ath79: convert ath10k pre-calibration data to NVMEM (binary MAC)
[openwrt/staging/svanheule.git] / target / linux / ath79 / dts / qca9531_comfast_cf-e313ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "comfast,cf-e313ac", "qca,qca9531";
10 model = "COMFAST CF-E313AC";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_rssihigh;
15 led-failsafe = &led_rssihigh;
16 led-upgrade = &led_rssihigh;
17 label-mac-device = &eth1;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22 pinctrl-names = "default";
23
24 wlan {
25 label = "green:wlan";
26 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 lan {
31 label = "green:lan";
32 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
33 };
34
35 wan {
36 label = "green:wan";
37 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
38 };
39
40 rssilow {
41 label = "red:rssilow";
42 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
43 };
44
45 rssimediumlow {
46 label = "red:rssimediumlow";
47 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48 };
49
50 rssimediumhigh {
51 label = "green:rssimediumhigh";
52 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
53 };
54
55 led_rssihigh: rssihigh {
56 label = "green:rssihigh";
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 reset {
65 label = "reset";
66 linux,code = <KEY_RESTART>;
67 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70 };
71 };
72
73 &spi {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <25000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x000000 0x010000>;
89 read-only;
90 };
91
92 art: partition@10000 {
93 label = "art";
94 reg = <0x010000 0x010000>;
95 read-only;
96
97 nvmem-layout {
98 compatible = "fixed-layout";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 macaddr_art_0: macaddr@0 {
103 reg = <0x0 0x6>;
104 };
105
106 macaddr_art_6: macaddr@6 {
107 reg = <0x6 0x6>;
108 };
109
110 macaddr_art_1002: macaddr@1002 {
111 reg = <0x1002 0x6>;
112 };
113
114 precal_art_5000: pre-calibration@5000 {
115 reg = <0x5000 0x2f20>;
116 };
117 };
118 };
119
120 partition@20000 {
121 compatible = "denx,uimage";
122 label = "firmware";
123 reg = <0x020000 0x7c0000>;
124 };
125
126 partition@7e0000 {
127 label = "config";
128 reg = <0x7e0000 0x010000>;
129 read-only;
130 };
131
132 partition@7f0000 {
133 label = "nvram";
134 reg = <0x7f0000 0x010000>;
135 read-only;
136 };
137 };
138 };
139 };
140
141 &eth0 {
142 status = "okay";
143
144 phy-handle = <&swphy0>;
145
146 nvmem-cells = <&macaddr_art_1002>;
147 nvmem-cell-names = "mac-address";
148
149 gmac-config {
150 device = <&gmac>;
151 switch-phy-swap = <1>;
152 };
153 };
154
155 &eth1 {
156 nvmem-cells = <&macaddr_art_0>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &pcie0 {
161 status = "okay";
162
163 wifi@0,0 {
164 compatible = "qcom,ath10k";
165 reg = <0 0 0 0 0>;
166 nvmem-cells = <&precal_art_5000>, <&macaddr_art_6>;
167 nvmem-cell-names = "pre-calibration", "mac-address";
168 };
169 };