ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.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 &spi {
96 status = "okay";
97
98 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <25000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "factory-uboot";
110 reg = <0x000000 0x020000>;
111 read-only;
112 };
113
114 partition@20000 {
115 label = "uboot";
116 reg = <0x020000 0x10000>;
117 read-only;
118 };
119
120 partition@30000 {
121 label = "firmware";
122 reg = <0x030000 0x7A0000>;
123 compatible = "denx,uimage";
124 };
125
126 info: partition@7e0000 {
127 label = "info";
128 reg = <0x7e0000 0x010000>;
129 read-only;
130
131 nvmem-layout {
132 compatible = "fixed-layout";
133 #address-cells = <1>;
134 #size-cells = <1>;
135
136 macaddr_info_8: macaddr@8 {
137 reg = <0x8 0x6>;
138 };
139 };
140 };
141
142 art: partition@7f0000 {
143 label = "art";
144 reg = <0x7f0000 0x010000>;
145 read-only;
146 };
147 };
148 };
149 };
150
151 &mdio0 {
152 status = "okay";
153
154 phy0: ethernet-phy@0 {
155 reg = <0>;
156 phy-mode = "sgmii";
157 qca,mib-poll-interval = <500>;
158
159 qca,ar8327-initvals = <
160 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
161 0x7c 0x0000007e /* PORT0_STATUS */
162 >;
163 };
164 };
165
166 &pcie {
167 status = "okay";
168 };
169
170 &eth0 {
171 status = "okay";
172
173 nvmem-cells = <&macaddr_info_8>;
174 nvmem-cell-names = "mac-address";
175 phy-mode = "sgmii";
176 phy-handle = <&phy0>;
177 };
178
179 &wmac {
180 status = "okay";
181
182 mtd-cal-data = <&art 0x1000>;
183 nvmem-cells = <&macaddr_info_8>;
184 nvmem-cell-names = "mac-address";
185 };