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