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