ath79: convert ath10k pre-calibration data to NVMEM (binary MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_deco-m4r-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9 compatible = "tplink,deco-m4r-v1", "qca,qca9563";
10 model = "TP-Link Deco M4R v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wlan2g {
23 label = "red:wlan2g";
24 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
25 linux,default-trigger = "phy1tpt";
26 };
27
28 led_power: power {
29 label = "green:power";
30 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 wlan5g {
35 label = "blue:wlan5g";
36 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy0tpt";
38 };
39 };
40
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "Reset button";
47 linux,code = <KEY_RESTART>;
48 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
49 debounce-interval = <60>;
50 };
51 };
52 };
53
54 &pcie {
55 status = "okay";
56
57 wifi@0,0 {
58 compatible = "qcom,ath10k";
59 reg = <0x0000 0 0 0 0>;
60 nvmem-cells = <&precal_art_5000>, <&macaddr_config_8 (-1)>;
61 nvmem-cell-names = "pre-calibration", "mac-address";
62 };
63 };
64
65 &mdio0 {
66 status = "okay";
67
68 phy0: ethernet-phy@0 {
69 reg = <0>;
70 phy-mode = "sgmii";
71 qca,mib-poll-interval = <500>;
72
73 qca,ar8327-initvals = <
74 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
75 0x7c 0x0000007e /* PORT0_STATUS */
76 >;
77 };
78 };
79
80 &spi {
81 status = "okay";
82 num-cs = <1>;
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <25000000>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 uboot: partition@0 {
95 label = "u-boot";
96 reg = <0x000000 0x080000>;
97 read-only;
98 };
99
100 partition@80000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 reg = <0x080000 0xe00000>;
104 };
105
106 partition@e80000 {
107 label = "product-info";
108 reg = <0xe80000 0x05000>;
109 read-only;
110 };
111
112 config: partition@e85000 {
113 label = "config";
114 reg = <0xe85000 0x16b000>;
115 read-only;
116
117 nvmem-layout {
118 compatible = "fixed-layout";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 macaddr_config_8: macaddr@8 {
123 compatible = "mac-base";
124 reg = <0x8 0x6>;
125 #nvmem-cell-cells = <1>;
126 };
127 };
128 };
129
130 art: partition@ff0000 {
131 label = "art";
132 reg = <0xff0000 0x010000>;
133 read-only;
134
135 nvmem-layout {
136 compatible = "fixed-layout";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 precal_art_5000: pre-calibration@5000 {
141 reg = <0x5000 0x2f20>;
142 };
143 };
144 };
145 };
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 phy-mode = "sgmii";
153 phy-handle = <&phy0>;
154
155 nvmem-cells = <&macaddr_config_8 0>;
156 nvmem-cell-names = "mac-address";
157 };
158
159 &wmac {
160 status = "okay";
161
162 mtd-cal-data = <&art 0x1000>;
163 nvmem-cells = <&macaddr_config_8 0>;
164 nvmem-cell-names = "mac-address";
165 };