ath79: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ath79 / dts / qca9558_belkin_f9x-v2.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/mtd/partitions/uimage.h>
9
10 / {
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 label-mac-device = &eth1;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 usb {
23 label = "green:usb2";
24 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
25 trigger-sources = <&hub_port0>;
26 linux,default-trigger = "usbport";
27 };
28
29 status {
30 function = LED_FUNCTION_STATUS;
31 color = <LED_COLOR_ID_AMBER>;
32 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
33 };
34
35 wps-amber {
36 function = LED_FUNCTION_WPS;
37 color = <LED_COLOR_ID_AMBER>;
38 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39 };
40
41 wps-blue {
42 function = LED_FUNCTION_WPS;
43 color = <LED_COLOR_ID_BLUE>;
44 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
45 };
46
47 led_system: system {
48 label = "blue:system";
49 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 gpio-export {
54 compatible = "gpio-export";
55 #size-cells = <0>;
56
57 usb2_power {
58 gpio-export,name = "usb2:power";
59 gpio-export,output = <1>;
60 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys";
66
67 wps {
68 label = "WPS button";
69 linux,code = <KEY_WPS_BUTTON>;
70 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
71 debounce-interval = <60>;
72 };
73
74 reset {
75 label = "Reset button";
76 linux,code = <KEY_RESTART>;
77 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
78 debounce-interval = <60>;
79 };
80 };
81
82 virtual_flash {
83 compatible = "mtd-concat";
84
85 devices = <&fwconcat0 &fwconcat1>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 compatible = "openwrt,uimage", "denx,uimage";
94 openwrt,ih-magic = <IH_MAGIC_OKLI>;
95 label = "firmware";
96 reg = <0x0 0x0>;
97 };
98 };
99 };
100 };
101
102 &pcie1 {
103 status = "okay";
104 };
105
106 &usb_phy0 {
107 status = "okay";
108 };
109
110 &usb0 {
111 status = "okay";
112 };
113
114 &spi {
115 status = "okay";
116
117 flash@0 {
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <80000000>;
121 m25p,fast-read;
122
123 partitions {
124 compatible = "fixed-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 uboot: partition@0 {
129 label = "u-boot";
130 reg = <0x000000 0x040000>;
131 read-only;
132 };
133
134 partition@40000 {
135 label = "u-boot-env";
136 reg = <0x040000 0x010000>;
137 };
138
139 fwconcat0: partition@50000 {
140 label = "fwconcat0";
141 reg = <0x050000 0xe20000>;
142 };
143
144 partition@e70000 {
145 label = "loader";
146 reg = <0xe70000 0x10000>;
147 read-only;
148 };
149
150 fwconcat1: partition@e80000 {
151 label = "fwconcat1";
152 reg = <0xe80000 0x170000>;
153 };
154
155 art: partition@ff0000 {
156 label = "art";
157 reg = <0xff0000 0x010000>;
158
159 nvmem-layout {
160 compatible = "fixed-layout";
161 #address-cells = <1>;
162 #size-cells = <1>;
163
164 macaddr_art_0: macaddr@0 {
165 compatible = "mac-base";
166 reg = <0x0 0x6>;
167 #nvmem-cell-cells = <1>;
168 };
169 };
170 };
171 };
172 };
173 };
174
175 &mdio0 {
176 status = "okay";
177
178 phy0: ethernet-phy@0 {
179 reg = <0>;
180
181 qca,ar8327-initvals = <
182 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
183 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
184 0x50 0xc737c737 /* LED_CTRL0 */
185 0x54 0x00000000 /* LED_CTRL1 */
186 0x58 0x00000000 /* LED_CTRL2 */
187 0x5c 0x0030c300 /* LED_CTRL3 */
188 0x7c 0x0000007e /* PORT0_STATUS */
189 0x94 0x0000007e /* PORT6 STATUS */
190 >;
191 };
192 };
193
194 &eth0 {
195 status = "okay";
196
197 nvmem-cells = <&macaddr_art_0 0>;
198 nvmem-cell-names = "mac-address";
199 phy-handle = <&phy0>;
200 pll-data = <0xa6000000 0x00000101 0x00001616>;
201
202 gmac-config {
203 device = <&gmac>;
204 rgmii-enabled = <1>;
205 };
206 };
207
208 &eth1 {
209 status = "okay";
210
211 nvmem-cells = <&macaddr_art_0 (-1)>;
212 nvmem-cell-names = "mac-address";
213 pll-data = <0x03000101 0x00000101 0x00001616>;
214
215 fixed-link {
216 speed = <1000>;
217 full-duplex;
218 };
219 };
220
221 &pcie0 {
222 status = "okay";
223
224 wifi@0,0 {
225 compatible = "qcom,ath10k";
226 reg = <0 0 0 0 0>;
227 };
228 };
229
230 &wmac {
231 status = "okay";
232
233 mtd-cal-data = <&art 0x1000>;
234 };