lantiq: convert to new LED color/function format where possible
[openwrt/staging/robimarko.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_avm_fritz7430.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
8
9 / {
10 compatible = "avm,fritz7430", "lantiq,xway", "lantiq,vr9";
11 model = "AVM FRITZ!Box 7430";
12
13 chosen {
14 bootargs = "console=ttyLTQ0,115200";
15 };
16
17 aliases {
18 led-boot = &led_power;
19 led-failsafe = &led_info_red;
20 led-running = &led_power;
21 led-upgrade = &led_info_green;
22
23 led-dsl = &led_info_green;
24 led-wifi = &led_wifi;
25 };
26
27 memory@0 {
28 device_type = "memory";
29 reg = <0x0 0x8000000>;
30 };
31
32 keys {
33 compatible = "gpio-keys-polled";
34 poll-interval = <100>;
35
36 dect {
37 label = "dect";
38 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_PHONE>;
40 };
41
42 wifi {
43 label = "wifi";
44 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RFKILL>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 led_power: power {
53 function = LED_FUNCTION_POWER;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
56 default-state = "keep";
57 };
58
59 led_info_green: info_green {
60 label = "green:info";
61 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
62 };
63
64 led_info_red: info_red {
65 label = "red:info";
66 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
67 };
68
69 led_wifi: wifi {
70 label = "green:wifi";
71 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
72 };
73
74 dect {
75 label = "green:dect";
76 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
77 };
78
79 fon {
80 label = "green:fon";
81 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
82 };
83 };
84
85 usb0_vbus: regulator-usb0-vbus {
86 compatible = "regulator-fixed";
87
88 regulator-name = "USB0_VBUS";
89
90 regulator-min-microvolt = <5000000>;
91 regulator-max-microvolt = <5000000>;
92
93 gpio = <&gpio 5 GPIO_ACTIVE_HIGH>;
94 enable-active-high;
95 };
96 };
97
98 &localbus {
99 flash@0 {
100 compatible = "lantiq,nand-xway";
101 bank-width = <2>;
102 reg = <0 0x0 0x8000000>;
103 lantiq,cs = <1>;
104
105 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
106 pinctrl-names = "default";
107
108 nand-use-soft-ecc-engine;
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "urlader";
117 reg = <0x0 0x40000>;
118 read-only;
119 };
120
121 partition@40000 {
122 label = "nand-tffs";
123 reg = <0x40000 0x400000>;
124 read-only;
125 };
126
127 partition@440000 {
128 label = "kernel";
129 reg = <0x440000 0x400000>;
130 };
131
132 partition@840000 {
133 label = "ubi";
134 reg = <0x840000 0x3000000>;
135 };
136
137 partition@3840000 {
138 label = "reserved-kernel";
139 reg = <0x3840000 0x400000>;
140 read-only;
141 };
142
143 partition@3c40000 {
144 label = "reserved-filesystem";
145 reg = <0x3c40000 0x3000000>;
146 read-only;
147 };
148
149 partition@6c40000 {
150 label = "config";
151 reg = <0x6c40000 0x200000>;
152 read-only;
153 };
154
155 partition@6e40000 {
156 label = "nand-filesystem";
157 reg = <0x6e40000 0x11c0000>;
158 read-only;
159 };
160 };
161 };
162 };
163
164 &pcie0 {
165 status = "okay";
166
167 gpio-reset = <&gpio 11 GPIO_ACTIVE_LOW>;
168
169 pcie@0 {
170 reg = <0 0 0 0 0>;
171 #interrupt-cells = <1>;
172 #size-cells = <2>;
173 #address-cells = <3>;
174 device_type = "pci";
175
176 wifi@168c,abcd {
177 compatible = "pci168c,abcd";
178 reg = <0 0 0 0 0>;
179 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
180 };
181 };
182 };
183
184 &gphy0 {
185 lantiq,gphy-mode = <GPHY_MODE_FE>;
186 };
187
188 &gphy1 {
189 lantiq,gphy-mode = <GPHY_MODE_FE>;
190 };
191
192 &gpio {
193 pinctrl-names = "default";
194 pinctrl-0 = <&state_default>;
195
196 state_default: pinmux {
197 pcie-rst {
198 lantiq,pins = "io11";
199 lantiq,open-drain = <1>;
200 lantiq,output = <1>;
201 };
202 };
203 };
204
205 &gswip_mdio {
206 phy11: ethernet-phy@11 {
207 reg = <0x11>;
208 };
209 phy12: ethernet-phy@12 {
210 reg = <0x12>;
211 };
212 phy13: ethernet-phy@13 {
213 reg = <0x13>;
214 };
215 phy14: ethernet-phy@14 {
216 reg = <0x14>;
217 };
218 };
219
220 &gswip_ports {
221 port@2 {
222 reg = <2>;
223 label = "lan3";
224 phy-mode = "internal";
225 phy-handle = <&phy11>;
226 };
227 port@3 {
228 reg = <3>;
229 label = "lan4";
230 phy-mode = "internal";
231 phy-handle = <&phy12>;
232 };
233 port@4 {
234 reg = <4>;
235 label = "lan1";
236 phy-mode = "internal";
237 phy-handle = <&phy13>;
238 };
239 port@5 {
240 reg = <5>;
241 label = "lan2";
242 phy-mode = "internal";
243 phy-handle = <&phy14>;
244 };
245 };
246
247 &usb_phy0 {
248 status = "okay";
249 };
250
251 &usb0 {
252 status = "okay";
253
254 vbus-supply = <&usb0_vbus>;
255 };