[openwrt/openwrt] bmips: document GPIO external interrupts

LEDE Commits lede-commits at lists.infradead.org
Thu Apr 27 07:37:34 PDT 2023


noltari pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e9f5b773d29ef6d10f5e23e21edb1897a8d828e6

commit e9f5b773d29ef6d10f5e23e21edb1897a8d828e6
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Thu Apr 27 13:47:24 2023 +0200

    bmips: document GPIO external interrupts
    
    BCM63xx SoCs have an external interrupt controller which can be used for
    specific GPIO keys.
    
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 target/linux/bmips/dts/bcm6318.dtsi                |  1 +
 target/linux/bmips/dts/bcm63268.dtsi               |  1 +
 target/linux/bmips/dts/bcm6328.dtsi                |  1 +
 target/linux/bmips/dts/bcm6358.dtsi                |  1 +
 target/linux/bmips/dts/bcm6362.dtsi                |  1 +
 target/linux/bmips/dts/bcm6368.dtsi                |  1 +
 .../bcm6318-interrupt-controller.h                 |  5 +++++
 .../bcm63268-interrupt-controller.h                |  9 +++++++--
 .../bcm6328-interrupt-controller.h                 |  5 +++++
 .../bcm6358-interrupt-controller.h                 |  7 +++++++
 .../bcm6362-interrupt-controller.h                 |  7 ++++++-
 .../bcm6368-interrupt-controller.h                 | 23 ++++++++++++++--------
 12 files changed, 51 insertions(+), 11 deletions(-)

diff --git a/target/linux/bmips/dts/bcm6318.dtsi b/target/linux/bmips/dts/bcm6318.dtsi
index fc5085c506..28c656d090 100644
--- a/target/linux/bmips/dts/bcm6318.dtsi
+++ b/target/linux/bmips/dts/bcm6318.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/bcm6318-interrupt-controller.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/reset/bcm6318-reset.h>
 #include <dt-bindings/soc/bcm6318-pm.h>
 
diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi
index e30cdd862f..f9a31d36ef 100644
--- a/target/linux/bmips/dts/bcm63268.dtsi
+++ b/target/linux/bmips/dts/bcm63268.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/bcm63268-interrupt-controller.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/reset/bcm63268-reset.h>
 #include <dt-bindings/soc/bcm63268-pm.h>
 
diff --git a/target/linux/bmips/dts/bcm6328.dtsi b/target/linux/bmips/dts/bcm6328.dtsi
index d61903e154..f45f94f5b8 100644
--- a/target/linux/bmips/dts/bcm6328.dtsi
+++ b/target/linux/bmips/dts/bcm6328.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/bcm6328-interrupt-controller.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/reset/bcm6328-reset.h>
 #include <dt-bindings/soc/bcm6328-pm.h>
 
diff --git a/target/linux/bmips/dts/bcm6358.dtsi b/target/linux/bmips/dts/bcm6358.dtsi
index eb8ca0c10d..b56ec698ba 100644
--- a/target/linux/bmips/dts/bcm6358.dtsi
+++ b/target/linux/bmips/dts/bcm6358.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/bcm6358-interrupt-controller.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/reset/bcm6358-reset.h>
 
 / {
diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi
index d7fff43c44..e615eaf8b3 100644
--- a/target/linux/bmips/dts/bcm6362.dtsi
+++ b/target/linux/bmips/dts/bcm6362.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/bcm6362-interrupt-controller.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/reset/bcm6362-reset.h>
 #include <dt-bindings/soc/bcm6362-pm.h>
 
diff --git a/target/linux/bmips/dts/bcm6368.dtsi b/target/linux/bmips/dts/bcm6368.dtsi
index baa1c43417..0ac1269166 100644
--- a/target/linux/bmips/dts/bcm6368.dtsi
+++ b/target/linux/bmips/dts/bcm6368.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/bcm6368-interrupt-controller.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/reset/bcm6368-reset.h>
 
 / {
diff --git a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6318-interrupt-controller.h b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6318-interrupt-controller.h
index 34bf929eda..91d70377cc 100644
--- a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6318-interrupt-controller.h
+++ b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6318-interrupt-controller.h
@@ -81,4 +81,9 @@
 #define BCM6318_IRQ_EPHY2_IDDQ_ENERGY	78
 #define BCM6318_IRQ_EPHY3_IDDQ_ENERGY	79
 
+#define BCM6318_EXTIRQ_0		0 /* GPIO 33 */
+#define BCM6318_EXTIRQ_1		1
+#define BCM6318_EXTIRQ_2		2
+#define BCM6318_EXTIRQ_3		3
+
 #endif /* __DT_BINDINGS_INTERRUPT_CONTROLLER_BCM6318_H */
diff --git a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm63268-interrupt-controller.h b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm63268-interrupt-controller.h
index 84a5f44611..90b7890f50 100644
--- a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm63268-interrupt-controller.h
+++ b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm63268-interrupt-controller.h
@@ -35,9 +35,9 @@
 #define BCM63268_IRQ_ATM_DMA3		29
 #define BCM63268_IRQ_WAKE_ON_IRQ	30
 #define BCM63268_IRQ_GPHY		31
-#define BCM63268_IRQ_DECT0              32		
+#define BCM63268_IRQ_DECT0              32
 #define BCM63268_IRQ_DECT1		33
-#define BCM63268_IRQ_UART1              34		
+#define BCM63268_IRQ_UART1              34
 #define BCM63268_IRQ_WLAN_GPIO		35
 #define BCM63268_IRQ_USB_CTL_TX_DMA	36
 #define BCM63268_IRQ_USB_BULK_TX_DMA	37
@@ -83,4 +83,9 @@
 #define BCM63268_IRQ_ATM_DMA19		79
 #define BCM63268_IRQ_LSSPI		80
 
+#define BCM63268_EXTIRQ_0		0 /* GPIO 32 */
+#define BCM63268_EXTIRQ_1		1 /* GPIO 33 */
+#define BCM63268_EXTIRQ_2		2 /* GPIO 34 */
+#define BCM63268_EXTIRQ_3		3 /* GPIO 35 */
+
 #endif /* __DT_BINDINGS_INTERRUPT_CONTROLLER_BCM63268_H */
diff --git a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6328-interrupt-controller.h b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6328-interrupt-controller.h
index 1f5192d9fe..2a6a1da888 100644
--- a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6328-interrupt-controller.h
+++ b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6328-interrupt-controller.h
@@ -65,4 +65,9 @@
 #define BCM6328_IRQ_ATM_DMA19		62
 #define BCM6328_IRQ_SAR			63
 
+#define BCM6328_EXTIRQ_0		0 /* GPIO 23 */
+#define BCM6328_EXTIRQ_1		1 /* GPIO 24 */
+#define BCM6328_EXTIRQ_2		2 /* GPIO 15 */
+#define BCM6328_EXTIRQ_3		3 /* GPIO 12 */
+
 #endif /* __DT_BINDINGS_INTERRUPT_CONTROLLER_BCM6328_H */
diff --git a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6358-interrupt-controller.h b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6358-interrupt-controller.h
index dc412d1f59..51c7e50cf4 100644
--- a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6358-interrupt-controller.h
+++ b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6358-interrupt-controller.h
@@ -35,4 +35,11 @@
 #define BCM6358_IRQ_DG			30
 #define BCM6358_IRQ_MPI			31
 
+#define BCM6358_EXTIRQ0_0		0 /* GPIO 34 */
+#define BCM6358_EXTIRQ0_1		1 /* GPIO 35 */
+#define BCM6358_EXTIRQ0_2		2 /* GPIO 36 */
+#define BCM6358_EXTIRQ0_3		3 /* GPIO 37 */
+#define BCM6358_EXTIRQ1_4		0 /* GPIO 32 */
+#define BCM6358_EXTIRQ1_5		1 /* GPIO 33 */
+
 #endif /* __DT_BINDINGS_INTERRUPT_CONTROLLER_BCM6358_H */
diff --git a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6362-interrupt-controller.h b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6362-interrupt-controller.h
index 2cb329204a..bec089b159 100644
--- a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6362-interrupt-controller.h
+++ b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6362-interrupt-controller.h
@@ -65,7 +65,12 @@
 #define BCM6362_IRQ_ATM_DMA15		59
 #define BCM6362_IRQ_ATM_DMA16		60
 #define BCM6362_IRQ_ATM_DMA17		61
-#define BCM6362_IRQ_ATM_DMA18		62		
+#define BCM6362_IRQ_ATM_DMA18		62
 #define BCM6362_IRQ_ATM_DMA19		63
 
+#define BCM6362_EXTIRQ_0		0 /* GPIO 24 */
+#define BCM6362_EXTIRQ_1		1 /* GPIO 25 */
+#define BCM6362_EXTIRQ_2		2 /* GPIO 26 */
+#define BCM6362_EXTIRQ_3		3 /* GPIO 27 */
+
 #endif /* __DT_BINDINGS_INTERRUPT_CONTROLLER_BCM6362_H */
diff --git a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6368-interrupt-controller.h b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6368-interrupt-controller.h
index 96a73d645e..0f36200749 100644
--- a/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6368-interrupt-controller.h
+++ b/target/linux/bmips/files/include/dt-bindings/interrupt-controller/bcm6368-interrupt-controller.h
@@ -35,14 +35,14 @@
 #define BCM6368_IRQ_USB_BULK_TX_DMA	29
 #define BCM6368_IRQ_USB_ISO_RX_DMA	30
 #define BCM6368_IRQ_USB_ISO_TX_DMA	31
-#define BCM6368_IRQ_ENETSW_RX_DMA0	32	
-#define BCM6368_IRQ_ENETSW_RX_DMA1	33	
-#define BCM6368_IRQ_ENETSW_RX_DMA2	34	
-#define BCM6368_IRQ_ENETSW_RX_DMA3	35	
-#define BCM6368_IRQ_ENETSW_TX_DMA0	36	
-#define BCM6368_IRQ_ENETSW_TX_DMA1	37	
-#define BCM6368_IRQ_ENETSW_TX_DMA2	38	
-#define BCM6368_IRQ_ENETSW_TX_DMA3	39	
+#define BCM6368_IRQ_ENETSW_RX_DMA0	32
+#define BCM6368_IRQ_ENETSW_RX_DMA1	33
+#define BCM6368_IRQ_ENETSW_RX_DMA2	34
+#define BCM6368_IRQ_ENETSW_RX_DMA3	35
+#define BCM6368_IRQ_ENETSW_TX_DMA0	36
+#define BCM6368_IRQ_ENETSW_TX_DMA1	37
+#define BCM6368_IRQ_ENETSW_TX_DMA2	38
+#define BCM6368_IRQ_ENETSW_TX_DMA3	39
 #define BCM6368_IRQ_ATM_DMA0		40
 #define BCM6368_IRQ_ATM_DMA1		41
 #define BCM6368_IRQ_ATM_DMA2		42
@@ -68,4 +68,11 @@
 #define BCM6368_IRQ_PCM_DMA0		62
 #define BCM6368_IRQ_PCM_DMA1		63
 
+#define BCM6368_EXTIRQ0_0		0 /* GPIO 34 */
+#define BCM6368_EXTIRQ0_1		1 /* GPIO 35 */
+#define BCM6368_EXTIRQ0_2		2 /* GPIO 36 */
+#define BCM6368_EXTIRQ0_3		3 /* GPIO 37 */
+#define BCM6368_EXTIRQ1_4		0 /* GPIO 32 */
+#define BCM6368_EXTIRQ1_5		1 /* GPIO 33 */
+
 #endif /* __DT_BINDINGS_INTERRUPT_CONTROLLER_BCM6368_H */




More information about the lede-commits mailing list