ath79: move dts-v1 statement to ath79.dtsi
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_engenius_enh202-v1.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 = "engenius,enh202-v1", "qca,ar7240";
10 model = "EnGenius ENH202 v1";
11
12 aliases {
13 led-boot = &led_rssihigh;
14 led-failsafe = &led_rssihigh;
15 led-running = &led_rssihigh;
16 led-upgrade = &led_rssihigh;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 linux,code = <KEY_RESTART>;
25 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
26 debounce-interval = <60>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 pinctrl-names = "default";
34 pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
35
36 rssilow {
37 label = "enh202-v1:red:rssilow";
38 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39 };
40
41 rssimedium {
42 label = "enh202-v1:amber:rssimedium";
43 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
44 };
45
46 led_rssihigh: rssihigh {
47 label = "enh202-v1:green:rssihigh";
48 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49 };
50
51 lan {
52 label = "enh202-v1:amber:lan";
53 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54 };
55
56 wan {
57 label = "enh202-v1:green:wan";
58 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
59 };
60 };
61
62 ath9k-leds {
63 compatible = "gpio-leds";
64
65 wlan {
66 label = "enh202-v1:green:wlan";
67 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy0tpt";
69 };
70 };
71
72 virtual_flash {
73 compatible = "mtd-concat";
74
75 devices = <&firmware1 &firmware2>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 compatible = "openwrt,okli";
84 label = "firmware";
85 reg = <0x0 0x0>;
86 };
87 };
88 };
89 };
90
91 &uart {
92 status = "okay";
93 };
94
95 &spi {
96 status = "okay";
97
98 num-cs = <1>;
99
100 flash@0 {
101 compatible = "jedec,spi-nor";
102 reg = <0>;
103 spi-max-frequency = <20000000>;
104
105 partitions {
106 compatible = "fixed-partitions";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 partition@0 {
111 label = "u-boot";
112 reg = <0x0 0x40000>;
113 read-only;
114 };
115
116 partition@40000 {
117 label = "u-boot-env";
118 reg = <0x40000 0x10000>;
119 };
120
121 partition@50000 {
122 label = "custom";
123 reg = <0x50000 0x50000>;
124 read-only;
125 };
126
127 partition@a0000 {
128 label = "loader";
129 reg = <0xa0000 0x10000>;
130 read-only;
131 };
132
133 firmware2: partition@b0000 {
134 label = "firmware2";
135 reg = <0xb0000 0xf0000>;
136 };
137
138 partition@1a0000 {
139 label = "fakeroot";
140 reg = <0x1a0000 0x10000>;
141 };
142
143 firmware1: partition@1b0000 {
144 label = "firmware1";
145 reg = <0x1b0000 0x4c0000>;
146 };
147
148 partition@670000 {
149 label = "failsafe";
150 reg = <0x670000 0x180000>;
151 read-only;
152 };
153
154 art: partition@7f0000 {
155 label = "art";
156 reg = <0x7f0000 0x10000>;
157 read-only;
158 };
159 };
160 };
161 };
162
163 &eth0 {
164 mtd-mac-address = <&art 0x0>;
165 };
166
167 &eth1 {
168 status = "okay";
169
170 mtd-mac-address = <&art 0x0>;
171 };
172
173 &pcie {
174 status = "okay";
175
176 ath9k: wifi@0,0 {
177 compatible = "pci168c,002a";
178 reg = <0x0000 0 0 0 0>;
179 qca,no-eeprom;
180 #gpio-cells = <2>;
181 gpio-controller;
182 };
183 };