ath79: move reference clock node to SoC dtsi
[openwrt/staging/jow.git] / target / linux / ath79 / dts / ar7242_buffalo_wzr-hp-g302h-a1a0.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7242.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242";
10 model = "Buffalo WZR-HP-G302H A1A0";
11
12 aliases {
13 led-boot = &led_diag;
14 led-failsafe = &led_diag;
15 led-upgrade = &led_diag;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 reset {
22 label = "reset";
23 linux,code = <KEY_RESTART>;
24 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
25 debounce-interval = <60>;
26 };
27
28 usb {
29 label = "usb";
30 linux,code = <BTN_2>;
31 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
32 debounce-interval = <60>;
33 };
34
35 router_on {
36 label = "router_on";
37 linux,code = <BTN_5>;
38 linux,input-type = <EV_SW>;
39 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
40 debounce-interval = <60>;
41 };
42
43 movie_engine {
44 label = "movie_engine";
45 linux,code = <BTN_3>;
46 linux,input-type = <EV_SW>;
47 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
48 debounce-interval = <60>;
49 };
50
51 wps {
52 label = "wps";
53 linux,code = <KEY_WPS_BUTTON>;
54 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
55 debounce-interval = <60>;
56 };
57 };
58
59 leds {
60 compatible = "gpio-leds";
61
62 led_diag: diag {
63 label = "red:diag";
64 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
65 };
66 };
67
68 ath9k-leds {
69 compatible = "gpio-leds";
70
71 usb {
72 label = "blue:usb";
73 gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
74 trigger-sources = <&hub_port>;
75 linux,default-trigger = "usbport";
76 };
77
78 wireless {
79 label = "green:wireless";
80 gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
81 linux,default-trigger = "phy0tpt";
82 };
83
84 security {
85 label = "orange:security";
86 gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
87 };
88
89 router {
90 label = "green:router";
91 gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
92 };
93
94 movie_engine_on {
95 label = "blue:movie_engine_on";
96 gpios = <&ath9k 8 GPIO_ACTIVE_LOW>;
97 };
98
99 movie_engine_off {
100 label = "blue:movie_engine_off";
101 gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
102 };
103 };
104
105 gpio-export {
106 compatible = "gpio-export";
107 #size-cells = <0>;
108
109 gpio_usb_power {
110 gpio-export,name = "buffalo:usb-power";
111 gpio-export,output = <1>;
112 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
113 };
114 };
115
116 virtual_flash {
117 compatible = "mtd-concat";
118 devices = <&flash0 &flash1>;
119
120 partitions {
121 compatible = "fixed-partitions";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 partition@0 {
126 reg = <0x0 0x40000>;
127 label = "u-boot";
128 read-only;
129 };
130
131 partition@40000 {
132 reg = <0x40000 0x10000>;
133 label = "u-boot-env";
134 };
135
136 art: partition@50000 {
137 reg = <0x50000 0x10000>;
138 label = "art";
139 read-only;
140 };
141
142 partition@60000 {
143 compatible = "denx,uimage";
144 reg = <0x60000 0x1f60000>;
145 label = "firmware";
146 };
147
148 partition@1fc0000 {
149 reg = <0x1fc0000 0x40000>;
150 label = "user_property";
151 read-only;
152 };
153 };
154 };
155 };
156
157 &spi {
158 status = "okay";
159
160 flash0: flash@0 {
161 compatible = "jedec,spi-nor";
162 reg = <0>;
163 spi-max-frequency = <25000000>;
164 };
165
166 flash1: flash@1 {
167 compatible = "jedec,spi-nor";
168 reg = <1>;
169 spi-max-frequency = <25000000>;
170 };
171 };
172
173 &mdio0 {
174 status = "okay";
175
176 phy0: ethernet-phy@0 {
177 reg = <0>;
178 phy-mode = "rgmii";
179 };
180 };
181
182 &eth0 {
183 status = "okay";
184
185 pll-data = <0x1c000000 0x00000101 0x00001616>;
186
187 nvmem-cells = <&macaddr_art_120c>;
188 nvmem-cell-names = "mac-address";
189
190 phy-mode = "rgmii";
191 phy-handle = <&phy0>;
192 };
193
194 &pcie {
195 status = "okay";
196
197 ath9k: wifi@0,0 {
198 compatible = "pci168c,002a";
199 reg = <0x0000 0 0 0 0>;
200 nvmem-cells = <&macaddr_art_120c>;
201 nvmem-cell-names = "mac-address";
202 qca,no-eeprom;
203 #gpio-cells = <2>;
204 gpio-controller;
205 };
206 };
207
208 &usb_phy {
209 status = "okay";
210 };
211
212 &usb {
213 #address-cells = <1>;
214 #size-cells = <0>;
215 status = "okay";
216
217 hub_port: port@1 {
218 reg = <1>;
219 #trigger-source-cells = <0>;
220 };
221 };
222
223 &art {
224 compatible = "nvmem-cells";
225 #address-cells = <1>;
226 #size-cells = <1>;
227
228 macaddr_art_120c: macaddr@120c {
229 reg = <0x120c 0x6>;
230 };
231 };