Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / net / dsa / marvell.txt
1 Marvell DSA Switch Device Tree Bindings
2 ---------------------------------------
3
4 WARNING: This binding is currently unstable. Do not program it into a
5 FLASH never to be changed again. Once this binding is stable, this
6 warning will be removed.
7
8 If you need a stable binding, use the old dsa.txt binding.
9
10 Marvell Switches are MDIO devices. The following properties should be
11 placed as a child node of an mdio device.
12
13 The properties described here are those specific to Marvell devices.
14 Additional required and optional properties can be found in dsa.txt.
15
16 The compatibility string is used only to find an identification register,
17 which is at a different MDIO base address in different switch families.
18 - "marvell,mv88e6085"   : Switch has base address 0x10. Use with models:
19                           6085, 6095, 6097, 6123, 6131, 6141, 6161, 6165,
20                           6171, 6172, 6175, 6176, 6185, 6240, 6320, 6321,
21                           6341, 6350, 6351, 6352
22 - "marvell,mv88e6190"   : Switch has base address 0x00. Use with models:
23                           6190, 6190X, 6191, 6290, 6390, 6390X
24
25 Required properties:
26 - compatible            : Should be one of "marvell,mv88e6085" or
27                           "marvell,mv88e6190" as indicated above
28 - reg                   : Address on the MII bus for the switch.
29
30 Optional properties:
31
32 - reset-gpios           : Should be a gpio specifier for a reset line
33 - interrupt-parent      : Parent interrupt controller
34 - interrupts            : Interrupt from the switch
35 - interrupt-controller  : Indicates the switch is itself an interrupt
36                           controller. This is used for the PHY interrupts.
37 #interrupt-cells = <2>  : Controller uses two cells, number and flag
38 - eeprom-length         : Set to the length of an EEPROM connected to the
39                           switch. Must be set if the switch can not detect
40                           the presence and/or size of a connected EEPROM,
41                           otherwise optional.
42 - mdio                  : Container of PHY and devices on the switches MDIO
43                           bus.
44 - mdio?         : Container of PHYs and devices on the external MDIO
45                           bus. The node must contains a compatible string of
46                           "marvell,mv88e6xxx-mdio-external"
47
48 Example:
49
50         mdio {
51                 #address-cells = <1>;
52                 #size-cells = <0>;
53                 interrupt-parent = <&gpio0>;
54                 interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
55                 interrupt-controller;
56                 #interrupt-cells = <2>;
57
58                 switch0: switch@0 {
59                         compatible = "marvell,mv88e6085";
60                         reg = <0>;
61                         reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
62
63                         mdio {
64                                 #address-cells = <1>;
65                                 #size-cells = <0>;
66                                 switch1phy0: switch1phy0@0 {
67                                         reg = <0>;
68                                         interrupt-parent = <&switch0>;
69                                         interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
70                                 };
71                         };
72                 };
73         };
74
75         mdio {
76                 #address-cells = <1>;
77                 #size-cells = <0>;
78                 interrupt-parent = <&gpio0>;
79                 interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
80                 interrupt-controller;
81                 #interrupt-cells = <2>;
82
83                 switch0: switch@0 {
84                         compatible = "marvell,mv88e6390";
85                         reg = <0>;
86                         reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
87
88                         mdio {
89                                 #address-cells = <1>;
90                                 #size-cells = <0>;
91                                 switch1phy0: switch1phy0@0 {
92                                         reg = <0>;
93                                         interrupt-parent = <&switch0>;
94                                         interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
95                                 };
96                         };
97
98                         mdio1 {
99                                 compatible = "marvell,mv88e6xxx-mdio-external";
100                                 #address-cells = <1>;
101                                 #size-cells = <0>;
102                                 switch1phy9: switch1phy0@9 {
103                                         reg = <9>;
104                                 };
105                         };
106                 };
107         };