ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-c2-v3.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 "qca956x.dtsi"
8
9 / {
10         compatible = "tplink,archer-c2-v3", "qca,qca9563";
11         model = "TP-Link Archer C2 v3";
12
13         aliases {
14                 led-boot = &led_system;
15                 led-failsafe = &led_system;
16                 led-running = &led_system;
17                 led-upgrade = &led_system;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 led_system: system {
24                         label = "tp-link:green:system";
25                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
26                         default-state = "on";
27                 };
28
29                 wifi2g {
30                         label = "tp-link:green:wifi2g";
31                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
32                         linux,default-trigger = "phy1tpt";
33                 };
34
35                 wifi5g {
36                         label = "tp-link:green:wifi5g";
37                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
38                         linux,default-trigger = "phy0tpt";
39                 };
40
41                 wifi_wps {
42                         label = "tp-link:green:wps";
43                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44                 };
45
46                 wan {
47                         label = "tp-link:green:wan";
48                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
49                 };
50
51                 wan_fail {
52                         label = "tp-link:orange:wan";
53                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
54                 };
55
56                 lan1 {
57                         label = "tp-link:green:lan1";
58                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
59                 };
60
61                 lan2 {
62                         label = "tp-link:green:lan2";
63                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
64                 };
65
66                 lan3 {
67                         label = "tp-link:green:lan3";
68                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
69                 };
70
71                 lan4 {
72                         label = "tp-link:green:lan4";
73                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
74                 };
75         };
76
77         keys {
78                 compatible = "gpio-keys";
79
80                 reset {
81                         label = "Reset button";
82                         linux,code = <KEY_RESTART>;
83                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
84                         debounce-interval = <60>;
85                 };
86
87                 wps {
88                         label = "WPS button";
89                         linux,code = <KEY_WPS_BUTTON>;
90                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
91                         debounce-interval = <60>;
92                 };
93         };
94 };
95
96 &uart {
97         status = "okay";
98 };
99
100 &spi {
101         status = "okay";
102
103         num-cs = <1>;
104
105         flash@0 {
106                 compatible = "jedec,spi-nor";
107                 reg = <0>;
108                 spi-max-frequency = <25000000>;
109
110                 partitions {
111                         compatible = "fixed-partitions";
112                         #address-cells = <1>;
113                         #size-cells = <1>;
114
115                         partition@0 {
116                                 label = "factory-uboot";
117                                 reg = <0x000000 0x020000>;
118                                 read-only;
119                         };
120
121                         partition@20000 {
122                                 label = "uboot";
123                                 reg = <0x020000 0x10000>;
124                                 read-only;
125                         };
126
127                         partition@30000 {
128                                 label = "firmware";
129                                 reg = <0x030000 0x7A0000>;
130                                 compatible = "denx,uimage";
131                         };
132
133                         info: partition@7e0000 {
134                                 label = "info";
135                                 reg = <0x7e0000 0x010000>;
136                                 read-only;
137                         };
138
139                         art: partition@7f0000 {
140                                 label = "art";
141                                 reg = <0x7f0000 0x010000>;
142                                 read-only;
143                         };
144                 };
145         };
146 };
147
148 &gpio {
149         status = "okay";
150 };
151
152 &mdio0 {
153         status = "okay";
154
155         phy-mask = <0>;
156         phy0: ethernet-phy@0 {
157                 reg = <0>;
158                 phy-mode = "sgmii";
159                 qca,mib-poll-interval = <500>;
160
161                 qca,ar8327-initvals = <
162                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
163                         0x7c 0x0000007e /* PORT0_STATUS */
164                 >;
165         };
166 };
167
168 &pcie {
169         status = "okay";
170 };
171
172 &eth0 {
173         status = "okay";
174
175         mtd-mac-address = <&info 0x8>;
176         phy-mode = "sgmii";
177         phy-handle = <&phy0>;
178 };
179
180 &wmac {
181         status = "okay";
182
183         mtd-cal-data = <&art 0x1000>;
184         mtd-mac-address = <&info 0x8>;
185 };