ath79: move dts-v1 statement to ath79.dtsi
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_buffalo_whr-g301n.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7240.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "buffalo,whr-g301n", "qca,ar7240";
10 model = "Buffalo WHR-G301N";
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 router_on {
22 label = "router_on";
23 linux,code = <BTN_2>;
24 linux,input-type = <EV_SW>;
25 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
26 debounce-interval = <60>;
27 };
28
29 router_off {
30 label = "router_off";
31 linux,code = <BTN_3>;
32 linux,input-type = <EV_SW>;
33 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 };
36
37 reset {
38 label = "reset";
39 linux,code = <KEY_RESTART>;
40 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43
44 wps {
45 label = "wps";
46 linux,code = <KEY_WPS_BUTTON>;
47 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48 debounce-interval = <60>;
49 };
50 };
51
52 leds {
53 compatible = "gpio-leds";
54 pinctrl-names = "default";
55 pinctrl-0 = <&switch_led_pins>;
56
57 security {
58 label = "whr-g301n:orange:security";
59 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
60 };
61
62 led_diag: diag {
63 label = "whr-g301n:red:diag";
64 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
65 };
66
67 router {
68 label = "whr-g301n:green:router";
69 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
70 };
71
72 lan1 {
73 label = "whr-g301n:green:lan1";
74 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
75 };
76
77 lan2 {
78 label = "whr-g301n:green:lan2";
79 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
80 };
81
82 lan3 {
83 label = "whr-g301n:green:lan3";
84 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
85 };
86
87 lan4 {
88 label = "whr-g301n:green:lan4";
89 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
90 };
91
92 wan {
93 label = "whr-g301n:green:wan";
94 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
95 };
96 };
97
98 ath9k-leds {
99 compatible = "gpio-leds";
100
101 wlan {
102 label = "whr-g301n:green:wlan";
103 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
104 linux,default-trigger = "phy0tpt";
105 };
106 };
107 };
108
109 &spi {
110 status = "okay";
111
112 num-cs = <1>;
113
114 flash@0 {
115 compatible = "jedec,spi-nor";
116 reg = <0>;
117 spi-max-frequency = <25000000>;
118
119 partitions {
120 compatible = "fixed-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 partition@0 {
125 reg = <0x0 0x3e000>;
126 label = "u-boot";
127 read-only;
128 };
129
130 partition@3e000 {
131 reg = <0x3e000 0x2000>;
132 label = "u-boot-env";
133 read-only;
134 };
135
136 partition@40000 {
137 compatible = "denx,uimage";
138 reg = <0x40000 0x3a0000>;
139 label = "firmware";
140 };
141
142 partition@3e0000 {
143 reg = <0x3e0000 0x10000>;
144 label = "user_property";
145 read-only;
146 };
147
148 art: partition@3f0000 {
149 reg = <0x3f0000 0x10000>;
150 label = "art";
151 read-only;
152 };
153 };
154 };
155 };
156
157 &eth0 {
158 mtd-mac-address = <&art 0x120c>;
159 };
160
161 &eth1 {
162 status = "okay";
163
164 mtd-mac-address = <&art 0x120c>;
165 mtd-mac-address-increment = <1>;
166 };
167
168 &pcie {
169 status = "okay";
170
171 ath9k: wifi@0,0 {
172 compatible = "pci168c,002a";
173 reg = <0x0000 0 0 0 0>;
174 qca,no-eeprom;
175 mtd-mac-address = <&art 0x120c>;
176 #gpio-cells = <2>;
177 gpio-controller;
178 };
179 };
180
181 &pinmux {
182 switch_led_pins: switch_led_pins {
183 pinctrl-single,bits = <0x0 0x0 0xf8>;
184 };
185 };
186
187 &uart {
188 status = "okay";
189 };