aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts
blob: 0c2fe394d4537a1847a407e2859c4372c7611004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "ar7242_ubnt_sw.dtsi"

/ {
	compatible = "ubnt,edgeswitch-8xp", "qca,ar7242";
	model = "Ubiquiti EdgeSwitch 8XP";

	gpio-export {
		compatible = "gpio-export";

		poe_24v_port1 {
			gpio-export,name = "ubnt:24v-poe:port1";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 1 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port1 {
			gpio-export,name = "ubnt:48v-poe:port1";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 0 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port2 {
			gpio-export,name = "ubnt:24v-poe:port2";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 3 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port2 {
			gpio-export,name = "ubnt:48v-poe:port2";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 2 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port3 {
			gpio-export,name = "ubnt:24v-poe:port3";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 5 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port3 {
			gpio-export,name = "ubnt:48v-poe:port3";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 4 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port4 {
			gpio-export,name = "ubnt:24v-poe:port4";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 7 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port4 {
			gpio-export,name = "ubnt:48v-poe:port4";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 6 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port5 {
			gpio-export,name = "ubnt:24v-poe:port5";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 9 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port5 {
			gpio-export,name = "ubnt:48v-poe:port5";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 8 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port6 {
			gpio-export,name = "ubnt:24v-poe:port6";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 11 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port6 {
			gpio-export,name = "ubnt:48v-poe:port6";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 10 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port7 {
			gpio-export,name = "ubnt:24v-poe:port7";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 13 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port7 {
			gpio-export,name = "ubnt:48v-poe:port7";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 12 GPIO_ACTIVE_HIGH>;
		};

		poe_24v_port8 {
			gpio-export,name = "ubnt:24v-poe:port8";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 15 GPIO_ACTIVE_HIGH>;
		};

		poe_48v_port8 {
			gpio-export,name = "ubnt:48v-poe:port8";
			gpio-export,output = <0>;
			gpios = <&gpio_hc595 14 GPIO_ACTIVE_HIGH>;
		};
	};
};

&mdio0 {
	status = "okay";

	phy-mask = <0x10>;

	ethernet-switch@1e {
		compatible = "brcm,bcm53128";
		reg = <0x1e>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port0@0 {
				reg = <0>;
				label = "lan1";
			};

			port1@1 {
				reg = <1>;
				label = "lan2";
			};

			port2@2 {
				reg = <2>;
				label = "lan3";
			};

			port3@3 {
				reg = <3>;
				label = "lan4";
			};

			port4@4 {
				reg = <4>;
				label = "lan5";
			};

			port5@5 {
				reg = <5>;
				label = "lan6";
			};

			port6@6 {
				reg = <6>;
				label = "lan7";
			};

			port7@7 {
				reg = <7>;
				label = "lan8";
			};

			phy0: port8@8 {
				reg = <8>;
				label = "cpu";
				ethernet = <&eth0>;

				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

&eth0 {
	status = "okay";

	phy-handle = <&phy0>;
	phy-mode = "rgmii-rxid";
	pll-data = <0x16000000 0x00000101 0x00001313>;

	nvmem-cells = <&macaddr_art_0>;
	nvmem-cell-names = "mac-address";

	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};

&art {
	compatible = "nvmem-cells";
	#address-cells = <1>;
	#size-cells = <1>;

	macaddr_art_0: macaddr@0 {
		reg = <0x0 0x6>;
	};
};