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