37d0f0b268517149f77ae5cf807f71d8d83ca141
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9558_aruba_ap-115.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "aruba,ap-115", "qca,qca9558";
10 model = "Aruba AP-115";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_red;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_red;
17 label-mac-device = &eth0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,9600n8";
22 };
23
24 /**
25 * Currently unused GPIOs in OpenWrt:
26 *
27 * TPM-CLK: 19
28 * TPM-IO: 20
29 * ETH-PHY-Interrupt: 11
30 * Power-DC: 22
31 * Power-PoE: 23
32 * Power-PoE-8023af: 17
33 */
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_power_green: power-green {
39 label = "green:power";
40 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
41 };
42
43 led_power_red: power-red {
44 label = "red:power";
45 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
46 };
47
48 radio-24-green {
49 label = "green:radio-24";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53
54 radio-24-amber {
55 label = "amber:radio-24";
56 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
57 };
58
59 radio-5-green {
60 label = "green:radio-5";
61 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
62 linux,default-trigger = "phy1tpt";
63 };
64
65 radio-5-amber {
66 label = "amber:radio-5";
67 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
68 };
69 };
70
71 keys {
72 compatible = "gpio-keys";
73
74 reset {
75 label = "reset";
76 linux,code = <KEY_RESTART>;
77 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
78 };
79 };
80
81 reg_usb_vbus {
82 compatible = "regulator-fixed";
83 regulator-name = "usb_vbus";
84 regulator-min-microvolt = <5000000>;
85 regulator-max-microvolt = <5000000>;
86 gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
87 enable-active-high;
88 regulator-always-on;
89 };
90 };
91
92 &pcie0 {
93 status = "okay";
94
95 ath9k: wifi@0,0 {
96 compatible = "pci168c,0033";
97 reg = <0x0000 0 0 0 0>;
98 qca,no-eeprom;
99
100 nvmem-cells = <&macaddr_oemdata_1d>;
101 nvmem-cell-names = "mac-address";
102
103 mac-address-increment = <1>;
104 };
105 };
106
107 &pinmux {
108 /**
109 * Ugly hack ahead!
110 *
111 * GPIO05: Bank1-CS / Bank2-CLK
112 * GPIO14: Bank1-CLK / Bank2-CS
113 *
114 * We can not support this with OpenWrt, as this
115 * would require us to influence the pinmux based on the CS.
116 *
117 * We force-select Bank 1. Remember to blame Aruba for that.
118 */
119 cs0_pin5: spi-cs0-pin5 {
120 pinctrl-single,bits = <0x4 0x900 0xff00>;
121 };
122
123 clk_pin14: spi-cs1-pin14 {
124 pinctrl-single,bits = <0xc 0x0a0000 0xff0000>;
125 };
126 };
127
128 &spi {
129 pinctrl-names = "default";
130 pinctrl-0 = <&cs0_pin5 &clk_pin14>;
131 status = "okay";
132
133 flash@0 {
134 compatible = "jedec,spi-nor";
135 reg = <0>;
136 spi-max-frequency = <25000000>;
137
138 partitions {
139 compatible = "fixed-partitions";
140 #address-cells = <1>;
141 #size-cells = <1>;
142
143 partition@1 {
144 label = "flash-full";
145 reg = <0x0 0x1000000>;
146 read-only;
147 };
148
149 uboot: partition@0 {
150 label = "u-boot";
151 reg = <0x000000 0x040000>;
152 read-only;
153 };
154
155 /* Here be dragons */
156
157 partition@100000 {
158 compatible = "denx,uimage";
159 label = "firmware";
160 reg = <0x100000 0xe00000>;
161 };
162
163 oemdata: partition@fe0000 {
164 label = "oemdata";
165 reg = <0xfe0000 0x010000>;
166 read-only;
167
168 nvmem-layout {
169 compatible = "fixed-layout";
170 #address-cells = <1>;
171 #size-cells = <1>;
172
173 macaddr_oemdata_1d: macaddr@1d {
174 reg = <0x1d 0x6>;
175 };
176 };
177 };
178
179 partition@ff0000 {
180 label = "u-boot-env";
181 reg = <0xff0000 0x10000>;
182 };
183 };
184 };
185 };
186
187 &wmac {
188 status = "okay";
189
190 qca,no-eeprom;
191 nvmem-cells = <&macaddr_oemdata_1d>;
192 nvmem-cell-names = "mac-address";
193 };
194
195 &mdio0 {
196 status = "okay";
197
198 phy0: ethernet-phy@0 {
199 reg = <0>;
200
201 reset-gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
202 reset-assert-us = <10000>;
203 reset-deassert-us = <10000>;
204
205 eee-broken-100tx;
206 eee-broken-1000t;
207 };
208 };
209
210 &eth0 {
211 status = "okay";
212
213 nvmem-cells = <&macaddr_oemdata_1d>;
214 nvmem-cell-names = "mac-address";
215
216 phy-handle = <&phy0>;
217 phy-mode = "rgmii-id";
218
219 pll-data = <0xa6000000 0xa0000101 0xa0001313>;
220
221 gmac-config {
222 device = <&gmac>;
223 ge0-sgmii = <0>;
224 txen-delay = <3>;
225 txd-delay = <3>;
226 rxdv-delay = <3>;
227 rxd-delay = <3>;
228 rgmii-enabled = <1>;
229 };
230 };
231
232 &usb_phy0 {
233 status = "okay";
234 };
235
236 &usb0 {
237 dr_mode = "host";
238 status = "okay";
239 };