ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7161_aruba_ap-105.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 "ar7100.dtsi"
8
9 / {
10         compatible = "aruba,ap-105", "qca,ar7161";
11         model = "Aruba AP-105";
12
13         chosen {
14                 bootargs = "console=ttyS0,9600";
15         };
16
17         aliases {
18                 led-boot = &power_green;
19                 led-failsafe = &power_red;
20                 led-running = &power_green;
21                 led-upgrade = &power_green;
22                 label-mac-device = &eth0;
23         };
24
25         extosc: ref {
26                 compatible = "fixed-clock";
27                 #clock-cells = <0>;
28                 clock-output-names = "ref";
29                 clock-frequency = <40000000>;
30         };
31
32         leds {
33                 compatible = "gpio-leds";
34
35                 power_green: power_green {
36                         label = "ap-105:green:power";
37                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
38                 };
39
40                 power_red: power_red {
41                         label = "ap-105:red:power";
42                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
43                         panic-indicator;
44                 };
45
46                 wifi_2g_red: wifi_2g_red {
47                         label = "ap-105:red:wlan2g";
48                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
49                 };
50
51                 wifi_5g_red: wifi_5g_red {
52                         label = "ap-105:red:wlan5g";
53                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
54                 };
55         };
56
57         ath9k-leds {
58                 compatible = "gpio-leds";
59
60                 wifi_2g_green {
61                         label = "ap-105:green:wlan2g";
62                         gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
63                         linux,default-trigger = "phy0tpt";
64                 };
65
66                 wifi_5g_green {
67                         label = "ap-105:green:wlan5g";
68                         gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
69                         linux,default-trigger = "phy1tpt";
70                 };
71         };
72
73         keys {
74                 compatible = "gpio-keys";
75
76                 reset {
77                         label = "reset";
78                         linux,code = <KEY_RESTART>;
79                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
80                 };
81         };
82
83         i2c {
84                 compatible = "i2c-gpio";
85
86                 sda-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
87                 scl-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
88
89                 /* can be removed on 4.19 */
90                 gpios = <&gpio 5 GPIO_ACTIVE_LOW>,
91                         <&gpio 4 GPIO_ACTIVE_LOW>;
92
93                 #address-cells = <1>;
94                 #size-cells = <0>;
95
96                 tpm@29 {
97                         compatible = "atmel,at97sc3203s";
98                         reg = <0x29>;
99
100                         /* triggering it, will also kill system */
101                         reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
102                 };
103         };
104 };
105
106 &pcie0 {
107         status = "okay";
108
109         ath9k0: wifi@0,11 { /* 2.4 GHz */
110                 compatible = "pci168c,0029";
111                 mtd-mac-address = <&hwinfo 0x1c>;
112                 mtd-mac-address-increment = <1>;
113                 reg = <0x8800 0 0 0 0>;
114                 #gpio-cells = <2>;
115                 gpio-controller;
116         };
117
118         ath9k1: wifi@0,12 { /* 5 GHz */
119                 compatible = "pci168c,0029";
120                 mtd-mac-address = <&hwinfo 0x1c>;
121                 mtd-mac-address-increment = <2>;
122                 reg = <0x9000 0 0 0 0>;
123                 #gpio-cells = <2>;
124                 gpio-controller;
125         };
126 };
127
128 &uart {
129         status = "okay";
130 };
131
132 &mdio0 {
133         status = "okay";
134
135         phy-mask = <0x1>;
136
137         phy0: ethernet-phy@0 {
138                 reg = <0>;
139         };
140 };
141
142 &eth0 {
143         status = "okay";
144         mtd-mac-address = <&hwinfo 0x1c>;
145
146         pll-data = <0x00110000 0x00001099 0x00991099>;
147
148         phy-mode = "rgmii";
149         phy-handle = <&phy0>;
150 };
151
152 &spi {
153         status = "okay";
154         num-cs = <1>;
155
156         flash@0 {
157                 compatible = "jedec,spi-nor";
158                 reg = <0>;
159                 spi-max-frequency = <25000000>;
160
161                 partitions {
162                         compatible = "fixed-partitions";
163                         #address-cells = <1>;
164                         #size-cells = <1>;
165
166                         partition@0 {
167                                 label = "u-boot";
168                                 reg = <0x000000 0x40000>;
169                                 read-only;
170                         };
171
172                         partition@40000 {
173                                 label = "firmware";
174                                 reg = <0x40000 0xfa0000>;
175                                 compatible = "denx,uimage";
176                         };
177
178                         hwinfo: partition@fe0000 {
179                                 label = "hwinfo";
180                                 reg = <0xfe0000 0x10000>;
181                                 read-only;
182                         };
183
184                         partition@ff0000 {
185                                 label = "u-boot-env";
186                                 reg = <0xff0000 0x10000>;
187                                 read-only;
188                         };
189                 };
190         };
191 };