Merge tag 'pinctrl-v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / net / dsa / ksz.txt
1 Microchip KSZ Series Ethernet switches
2 ==================================
3
4 Required properties:
5
6 - compatible: For external switch chips, compatible string must be exactly one
7   of the following:
8   - "microchip,ksz9477"
9   - "microchip,ksz9897"
10   - "microchip,ksz9896"
11   - "microchip,ksz9567"
12   - "microchip,ksz8565"
13   - "microchip,ksz9893"
14   - "microchip,ksz9563"
15   - "microchip,ksz8563"
16
17 Optional properties:
18
19 - reset-gpios           : Should be a gpio specifier for a reset line
20 - microchip,synclko-125 : Set if the output SYNCLKO frequency should be set to
21                           125MHz instead of 25MHz.
22
23 See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
24 required and optional properties.
25
26 Examples:
27
28 Ethernet switch connected via SPI to the host, CPU port wired to eth0:
29
30         eth0: ethernet@10001000 {
31                 fixed-link {
32                         speed = <1000>;
33                         full-duplex;
34                 };
35         };
36
37         spi1: spi@f8008000 {
38                 pinctrl-0 = <&pinctrl_spi_ksz>;
39                 cs-gpios = <&pioC 25 0>;
40                 id = <1>;
41
42                 ksz9477: ksz9477@0 {
43                         compatible = "microchip,ksz9477";
44                         reg = <0>;
45
46                         spi-max-frequency = <44000000>;
47                         spi-cpha;
48                         spi-cpol;
49
50                         ports {
51                                 #address-cells = <1>;
52                                 #size-cells = <0>;
53                                 port@0 {
54                                         reg = <0>;
55                                         label = "lan1";
56                                 };
57                                 port@1 {
58                                         reg = <1>;
59                                         label = "lan2";
60                                 };
61                                 port@2 {
62                                         reg = <2>;
63                                         label = "lan3";
64                                 };
65                                 port@3 {
66                                         reg = <3>;
67                                         label = "lan4";
68                                 };
69                                 port@4 {
70                                         reg = <4>;
71                                         label = "lan5";
72                                 };
73                                 port@5 {
74                                         reg = <5>;
75                                         label = "cpu";
76                                         ethernet = <&eth0>;
77                                         fixed-link {
78                                                 speed = <1000>;
79                                                 full-duplex;
80                                         };
81                                 };
82                         };
83                 };
84                 ksz8565: ksz8565@0 {
85                         compatible = "microchip,ksz8565";
86                         reg = <0>;
87
88                         spi-max-frequency = <44000000>;
89                         spi-cpha;
90                         spi-cpol;
91
92                         ports {
93                                 #address-cells = <1>;
94                                 #size-cells = <0>;
95                                 port@0 {
96                                         reg = <0>;
97                                         label = "lan1";
98                                 };
99                                 port@1 {
100                                         reg = <1>;
101                                         label = "lan2";
102                                 };
103                                 port@2 {
104                                         reg = <2>;
105                                         label = "lan3";
106                                 };
107                                 port@3 {
108                                         reg = <3>;
109                                         label = "lan4";
110                                 };
111                                 port@6 {
112                                         reg = <6>;
113                                         label = "cpu";
114                                         ethernet = <&eth0>;
115                                         fixed-link {
116                                                 speed = <1000>;
117                                                 full-duplex;
118                                         };
119                                 };
120                         };
121                 };
122         };