Skip to contentSkip to conversation

ARM: meson: enable gpio interrupt controller

PATCH Applied Jerome Brunet 3 participants 8 messages Oct 19, 2017 – Oct 30, 2017

Subsystems (5)
lore
Share & tools
lore

Jerome Brunet

author reviewer
#0 lore raw

cover ARM: meson: enable gpio interrupt controller

This patchset enables gpio interrupt controller found on the meson SoC family. ATM, it supports meson8b, gxbb and gxl. The meson8 has been left out because I don't have the documentation of this particular SoC.

The last patch uses the interrupts provided by this controller with the external ethernet PHY found on a few platforms.

Jerome Brunet (5):
ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b
ARM64: meson: enable MESON_IRQ_GPIO in Kconfig
ARM: dts: meson8b: enable gpio interrupt controller
ARM64: dts: meson-gx: add gpio interrupt controller
ARM64: dts: meson-gx: add external PHY interrupt on some platforms

 arch/arm/boot/dts/meson.dtsi                         | 9 +++++++++
 arch/arm/boot/dts/meson8b.dtsi                       | 6 ++++++
 arch/arm/mach-meson/Kconfig                          | 1 +
 arch/arm64/Kconfig.platforms                         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi            | 9 +++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts      | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi          | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi           | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts       | 2 ++
 12 files changed, 48 insertions(+)
Signature · 1 line
2.13.6
author reviewer
#1 lore raw

PATCH 1/5 ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b

select MESON_IRQ_GPIO in Kconfig for Amlogic's meson8b SoC

---
 arch/arm/mach-meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-meson/Kconfig +1 -0
index ee30511849ca..dc4830bb80fc 100644
@@ -28,5 +28,6 @@ config MACH_MESON8B
 	default ARCH_MESON
 	select MESON6_TIMER
 	select COMMON_CLK_MESON8B
+	select MESON_IRQ_GPIO
 
 endif
Signature · 1 line
2.13.6
author reviewer
#2 lore raw

PATCH 2/5 ARM64: meson: enable MESON_IRQ_GPIO in Kconfig

In reply to Jerome Brunet

select MESON_IRQ_GPIO in Kconfig for Amlogic's meson SoC family

---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
index 6b54ee8c1262..5d5e79e8d556 100644
@@ -104,6 +104,7 @@ config ARCH_MESON
 	select PINCTRL_MESON
 	select COMMON_CLK_AMLOGIC
 	select COMMON_CLK_GXBB
+	select MESON_IRQ_GPIO
 	help
 	  This enables support for the Amlogic S905 SoCs.
 
Signature · 1 line
2.13.6
author reviewer
#3 lore raw

PATCH 3/5 ARM: dts: meson8b: enable gpio interrupt controller

In reply to Jerome Brunet

Add gpio interrupt controller node to the meson8b boards

---
 arch/arm/boot/dts/meson.dtsi   | 9 +++++++++
 arch/arm/boot/dts/meson8b.dtsi | 6 ++++++
 2 files changed, 15 insertions(+)
arch/arm/boot/dts/meson.dtsi +9 -0
index 290a183e87c5..3d18ecc2bef1 100644
@@ -85,6 +85,15 @@
 				reg = <0x7c00 0x200>;
 			};
 
+			gpio_intc: interrupt-controller at 9880 {
+				compatible = "amlogic,meson-gpio-intc";
+				reg = <0xc1109880 0x10>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
+				status = "disabled";
+			};
+
 			hwrng: rng at 8100 {
 				compatible = "amlogic,meson-rng";
 				reg = <0x8100 0x8>;
arch/arm/boot/dts/meson8b.dtsi +6 -0
index 40cfe5c8df6a..574aafa3db83 100644
@@ -179,6 +179,12 @@
 	clock-names = "stmmaceth";
 };
 
+&gpio_intc {
+	compatible = "amlogic,meson-gpio-intc",
+		     "amlogic,meson8b-gpio-intc";
+	status = "okay";
+};
+
 &hwrng {
 	compatible = "amlogic,meson8b-rng", "amlogic,meson-rng";
 	clocks = <&clkc CLKID_RNG0>;
Signature · 1 line
2.13.6
author reviewer
#4 lore raw

PATCH 4/5 ARM64: dts: meson-gx: add gpio interrupt controller

In reply to Jerome Brunet

Add gpio interrupt controller to Amlogic GX family SoCs

---
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi   | 9 +++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi  | 6 ++++++
 3 files changed, 21 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +9 -0
index b7723436a04b..ab7ce1644cdc 100644
@@ -218,6 +218,15 @@
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xc1100000 0x0 0x100000>;
 
+			gpio_intc: interrupt-controller at 9880 {
+				compatible = "amlogic,meson-gpio-intc";
+				reg = <0x0 0x9880 0x0 0x10>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
+				status = "disabled";
+			};
+
 			reset: reset-controller at 4404 {
 				compatible = "amlogic,meson-gx-reset", "amlogic,meson-gxbb-reset";
 				reg = <0x0 0x04404 0x0 0x20>;
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +6 -0
index 3d41db9c9d22..ead895a4e9a5 100644
@@ -323,6 +323,12 @@
 	clock-names = "stmmaceth", "clkin0", "clkin1";
 };
 
+&gpio_intc {
+	compatible = "amlogic,meson-gpio-intc",
+		     "amlogic,meson-gxbb-gpio-intc";
+	status = "okay";
+};
+
 &hdmi_tx {
 	compatible = "amlogic,meson-gxbb-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
 	resets = <&reset RESET_HDMITX_CAPB3>,
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +6 -0
index d3a51031a711..0aa71a35ce64 100644
@@ -225,6 +225,12 @@
 	compatible = "amlogic,meson-gxl-aoclkc", "amlogic,meson-gx-aoclkc";
 };
 
+&gpio_intc {
+	compatible = "amlogic,meson-gpio-intc",
+		     "amlogic,meson-gxl-gpio-intc";
+	status = "okay";
+};
+
 &hdmi_tx {
 	compatible = "amlogic,meson-gxl-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
 	resets = <&reset RESET_HDMITX_CAPB3>,
Signature · 1 line
2.13.6
author reviewer
#5 lore raw

PATCH 5/5 ARM64: dts: meson-gx: add external PHY interrupt on some platforms

In reply to Jerome Brunet

Add the external PHY interrupt on the nanopi-k2, odroid-c2, p200, p230 and q200

---
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts      | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts       | 2 ++
 5 files changed, 10 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +2 -0
index 2e853c082a65..4a4251001bfd 100644
@@ -168,6 +168,8 @@
 		eth_phy0: ethernet-phy at 0 {
 			/* Realtek RTL8211F (0x001cc916) */
 			reg = <0>;
+			interrupt-parent = <&gpio_intc>;
+			interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
 		};
 	};
 };
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -0
index 1deaa53c9fb5..fac5c3eeb07d 100644
@@ -157,6 +157,8 @@
 
 		eth_phy0: ethernet-phy at 0 {
 			reg = <0>;
+			interrupt-parent = <&gpio_intc>;
+			interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
 			eee-broken-1000t;
 		};
 	};
arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts +2 -0
index 2054a474e0a9..9bf16bb7c491 100644
@@ -117,6 +117,8 @@
 		eth_phy0: ethernet-phy at 3 {
 			/* Micrel KSZ9031 (0x00221620) */
 			reg = <3>;
+			interrupt-parent = <&gpio_intc>;
+			interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
 		};
 	};
 };
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts +2 -0
index 6827f235d7cf..4f3f03fc31b0 100644
@@ -128,6 +128,8 @@
 		compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
+		interrupt-parent = <&gpio_intc>;
+		interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
 	};
 };
 
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts +2 -0
index b65776b01911..66c6da7e112c 100644
@@ -110,6 +110,8 @@
 		compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
+		interrupt-parent = <&gpio_intc>;
+		interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
 	};
 };
 
Signature · 1 line
2.13.6
Reviewed-by on the v1 series
#6 lore raw
In reply to Jerome Brunet
Quoted 14 lines · Jerome Brunet

This patchset enables gpio interrupt controller found on the meson SoC family. ATM, it supports meson8b, gxbb and gxl. The meson8 has been left out because I don't have the documentation of this particular SoC.

The last patch uses the interrupts provided by this controller with the external ethernet PHY found on a few platforms.

Jerome Brunet (5):
ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b
ARM64: meson: enable MESON_IRQ_GPIO in Kconfig
ARM: dts: meson8b: enable gpio interrupt controller
ARM64: dts: meson-gx: add gpio interrupt controller
ARM64: dts: meson-gx: add external PHY interrupt on some platforms

Quoted 14 lines
 arch/arm/boot/dts/meson.dtsi                         | 9 +++++++++
 arch/arm/boot/dts/meson8b.dtsi                       | 6 ++++++
 arch/arm/mach-meson/Kconfig                          | 1 +
 arch/arm64/Kconfig.platforms                         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi            | 9 +++++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts      | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi          | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 ++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi           | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts       | 2 ++
 12 files changed, 48 insertions(+)
maintainer Applied
#7 lore raw
In reply to Jerome Brunet
Quoted 7 lines · Jerome Brunet

This patchset enables gpio interrupt controller found on the meson SoC family. ATM, it supports meson8b, gxbb and gxl. The meson8 has been left out because I don't have the documentation of this particular SoC.

The last patch uses the interrupts provided by this controller with the external ethernet PHY found on a few platforms.

Quoted 6 lines

Jerome Brunet (5):
ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b
ARM64: meson: enable MESON_IRQ_GPIO in Kconfig
ARM: dts: meson8b: enable gpio interrupt controller
ARM64: dts: meson-gx: add gpio interrupt controller
ARM64: dts: meson-gx: add external PHY interrupt on some platforms

Applied,

Kevin