ath79: TP-Link EAP245 v3: use pre-calibration nvmem-cell
[openwrt/staging/jow.git] / target / linux / ath79 / dts / qca9563_tplink_eap245-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,eap245-v3", "qca,qca9563";
10 model = "TP-Link EAP245 v3 / EAP265 HD v1";
11
12 aliases {
13 led-boot = &led_status_green;
14 led-failsafe = &led_status_amber;
15 led-running = &led_status_green;
16 led-upgrade = &led_status_amber;
17 label-mac-device = &eth0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_status_green: status_green {
24 label = "green:status";
25 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28
29 led_status_amber: status_amber {
30 label = "amber:status";
31 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "Reset button";
40 linux,code = <KEY_RESTART>;
41 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
42 debounce-interval = <60>;
43 };
44 };
45 };
46
47 &pcie {
48 status = "okay";
49
50 wifi@0,0 {
51 compatible = "qcom,ath10k";
52 reg = <0 0 0 0 0>;
53
54 mac-address-increment = <1>;
55
56 nvmem-cells = <&macaddr_info_8>, <&calibration_ath10k>;
57 nvmem-cell-names = "mac-address", "pre-calibration";
58 };
59 };
60
61 &spi {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <25000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "factory-boot";
76 reg = <0x000000 0x040000>;
77 read-only;
78 };
79
80 partition@40000 {
81 label = "u-boot";
82 reg = <0x040000 0x040000>;
83 read-only;
84 };
85
86 partition@80000 {
87 label = "partition-table";
88 reg = <0x080000 0x010000>;
89 read-only;
90 };
91
92 info: partition@90000 {
93 label = "info";
94 reg = <0x090000 0x010000>;
95 read-only;
96 };
97
98 partition@a0000 {
99 label = "art";
100 reg = <0x0a0000 0x010000>;
101 read-only;
102
103 compatible = "nvmem-cells";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 calibration_ath9k: calibration@1000 {
108 reg = <0x1000 0x440>;
109 };
110
111 calibration_ath10k: calibration@5000 {
112 reg = <0x5000 0x2f20>;
113 };
114 };
115
116 partition@b0000 {
117 label = "extra-para";
118 reg = <0x0b0000 0x010000>;
119 read-only;
120 };
121
122 partition@c0000 {
123 compatible = "openwrt,elf";
124 label = "firmware";
125 reg = <0x0c0000 0xe40000>;
126 };
127
128 partition@f00000 {
129 label = "config";
130 reg = <0xf00000 0x030000>;
131 read-only;
132 };
133
134 partition@f30000 {
135 label = "mutil-log";
136 reg = <0xf30000 0x080000>;
137 read-only;
138 };
139
140 partition@fb0000 {
141 label = "oops";
142 reg = <0xfb0000 0x040000>;
143 read-only;
144 };
145 };
146 };
147 };
148
149 &mdio0 {
150 status = "okay";
151
152 phy0: ethernet-phy@0 {
153 reg = <0>;
154 phy-mode = "sgmii";
155 qca,ar8327-initvals = <
156 0x04 0x00080080 /* PAD0 */
157 0x7c 0x0000007e /* PORT0_STATUS */
158 0xe0 0xc74164de /* SGMII_CTRL */
159 >;
160 };
161 };
162
163 &eth0 {
164 status = "okay";
165
166 phy-handle = <&phy0>;
167 phy-mode = "sgmii";
168
169 nvmem-cells = <&macaddr_info_8>;
170 nvmem-cell-names = "mac-address";
171 };
172
173 &wmac {
174 status = "okay";
175
176 nvmem-cells = <&macaddr_info_8>, <&calibration_ath9k>;
177 nvmem-cell-names = "mac-address", "calibration";
178 };
179
180 &info {
181 compatible = "nvmem-cells";
182 #address-cells = <1>;
183 #size-cells = <1>;
184
185 macaddr_info_8: macaddr@8 {
186 reg = <0x8 0x6>;
187 };
188 };