From 28e5601cb736c1be9cf37c9bc4196a3df9695106 Mon Sep 17 00:00:00 2001
From: Lukasz Kotasa <lukasz.kotasa@iopsys.eu>
Date: Tue, 25 Jan 2022 12:17:15 +0100
Subject: [PATCH] iopsys-econet: en7523-gpio entries in arcee/rodimus dts

---
 iopsys-econet/dts/arcee.dts   | 41 +++++++++++++++++++++++++++++++----
 iopsys-econet/dts/rodimus.dts | 24 ++++++++++++++++----
 2 files changed, 57 insertions(+), 8 deletions(-)

diff --git a/iopsys-econet/dts/arcee.dts b/iopsys-econet/dts/arcee.dts
index 3db333271..846fc6bcc 100755
--- a/iopsys-econet/dts/arcee.dts
+++ b/iopsys-econet/dts/arcee.dts
@@ -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>
 
 /dts-v1/;
 
@@ -323,10 +324,42 @@
         interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
         //status = "disabled";
     };
-	gpio@1fbf0200 {
-		compatible = "econet,ecnt-gpio";
-		reg = <0x1fbf0200 0x80>;
-	};
+
+       leds {
+               compatible = "gpio-leds";
+               led1 {
+                       label = "green:led1";
+                       gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+                       };
+               led2 {
+                       label = "red:led2";
+                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+               };
+               led3 {
+                       label = "blue:led3";
+                       gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       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>;
+
 
 	spi_ctrl: spi_controller@1fa10000 {
 		compatible = "econet,ecnt-spi_ctrl";
diff --git a/iopsys-econet/dts/rodimus.dts b/iopsys-econet/dts/rodimus.dts
index 3db333271..61a648f3c 100755
--- a/iopsys-econet/dts/rodimus.dts
+++ b/iopsys-econet/dts/rodimus.dts
@@ -323,10 +323,26 @@
         interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
         //status = "disabled";
     };
-	gpio@1fbf0200 {
-		compatible = "econet,ecnt-gpio";
-		reg = <0x1fbf0200 0x80>;
-	};
+
+       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>;
+
 
 	spi_ctrl: spi_controller@1fa10000 {
 		compatible = "econet,ecnt-spi_ctrl";
-- 
GitLab