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