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