xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/mdio-mux-gpio.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunProperties for an MDIO bus multiplexer/switch controlled by GPIO pins.
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThis is a special case of a MDIO bus multiplexer.  One or more GPIO
4*4882a593Smuzhiyunlines are used to control which child bus is connected.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunRequired properties in addition to the generic multiplexer properties:
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun- compatible : mdio-mux-gpio.
9*4882a593Smuzhiyun- gpios : GPIO specifiers for each GPIO line.  One or more must be specified.
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunExample :
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun	/* The parent MDIO bus. */
15*4882a593Smuzhiyun	smi1: mdio@1180000001900 {
16*4882a593Smuzhiyun		compatible = "cavium,octeon-3860-mdio";
17*4882a593Smuzhiyun		#address-cells = <1>;
18*4882a593Smuzhiyun		#size-cells = <0>;
19*4882a593Smuzhiyun		reg = <0x11800 0x00001900 0x0 0x40>;
20*4882a593Smuzhiyun	};
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun	/*
23*4882a593Smuzhiyun	   An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
24*4882a593Smuzhiyun	   pair of GPIO lines.  Child busses 2 and 3 populated with 4
25*4882a593Smuzhiyun	   PHYs each.
26*4882a593Smuzhiyun	 */
27*4882a593Smuzhiyun	mdio-mux {
28*4882a593Smuzhiyun		compatible = "mdio-mux-gpio";
29*4882a593Smuzhiyun		gpios = <&gpio1 3 0>, <&gpio1 4 0>;
30*4882a593Smuzhiyun		mdio-parent-bus = <&smi1>;
31*4882a593Smuzhiyun		#address-cells = <1>;
32*4882a593Smuzhiyun		#size-cells = <0>;
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun		mdio@2 {
35*4882a593Smuzhiyun			reg = <2>;
36*4882a593Smuzhiyun			#address-cells = <1>;
37*4882a593Smuzhiyun			#size-cells = <0>;
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun			phy11: ethernet-phy@1 {
40*4882a593Smuzhiyun				reg = <1>;
41*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
42*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
43*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
44*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
45*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
46*4882a593Smuzhiyun				interrupts = <10 8>; /* Pin 10, active low */
47*4882a593Smuzhiyun			};
48*4882a593Smuzhiyun			phy12: ethernet-phy@2 {
49*4882a593Smuzhiyun				reg = <2>;
50*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
51*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
52*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
53*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
54*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
55*4882a593Smuzhiyun				interrupts = <10 8>; /* Pin 10, active low */
56*4882a593Smuzhiyun			};
57*4882a593Smuzhiyun			phy13: ethernet-phy@3 {
58*4882a593Smuzhiyun				reg = <3>;
59*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
60*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
61*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
62*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
63*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
64*4882a593Smuzhiyun				interrupts = <10 8>; /* Pin 10, active low */
65*4882a593Smuzhiyun			};
66*4882a593Smuzhiyun			phy14: ethernet-phy@4 {
67*4882a593Smuzhiyun				reg = <4>;
68*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
69*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
70*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
71*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
72*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
73*4882a593Smuzhiyun				interrupts = <10 8>; /* Pin 10, active low */
74*4882a593Smuzhiyun			};
75*4882a593Smuzhiyun		};
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun		mdio@3 {
78*4882a593Smuzhiyun			reg = <3>;
79*4882a593Smuzhiyun			#address-cells = <1>;
80*4882a593Smuzhiyun			#size-cells = <0>;
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun			phy21: ethernet-phy@1 {
83*4882a593Smuzhiyun				reg = <1>;
84*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
85*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
86*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
87*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
88*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
89*4882a593Smuzhiyun				interrupts = <12 8>; /* Pin 12, active low */
90*4882a593Smuzhiyun			};
91*4882a593Smuzhiyun			phy22: ethernet-phy@2 {
92*4882a593Smuzhiyun				reg = <2>;
93*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
94*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
95*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
96*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
97*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
98*4882a593Smuzhiyun				interrupts = <12 8>; /* Pin 12, active low */
99*4882a593Smuzhiyun			};
100*4882a593Smuzhiyun			phy23: ethernet-phy@3 {
101*4882a593Smuzhiyun				reg = <3>;
102*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
103*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
104*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
105*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
106*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
107*4882a593Smuzhiyun				interrupts = <12 8>; /* Pin 12, active low */
108*4882a593Smuzhiyun			};
109*4882a593Smuzhiyun			phy24: ethernet-phy@4 {
110*4882a593Smuzhiyun				reg = <4>;
111*4882a593Smuzhiyun				marvell,reg-init = <3 0x10 0 0x5777>,
112*4882a593Smuzhiyun					<3 0x11 0 0x00aa>,
113*4882a593Smuzhiyun					<3 0x12 0 0x4105>,
114*4882a593Smuzhiyun					<3 0x13 0 0x0a60>;
115*4882a593Smuzhiyun				interrupt-parent = <&gpio>;
116*4882a593Smuzhiyun				interrupts = <12 8>; /* Pin 12, active low */
117*4882a593Smuzhiyun			};
118*4882a593Smuzhiyun		};
119*4882a593Smuzhiyun	};
120