xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/dsa/b53.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunBroadcom BCM53xx Ethernet switches
2*4882a593Smuzhiyun==================================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunRequired properties:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun- compatible: For external switch chips, compatible string must be exactly one
7*4882a593Smuzhiyun  of: "brcm,bcm5325"
8*4882a593Smuzhiyun      "brcm,bcm53115"
9*4882a593Smuzhiyun      "brcm,bcm53125"
10*4882a593Smuzhiyun      "brcm,bcm53128"
11*4882a593Smuzhiyun      "brcm,bcm5365"
12*4882a593Smuzhiyun      "brcm,bcm5395"
13*4882a593Smuzhiyun      "brcm,bcm5389"
14*4882a593Smuzhiyun      "brcm,bcm5397"
15*4882a593Smuzhiyun      "brcm,bcm5398"
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun  For the BCM11360 SoC, must be:
18*4882a593Smuzhiyun      "brcm,bcm11360-srab" and the mandatory "brcm,cygnus-srab" string
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun  For the BCM5310x SoCs with an integrated switch, must be one of:
21*4882a593Smuzhiyun      "brcm,bcm53010-srab"
22*4882a593Smuzhiyun      "brcm,bcm53011-srab"
23*4882a593Smuzhiyun      "brcm,bcm53012-srab"
24*4882a593Smuzhiyun      "brcm,bcm53018-srab"
25*4882a593Smuzhiyun      "brcm,bcm53019-srab" and the mandatory "brcm,bcm5301x-srab" string
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  For the BCM5831X/BCM1140x SoCs with an integrated switch, must be one of:
28*4882a593Smuzhiyun      "brcm,bcm11404-srab"
29*4882a593Smuzhiyun      "brcm,bcm11407-srab"
30*4882a593Smuzhiyun      "brcm,bcm11409-srab"
31*4882a593Smuzhiyun      "brcm,bcm58310-srab"
32*4882a593Smuzhiyun      "brcm,bcm58311-srab"
33*4882a593Smuzhiyun      "brcm,bcm58313-srab" and the mandatory "brcm,omega-srab" string
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun  For the BCM585xx/586XX/88312 SoCs with an integrated switch, must be one of:
36*4882a593Smuzhiyun      "brcm,bcm58522-srab"
37*4882a593Smuzhiyun      "brcm,bcm58523-srab"
38*4882a593Smuzhiyun      "brcm,bcm58525-srab"
39*4882a593Smuzhiyun      "brcm,bcm58622-srab"
40*4882a593Smuzhiyun      "brcm,bcm58623-srab"
41*4882a593Smuzhiyun      "brcm,bcm58625-srab"
42*4882a593Smuzhiyun      "brcm,bcm88312-srab" and the mandatory "brcm,nsp-srab string
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun  For the BCM63xx/33xx SoCs with an integrated switch, must be one of:
45*4882a593Smuzhiyun      "brcm,bcm3384-switch"
46*4882a593Smuzhiyun      "brcm,bcm6328-switch"
47*4882a593Smuzhiyun      "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch"
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunRequired properties for BCM585xx/586xx/88312 SoCs:
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun - reg: a total of 3 register base addresses, the first one must be the
52*4882a593Smuzhiyun   Switch Register Access block base, the second is the port 5/4 mux
53*4882a593Smuzhiyun   configuration register and the third one is the SGMII configuration
54*4882a593Smuzhiyun   and status register base address.
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun - interrupts: a total of 13 interrupts must be specified, in the following
57*4882a593Smuzhiyun   order: port 0-5, 7-8 link status change, then the integrated PHY interrupt,
58*4882a593Smuzhiyun   then the timestamping interrupt and the sleep timer interrupts for ports
59*4882a593Smuzhiyun   5,7,8.
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunOptional properties for BCM585xx/586xx/88312 SoCs:
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun  - reg-names: a total of 3 names matching the 3 base register address, must
64*4882a593Smuzhiyun    be in the following order:
65*4882a593Smuzhiyun	"srab"
66*4882a593Smuzhiyun	"mux_config"
67*4882a593Smuzhiyun	"sgmii_config"
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun  - interrupt-names: a total of 13 names matching the 13 interrupts specified
70*4882a593Smuzhiyun    must be in the following order:
71*4882a593Smuzhiyun	"link_state_p0"
72*4882a593Smuzhiyun	"link_state_p1"
73*4882a593Smuzhiyun	"link_state_p2"
74*4882a593Smuzhiyun	"link_state_p3"
75*4882a593Smuzhiyun	"link_state_p4"
76*4882a593Smuzhiyun	"link_state_p5"
77*4882a593Smuzhiyun	"link_state_p7"
78*4882a593Smuzhiyun	"link_state_p8"
79*4882a593Smuzhiyun	"phy"
80*4882a593Smuzhiyun	"ts"
81*4882a593Smuzhiyun	"imp_sleep_timer_p5"
82*4882a593Smuzhiyun	"imp_sleep_timer_p7"
83*4882a593Smuzhiyun	"imp_sleep_timer_p8"
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunSee Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
86*4882a593Smuzhiyunrequired and optional properties.
87*4882a593Smuzhiyun
88*4882a593SmuzhiyunExamples:
89*4882a593Smuzhiyun
90*4882a593SmuzhiyunEthernet switch connected via MDIO to the host, CPU port wired to eth0:
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun	eth0: ethernet@10001000 {
93*4882a593Smuzhiyun		compatible = "brcm,unimac";
94*4882a593Smuzhiyun		reg = <0x10001000 0x1000>;
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun		fixed-link {
97*4882a593Smuzhiyun			speed = <1000>;
98*4882a593Smuzhiyun			full-duplex;
99*4882a593Smuzhiyun		};
100*4882a593Smuzhiyun	};
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun	mdio0: mdio@10000000 {
103*4882a593Smuzhiyun		compatible = "brcm,unimac-mdio";
104*4882a593Smuzhiyun		#address-cells = <1>;
105*4882a593Smuzhiyun		#size-cells = <0>;
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun		switch0: ethernet-switch@1e {
108*4882a593Smuzhiyun			compatible = "brcm,bcm53125";
109*4882a593Smuzhiyun			reg = <30>;
110*4882a593Smuzhiyun			#address-cells = <1>;
111*4882a593Smuzhiyun			#size-cells = <0>;
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun			ports {
114*4882a593Smuzhiyun				#address-cells = <1>;
115*4882a593Smuzhiyun				#size-cells = <0>;
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun				port0@0 {
118*4882a593Smuzhiyun					reg = <0>;
119*4882a593Smuzhiyun					label = "lan1";
120*4882a593Smuzhiyun				};
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun				port1@1 {
123*4882a593Smuzhiyun					reg = <1>;
124*4882a593Smuzhiyun					label = "lan2";
125*4882a593Smuzhiyun				};
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun				port5@5 {
128*4882a593Smuzhiyun					reg = <5>;
129*4882a593Smuzhiyun					label = "cable-modem";
130*4882a593Smuzhiyun					fixed-link {
131*4882a593Smuzhiyun						speed = <1000>;
132*4882a593Smuzhiyun						full-duplex;
133*4882a593Smuzhiyun					};
134*4882a593Smuzhiyun					phy-mode = "rgmii-txid";
135*4882a593Smuzhiyun				};
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun				port8@8 {
138*4882a593Smuzhiyun					reg = <8>;
139*4882a593Smuzhiyun					label = "cpu";
140*4882a593Smuzhiyun					fixed-link {
141*4882a593Smuzhiyun						speed = <1000>;
142*4882a593Smuzhiyun						full-duplex;
143*4882a593Smuzhiyun					};
144*4882a593Smuzhiyun					phy-mode = "rgmii-txid";
145*4882a593Smuzhiyun					ethernet = <&eth0>;
146*4882a593Smuzhiyun				};
147*4882a593Smuzhiyun			};
148*4882a593Smuzhiyun		};
149*4882a593Smuzhiyun	};
150