Skip to content

Commit dc30c35

Browse files
lunndavem330
authored andcommitted
net: dsa: mv88e6xxx: Implement interrupt support.
The switch can have up to two interrupt controllers. One of these contains the interrupts from the integrated PHYs, so is useful to export. The Marvell PHY driver can then be used in interrupt mode, rather than polling, speeding up PHY handling and reducing load on the MDIO bus. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9c7cbcf commit dc30c35

File tree

5 files changed

+438
-12
lines changed

5 files changed

+438
-12
lines changed

Documentation/devicetree/bindings/net/dsa/marvell.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,35 @@ Required properties:
2020
Optional properties:
2121

2222
- reset-gpios : Should be a gpio specifier for a reset line
23-
23+
- interrupt-parent : Parent interrupt controller
24+
- interrupts : Interrupt from the switch
25+
- interrupt-controller : Indicates the switch is itself an interrupt
26+
controller. This is used for the PHY interrupts.
27+
#interrupt-cells = <2> : Controller uses two cells, number and flag
28+
- mdio : container of PHY and devices on the switches MDIO
29+
bus
2430
Example:
2531

2632
mdio {
2733
#address-cells = <1>;
2834
#size-cells = <0>;
35+
interrupt-parent = <&gpio0>;
36+
interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
37+
interrupt-controller;
38+
#interrupt-cells = <2>;
2939

3040
switch0: switch@0 {
3141
compatible = "marvell,mv88e6085";
3242
reg = <0>;
3343
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
3444
};
45+
mdio {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
switch1phy0: switch1phy0@0 {
49+
reg = <0>;
50+
interrupt-parent = <&switch0>;
51+
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
52+
};
53+
};
3554
};

0 commit comments

Comments
 (0)