ath79: add support for Senao Engenius ENH202 v1
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_engenius_enh202-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 "ar7240.dtsi"
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 = "enh202-v1:red:rssilow";
39 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
40 };
41
42 rssimedium {
43 label = "enh202-v1:amber:rssimedium";
44 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
45 };
46
47 led_rssihigh: rssihigh {
48 label = "enh202-v1:green:rssihigh";
49 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
50 };
51
52 lan {
53 label = "enh202-v1:amber:lan";
54 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
55 };
56
57 wan {
58 label = "enh202-v1:green:wan";
59 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
60 };
61 };
62
63 ath9k-leds {
64 compatible = "gpio-leds";
65
66 wlan {
67 label = "enh202-v1: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 = <&firmware1 &firmware2>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 compatible = "openwrt,okli";
85 label = "firmware";
86 reg = <0x0 0x0>;
87 };
88 };
89 };
90 };
91
92 &uart {
93 status = "okay";
94 };
95
96 &spi {
97 status = "okay";
98
99 num-cs = <1>;
100
101 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <20000000>;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "u-boot";
113 reg = <0x0 0x40000>;
114 read-only;
115 };
116
117 partition@40000 {
118 label = "u-boot-env";
119 reg = <0x40000 0x10000>;
120 };
121
122 partition@50000 {
123 label = "custom";
124 reg = <0x50000 0x50000>;
125 read-only;
126 };
127
128 partition@a0000 {
129 label = "loader";
130 reg = <0xa0000 0x10000>;
131 read-only;
132 };
133
134 firmware2: partition@b0000 {
135 label = "firmware2";
136 reg = <0xb0000 0xf0000>;
137 };
138
139 partition@1a0000 {
140 label = "fakeroot";
141 reg = <0x1a0000 0x10000>;
142 };
143
144 firmware1: partition@1b0000 {
145 label = "firmware1";
146 reg = <0x1b0000 0x4c0000>;
147 };
148
149 partition@670000 {
150 label = "failsafe";
151 reg = <0x670000 0x180000>;
152 read-only;
153 };
154
155 art: partition@7f0000 {
156 label = "art";
157 reg = <0x7f0000 0x10000>;
158 read-only;
159 };
160 };
161 };
162 };
163
164 &eth0 {
165 mtd-mac-address = <&art 0x0>;
166 };
167
168 &eth1 {
169 status = "okay";
170
171 mtd-mac-address = <&art 0x0>;
172 };
173
174 &pcie {
175 status = "okay";
176
177 ath9k: wifi@0,0 {
178 compatible = "pci168c,002a";
179 reg = <0x0000 0 0 0 0>;
180 qca,no-eeprom;
181 #gpio-cells = <2>;
182 gpio-controller;
183 };
184 };