Skip to contentSkip to conversation

Meson8 GPIO interrupt support

PATCH New Martin Blumenstingl 4 participants 10 messages Oct 29, 2017 – Dec 11, 2017

Subsystems (5)
lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

cover Meson8 GPIO interrupt support

This is a simple follow-up of two series from Jerome:
- "irqchip: meson: add support for the gpio interrupt controller"
- "ARM: meson: enable gpio interrupt controller"

This fills in the missing bits to have GPIO interrupt support on Meson8, which includes:
- a new binding in the driver with the correct IRQ number
- enabling the GPIO interrupt controller in meson8.dts
- enabling the GPIO interrupt controller via Kconfig for MACH_MESON8

Martin Blumenstingl (3):
irqchip/meson-gpio: add support for Meson8 SoCs
ARM: dts: meson8: enable the GPIO interrupt controller
ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 arch/arm/boot/dts/meson8.dtsi                                        | 5 +++++
 arch/arm/mach-meson/Kconfig                                          | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 4 files changed, 12 insertions(+)
Signature · 1 line
2.14.3
author reviewer
#1 lore raw

PATCH 1/3 irqchip/meson-gpio: add support for Meson8 SoCs

Meson8 uses the same GPIO interrupt controller IP block as the other Meson SoCs. A total of 134 pins can be spied on, which is the sum of:
- 22 pins on bank GPIOX
- 17 pins on bank GPIOY
- 30 pins on bank GPIODV
- 10 pins on bank GPIOH
- 15 pins on bank GPIOZ
- 7 pins on bank CARD
- 19 pins on bank BOOT
- 14 pins in the AO domain

---
 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 2 files changed, 6 insertions(+)
Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt +1 -0
index 633e21ce4b17..a83f9a5734ca 100644
@@ -10,6 +10,7 @@ number of interrupt exposed depends on the SoC.
 Required properties:
 
 - compatible : must have "amlogic,meson8-gpio-intc? and either
+   ?amlogic,meson8-gpio-intc? for meson8 SoCs (S802) or
    ?amlogic,meson8b-gpio-intc? for meson8b SoCs (S805) or
    ?amlogic,meson-gxbb-gpio-intc? for GXBB SoCs (S905) or
    ?amlogic,meson-gxl-gpio-intc? for GXL SoCs (S905X, S912)
drivers/irqchip/irq-meson-gpio.c +5 -0
index c7cc7e37a23c..a59bdbc0b9bb 100644
@@ -47,6 +47,10 @@ struct meson_gpio_irq_params {
 	unsigned int nr_hwirq;
 };
 
+static const struct meson_gpio_irq_params meson8_params = {
+	.nr_hwirq = 134,
+};
+
 static const struct meson_gpio_irq_params meson8b_params = {
 	.nr_hwirq = 119,
 };
@@ -60,6 +64,7 @@ static const struct meson_gpio_irq_params gxl_params = {
 };
 
 static const struct of_device_id meson_irq_gpio_matches[] = {
+	{ .compatible = "amlogic,meson8-gpio-intc", .data = &meson8_params },
 	{ .compatible = "amlogic,meson8b-gpio-intc", .data = &meson8b_params },
 	{ .compatible = "amlogic,meson-gxbb-gpio-intc", .data = &gxbb_params },
 	{ .compatible = "amlogic,meson-gxl-gpio-intc", .data = &gxl_params },
Signature · 1 line
2.14.3
maintainer
#2 lore raw

PATCH 1/3 irqchip/meson-gpio: add support for Meson8 SoCs

Quoted 11 lines · Martin Blumenstingl

Meson8 uses the same GPIO interrupt controller IP block as the other Meson SoCs. A total of 134 pins can be spied on, which is the sum of:
- 22 pins on bank GPIOX
- 17 pins on bank GPIOY
- 30 pins on bank GPIODV
- 10 pins on bank GPIOH
- 15 pins on bank GPIOZ
- 7 pins on bank CARD
- 19 pins on bank BOOT
- 14 pins in the AO domain

Quoted 5 lines
---
 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 2 files changed, 6 insertions(+)
author reviewer
#3 lore raw

PATCH 2/3 ARM: dts: meson8: enable the GPIO interrupt controller

In reply to Martin Blumenstingl

This enables the GPIO interrupt controller for the Meson8 SoCs. Interrupt support on the GPIOs can be used by the MMC framework to detect when an SD card is inserted/removed or by the input framework to detect button presses.

---
 arch/arm/boot/dts/meson8.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/meson8.dtsi +5 -0
index eb3f8161eef0..bedcbebc2433 100644
@@ -286,6 +286,11 @@
 	clock-names = "stmmaceth";
 };
 
+&gpio_intc {
+	compatible = "amlogic,meson8-gpio-intc", "amlogic,meson-gpio-intc";
+	status = "okay";
+};
+
 &hwrng {
 	compatible = "amlogic,meson8-rng", "amlogic,meson-rng";
 	clocks = <&clkc CLKID_RNG0>;
Signature · 1 line
2.14.3
author reviewer
#4 lore raw

PATCH 3/3 ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

In reply to Martin Blumenstingl

Now that the GPIO interrupt controller also supports the Meson8 SoCs we can enable it via Kconfig.

---
 arch/arm/mach-meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-meson/Kconfig +1 -0
index aff6164b2083..d90f61e6254f 100644
@@ -23,6 +23,7 @@ config MACH_MESON8
 	default ARCH_MESON
 	select MESON6_TIMER
 	select COMMON_CLK_MESON8B
+	select MESON_IRQ_GPIO
 
 config MACH_MESON8B
 	bool "Amlogic Meson8b SoCs support"
Signature · 1 line
2.14.3
#5 lore raw

cover Meson8 GPIO interrupt support

In reply to Martin Blumenstingl
Quoted 16 lines · Martin Blumenstingl

This is a simple follow-up of two series from Jerome:
- "irqchip: meson: add support for the gpio interrupt controller"
- "ARM: meson: enable gpio interrupt controller"

This fills in the missing bits to have GPIO interrupt support on Meson8, which includes:
- a new binding in the driver with the correct IRQ number
- enabling the GPIO interrupt controller in meson8.dts
- enabling the GPIO interrupt controller via Kconfig for MACH_MESON8

Martin Blumenstingl (3):
irqchip/meson-gpio: add support for Meson8 SoCs
ARM: dts: meson8: enable the GPIO interrupt controller
ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

Quoted 5 lines
 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 arch/arm/boot/dts/meson8.dtsi                                        | 5 +++++
 arch/arm/mach-meson/Kconfig                                          | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 4 files changed, 12 insertions(+)

Kevin, Carlos: Are you OK with this one? It seems pretty minor, and I'm happy to queue it if I get an Ack for it. If you'd rather get it through via armsoc, let me know.

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny.
maintainer
#6 lore raw

cover Meson8 GPIO interrupt support

Quoted 23 lines · Marc Zyngier
Quoted 16 lines · Martin Blumenstingl

This is a simple follow-up of two series from Jerome:
- "irqchip: meson: add support for the gpio interrupt controller"
- "ARM: meson: enable gpio interrupt controller"

This fills in the missing bits to have GPIO interrupt support on Meson8, which includes:
- a new binding in the driver with the correct IRQ number
- enabling the GPIO interrupt controller in meson8.dts
- enabling the GPIO interrupt controller via Kconfig for MACH_MESON8

Martin Blumenstingl (3):
irqchip/meson-gpio: add support for Meson8 SoCs
ARM: dts: meson8: enable the GPIO interrupt controller
ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

Quoted 5 lines
 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 arch/arm/boot/dts/meson8.dtsi                                        | 5 +++++
 arch/arm/mach-meson/Kconfig                                          | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 4 files changed, 12 insertions(+)
Quoted 3 lines

Kevin, Carlos: Are you OK with this one? It seems pretty minor, and I'm happy to queue it if I get an Ack for it. If you'd rather get it through via armsoc, let me know.

Can you take the drivers/irqchip and bindings patch (PATCH 1/3) and I'll take the rest to avoid conflicts with a bunch of other moving parts we have in arch/arm.

For the driver, feel free to add

Kevin

#7 lore raw

cover Meson8 GPIO interrupt support

Quoted 26 lines · Kevin Hilman
Quoted 24 lines · Marc Zyngier
Quoted 21 lines · Martin Blumenstingl

This is a simple follow-up of two series from Jerome:
- "irqchip: meson: add support for the gpio interrupt controller"
- "ARM: meson: enable gpio interrupt controller"

This fills in the missing bits to have GPIO interrupt support on Meson8, which includes:
- a new binding in the driver with the correct IRQ number
- enabling the GPIO interrupt controller in meson8.dts
- enabling the GPIO interrupt controller via Kconfig for MACH_MESON8

Martin Blumenstingl (3):
irqchip/meson-gpio: add support for Meson8 SoCs
ARM: dts: meson8: enable the GPIO interrupt controller
ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 arch/arm/boot/dts/meson8.dtsi                                        | 5 +++++
 arch/arm/mach-meson/Kconfig                                          | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 4 files changed, 12 insertions(+)
Quoted 7 lines
Quoted 3 lines

Kevin, Carlos: Are you OK with this one? It seems pretty minor, and I'm happy to queue it if I get an Ack for it. If you'd rather get it through via armsoc, let me know.

Can you take the drivers/irqchip and bindings patch (PATCH 1/3) and I'll take the rest to avoid conflicts with a bunch of other moving parts we have in arch/arm.

Sure, no problem.

Quoted 3 lines

For the driver, feel free to add

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny.
author reviewer
#8 lore raw

cover Meson8 GPIO interrupt support

In reply to Kevin Hilman

Hi Kevin,

Quoted 25 lines · Kevin Hilman
Quoted 23 lines · Marc Zyngier
Quoted 21 lines · Martin Blumenstingl

This is a simple follow-up of two series from Jerome:
- "irqchip: meson: add support for the gpio interrupt controller"
- "ARM: meson: enable gpio interrupt controller"

This fills in the missing bits to have GPIO interrupt support on Meson8, which includes:
- a new binding in the driver with the correct IRQ number
- enabling the GPIO interrupt controller in meson8.dts
- enabling the GPIO interrupt controller via Kconfig for MACH_MESON8

Martin Blumenstingl (3):
irqchip/meson-gpio: add support for Meson8 SoCs
ARM: dts: meson8: enable the GPIO interrupt controller
ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 arch/arm/boot/dts/meson8.dtsi                                        | 5 +++++
 arch/arm/mach-meson/Kconfig                                          | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 4 files changed, 12 insertions(+)
Quoted 7 lines
Quoted 3 lines

Kevin, Carlos: Are you OK with this one? It seems pretty minor, and I'm happy to queue it if I get an Ack for it. If you'd rather get it through via armsoc, let me know.

Can you take the drivers/irqchip and bindings patch (PATCH 1/3) and I'll take the rest to avoid conflicts with a bunch of other moving parts we have in arch/arm.

PATCH 1/3 even made it into v4.15
can you please queue the remaining two patches for v4.16 - or do you want me to re-send these?

thank you!
Martin

maintainer
#9 lore raw

cover Meson8 GPIO interrupt support

Quoted 32 lines · Martin Blumenstingl

Hi Kevin,

Quoted 29 lines · Kevin Hilman
Quoted 26 lines · Marc Zyngier
Quoted 16 lines · Martin Blumenstingl

This is a simple follow-up of two series from Jerome:
- "irqchip: meson: add support for the gpio interrupt controller"
- "ARM: meson: enable gpio interrupt controller"

This fills in the missing bits to have GPIO interrupt support on Meson8, which includes:
- a new binding in the driver with the correct IRQ number
- enabling the GPIO interrupt controller in meson8.dts
- enabling the GPIO interrupt controller via Kconfig for MACH_MESON8

Martin Blumenstingl (3):
irqchip/meson-gpio: add support for Meson8 SoCs
ARM: dts: meson8: enable the GPIO interrupt controller
ARM: meson: enable MESON_IRQ_GPIO also for MACH_MESON8

Quoted 5 lines
 .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt        | 1 +
 arch/arm/boot/dts/meson8.dtsi                                        | 5 +++++
 arch/arm/mach-meson/Kconfig                                          | 1 +
 drivers/irqchip/irq-meson-gpio.c                                     | 5 +++++
 4 files changed, 12 insertions(+)

Kevin, Carlos: Are you OK with this one? It seems pretty minor, and I'm happy to queue it if I get an Ack for it. If you'd rather get it through via armsoc, let me know.

Quoted 6 lines
Quoted 3 lines

Can you take the drivers/irqchip and bindings patch (PATCH 1/3) and I'll take the rest to avoid conflicts with a bunch of other moving parts we have in arch/arm.

PATCH 1/3 even made it into v4.15
can you please queue the remaining two patches for v4.16 - or do you want me to re-send these?

No need to resend, I've applied them to v4.16/dt.

Thanks for following up.

Kevin