From e09b2bd1c57158519eaae2e49ef6cbc306cbcefd Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 28 Mar 2021 12:11:23 +0200 Subject: [PATCH 1/2] tools/litex_json2dts: Fix gpio node gpio@f0003000: 'gpio-controller' is a required property From schema: Documentation/devicetree/bindings/gpio/litex,gpio.yaml gpio@f0003000: '#gpio-cells' is a required property From schema: Documentation/devicetree/bindings/gpio/litex,gpio.yaml Fix this by adding the missing properties. Signed-off-by: Geert Uytterhoeven --- litex/tools/litex_json2dts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litex/tools/litex_json2dts.py b/litex/tools/litex_json2dts.py index 0349a0bd0..835192709 100755 --- a/litex/tools/litex_json2dts.py +++ b/litex/tools/litex_json2dts.py @@ -287,6 +287,8 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False): leds: gpio@{leds_csr_base:x} {{ compatible = "litex,gpio"; reg = <0x{leds_csr_base:x} 0x4>; + gpio-controller; + #gpio-cells = <2>; litex,direction = "out"; status = "disabled"; }}; @@ -313,6 +315,8 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False): switches: gpio@{switches_csr_base:x} {{ compatible = "litex,gpio"; reg = <0x{switches_csr_base:x} 0x4>; + gpio-controller; + #gpio-cells = <2>; litex,direction = "in"; status = "disabled"; }}; From 24ad265a3be040625405f900d8d670f6367cb263 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 28 Mar 2021 12:42:40 +0200 Subject: [PATCH 2/2] tools/litex_json2dts: Fix i2c node i2c@f0000800: '#address-cells' is a required property From schema: Documentation/devicetree/bindings/i2c/litex,i2c.yaml i2c@f0000800: '#size-cells' is a required property From schema: Documentation/devicetree/bindings/i2c/litex,i2c.yaml Fix this by adding the missing properties. Signed-off-by: Geert Uytterhoeven --- litex/tools/litex_json2dts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litex/tools/litex_json2dts.py b/litex/tools/litex_json2dts.py index 835192709..8eeb325c7 100755 --- a/litex/tools/litex_json2dts.py +++ b/litex/tools/litex_json2dts.py @@ -355,6 +355,8 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False): i2c0: i2c@{i2c0_csr_base:x} {{ compatible = "litex,i2c"; reg = <0x{i2c0_csr_base:x} 0x5>; + #address-cells = <1>; + #size-cells = <0>; status = "okay"; }}; """.format(i2c0_csr_base=d["csr_bases"]["i2c0"])