This patch adds GPIO interrupt support for Amloigc-T7 SoC (A311D2)
Huqiang Qin (3):
dt-bindings: interrupt-controller: Add support for Amlogic-T7 SoCs
irqchip: Add support for Amlogic-T7 SoCs
arm64: dts: Add gpio_intc node for Amlogic-T7 SoCs
.../interrupt-controller/amlogic,meson-gpio-intc.yaml | 1 +
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 10 ++++++++++
drivers/irqchip/irq-meson-gpio.c | 5 +++++
3 files changed, 16 insertions(+)
--
2.42.0
Add GPIO interrupt controller device.
Signed-off-by: Huqiang Qin <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index ad1cac42e9d8..5248bdf824ea 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -171,6 +171,16 @@ gpio: bank@4000 {
};
};
+ gpio_intc: interrupt-controller@4080 {
+ compatible = "amlogic,t7-gpio-intc",
+ "amlogic,meson-gpio-intc";
+ reg = <0x0 0x4080 0x0 0x20>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ amlogic,channel-interrupts =
+ <10 11 12 13 14 15 16 17 18 19 20 21>;
+ };
+
uart_a: serial@78000 {
compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
reg = <0x0 0x78000 0x0 0x18>;
--
2.42.0
The Amlogic-T7 SoCs support 12 GPIO IRQ lines compared with previous
serial chips and have something different, details are as below.
IRQ Number:
- 156 1 pin on bank TESTN
- 155:148 8 pins on bank H
- 147:129 19 pins on bank Y
- 128:115 14 pins on bank M
- 114:91 24 pins on bank T
- 90:77 14 pins on bank Z
- 76:70 7 pins on bank E
- 69:57 13 pins on bank D
- 56:40 17 pins on bank W
- 39:20 20 pins on bank X
- 19:13 7 pins on bank C
- 12:0 13 pins on bank B
Signed-off-by: Huqiang Qin <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
---
drivers/irqchip/irq-meson-gpio.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
index f88df39f4129..9a1791908598 100644
--- a/drivers/irqchip/irq-meson-gpio.c
+++ b/drivers/irqchip/irq-meson-gpio.c
@@ -154,6 +154,10 @@ static const struct meson_gpio_irq_params c3_params = {
INIT_MESON_S4_COMMON_DATA(55)
};
+static const struct meson_gpio_irq_params t7_params = {
+ INIT_MESON_S4_COMMON_DATA(157)
+};
+
static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
{ .compatible = "amlogic,meson8-gpio-intc", .data = &meson8_params },
{ .compatible = "amlogic,meson8b-gpio-intc", .data = &meson8b_params },
@@ -165,6 +169,7 @@ static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
{ .compatible = "amlogic,meson-a1-gpio-intc", .data = &a1_params },
{ .compatible = "amlogic,meson-s4-gpio-intc", .data = &s4_params },
{ .compatible = "amlogic,c3-gpio-intc", .data = &c3_params },
+ { .compatible = "amlogic,t7-gpio-intc", .data = &t7_params },
{ }
};
--
2.42.0
Update dt-binding document for GPIO interrupt controller
of Amlogic-T7 SoCs.
Signed-off-by: Huqiang Qin <[email protected]>
Acked-by: Conor Dooley <[email protected]>
---
.../bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
index 3d06db98e978..a93744763787 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
@@ -36,6 +36,7 @@ properties:
- amlogic,meson-a1-gpio-intc
- amlogic,meson-s4-gpio-intc
- amlogic,c3-gpio-intc
+ - amlogic,t7-gpio-intc
- const: amlogic,meson-gpio-intc
reg:
--
2.42.0
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 3f734564a03df595c671316314b65a465d333f4a
Gitweb: https://git.kernel.org/tip/3f734564a03df595c671316314b65a465d333f4a
Author: Huqiang Qin <[email protected]>
AuthorDate: Thu, 22 Feb 2024 15:46:39 +08:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Thu, 22 Feb 2024 18:04:43 +01:00
arm64: dts: Add gpio_intc node for Amlogic-T7 SoCs
Add GPIO interrupt controller device.
Signed-off-by: Huqiang Qin <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index a03c766..2bfe2c4 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -171,6 +171,16 @@
};
};
+ gpio_intc: interrupt-controller@4080 {
+ compatible = "amlogic,t7-gpio-intc",
+ "amlogic,meson-gpio-intc";
+ reg = <0x0 0x4080 0x0 0x20>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ amlogic,channel-interrupts =
+ <10 11 12 13 14 15 16 17 18 19 20 21>;
+ };
+
uart_a: serial@78000 {
compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
reg = <0x0 0x78000 0x0 0x18>;
The following commit has been merged into the irq/core branch of tip:
Commit-ID: e281bfa6f759b667357454c1d3d283f7a52871da
Gitweb: https://git.kernel.org/tip/e281bfa6f759b667357454c1d3d283f7a52871da
Author: Huqiang Qin <[email protected]>
AuthorDate: Thu, 22 Feb 2024 15:46:38 +08:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Thu, 22 Feb 2024 18:04:42 +01:00
irqchip/meson-gpio: Add support for Amlogic-T7 SoCs
The Amlogic-T7 SoCs support 12 GPIO IRQ lines compared with previous
serial chips and have something different, details are as below.
IRQ Number:
- 156 1 pin on bank TESTN
- 155:148 8 pins on bank H
- 147:129 19 pins on bank Y
- 128:115 14 pins on bank M
- 114:91 24 pins on bank T
- 90:77 14 pins on bank Z
- 76:70 7 pins on bank E
- 69:57 13 pins on bank D
- 56:40 17 pins on bank W
- 39:20 20 pins on bank X
- 19:13 7 pins on bank C
- 12:0 13 pins on bank B
Signed-off-by: Huqiang Qin <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
drivers/irqchip/irq-meson-gpio.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
index f88df39..9a17919 100644
--- a/drivers/irqchip/irq-meson-gpio.c
+++ b/drivers/irqchip/irq-meson-gpio.c
@@ -154,6 +154,10 @@ static const struct meson_gpio_irq_params c3_params = {
INIT_MESON_S4_COMMON_DATA(55)
};
+static const struct meson_gpio_irq_params t7_params = {
+ INIT_MESON_S4_COMMON_DATA(157)
+};
+
static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
{ .compatible = "amlogic,meson8-gpio-intc", .data = &meson8_params },
{ .compatible = "amlogic,meson8b-gpio-intc", .data = &meson8b_params },
@@ -165,6 +169,7 @@ static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
{ .compatible = "amlogic,meson-a1-gpio-intc", .data = &a1_params },
{ .compatible = "amlogic,meson-s4-gpio-intc", .data = &s4_params },
{ .compatible = "amlogic,c3-gpio-intc", .data = &c3_params },
+ { .compatible = "amlogic,t7-gpio-intc", .data = &t7_params },
{ }
};
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 4a0705bb83d6edc7207e94d8d07ba5e5c27814b8
Gitweb: https://git.kernel.org/tip/4a0705bb83d6edc7207e94d8d07ba5e5c27814b8
Author: Huqiang Qin <[email protected]>
AuthorDate: Thu, 22 Feb 2024 15:46:37 +08:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Thu, 22 Feb 2024 18:04:42 +01:00
dt-bindings: interrupt-controller: Add support for Amlogic-T7 SoCs
Update dt-binding document for GPIO interrupt controller
of Amlogic-T7 SoCs.
Signed-off-by: Huqiang Qin <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
index 3d06db9..a937447 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
@@ -36,6 +36,7 @@ properties:
- amlogic,meson-a1-gpio-intc
- amlogic,meson-s4-gpio-intc
- amlogic,c3-gpio-intc
+ - amlogic,t7-gpio-intc
- const: amlogic,meson-gpio-intc
reg: