ath79: use gpios for switch management in WZR-HP-G300NH variants
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9550_airtight_c-75.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "AirTight Networks C-75";
11 compatible = "airtight,c-75", "qca,qca9550", "qca,qca9558";
12
13 aliases {
14 label-mac-device = &eth0;
15 led-boot = &led_power_amber;
16 led-running = &led_power_green;
17 led-failsafe = &led_power_amber;
18 led-upgrade = &led_power_amber;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_power_amber: power-amber {
35 label = "amber:power";
36 color = <LED_COLOR_ID_AMBER>;
37 function = LED_FUNCTION_POWER;
38 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39 };
40
41 led_power_green: power-green {
42 label = "green:power";
43 color = <LED_COLOR_ID_GREEN>;
44 function = LED_FUNCTION_POWER;
45 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan2g {
49 label = "green:wlan2g";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy1tpt";
52 };
53 };
54
55 virtual_flash {
56 compatible = "mtd-concat";
57 devices = <&fwconcat0 &fwconcat1>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "firmware";
66 reg = <0x0 0x1f90000>;
67 compatible = "denx,uimage";
68 };
69 };
70 };
71 };
72
73 &eth0 {
74 status = "okay";
75
76 nvmem-cells = <&macaddr_art_0>;
77 nvmem-cell-names = "mac-address";
78 phy-handle = <&phy0>;
79 pll-data = <0xa6000000 0x00000101 0x00001616>;
80 };
81
82 &mdio0 {
83 status = "okay";
84
85 phy0: ethernet-phy@0 {
86 reg = <0>;
87 qca,ar8327-initvals = <
88 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
89 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
90 0x58 0xc935c935 /* LED2 CTRL */
91 0x5c 0x03ffff00 /* LED3 CTRL */
92 0x7c 0x0000007e /* PORT0_STATUS */
93 0x94 0x0000007e /* PORT6_STATUS */
94 >;
95 };
96 };
97
98 &eth1 {
99 status = "okay";
100
101 nvmem-cells = <&macaddr_art_6>;
102 nvmem-cell-names = "mac-address";
103 pll-data = <0x03000101 0x00000101 0x00001616>;
104
105 fixed-link {
106 speed = <1000>;
107 full-duplex;
108 };
109 };
110
111 &pcie0 {
112 status = "okay";
113
114 wifi@0,0 {
115 compatible = "qcom,ath10k";
116 reg = <0x0000 0 0 0 0>;
117 };
118 };
119
120 &spi {
121 status = "okay";
122
123 flash@0 {
124 compatible = "jedec,spi-nor";
125 reg = <0>;
126 spi-max-frequency = <25000000>;
127
128 partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 partition@0 {
134 label = "u-boot";
135 reg = <0x000000 0x040000>;
136 read-only;
137 };
138
139 partition@40000 {
140 label = "u-boot-env";
141 reg = <0x040000 0x010000>;
142 };
143
144 partition@50000 {
145 label = "wlandrv";
146 reg = <0x050000 0x010000>;
147 read-only;
148 };
149
150 fwconcat0: partition@60000 {
151 label = "fwconcat0";
152 reg = <0x060000 0xf90000>;
153 };
154
155 art: partition@ff0000 {
156 label = "art";
157 reg = <0xff0000 0x010000>;
158 read-only;
159 };
160 };
161 };
162
163 flash@1 {
164 compatible = "jedec,spi-nor";
165 reg = <1>;
166 spi-max-frequency = <25000000>;
167
168 partitions {
169 compatible = "fixed-partitions";
170 #address-cells = <1>;
171 #size-cells = <1>;
172
173 fwconcat1: partition@0 {
174 label = "fwconcat1";
175 reg = <0x0 0x1000000>;
176 };
177 };
178 };
179 };
180
181 &usb_phy0 {
182 status = "okay";
183 };
184
185 &usb0 {
186 status = "okay";
187 };
188
189 &wmac {
190 status = "okay";
191
192 mtd-cal-data = <&art 0x1000>;
193 };
194
195 &art {
196 compatible = "nvmem-cells";
197 #address-cells = <1>;
198 #size-cells = <1>;
199
200 macaddr_art_0: macaddr@0 {
201 reg = <0x0 0x6>;
202 };
203
204 macaddr_art_6: macaddr@6 {
205 reg = <0x6 0x6>;
206 };
207 };