ath79: convert ath10k pre-calibration data to NVMEM (binary MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_cpe710-v1.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 = "TP-Link CPE710 v1";
10 compatible = "tplink,cpe710-v1", "qca,qca9563";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_lan;
15 led-failsafe = &led_lan;
16 led-upgrade = &led_lan;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_lan: lan {
23 label = "blue:lan";
24 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
25 };
26
27 wlan5g {
28 label = "blue:wlan5g";
29 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30 linux,default-trigger = "phy0tpt";
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "Reset button";
39 linux,code = <KEY_RESTART>;
40 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43 };
44 };
45
46 &pcie {
47 status = "okay";
48
49 wifi@0,0 {
50 compatible = "qcom,ath10k";
51 reg = <0x0000 0 0 0 0>;
52 nvmem-cells = <&precal_art_5000>, <&macaddr_info_8>;
53 nvmem-cell-names = "pre-calibration", "mac-address";
54 };
55 };
56
57 &spi {
58 status = "okay";
59
60 flash@0 {
61 compatible = "jedec,spi-nor";
62 reg = <0>;
63 spi-max-frequency = <40000000>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x000000 0x040000>;
73 read-only;
74 };
75
76 partition@40000 {
77 label = "u-boot-env";
78 reg = <0x040000 0x010000>;
79 };
80
81 partition@50000 {
82 label = "partition-table";
83 reg = <0x050000 0x010000>;
84 read-only;
85 };
86
87 info: partition@60000 {
88 label = "info";
89 reg = <0x060000 0x010000>;
90 read-only;
91
92 nvmem-layout {
93 compatible = "fixed-layout";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 macaddr_info_8: macaddr@8 {
98 reg = <0x8 0x6>;
99 };
100 };
101 };
102
103 partition@70000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x070000 0xf50000>;
107 };
108
109 partition@fc0000 {
110 label = "config";
111 reg = <0xfc0000 0x030000>;
112 read-only;
113 };
114
115 art: partition@ff0000 {
116 label = "art";
117 reg = <0xff0000 0x010000>;
118 read-only;
119
120 nvmem-layout {
121 compatible = "fixed-layout";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 precal_art_5000: pre-calibration@5000 {
126 reg = <0x5000 0x2f20>;
127 };
128 };
129 };
130 };
131 };
132 };
133
134 &pinmux {
135 mdio_pins: mdio_pins {
136 /* GPIO 10 as MDIO(0x20), GPIO 8 as MDC(0x21) */
137 pinctrl-single,bits = <0x8 0x00200021 0x00ff00ff>;
138 };
139 };
140
141 &mdio0 {
142 status = "okay";
143
144 pinctrl-names = "default";
145 pinctrl-0 = <&mdio_pins>;
146
147 phy4: ethernet-phy@4 {
148 reg = <4>;
149 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
150 };
151 };
152
153 &eth0 {
154 status = "okay";
155
156 phy-handle = <&phy4>;
157 phy-mode = "sgmii";
158
159 nvmem-cells = <&macaddr_info_8>;
160 nvmem-cell-names = "mac-address";
161
162 qca956x-serdes-fixup;
163
164 gmac-config {
165 device = <&gmac>;
166 };
167 };