ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-c6-v2-us.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca9563_tplink_archer-x6-v2.dtsi"
4
5 / {
6 compatible = "tplink,archer-c6-v2-us", "qca,qca9563";
7 model = "TP-Link Archer C6 v2 (US) / A6 v2 (US/TW)";
8
9 aliases {
10 label-mac-device = &eth0;
11
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 label = "green:power";
23 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
24 default-state = "on";
25 };
26
27 wlan2g {
28 label = "green:wlan2g";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 linux,default-trigger = "phy1tpt";
31 };
32
33 wlan5g {
34 label = "green:wlan5g";
35 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0tpt";
37 };
38
39 lan {
40 label = "green:lan";
41 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
42 };
43
44 wan {
45 label = "green:wan";
46 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
47 };
48
49 wan_fail {
50 label = "amber:wan";
51 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52 };
53
54 wps {
55 label = "green:wps";
56 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
57 };
58 };
59
60 keys {
61 compatible = "gpio-keys";
62
63 reset {
64 label = "Reset button";
65 linux,code = <KEY_RESTART>;
66 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
67 debounce-interval = <60>;
68 };
69
70 wps {
71 label = "WPS button";
72 linux,code = <KEY_WPS_BUTTON>;
73 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
74 debounce-interval = <60>;
75 };
76 };
77 };
78
79 &spi {
80 status = "okay";
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <25000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "factory-boot";
94 reg = <0x000000 0x020000>;
95 read-only;
96 };
97
98 info: partition@20000 {
99 label = "info";
100 reg = <0x020000 0x010000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "u-boot";
106 reg = <0x030000 0x020000>;
107 read-only;
108 };
109
110 partition@50000 {
111 compatible = "denx,uimage";
112 label = "firmware";
113 reg = <0x050000 0xf80000>;
114 };
115
116 partition@fd0000 {
117 label = "tplink";
118 reg = <0xfd0000 0x020000>;
119 read-only;
120 };
121
122 art: partition@ff0000 {
123 label = "art";
124 reg = <0xff0000 0x010000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &eth0 {
132 nvmem-cells = <&macaddr_info_8>;
133 nvmem-cell-names = "mac-address";
134 };
135
136 &wmac {
137 mtd-cal-data = <&art 0x1000>;
138
139 nvmem-cells = <&macaddr_info_8>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &info {
144 compatible = "nvmem-cells";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 macaddr_info_8: macaddr@8 {
149 reg = <0x8 0x6>;
150 };
151 };