ath79: improve common DTSI name for TP-Link Archer C5, C7 v1/v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9557_iodata_wn-ac-dgr.dtsi
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 "qca9557.dtsi"
8
9 / {
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200n8";
19 };
20
21 leds: leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "iodata:green:power";
26 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 eco {
31 label = "iodata:green:eco";
32 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33 };
34
35 wlan5g {
36 label = "iodata:green:wlan5g";
37 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy0tpt";
39 };
40
41 wlan2g {
42 label = "iodata:green:wlan2g";
43 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
44 linux,default-trigger = "phy1tpt";
45 };
46
47 notification {
48 label = "iodata:amber:notification";
49 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys: keys {
54 compatible = "gpio-keys";
55
56 eco {
57 label = "eco";
58 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
59 linux,code = <BTN_1>;
60 debounce-interval = <60>;
61 };
62
63 auto {
64 label = "auto";
65 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_0>;
67 linux,input-type = <EV_SW>;
68 debounce-interval = <60>;
69 };
70
71 wps {
72 label = "wps";
73 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_WPS_BUTTON>;
75 debounce-interval = <60>;
76 };
77
78 reset {
79 label = "reset";
80 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 debounce-interval = <60>;
83 };
84
85 router {
86 label = "router";
87 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
88 linux,code = <BTN_0>;
89 linux,input-type = <EV_SW>;
90 debounce-interval = <60>;
91 };
92 };
93 };
94
95 &spi {
96 status = "okay";
97
98 num-cs = <1>;
99
100 flash@0 {
101 compatible = "jedec,spi-nor";
102 reg = <0>;
103 spi-max-frequency = <25000000>;
104
105 partitions {
106 compatible = "fixed-partitions";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 partition@0 {
111 label = "u-boot";
112 reg = <0x000000 0x030000>;
113 read-only;
114 };
115
116 partition@30000 {
117 label = "u-boot-env";
118 reg = <0x030000 0x010000>;
119 read-only;
120 };
121
122 partition@40000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x040000 0xe50000>;
126 };
127
128 partition@e90000 {
129 label = "manufacture";
130 reg = <0xe90000 0x100000>;
131 read-only;
132 };
133
134 partition@f90000 {
135 label = "backup";
136 reg = <0xf90000 0x010000>;
137 read-only;
138 };
139
140 partition@fa0000 {
141 label = "storage";
142 reg = <0xfa0000 0x050000>;
143 read-only;
144 };
145
146 art: partition@ff0000 {
147 label = "art";
148 reg = <0xff0000 0x010000>;
149 read-only;
150 };
151 };
152 };
153 };
154
155 &mdio0 {
156 status = "okay";
157
158 phy0: ethernet-phy@0 {
159 reg = <0>;
160
161 qca,ar8327-initvals = <
162 0x04 0x87600000 /* PORT0 PAD MODE CTRL */
163 0x7c 0x0000007e /* PORT0_STATUS */
164 >;
165 };
166 };
167
168 &eth0 {
169 status = "okay";
170
171 pll-data = <0xa6000000 0x00000101 0x00001616>;
172 phy-handle = <&phy0>;
173 };
174
175 &pcie1 {
176 status = "okay";
177
178 wifi@0,0 {
179 compatible = "pci168c,003c";
180 reg = <0x0000 0 0 0 0>;
181 };
182 };
183
184 &uart {
185 status = "okay";
186 };
187
188 &usb_phy0 {
189 status = "okay";
190 };
191
192 &usb0 {
193 status = "okay";
194 };
195
196 &wmac {
197 status = "okay";
198
199 qca,no-eeprom;
200 };