ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_qihoo_c301.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "Qihoo 360 C301";
11 compatible = "qihoo,c301";
12
13 aliases {
14 led-boot = &led_wlan_g;
15 led-failsafe = &led_wlan_o;
16 led-upgrade = &led_wlan_o;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21 pinctrl-names = "default";
22 pinctrl-0 = <&jtag_disable_pins>;
23
24 led_wlan_g: wlan_g {
25 function = LED_FUNCTION_WLAN;
26 color = <LED_COLOR_ID_GREEN>;
27 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
28 };
29
30 led_wlan_o: wlan_o {
31 function = LED_FUNCTION_WLAN;
32 color = <LED_COLOR_ID_ORANGE>;
33 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy1tpt";
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 linux,code = <KEY_RESTART>;
43 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
44 debounce-interval = <60>;
45 };
46 };
47
48 reg_eth_led_vbus {
49 compatible = "regulator-fixed";
50 regulator-name = "eth_led_vbus";
51 regulator-min-microvolt = <3300000>;
52 regulator-max-microvolt = <3300000>;
53 regulator-always-on;
54 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
55 };
56
57 usb_vbus: reg_usb_vbus {
58 compatible = "regulator-fixed";
59 regulator-name = "usb_vbus";
60 regulator-min-microvolt = <5000000>;
61 regulator-max-microvolt = <5000000>;
62 enable-active-high;
63 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
64 };
65 };
66
67 &pinmux {
68 pmx_spi_cs1: pinmux_spi_cs1 {
69 pinctrl-single,bits = <0xc 0x07 0xff>;
70 };
71
72 pmx_led_switch: pinmux_led_switch {
73 pinctrl-single,bits = <0x0 0x2b2a2d00 0xffffff00>;
74 };
75 };
76
77 &ref {
78 clock-frequency = <40000000>;
79 };
80
81 &gpio {
82 gpio_ext_lna0 {
83 gpio-hog;
84 gpios = <14 0>;
85 output-high;
86 line-name = "c301:ext:lna0";
87 };
88
89 gpio_ext_lna1 {
90 gpio-hog;
91 gpios = <15 0>;
92 output-high;
93 line-name = "c301:ext:lna1";
94 };
95 };
96
97 &builtin_switch {
98 pinctrl-names = "default";
99 pinctrl-0 = <&pmx_led_switch>;
100 };
101
102 &spi {
103 status = "okay";
104
105 pinctrl-names = "default";
106 pinctrl-0 = <&pmx_spi_cs1>;
107
108 flash@0 {
109 compatible = "jedec,spi-nor";
110 reg = <0>;
111 spi-max-frequency = <25000000>;
112
113 partitions {
114 compatible = "fixed-partitions";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 uboot: partition@0 {
119 label = "u-boot";
120 reg = <0x0 0x40000>;
121 read-only;
122 };
123
124 partition@40000 {
125 label = "u-boot-env";
126 reg = <0x40000 0x10000>;
127 read-only;
128 };
129
130 partition@50000 {
131 label = "devdata";
132 reg = <0x50000 0x10000>;
133 read-only;
134 };
135
136 partition@60000 {
137 label = "devconf";
138 reg = <0x60000 0x10000>;
139 read-only;
140 };
141
142 partition@70000 {
143 compatible = "seama";
144 label = "firmware";
145 reg = <0x70000 0xf60000>;
146 };
147
148 partition@fd0000 {
149 label = "warm_start";
150 reg = <0xfd0000 0x10000>;
151 read-only;
152 };
153
154 partition@fe0000 {
155 label = "action_image_config";
156 reg = <0xfe0000 0x10000>;
157 };
158
159 partition@ff0000 {
160 label = "radiocfg";
161 reg = <0xff0000 0x10000>;
162 read-only;
163
164 nvmem-layout {
165 compatible = "fixed-layout";
166 #address-cells = <1>;
167 #size-cells = <1>;
168
169 cal_radiocfg_5000: calibration@5000 {
170 reg = <0x5000 0x844>;
171 };
172 };
173 };
174 };
175 };
176
177 flash@1 {
178 compatible = "jedec,spi-nor";
179 reg = <1>;
180 spi-max-frequency = <25000000>;
181
182 partitions {
183 compatible = "fixed-partitions";
184 #address-cells = <1>;
185 #size-cells = <1>;
186
187 partition@0 {
188 label = "firmware2";
189 reg = <0x0 0xf00000>;
190 };
191
192 partition@f00000 {
193 label = "privatedata";
194 reg = <0xf00000 0x100000>;
195 read-only;
196 };
197 };
198 };
199 };
200
201 &usb {
202 status = "okay";
203 };
204
205 &usb_phy {
206 status = "okay";
207 phy-supply = <&usb_vbus>;
208 };
209
210 &pcie {
211 status = "okay";
212
213 wifi@0,0 {
214 compatible = "qcom,ath10k";
215 reg = <0 0 0 0 0>;
216 nvmem-cells = <&cal_radiocfg_5000>;
217 nvmem-cell-names = "calibration";
218 };
219 };
220
221 &wmac {
222 status = "okay";
223 qca,no-eeprom;
224 };
225
226 &eth1 {
227 status = "okay";
228 gmac-config {
229 device = <&gmac>;
230 switch-phy-swap = <1>;
231 switch-only-mode = <1>;
232 };
233 };
234
235 &eth0 {
236 status = "okay";
237 phy-handle = <&swphy0>;
238 };