ath79: ar: convert to mac-base
[openwrt/staging/hauke.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 1>;
126 nvmem-cell-names = "mac-address";
127 reg = <0x8800 0 0 0 0>;
128 #gpio-cells = <2>;
129 gpio-controller;
130 };
131
132 ath9k1: wifi@0,12 {
133 compatible = "pci168c,0029";
134 nvmem-cells = <&macaddr_hwinfo_1c 2>;
135 nvmem-cell-names = "mac-address";
136 reg = <0x9000 0 0 0 0>;
137 #gpio-cells = <2>;
138 gpio-controller;
139 };
140 };
141
142 &mdio0 {
143 status = "okay";
144
145 phy1: ethernet-phy@1 {
146 reg = <0x1>;
147 };
148 };
149
150 &eth0 {
151 status = "okay";
152 nvmem-cells = <&macaddr_hwinfo_1c 0>;
153 nvmem-cell-names = "mac-address";
154
155 phy-mode = "rgmii";
156 phy-handle = <&phy1>;
157 };
158
159 &spi {
160 status = "okay";
161
162 flash@0 {
163 compatible = "jedec,spi-nor";
164 reg = <0>;
165 spi-max-frequency = <25000000>;
166
167 partitions {
168 compatible = "fixed-partitions";
169 #address-cells = <1>;
170 #size-cells = <1>;
171
172 partition@0 {
173 label = "u-boot";
174 reg = <0x000000 0x40000>;
175 read-only;
176 };
177
178 partition@40000 {
179 label = "firmware";
180 reg = <0x40000 0xfa0000>;
181 compatible = "denx,uimage";
182 };
183
184 hwinfo: partition@fe0000 {
185 label = "hwinfo";
186 reg = <0xfe0000 0x10000>;
187 read-only;
188
189 nvmem-layout {
190 compatible = "fixed-layout";
191 #address-cells = <1>;
192 #size-cells = <1>;
193
194 macaddr_hwinfo_1c: macaddr@1c {
195 compatible = "mac-base";
196 reg = <0x1c 0x6>;
197 #nvmem-cell-cells = <1>;
198 };
199 };
200 };
201
202 partition@ff0000 {
203 label = "u-boot-env";
204 reg = <0xff0000 0x10000>;
205 read-only;
206 };
207 };
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 };