1SMSC/MicroChip LAN9303 three port ethernet switch 2------------------------------------------------- 3 4Required properties: 5 6- compatible: should be 7 - "smsc,lan9303-i2c" for I2C managed mode 8 or 9 - "smsc,lan9303-mdio" for mdio managed mode 10 11Optional properties: 12 13- reset-gpios: GPIO to be used to reset the whole device 14- reset-duration: reset duration in milliseconds, defaults to 200 ms 15 16Subnodes: 17 18The integrated switch subnode should be specified according to the binding 19described in dsa/dsa.txt. The CPU port of this switch is always port 0. 20 21Note: always use 'reg = <0/1/2>;' for the three DSA ports, even if the device is 22configured to use 1/2/3 instead. This hardware configuration will be 23auto-detected and mapped accordingly. 24 25Example: 26 27I2C managed mode: 28 29 master: masterdevice@X { 30 status = "okay"; 31 32 fixed-link { /* RMII fixed link to LAN9303 */ 33 speed = <100>; 34 full-duplex; 35 }; 36 }; 37 38 switch: switch@a { 39 compatible = "smsc,lan9303-i2c"; 40 reg = <0xa>; 41 status = "okay"; 42 reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; 43 reset-duration = <200>; 44 45 ports { 46 #address-cells = <1>; 47 #size-cells = <0>; 48 49 port@0 { /* RMII fixed link to master */ 50 reg = <0>; 51 label = "cpu"; 52 ethernet = <&master>; 53 }; 54 55 port@1 { /* external port 1 */ 56 reg = <1>; 57 label = "lan1; 58 }; 59 60 port@2 { /* external port 2 */ 61 reg = <2>; 62 label = "lan2"; 63 }; 64 }; 65 }; 66 67MDIO managed mode: 68 69 master: masterdevice@X { 70 status = "okay"; 71 phy-handle = <&switch>; 72 73 mdio { 74 #address-cells = <1>; 75 #size-cells = <0>; 76 77 switch: switch-phy@0 { 78 compatible = "smsc,lan9303-mdio"; 79 reg = <0>; 80 reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; 81 reset-duration = <100>; 82 83 ports { 84 #address-cells = <1>; 85 #size-cells = <0>; 86 87 port@0 { 88 reg = <0>; 89 label = "cpu"; 90 ethernet = <&master>; 91 }; 92 93 port@1 { /* external port 1 */ 94 reg = <1>; 95 label = "lan1; 96 }; 97 98 port@2 { /* external port 2 */ 99 reg = <2>; 100 label = "lan2"; 101 }; 102 }; 103 }; 104 }; 105 }; 106