ath79: Add Aruba AP-175 support
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_aruba_ap-175.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "aruba,ap-175", "qca,ar7161";
10 model = "Aruba AP-175";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 aliases {
17 led-boot = &led_power_amber;
18 led-failsafe = &led_power_amber;
19 led-upgrade = &led_power_amber;
20 label-mac-device = &eth0;
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 /* These internal LEDs cannot be seen when case is closed */
27 internal_2g_green {
28 label = "green:internal_2g";
29 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
30 };
31
32 internal_5g_green {
33 label = "green:internal_5g";
34 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
35 };
36
37 /* These external LEDs are visible from the bottom panel */
38
39 led_power_amber: power_amber {
40 label = "amber:power";
41 gpios = <&gpio_ext 5 GPIO_ACTIVE_HIGH>;
42 panic-indicator;
43 };
44
45 r1_act_blue {
46 label = "blue:r1_act";
47 gpios = <&gpio_ext 0 GPIO_ACTIVE_HIGH>;
48 linux,default-trigger = "phy1tpt";
49 };
50
51 r1_rssi1_blue {
52 label = "blue:r1_rssi1";
53 gpios = <&gpio_ext 1 GPIO_ACTIVE_HIGH>;
54 };
55
56 r1_rssi2_blue {
57 label = "blue:r1_rssi2";
58 gpios = <&gpio_ext 2 GPIO_ACTIVE_HIGH>;
59 };
60
61 r1_rssi3_blue {
62 label = "blue:r1_rssi3";
63 gpios = <&gpio_ext 3 GPIO_ACTIVE_HIGH>;
64 };
65
66 r1_rssi4_blue {
67 label = "blue:r1_rssi4";
68 gpios = <&gpio_ext 4 GPIO_ACTIVE_HIGH>;
69 };
70
71 r0_act_amber {
72 label = "amber:r0_act";
73 gpios = <&gpio_ext 8 GPIO_ACTIVE_HIGH>;
74 linux,default-trigger = "phy0tpt";
75 };
76
77 r0_rssi1_amber {
78 label = "amber:r0_rssi1";
79 gpios = <&gpio_ext 9 GPIO_ACTIVE_HIGH>;
80 };
81
82 r0_rssi2_amber {
83 label = "amber:r0_rssi2";
84 gpios = <&gpio_ext 10 GPIO_ACTIVE_HIGH>;
85 };
86
87 r0_rssi3_amber {
88 label = "amber:r0_rssi3";
89 gpios = <&gpio_ext 11 GPIO_ACTIVE_HIGH>;
90 };
91
92 r0_rssi4_amber {
93 label = "amber:r0_rssi4";
94 gpios = <&gpio_ext 12 GPIO_ACTIVE_HIGH>;
95 };
96 };
97
98 keys {
99 compatible = "gpio-keys";
100
101 reset {
102 label = "reset";
103 linux,code = <KEY_RESTART>;
104 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
105 };
106 };
107
108 i2c0: i2c {
109 compatible = "i2c-gpio";
110 i2c-gpio,delay-us = <10>;
111 i2c-gpio,timeout-ms = <1>;
112 sda-gpios = <&gpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
113 scl-gpios = <&gpio 2 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
114
115 #address-cells = <1>;
116 #size-cells = <0>;
117 };
118 };
119
120 &pcie0 {
121 status = "okay";
122
123 ath9k0: wifi@0,11 {
124 compatible = "pci168c,0029";
125 nvmem-cells = <&macaddr_hwinfo_1c>;
126 nvmem-cell-names = "mac-address";
127 mac-address-increment = <1>;
128 reg = <0x8800 0 0 0 0>;
129 #gpio-cells = <2>;
130 gpio-controller;
131 };
132
133 ath9k1: wifi@0,12 {
134 compatible = "pci168c,0029";
135 nvmem-cells = <&macaddr_hwinfo_1c>;
136 nvmem-cell-names = "mac-address";
137 mac-address-increment = <2>;
138 reg = <0x9000 0 0 0 0>;
139 #gpio-cells = <2>;
140 gpio-controller;
141 };
142 };
143
144 &mdio0 {
145 status = "okay";
146
147 phy1: ethernet-phy@1 {
148 reg = <0x1>;
149 };
150 };
151
152 &eth0 {
153 status = "okay";
154 nvmem-cells = <&macaddr_hwinfo_1c>;
155 nvmem-cell-names = "mac-address";
156
157 phy-mode = "rgmii";
158 phy-handle = <&phy1>;
159 };
160
161 &spi {
162 status = "okay";
163
164 flash@0 {
165 compatible = "jedec,spi-nor";
166 reg = <0>;
167 spi-max-frequency = <25000000>;
168
169 partitions {
170 compatible = "fixed-partitions";
171 #address-cells = <1>;
172 #size-cells = <1>;
173
174 partition@0 {
175 label = "u-boot";
176 reg = <0x000000 0x40000>;
177 read-only;
178 };
179
180 partition@40000 {
181 label = "firmware";
182 reg = <0x40000 0xfa0000>;
183 compatible = "denx,uimage";
184 };
185
186 hwinfo: partition@fe0000 {
187 label = "hwinfo";
188 reg = <0xfe0000 0x10000>;
189 read-only;
190 };
191
192 partition@ff0000 {
193 label = "u-boot-env";
194 reg = <0xff0000 0x10000>;
195 read-only;
196 };
197 };
198 };
199 };
200
201 &hwinfo {
202 compatible = "nvmem-cells";
203 #address-cells = <1>;
204 #size-cells = <1>;
205
206 macaddr_hwinfo_1c: macaddr@1c {
207 reg = <0x1c 0x6>;
208 };
209 };
210
211 &i2c0 {
212 gpio_ext: gpio@21 {
213 status = "okay";
214
215 compatible = "ti,tca6416";
216 reg = <0x21>;
217
218 #address-cells = <1>;
219 #size-cells = <0>;
220
221 gpio-controller;
222 #gpio-cells = <2>;
223 };
224
225 temp-sensor@4a {
226 compatible = "national,lm75";
227 reg = <0x4a>;
228 };
229
230 eeprom@50 { /* 24lc2561 */
231 compatible = "atmel,24c256","at24";
232 #address-cells = <1>;
233 #size-cells = <0>;
234 reg = <0x50>;
235 size = <256>;
236 };
237
238 ds1374c: rtc@68 {
239 status = "okay";
240
241 compatible = "dallas,ds1374";
242 reg = <0x68>;
243 };
244 };