On 2019-01-22 7:22 p.m., Andrew Lunn wrote:
> >From my Espressobin
>
> cat /proc/interrupts
> ...
> 44: 0 0 mv88e6xxx-g1 3 Edge mv88e6xxx-g1-atu-prob
> 46: 0 0 mv88e6xxx-g1 5 Edge mv88e6xxx-g1-vtu-prob
> 48: 38 24 mv88e6xxx-g1 7 Edge mv88e6xxx-g2
> 51: 0 1 mv88e6xxx-g2 1 Edge
> !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:11
> 52: 0 0 mv88e6xxx-g2 2 Edge
> !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:12
> 53: 38 23 mv88e6xxx-g2 3 Edge
> !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:13
>
> These are PHY interrupts.
>
Thanks. That was the clue. I had tried to enable hardware for support
for switch interrupts. However,
the espressobin connects the switch interrupt output to a southbridge
pin that only supports edge interrupts.
Link detection works okay once the attached change is removed. I may
try and see if moving the interrupt
to a northbridge pin works.
I have to wonder about the use of edge interrupts. Given that a GPIO
interrupt isn't defined for the mv88e6xxx,
then the interrupt must be done by polling the global1 control register.
This also makes me wonder about this SD interrupt:
43: 0 0 GPIO1 3 Edge d00d0000.sdhci cd
Many poeple have trouble with SD cards on reboot.
Although the driver doesn't handle AVB interrupts, I started down this
path to try get ptp4l working better. I
have tweaked the polling but there are still circumstances where
timestamps are overwritten (or not written).
Dave
--
John David Anglin [email protected]
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
index 3ab25ad402b9..65a3ff4da610 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -126,6 +126,14 @@
dsa,member = <0 0>;
+ interrupt-parent = <&gpiosb>;
+ /* Actually, the irq is active low but gpiosb doesn't
+ support that. Falling edge seems to work okay.
+ We need this for ptp support */
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
ports {
#address-cells = <1>;
#size-cells = <0>;