linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines
@ 2019-11-14 11:02 Rasmus Villemoes
  2019-11-14 11:02 ` [PATCH v2 1/2] ARM: dts: ls1021a: add node describing " Rasmus Villemoes
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rasmus Villemoes @ 2019-11-14 11:02 UTC (permalink / raw)
  To: Shawn Guo, Li Yang, Rob Herring, Mark Rutland, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Vladimir Oltean, Marc Zyngier, netdev, Andrew Lunn, Rasmus Villemoes

A device tree binding documentation as well as a driver implementing
support for the external interrupt lines on the ls1021a has been
merged into irqchip-next, so will very likely appear in v5.5. See

87cd38dfd9e6 dt/bindings: Add bindings for Layerscape external irqs
0dcd9f872769 irqchip: Add support for Layerscape external interrupt lines

present in next-20191114.

These patches simply add the extirq node to the ls1021a.dtsi and make
use of it on the LS1021A-TSN board. I hope these can be picked up so
they also land in v5.5, so we don't have to wait a full extra release
cycle.

v2: fix interrupt type in 2/2 (s/IRQ_TYPE_EDGE_FALLING/IRQ_TYPE_LEVEL_LOW/).

Rasmus Villemoes (1):
  ARM: dts: ls1021a: add node describing external interrupt lines

Vladimir Oltean (1):
  ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs

 arch/arm/boot/dts/ls1021a-tsn.dts |  4 ++++
 arch/arm/boot/dts/ls1021a.dtsi    | 19 +++++++++++++++++++
 2 files changed, 23 insertions(+)

-- 
2.23.0


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

* [PATCH v2 1/2] ARM: dts: ls1021a: add node describing external interrupt lines
  2019-11-14 11:02 [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines Rasmus Villemoes
@ 2019-11-14 11:02 ` Rasmus Villemoes
  2019-11-14 11:02 ` [PATCH v2 2/2] ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs Rasmus Villemoes
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Rasmus Villemoes @ 2019-11-14 11:02 UTC (permalink / raw)
  To: Shawn Guo, Li Yang, Rob Herring, Mark Rutland
  Cc: Vladimir Oltean, Marc Zyngier, netdev, Andrew Lunn,
	Rasmus Villemoes, linux-arm-kernel, devicetree, linux-kernel

This adds a node describing the six external interrupt lines IRQ0-IRQ5
with configurable polarity.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 arch/arm/boot/dts/ls1021a.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 2f6977ada447..0855b1fe98e0 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -216,6 +216,25 @@
 			compatible = "fsl,ls1021a-scfg", "syscon";
 			reg = <0x0 0x1570000 0x0 0x10000>;
 			big-endian;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0x0 0x0 0x1570000 0x10000>;
+
+			extirq: interrupt-controller@1ac {
+				compatible = "fsl,ls1021a-extirq";
+				#interrupt-cells = <2>;
+				#address-cells = <0>;
+				interrupt-controller;
+				reg = <0x1ac 4>;
+				interrupt-map =
+					<0 0 &gic GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
+					<1 0 &gic GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
+					<2 0 &gic GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
+					<3 0 &gic GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
+					<4 0 &gic GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
+					<5 0 &gic GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-map-mask = <0xffffffff 0x0>;
+			};
 		};
 
 		crypto: crypto@1700000 {
-- 
2.23.0


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

* [PATCH v2 2/2] ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs
  2019-11-14 11:02 [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines Rasmus Villemoes
  2019-11-14 11:02 ` [PATCH v2 1/2] ARM: dts: ls1021a: add node describing " Rasmus Villemoes
@ 2019-11-14 11:02 ` Rasmus Villemoes
  2019-11-14 15:28   ` Andrew Lunn
  2019-11-14 21:39 ` [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines David Miller
  2019-12-04 13:14 ` Shawn Guo
  3 siblings, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2019-11-14 11:02 UTC (permalink / raw)
  To: Shawn Guo, Li Yang, Rob Herring, Mark Rutland
  Cc: Vladimir Oltean, Marc Zyngier, netdev, Andrew Lunn,
	Rasmus Villemoes, linux-arm-kernel, devicetree, linux-kernel

From: Vladimir Oltean <olteanv@gmail.com>

On the LS1021A-TSN board, the 2 Atheros AR8031 PHYs for eth0 and eth1
have interrupt lines connected to the shared IRQ2_B LS1021A pin.

Switching to interrupts offloads the PHY library from the task of
polling the MDIO status and AN registers (1, 4, 5) every second.

Unfortunately, the BCM5464R quad PHY connected to the switch does not
appear to have an interrupt line routed to the SoC.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 arch/arm/boot/dts/ls1021a-tsn.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-tsn.dts
index 5b7689094b70..9d8f0c2a8aba 100644
--- a/arch/arm/boot/dts/ls1021a-tsn.dts
+++ b/arch/arm/boot/dts/ls1021a-tsn.dts
@@ -203,11 +203,15 @@
 	/* AR8031 */
 	sgmii_phy1: ethernet-phy@1 {
 		reg = <0x1>;
+		/* SGMII1_PHY_INT_B: connected to IRQ2, active low */
+		interrupts-extended = <&extirq 2 IRQ_TYPE_LEVEL_LOW>;
 	};
 
 	/* AR8031 */
 	sgmii_phy2: ethernet-phy@2 {
 		reg = <0x2>;
+		/* SGMII2_PHY_INT_B: connected to IRQ2, active low */
+		interrupts-extended = <&extirq 2 IRQ_TYPE_LEVEL_LOW>;
 	};
 
 	/* BCM5464 quad PHY */
-- 
2.23.0


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

* Re: [PATCH v2 2/2] ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs
  2019-11-14 11:02 ` [PATCH v2 2/2] ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs Rasmus Villemoes
@ 2019-11-14 15:28   ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2019-11-14 15:28 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: Shawn Guo, Li Yang, Rob Herring, Mark Rutland, Vladimir Oltean,
	Marc Zyngier, netdev, linux-arm-kernel, devicetree, linux-kernel

On Thu, Nov 14, 2019 at 12:02:53PM +0100, Rasmus Villemoes wrote:
> From: Vladimir Oltean <olteanv@gmail.com>
> 
> On the LS1021A-TSN board, the 2 Atheros AR8031 PHYs for eth0 and eth1
> have interrupt lines connected to the shared IRQ2_B LS1021A pin.
> 
> Switching to interrupts offloads the PHY library from the task of
> polling the MDIO status and AN registers (1, 4, 5) every second.
> 
> Unfortunately, the BCM5464R quad PHY connected to the switch does not
> appear to have an interrupt line routed to the SoC.
> 
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines
  2019-11-14 11:02 [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines Rasmus Villemoes
  2019-11-14 11:02 ` [PATCH v2 1/2] ARM: dts: ls1021a: add node describing " Rasmus Villemoes
  2019-11-14 11:02 ` [PATCH v2 2/2] ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs Rasmus Villemoes
@ 2019-11-14 21:39 ` David Miller
  2019-11-14 21:53   ` Vladimir Oltean
  2019-12-04 13:14 ` Shawn Guo
  3 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2019-11-14 21:39 UTC (permalink / raw)
  To: linux
  Cc: shawnguo, leoyang.li, robh+dt, mark.rutland, linux-arm-kernel,
	devicetree, linux-kernel, olteanv, maz, netdev, andrew

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Thu, 14 Nov 2019 12:02:51 +0100

> A device tree binding documentation as well as a driver implementing
> support for the external interrupt lines on the ls1021a has been
> merged into irqchip-next, so will very likely appear in v5.5. See
> 
> 87cd38dfd9e6 dt/bindings: Add bindings for Layerscape external irqs
> 0dcd9f872769 irqchip: Add support for Layerscape external interrupt lines
> 
> present in next-20191114.
> 
> These patches simply add the extirq node to the ls1021a.dtsi and make
> use of it on the LS1021A-TSN board. I hope these can be picked up so
> they also land in v5.5, so we don't have to wait a full extra release
> cycle.
> 
> v2: fix interrupt type in 2/2 (s/IRQ_TYPE_EDGE_FALLING/IRQ_TYPE_LEVEL_LOW/).

I am assuming this will go via an ARM tree.

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

* Re: [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines
  2019-11-14 21:39 ` [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines David Miller
@ 2019-11-14 21:53   ` Vladimir Oltean
  0 siblings, 0 replies; 7+ messages in thread
From: Vladimir Oltean @ 2019-11-14 21:53 UTC (permalink / raw)
  To: David Miller
  Cc: Rasmus Villemoes, Shawn Guo, Li Yang, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree, lkml, Marc Zyngier, netdev,
	Andrew Lunn

On Thu, 14 Nov 2019 at 23:40, David Miller <davem@davemloft.net> wrote:
>
> From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Date: Thu, 14 Nov 2019 12:02:51 +0100
>
> > A device tree binding documentation as well as a driver implementing
> > support for the external interrupt lines on the ls1021a has been
> > merged into irqchip-next, so will very likely appear in v5.5. See
> >
> > 87cd38dfd9e6 dt/bindings: Add bindings for Layerscape external irqs
> > 0dcd9f872769 irqchip: Add support for Layerscape external interrupt lines
> >
> > present in next-20191114.
> >
> > These patches simply add the extirq node to the ls1021a.dtsi and make
> > use of it on the LS1021A-TSN board. I hope these can be picked up so
> > they also land in v5.5, so we don't have to wait a full extra release
> > cycle.
> >
> > v2: fix interrupt type in 2/2 (s/IRQ_TYPE_EDGE_FALLING/IRQ_TYPE_LEVEL_LOW/).
>
> I am assuming this will go via an ARM tree.

Yes, of course, they are for Shawn. Netdev and Andrew was copied for
patch 2/2 (an SGMII PHY interrupt).

Regards,
-Vladimir

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

* Re: [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines
  2019-11-14 11:02 [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines Rasmus Villemoes
                   ` (2 preceding siblings ...)
  2019-11-14 21:39 ` [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines David Miller
@ 2019-12-04 13:14 ` Shawn Guo
  3 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2019-12-04 13:14 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: Li Yang, Rob Herring, Mark Rutland, linux-arm-kernel, devicetree,
	linux-kernel, Vladimir Oltean, Marc Zyngier, netdev, Andrew Lunn

On Thu, Nov 14, 2019 at 12:02:51PM +0100, Rasmus Villemoes wrote:
> A device tree binding documentation as well as a driver implementing
> support for the external interrupt lines on the ls1021a has been
> merged into irqchip-next, so will very likely appear in v5.5. See
> 
> 87cd38dfd9e6 dt/bindings: Add bindings for Layerscape external irqs
> 0dcd9f872769 irqchip: Add support for Layerscape external interrupt lines
> 
> present in next-20191114.
> 
> These patches simply add the extirq node to the ls1021a.dtsi and make
> use of it on the LS1021A-TSN board. I hope these can be picked up so
> they also land in v5.5, so we don't have to wait a full extra release
> cycle.

Sorry.  I usually send queued patches around -rc6 timeline to my
arm-soc maintainers.  Patches coming later than that will be scheduled
for the next release unless critical fixes.
> 
> v2: fix interrupt type in 2/2 (s/IRQ_TYPE_EDGE_FALLING/IRQ_TYPE_LEVEL_LOW/).
> 
> Rasmus Villemoes (1):
>   ARM: dts: ls1021a: add node describing external interrupt lines
> 
> Vladimir Oltean (1):
>   ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs

Applied both, thanks.

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

end of thread, other threads:[~2019-12-04 13:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 11:02 [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines Rasmus Villemoes
2019-11-14 11:02 ` [PATCH v2 1/2] ARM: dts: ls1021a: add node describing " Rasmus Villemoes
2019-11-14 11:02 ` [PATCH v2 2/2] ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs Rasmus Villemoes
2019-11-14 15:28   ` Andrew Lunn
2019-11-14 21:39 ` [PATCH v2 0/2] ARM: dts: ls1021a: define and use external interrupt lines David Miller
2019-11-14 21:53   ` Vladimir Oltean
2019-12-04 13:14 ` Shawn Guo

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).