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