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