OSDN Git Service

ARM: dts: add GPIO support for Airoha EN7523
authorJohn Crispin <john@phrozen.org>
Sun, 30 Jan 2022 14:51:16 +0000 (15:51 +0100)
committerMatthias Brugger <matthias.bgg@gmail.com>
Tue, 1 Mar 2022 08:04:45 +0000 (09:04 +0100)
Airoha's GPIO controller on their ARM EN7523 SoCs consists of two banks of 32
GPIOs

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20220130145116.88406-14-nbd@nbd.name
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm/boot/dts/en7523-evb.dts
arch/arm/boot/dts/en7523.dtsi

index 69754ef..a8d8bb0 100644 (file)
                reg = <0x80000000 0x20000000>;
        };
 };
+
+&gpio0 {
+       status = "okay";
+};
+
+&gpio1 {
+       status = "okay";
+};
index f1d4c03..36597f5 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        interrupt-parent = <&gic>;
                clock-frequency = <1843200>;
                status = "okay";
        };
+
+       gpio0: gpio@1fbf0200 {
+               compatible = "airoha,en7523-gpio";
+               reg = <0x1fbf0204 0x4>,
+                     <0x1fbf0200 0x4>,
+                     <0x1fbf0220 0x4>,
+                     <0x1fbf0214 0x4>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpio1: gpio@1fbf0270 {
+               compatible = "airoha,en7523-gpio";
+               reg = <0x1fbf0270 0x4>,
+                     <0x1fbf0260 0x4>,
+                     <0x1fbf0264 0x4>,
+                     <0x1fbf0278 0x4>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
 };