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 <geert@linux-m68k.org>
This commit is contained in:
Geert Uytterhoeven 2021-03-28 12:11:23 +02:00
parent b858dd62e9
commit e09b2bd1c5
1 changed files with 4 additions and 0 deletions

View File

@ -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";
}};