ath79: move dts-v1 statement to ath79.dtsi
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_engenius_ens202ext-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9341.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Engenius ENS202EXT v1";
10 compatible = "engenius,ens202ext-v1", "qca,ar9341";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "Reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_power: power {
35 label = "ens202ext-v1:amber:power";
36 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
37 default-state = "on";
38 };
39
40 wlan {
41 label = "ens202ext-v1:amber:wlan";
42 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy0tpt";
44 };
45
46 rssilow {
47 label = "ens202ext-v1:red:rssilow";
48 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
49 };
50
51 rssimedium {
52 label = "ens202ext-v1:amber:rssimedium";
53 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
54 };
55
56 rssihigh {
57 label = "ens202ext-v1:green:rssihigh";
58 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
59 };
60 };
61
62 virtual_flash {
63 compatible = "mtd-concat";
64
65 devices = <&firmware1 &firmware2>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 compatible = "openwrt,okli";
74 label = "firmware";
75 reg = <0x0 0x0>;
76 };
77 };
78 };
79 };
80
81 &ref {
82 clock-frequency = <40000000>;
83 };
84
85 &uart {
86 status = "okay";
87 };
88
89 &spi {
90 status = "okay";
91
92 num-cs = <1>;
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <40000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x000000 0x040000>;
107 read-only;
108 };
109
110 partition@40000 {
111 label = "u-boot-env";
112 reg = <0x040000 0x010000>;
113 };
114
115 partition@50000 {
116 label = "custom";
117 reg = <0x050000 0x050000>;
118 read-only;
119 };
120
121 partition@a0000 {
122 label = "loader";
123 reg = <0x0a0000 0x010000>;
124 read-only;
125 };
126
127 firmware2: partition@b0000 {
128 label = "firmware2";
129 reg = <0x0b0000 0x170000>;
130 };
131
132 partition@220000 {
133 label = "fakeroot";
134 reg = <0x220000 0x010000>;
135 };
136
137 firmware1: partition@230000 {
138 label = "firmware1";
139 reg = <0x230000 0xbc0000>;
140 };
141
142 partition@df0000 {
143 label = "failsafe";
144 reg = <0xdf0000 0x200000>;
145 read-only;
146 };
147
148 art: partition@ff0000 {
149 label = "art";
150 reg = <0xff0000 0x010000>;
151 read-only;
152 };
153 };
154 };
155 };
156
157 &eth0 {
158 status = "okay";
159
160 phy-handle = <&swphy0>;
161
162 mtd-mac-address = <&art 0x0>;
163 };
164
165 &eth1 {
166 status = "okay";
167
168 mtd-mac-address = <&art 0x0>;
169
170 gmac-config {
171 device = <&gmac>;
172 switch-phy-swap = <1>;
173 };
174 };
175
176 &wmac {
177 status = "okay";
178
179 mtd-cal-data = <&art 0x1000>;
180 };