1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include "qca956x.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
11 led-boot = &led_power_amber;
12 led-failsafe = &led_power_amber;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_amber;
15 label-mac-device = ð0;
19 compatible = "gpio-keys";
23 linux,code = <KEY_WPS_BUTTON>;
24 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
35 compatible = "gpio-keys-polled";
40 linux,code = <KEY_RFKILL>;
41 gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
42 debounce-interval = <60>;
47 compatible = "gpio-leds";
49 pinctrl-names = "default";
50 pinctrl-0 = <&jtag_disable_pins>;
52 led_power_green: power_green {
53 function = LED_FUNCTION_POWER;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
58 led_power_amber: power_amber {
59 function = LED_FUNCTION_POWER;
60 color = <LED_COLOR_ID_AMBER>;
61 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
62 default-state = "keep";
66 function = LED_FUNCTION_WAN;
67 color = <LED_COLOR_ID_GREEN>;
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
72 function = LED_FUNCTION_WAN;
73 color = <LED_COLOR_ID_AMBER>;
74 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
78 label = "green:wlan2g";
79 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
80 linux,default-trigger = "phy0tpt";
84 function = LED_FUNCTION_WPS;
85 color = <LED_COLOR_ID_GREEN>;
86 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
91 compatible = "gpio-leds";
94 label = "blue:wlan5g";
95 gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
96 linux,default-trigger = "phy1tpt";
101 compatible = "mtd-concat";
102 devices = <&ubiconcat0 &ubiconcat1>;
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
121 compatible = "jedec,spi-nor";
123 spi-max-frequency = <25000000>;
126 compatible = "fixed-partitions";
127 #address-cells = <1>;
137 label = "u-boot-env";
138 reg = <0x40000 0x10000>;
142 label = "caldata_backup";
143 reg = <0x50000 0x10000>;
149 reg = <0x60000 0x10000>;
153 label = "traffic_meter";
154 reg = <0x70000 0x10000>;
159 reg = <0x80000 0x10000>;
164 reg = <0x90000 0x160000>;
167 caldata: partition@1f0000 {
169 reg = <0x1f0000 0x10000>;
173 compatible = "fixed-layout";
174 #address-cells = <1>;
177 macaddr_caldata_0: macaddr@0 {
181 macaddr_caldata_c: macaddr@c {
185 cal_art_1000: cal@1000 {
186 reg = <0x1000 0x440>;
189 cal_art_5000: cal@5000 {
190 reg = <0x5000 0x440>;
198 compatible = "spi-nand";
200 spi-max-frequency = <25000000>;
203 compatible = "fixed-partitions";
204 #address-cells = <1>;
209 reg = <0x0 0x400000>;
212 ubiconcat0: partition@400000 {
213 label = "ubiconcat0";
214 reg = <0x400000 0x5c00000>;
217 ubiconcat1: partition@6020000 {
218 label = "ubiconcat1";
219 reg = <0x6020000 0x1f60000>;
222 * U-boot always unconditionally marks block 768, 1020 - 1023 as
223 * bad blocks on each boot. To avoid conflicts with the nand
224 * driver, manually skip them.
233 phy0: ethernet-phy@0 {
236 qca,mib-poll-interval = <500>;
238 qca,ar8327-initvals = <
239 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
240 0x10 0x81000080 /* POWER_ON_STRAP */
241 0x50 0xcc35cc35 /* LED_CTRL0 */
242 0x54 0xcb37cb37 /* LED_CTRL1 */
243 0x58 0x00000000 /* LED_CTRL2 */
244 0x5c 0x00f3cf00 /* LED_CTRL3 */
245 0x7c 0x0000007e /* PORT0_STATUS */
246 0x94 0x00000200 /* PORT6_STATUS */
254 pll-data = <0x03000101 0x00000101 0x00001919>;
256 nvmem-cells = <&macaddr_caldata_0>;
257 nvmem-cell-names = "mac-address";
260 phy-handle = <&phy0>;
266 nvmem-cells = <&macaddr_caldata_0>, <&cal_art_1000>;
267 nvmem-cell-names = "mac-address", "calibration";
274 /* chip is AR9580, override bogus PCI ID 168c:abcd */
275 compatible = "pci168c,0033";
276 reg = <0x0000 0 0 0 0>;
277 nvmem-cells = <&macaddr_caldata_c>, <&cal_art_5000>;
278 nvmem-cell-names = "mac-address", "calibration";
279 qca,gpio-mask=<0xf6ff>; /* unmask pin 9 for RFKILL button */