Andrew Lunn | 14c7b3c | 2016-05-10 23:27:21 +0200 | [diff] [blame] | 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 | |
Andrew Lunn | 52638f7 | 2016-05-10 23:27:22 +0200 | [diff] [blame] | 13 | The properties described here are those specific to Marvell devices. |
| 14 | Additional required and optional properties can be found in dsa.txt. |
| 15 | |
Andrew Lunn | 14c7b3c | 2016-05-10 23:27:21 +0200 | [diff] [blame] | 16 | Required properties: |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 17 | - compatible : Should be one of "marvell,mv88e6085" or |
| 18 | "marvell,mv88e6190" |
| 19 | - reg : Address on the MII bus for the switch. |
Andrew Lunn | 14c7b3c | 2016-05-10 23:27:21 +0200 | [diff] [blame] | 20 | |
Andrew Lunn | 52638f7 | 2016-05-10 23:27:22 +0200 | [diff] [blame] | 21 | Optional properties: |
| 22 | |
| 23 | - reset-gpios : Should be a gpio specifier for a reset line |
Andrew Lunn | dc30c35 | 2016-10-16 19:56:49 +0200 | [diff] [blame] | 24 | - interrupt-parent : Parent interrupt controller |
| 25 | - interrupts : Interrupt from the switch |
| 26 | - interrupt-controller : Indicates the switch is itself an interrupt |
| 27 | controller. This is used for the PHY interrupts. |
| 28 | #interrupt-cells = <2> : Controller uses two cells, number and flag |
Andrew Lunn | 6c713a3 | 2017-05-26 01:44:43 +0200 | [diff] [blame^] | 29 | - eeprom-length : Set to the length of an EEPROM connected to the |
| 30 | switch. Must be set if the switch can not detect |
| 31 | the presence and/or size of a connected EEPROM, |
| 32 | otherwise optional. |
Andrew Lunn | a3c53be | 2017-01-24 14:53:50 +0100 | [diff] [blame] | 33 | - mdio : Container of PHY and devices on the switches MDIO |
| 34 | bus. |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 35 | - mdio? : Container of PHYs and devices on the external MDIO |
Andrew Lunn | a3c53be | 2017-01-24 14:53:50 +0100 | [diff] [blame] | 36 | bus. The node must contains a compatible string of |
| 37 | "marvell,mv88e6xxx-mdio-external" |
| 38 | |
Andrew Lunn | 14c7b3c | 2016-05-10 23:27:21 +0200 | [diff] [blame] | 39 | Example: |
| 40 | |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 41 | mdio { |
| 42 | #address-cells = <1>; |
| 43 | #size-cells = <0>; |
| 44 | interrupt-parent = <&gpio0>; |
| 45 | interrupts = <27 IRQ_TYPE_LEVEL_LOW>; |
| 46 | interrupt-controller; |
| 47 | #interrupt-cells = <2>; |
Andrew Lunn | 14c7b3c | 2016-05-10 23:27:21 +0200 | [diff] [blame] | 48 | |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 49 | switch0: switch@0 { |
| 50 | compatible = "marvell,mv88e6085"; |
| 51 | reg = <0>; |
| 52 | reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; |
| 53 | }; |
| 54 | mdio { |
| 55 | #address-cells = <1>; |
| 56 | #size-cells = <0>; |
| 57 | switch1phy0: switch1phy0@0 { |
| 58 | reg = <0>; |
| 59 | interrupt-parent = <&switch0>; |
| 60 | interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; |
| 61 | }; |
| 62 | }; |
| 63 | }; |
Andrew Lunn | a3c53be | 2017-01-24 14:53:50 +0100 | [diff] [blame] | 64 | |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 65 | mdio { |
| 66 | #address-cells = <1>; |
| 67 | #size-cells = <0>; |
| 68 | interrupt-parent = <&gpio0>; |
| 69 | interrupts = <27 IRQ_TYPE_LEVEL_LOW>; |
| 70 | interrupt-controller; |
| 71 | #interrupt-cells = <2>; |
Andrew Lunn | a3c53be | 2017-01-24 14:53:50 +0100 | [diff] [blame] | 72 | |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 73 | switch0: switch@0 { |
| 74 | compatible = "marvell,mv88e6390"; |
| 75 | reg = <0>; |
| 76 | reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; |
| 77 | }; |
| 78 | mdio { |
| 79 | #address-cells = <1>; |
| 80 | #size-cells = <0>; |
| 81 | switch1phy0: switch1phy0@0 { |
| 82 | reg = <0>; |
| 83 | interrupt-parent = <&switch0>; |
| 84 | interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; |
| 85 | }; |
| 86 | }; |
Andrew Lunn | a3c53be | 2017-01-24 14:53:50 +0100 | [diff] [blame] | 87 | |
Andrew Lunn | d234559 | 2017-01-25 02:44:48 +0100 | [diff] [blame] | 88 | mdio1 { |
| 89 | compatible = "marvell,mv88e6xxx-mdio-external"; |
| 90 | #address-cells = <1>; |
| 91 | #size-cells = <0>; |
| 92 | switch1phy9: switch1phy0@9 { |
| 93 | reg = <9>; |
| 94 | }; |
| 95 | }; |
| 96 | }; |