lantiq: set port numbers corresponding to reg value
[openwrt/openwrt.git] / target / linux / lantiq / files-5.4 / arch / mips / boot / dts / lantiq / vr9_lantiq_easy80920.dtsi
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
5
6 / {
7 compatible = "lantiq,easy80920", "lantiq,xway", "lantiq,vr9";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11 };
12
13 aliases {
14 led-boot = &power;
15 led-failsafe = &power;
16 led-running = &power;
17 led-upgrade = &power;
18
19 led-usb = &led_usb1;
20 led-usb2 = &led_usb2;
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <100>;
31 /* reset {
32 label = "reset";
33 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };*/
36 paging {
37 label = "paging";
38 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_PHONE>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 power: power {
47 label = "easy80920:green:power";
48 gpios = <&stp 9 GPIO_ACTIVE_HIGH>;
49 default-state = "keep";
50 };
51 warning {
52 label = "easy80920:green:warning";
53 gpios = <&stp 22 GPIO_ACTIVE_HIGH>;
54 };
55 fxs1 {
56 label = "easy80920:green:fxs1";
57 gpios = <&stp 21 GPIO_ACTIVE_HIGH>;
58 };
59 fxs2 {
60 label = "easy80920:green:fxs2";
61 gpios = <&stp 20 GPIO_ACTIVE_HIGH>;
62 };
63 fxo {
64 label = "easy80920:green:fxo";
65 gpios = <&stp 19 GPIO_ACTIVE_HIGH>;
66 };
67 led_usb1: usb1 {
68 label = "easy80920:green:usb1";
69 gpios = <&stp 18 GPIO_ACTIVE_HIGH>;
70 };
71 led_usb2: usb2 {
72 label = "easy80920:green:usb2";
73 gpios = <&stp 15 GPIO_ACTIVE_HIGH>;
74 };
75 sd {
76 label = "easy80920:green:sd";
77 gpios = <&stp 14 GPIO_ACTIVE_HIGH>;
78 };
79 wps {
80 label = "easy80920:green:wps";
81 gpios = <&stp 12 GPIO_ACTIVE_HIGH>;
82 };
83 };
84
85 usb_vbus: regulator-usb-vbus {
86 compatible = "regulator-fixed";
87
88 regulator-name = "USB_VBUS";
89
90 regulator-min-microvolt = <5000000>;
91 regulator-max-microvolt = <5000000>;
92
93 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
94 enable-active-high;
95 };
96 };
97
98 &eth0 {
99 lan: interface@0 {
100 compatible = "lantiq,xrx200-pdi";
101 #address-cells = <1>;
102 #size-cells = <0>;
103 reg = <0>;
104 lantiq,switch;
105
106 ethernet@0 {
107 compatible = "lantiq,xrx200-pdi-port";
108 reg = <0>;
109 phy-mode = "rgmii";
110 phy-handle = <&phy0>;
111 };
112 ethernet@1 {
113 compatible = "lantiq,xrx200-pdi-port";
114 reg = <1>;
115 phy-mode = "rgmii";
116 phy-handle = <&phy1>;
117 };
118 ethernet@2 {
119 compatible = "lantiq,xrx200-pdi-port";
120 reg = <2>;
121 phy-mode = "gmii";
122 phy-handle = <&phy11>;
123 };
124 ethernet@4 {
125 compatible = "lantiq,xrx200-pdi-port";
126 reg = <4>;
127 phy-mode = "gmii";
128 phy-handle = <&phy13>;
129 };
130 };
131
132 wan: interface@1 {
133 compatible = "lantiq,xrx200-pdi";
134 #address-cells = <1>;
135 #size-cells = <0>;
136 reg = <1>;
137 lantiq,wan;
138
139 ethernet@5 {
140 compatible = "lantiq,xrx200-pdi-port";
141 reg = <5>;
142 phy-mode = "rgmii";
143 phy-handle = <&phy5>;
144 };
145 };
146
147 mdio {
148 #address-cells = <1>;
149 #size-cells = <0>;
150 compatible = "lantiq,xrx200-mdio";
151
152 phy0: ethernet-phy@0 {
153 reg = <0x0>;
154 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
155 };
156 phy1: ethernet-phy@1 {
157 reg = <0x1>;
158 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
159 };
160 phy5: ethernet-phy@5 {
161 reg = <0x5>;
162 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
163 };
164 phy11: ethernet-phy@11 {
165 reg = <0x11>;
166 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
167 };
168 phy13: ethernet-phy@13 {
169 reg = <0x13>;
170 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
171 };
172 };
173 };
174
175 &gphy0 {
176 lantiq,gphy-mode = <GPHY_MODE_GE>;
177 };
178
179 &gphy1 {
180 lantiq,gphy-mode = <GPHY_MODE_GE>;
181 };
182
183 &gpio {
184 pinctrl-names = "default";
185 pinctrl-0 = <&state_default>;
186
187 state_default: pinmux {
188 exin3 {
189 lantiq,groups = "exin3";
190 lantiq,function = "exin";
191 };
192 conf_out {
193 lantiq,pins = "io21",
194 "io33";
195 lantiq,open-drain;
196 lantiq,pull = <0>;
197 lantiq,output = <1>;
198 };
199 pcie-rst {
200 lantiq,pins = "io38";
201 lantiq,pull = <0>;
202 lantiq,output = <1>;
203 };
204 conf_in {
205 lantiq,pins = "io39"; /* exin3 */
206 lantiq,pull = <2>;
207 };
208 };
209 };
210
211 &spi {
212 status = "okay";
213
214 flash@4 {
215 compatible = "jedec,spi-nor";
216 reg = <4>;
217 spi-max-frequency = <1000000>;
218
219 partitions {
220 compatible = "fixed-partitions";
221 #address-cells = <1>;
222 #size-cells = <1>;
223
224 partition@0 {
225 reg = <0x0 0x20000>;
226 label = "SPI (RO) U-Boot Image";
227 read-only;
228 };
229
230 partition@20000 {
231 reg = <0x20000 0x10000>;
232 label = "ENV_MAC";
233 read-only;
234 };
235
236 partition@30000 {
237 reg = <0x30000 0x10000>;
238 label = "DPF";
239 read-only;
240 };
241
242 partition@40000 {
243 reg = <0x40000 0x10000>;
244 label = "NVRAM";
245 read-only;
246 };
247
248 partition@500000 {
249 reg = <0x50000 0x003a0000>;
250 label = "kernel";
251 };
252 };
253 };
254 };
255
256 &pci0 {
257 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
258 pinctrl-names = "default";
259 };
260
261 &stp {
262 status = "okay";
263
264 lantiq,shadow = <0xffff>;
265 lantiq,groups = <0x7>;
266 lantiq,dsl = <0x3>;
267 lantiq,phy1 = <0x7>;
268 lantiq,phy2 = <0x7>;
269 /* lantiq,rising; */
270 };
271
272 &usb_phy0 {
273 status = "okay";
274 };
275
276 &usb0 {
277 status = "okay";
278 vbus-supply = <&usb_vbus>;
279 };