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