xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Broadcom Starfighter 2 integrated swich
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun- compatible: should be one of
6*4882a593Smuzhiyun	"brcm,bcm7445-switch-v4.0"
7*4882a593Smuzhiyun	"brcm,bcm7278-switch-v4.0"
8*4882a593Smuzhiyun	"brcm,bcm7278-switch-v4.8"
9*4882a593Smuzhiyun- reg: addresses and length of the register sets for the device, must be 6
10*4882a593Smuzhiyun  pairs of register addresses and lengths
11*4882a593Smuzhiyun- interrupts: interrupts for the devices, must be two interrupts
12*4882a593Smuzhiyun- #address-cells: must be 1, see dsa/dsa.txt
13*4882a593Smuzhiyun- #size-cells: must be 0, see dsa/dsa.txt
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunDeprecated binding required properties:
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun- dsa,mii-bus: phandle to the MDIO bus controller, see dsa/dsa.txt
18*4882a593Smuzhiyun- dsa,ethernet: phandle to the CPU network interface controller, see dsa/dsa.txt
19*4882a593Smuzhiyun- #address-cells: must be 2, see dsa/dsa.txt
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunSubnodes:
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunThe integrated switch subnode should be specified according to the binding
24*4882a593Smuzhiyundescribed in dsa/dsa.txt.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunOptional properties:
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun- reg-names: litteral names for the device base register addresses, when present
29*4882a593Smuzhiyun  must be: "core", "reg", "intrl2_0", "intrl2_1", "fcb", "acb"
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun- interrupt-names: litternal names for the device interrupt lines, when present
32*4882a593Smuzhiyun  must be: "switch_0" and "switch_1"
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun- brcm,num-gphy: specify the maximum number of integrated gigabit PHYs in the
35*4882a593Smuzhiyun  switch
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun- brcm,num-rgmii-ports: specify the maximum number of RGMII interfaces supported
38*4882a593Smuzhiyun  by the switch
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun- brcm,fcb-pause-override: boolean property, if present indicates that the switch
41*4882a593Smuzhiyun  supports Failover Control Block pause override capability
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun- brcm,acb-packets-inflight: boolean property, if present indicates that the switch
44*4882a593Smuzhiyun  Admission Control Block supports reporting the number of packets in-flight in a
45*4882a593Smuzhiyun  switch queue
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun- resets: a single phandle and reset identifier pair. See
48*4882a593Smuzhiyun  Documentation/devicetree/bindings/reset/reset.txt for details.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun- reset-names: If the "reset" property is specified, this property should have
51*4882a593Smuzhiyun  the value "switch" to denote the switch reset line.
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun- clocks: when provided, the first phandle is to the switch's main clock and
54*4882a593Smuzhiyun  is valid for both BCM7445 and BCM7278. The second phandle is only applicable
55*4882a593Smuzhiyun  to BCM7445 and is to support dividing the switch core clock.
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun- clock-names: when provided, the first phandle must be "sw_switch", and the
58*4882a593Smuzhiyun  second must be named "sw_switch_mdiv".
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunPort subnodes:
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunOptional properties:
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun- brcm,use-bcm-hdr: boolean property, if present, indicates that the switch
65*4882a593Smuzhiyun  port has Broadcom tags enabled (per-packet metadata)
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunExample:
68*4882a593Smuzhiyun
69*4882a593Smuzhiyunswitch_top@f0b00000 {
70*4882a593Smuzhiyun	compatible = "simple-bus";
71*4882a593Smuzhiyun	#size-cells = <1>;
72*4882a593Smuzhiyun	#address-cells = <1>;
73*4882a593Smuzhiyun	ranges = <0 0xf0b00000 0x40804>;
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun	ethernet_switch@0 {
76*4882a593Smuzhiyun		compatible = "brcm,bcm7445-switch-v4.0";
77*4882a593Smuzhiyun		#size-cells = <0>;
78*4882a593Smuzhiyun		#address-cells = <1>;
79*4882a593Smuzhiyun		reg = <0x0 0x40000
80*4882a593Smuzhiyun			0x40000 0x110
81*4882a593Smuzhiyun			0x40340 0x30
82*4882a593Smuzhiyun			0x40380 0x30
83*4882a593Smuzhiyun			0x40400 0x34
84*4882a593Smuzhiyun			0x40600 0x208>;
85*4882a593Smuzhiyun		reg-names = "core", "reg", intrl2_0", "intrl2_1",
86*4882a593Smuzhiyun			    "fcb, "acb";
87*4882a593Smuzhiyun		interrupts = <0 0x18 0
88*4882a593Smuzhiyun				0 0x19 0>;
89*4882a593Smuzhiyun		brcm,num-gphy = <1>;
90*4882a593Smuzhiyun		brcm,num-rgmii-ports = <2>;
91*4882a593Smuzhiyun		brcm,fcb-pause-override;
92*4882a593Smuzhiyun		brcm,acb-packets-inflight;
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun		ports {
95*4882a593Smuzhiyun			#address-cells = <1>;
96*4882a593Smuzhiyun			#size-cells = <0>;
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun			port@0 {
99*4882a593Smuzhiyun				label = "gphy";
100*4882a593Smuzhiyun				reg = <0>;
101*4882a593Smuzhiyun			};
102*4882a593Smuzhiyun		};
103*4882a593Smuzhiyun	};
104*4882a593Smuzhiyun};
105*4882a593Smuzhiyun
106*4882a593SmuzhiyunExample using the old DSA DeviceTree binding:
107*4882a593Smuzhiyun
108*4882a593Smuzhiyunswitch_top@f0b00000 {
109*4882a593Smuzhiyun	compatible = "simple-bus";
110*4882a593Smuzhiyun	#size-cells = <1>;
111*4882a593Smuzhiyun	#address-cells = <1>;
112*4882a593Smuzhiyun	ranges = <0 0xf0b00000 0x40804>;
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun	ethernet_switch@0 {
115*4882a593Smuzhiyun		compatible = "brcm,bcm7445-switch-v4.0";
116*4882a593Smuzhiyun		#size-cells = <0>;
117*4882a593Smuzhiyun		#address-cells = <2>;
118*4882a593Smuzhiyun		reg = <0x0 0x40000
119*4882a593Smuzhiyun			0x40000 0x110
120*4882a593Smuzhiyun			0x40340 0x30
121*4882a593Smuzhiyun			0x40380 0x30
122*4882a593Smuzhiyun			0x40400 0x34
123*4882a593Smuzhiyun			0x40600 0x208>;
124*4882a593Smuzhiyun		interrupts = <0 0x18 0
125*4882a593Smuzhiyun				0 0x19 0>;
126*4882a593Smuzhiyun		brcm,num-gphy = <1>;
127*4882a593Smuzhiyun		brcm,num-rgmii-ports = <2>;
128*4882a593Smuzhiyun		brcm,fcb-pause-override;
129*4882a593Smuzhiyun		brcm,acb-packets-inflight;
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun		...
132*4882a593Smuzhiyun		switch@0 {
133*4882a593Smuzhiyun			reg = <0 0>;
134*4882a593Smuzhiyun			#size-cells = <0>;
135*4882a593Smuzhiyun			#address-cells <1>;
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun			port@0 {
138*4882a593Smuzhiyun				label = "gphy";
139*4882a593Smuzhiyun				reg = <0>;
140*4882a593Smuzhiyun				brcm,use-bcm-hdr;
141*4882a593Smuzhiyun			};
142*4882a593Smuzhiyun			...
143*4882a593Smuzhiyun		};
144*4882a593Smuzhiyun	};
145*4882a593Smuzhiyun};
146