forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt
....@@ -2,8 +2,8 @@
22 ========================
33
44 This defines device tree bindings for the Vitesse VSC73xx switch chips.
5
-The Vitesse company has been acquired by Microsemi and Microsemi in turn
6
-acquired by Microchip but retains this vendor branding.
5
+The Vitesse company has been acquired by Microsemi and Microsemi has
6
+been acquired Microchip but retains this vendor branding.
77
88 The currently supported switch chips are:
99 Vitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch
....@@ -11,8 +11,14 @@
1111 Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch
1212 Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch
1313
14
-The device tree node is an SPI device so it must reside inside a SPI bus
15
-device tree node, see spi/spi-bus.txt
14
+This switch could have two different management interface.
15
+
16
+If SPI interface is used, the device tree node is an SPI device so it must
17
+reside inside a SPI bus device tree node, see spi/spi-bus.txt
18
+
19
+When the chip is connected to a parallel memory bus and work in memory-mapped
20
+I/O mode, a platform device is used to represent the vsc73xx. In this case it
21
+must reside inside a platform bus device tree node.
1622
1723 Required properties:
1824
....@@ -38,6 +44,7 @@
3844
3945 Examples:
4046
47
+SPI:
4148 switch@0 {
4249 compatible = "vitesse,vsc7395";
4350 reg = <0>;
....@@ -79,3 +86,46 @@
7986 };
8087 };
8188 };
89
+
90
+Platform:
91
+switch@2,0 {
92
+ #address-cells = <1>;
93
+ #size-cells = <1>;
94
+ compatible = "vitesse,vsc7385";
95
+ reg = <0x2 0x0 0x20000>;
96
+ reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
97
+
98
+ ports {
99
+ #address-cells = <1>;
100
+ #size-cells = <0>;
101
+
102
+ port@0 {
103
+ reg = <0>;
104
+ label = "lan1";
105
+ };
106
+ port@1 {
107
+ reg = <1>;
108
+ label = "lan2";
109
+ };
110
+ port@2 {
111
+ reg = <2>;
112
+ label = "lan3";
113
+ };
114
+ port@3 {
115
+ reg = <3>;
116
+ label = "lan4";
117
+ };
118
+ vsc: port@6 {
119
+ reg = <6>;
120
+ label = "cpu";
121
+ ethernet = <&enet0>;
122
+ phy-mode = "rgmii";
123
+ fixed-link {
124
+ speed = <1000>;
125
+ full-duplex;
126
+ pause;
127
+ };
128
+ };
129
+ };
130
+
131
+};