ath79: convert ath10k calibration data to NVMEM (ASCII MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_nec_wg800hp.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 model = "NEC Aterm WG800HP";
10 compatible = "nec,wg800hp", "qca,qca9563";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_red;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_green;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21 pinctrl-names = "default";
22 pinctrl-0 = <&jtag_disable_pins>;
23
24 wlan2g_red {
25 label = "red:wlan2g";
26 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
27 };
28
29 active_red {
30 label = "red:active";
31 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
32 };
33
34 active_green {
35 label = "green:active";
36 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
37 };
38
39 led_power_red: power_red {
40 label = "red:power";
41 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
42 };
43
44 led_power_green: power_green {
45 label = "green:power";
46 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
47 default-state = "on";
48 };
49
50 wlan5g_red {
51 label = "red:wlan5g";
52 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
53 };
54
55 wlan5g_green {
56 label = "green:wlan5g";
57 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
58 linux,default-trigger = "phy0tpt";
59 };
60
61 wlan2g_green {
62 label = "green:wlan2g";
63 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy1tpt";
65 };
66 };
67
68 keys {
69 compatible = "gpio-keys";
70
71 br {
72 label = "br";
73 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
74 linux,code = <BTN_0>;
75 linux,input-type = <EV_SW>;
76 debounce-interval = <60>;
77 };
78
79 reset {
80 label = "reset";
81 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
82 linux,code = <KEY_RESTART>;
83 debounce-interval = <60>;
84 };
85
86 wps {
87 label = "wps";
88 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_WPS_BUTTON>;
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 = "u-boot";
110 reg = <0x000000 0x040000>;
111 read-only;
112 };
113
114 partition@40000 {
115 label = "u-boot-env";
116 reg = <0x040000 0x010000>;
117 read-only;
118 };
119
120 partition@50000 {
121 compatible = "denx,uimage";
122 label = "firmware";
123 reg = <0x050000 0x6f0000>;
124 };
125
126 partition@740000 {
127 label = "user_data";
128 reg = <0x740000 0x0a0000>;
129 read-only;
130 };
131
132 partition@7e0000 {
133 label = "board_data";
134 reg = <0x7e0000 0x010000>;
135 read-only;
136
137 nvmem-layout {
138 compatible = "fixed-layout";
139 #address-cells = <1>;
140 #size-cells = <1>;
141
142 macaddr_board_data_880: macaddr@880 {
143 compatible = "mac-base";
144 reg = <0x880 0x11>;
145 #nvmem-cell-cells = <1>;
146 };
147 };
148 };
149
150 art: partition@7f0000 {
151 label = "art";
152 reg = <0x7f0000 0x010000>;
153 read-only;
154
155 nvmem-layout {
156 compatible = "fixed-layout";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 cal_art_5000: calibration@5000 {
161 reg = <0x5000 0x844>;
162 };
163 };
164 };
165 };
166 };
167 };
168
169 &mdio0 {
170 status = "okay";
171
172 phy0: ethernet-phy@0 {
173 reg = <0>;
174
175 qca,ar8327-initvals = <
176 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
177 0x50 0xcc35cc35 /* LED_CTRL0 */
178 0x54 0xca35ca35 /* LED_CTRL1 */
179 0x58 0xc935c935 /* LED_CTRL2 */
180 0x5c 0x03ffff00 /* LED_CTRL3 */
181 0x7c 0x0000007e /* PORT0_STATUS */
182 >;
183 };
184 };
185
186 &eth0 {
187 status = "okay";
188
189 phy-mode = "sgmii";
190 phy-handle = <&phy0>;
191 };
192
193 &pcie {
194 status = "okay";
195
196 wifi@0,0 {
197 compatible = "qcom,ath10k";
198 reg = <0x0000 0 0 0 0>;
199 nvmem-cells = <&cal_art_5000>, <&macaddr_board_data_880 0>;
200 nvmem-cell-names = "calibration", "mac-address";
201 };
202 };
203
204 &wmac {
205 status = "okay";
206 qca,no-eeprom;
207 };