linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs
@ 2019-06-15 10:43 Martin Blumenstingl
  2019-06-15 10:43 ` [PATCH v2 1/2] arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Martin Blumenstingl @ 2019-06-15 10:43 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel, narmstrong

Avoid polling of the PHY status by passing the Ethernet PHY's GPIO
interrupt line to the PHY node.

I tested this successfully on my X96 Max, but I don't have an Odroid-N2
to test it there. The reset and interrupt GPIO part of the schematics
seems to be identical for both boards (and probably other "reference
design" based boards as well).

This depends on my other series "Ethernet PHY reset GPIO updates for
Amlogic SoCs" from [0]


Changes since v1 at [1]:
- added Neil's Tested/Acked-by (thank you!)
- rebased on top of v3 of my other series
- updated cover-letter since the GPIO interrupt controller support
  is now merged so it's not a dependency anymore


[0] https://patchwork.kernel.org/cover/10997069/
[1] https://patchwork.kernel.org/cover/10985175/


Martin Blumenstingl (2):
  arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt
    line
  arm64: dts: meson: g12a: x96-max: add the Ethernet PHY interrupt line

 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts   | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 4 ++++
 2 files changed, 8 insertions(+)

-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line
  2019-06-15 10:43 [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Martin Blumenstingl
@ 2019-06-15 10:43 ` Martin Blumenstingl
  2019-06-15 10:43 ` [PATCH v2 2/2] arm64: dts: meson: g12a: x96-max: " Martin Blumenstingl
  2019-06-20  3:41 ` [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Kevin Hilman
  2 siblings, 0 replies; 4+ messages in thread
From: Martin Blumenstingl @ 2019-06-15 10:43 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel, narmstrong

The interrupt line of the RTL8211F PHY is routed to the GPIOZ_14 pad.
Describe this in the device tree so the PHY framework doesn't have to
poll the PHY status.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index 82b42c073c5e..81780ffcc7f0 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -254,6 +254,10 @@
 		reset-assert-us = <10000>;
 		reset-deassert-us = <30000>;
 		reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
+
+		interrupt-parent = <&gpio_intc>;
+		/* MAC_INTR on GPIOZ_14 */
+		interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
 	};
 };
 
-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] arm64: dts: meson: g12a: x96-max: add the Ethernet PHY interrupt line
  2019-06-15 10:43 [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Martin Blumenstingl
  2019-06-15 10:43 ` [PATCH v2 1/2] arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line Martin Blumenstingl
@ 2019-06-15 10:43 ` Martin Blumenstingl
  2019-06-20  3:41 ` [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Kevin Hilman
  2 siblings, 0 replies; 4+ messages in thread
From: Martin Blumenstingl @ 2019-06-15 10:43 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel, narmstrong

X96 Max has the PHY reset and interrupt lines are identical to the
Odroid-N2:
- GPIOZ_14 is the interrupt on X96 Max
- GPIOZ_15 is the reset line on X96 Max

Add GPIOZ_14 as PHY interrupt line on the X96 Max so we don't have to
poll for the PHY status.

Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 3f9385553132..fe4013cca876 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -289,6 +289,10 @@
 		reset-assert-us = <10000>;
 		reset-deassert-us = <30000>;
 		reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
+
+		interrupt-parent = <&gpio_intc>;
+		/* MAC_INTR on GPIOZ_14 */
+		interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
 	};
 };
 
-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs
  2019-06-15 10:43 [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Martin Blumenstingl
  2019-06-15 10:43 ` [PATCH v2 1/2] arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line Martin Blumenstingl
  2019-06-15 10:43 ` [PATCH v2 2/2] arm64: dts: meson: g12a: x96-max: " Martin Blumenstingl
@ 2019-06-20  3:41 ` Kevin Hilman
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2019-06-20  3:41 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel, narmstrong

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Avoid polling of the PHY status by passing the Ethernet PHY's GPIO
> interrupt line to the PHY node.
>
> I tested this successfully on my X96 Max, but I don't have an Odroid-N2
> to test it there. The reset and interrupt GPIO part of the schematics
> seems to be identical for both boards (and probably other "reference
> design" based boards as well).
>
> This depends on my other series "Ethernet PHY reset GPIO updates for
> Amlogic SoCs" from [0]
>
>
> Changes since v1 at [1]:
> - added Neil's Tested/Acked-by (thank you!)
> - rebased on top of v3 of my other series
> - updated cover-letter since the GPIO interrupt controller support
>   is now merged so it's not a dependency anymore

Queued for v5.3,

Thanks,

Kevin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-20  3:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-15 10:43 [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Martin Blumenstingl
2019-06-15 10:43 ` [PATCH v2 1/2] arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line Martin Blumenstingl
2019-06-15 10:43 ` [PATCH v2 2/2] arm64: dts: meson: g12a: x96-max: " Martin Blumenstingl
2019-06-20  3:41 ` [PATCH v2 0/2] arm64: dts: g12a/g12b: add the Ethernet PHY GPIO IRQs Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).