ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_comfast_cf-e375ac.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 = "COMFAST CF-E375AC";
10 compatible = "comfast,cf-e375ac", "qca,qca9563";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_lan;
15 led-failsafe = &led_lan;
16 led-running = &led_lan;
17 led-upgrade = &led_lan;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_lan: lan {
24 label = "green:lan";
25 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
26 };
27
28 wan {
29 label = "red:wan";
30 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
31 };
32
33 wlan2g {
34 label = "blue:wlan2g";
35 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "phy1tpt";
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 linux,code = <KEY_RESTART>;
45 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
46 debounce-interval = <60>;
47 };
48 };
49
50 watchdog {
51 compatible = "linux,wdt-gpio";
52
53 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
54 hw_algo = "toggle";
55 hw_margin_ms = <500>;
56 always-running;
57 };
58 };
59
60 &pcie {
61 status = "okay";
62
63 wifi@0,0 {
64 compatible = "qcom,ath10k";
65 reg = <0x0000 0 0 0 0>;
66 nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 2>;
67 nvmem-cell-names = "pre-calibration", "mac-address";
68 };
69 };
70
71 &spi {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <25000000>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x000000 0x040000>;
87 read-only;
88 };
89
90 art: partition@40000 {
91 label = "art";
92 reg = <0x040000 0x010000>;
93 read-only;
94
95 nvmem-layout {
96 compatible = "fixed-layout";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 macaddr_art_0: macaddr@0 {
101 compatible = "mac-base";
102 reg = <0x0 0x6>;
103 #nvmem-cell-cells = <1>;
104 };
105
106 precal_art_5000: pre-calibration@5000 {
107 reg = <0x5000 0x2f20>;
108 };
109 };
110 };
111
112 partition@50000 {
113 compatible = "denx,uimage";
114 label = "firmware";
115 reg = <0x050000 0xfa0000>;
116 };
117
118 partition@ff0000 {
119 label = "art-backup";
120 reg = <0xff0000 0x010000>;
121 read-only;
122 };
123 };
124 };
125 };
126
127 &mdio0 {
128 status = "okay";
129
130 phy0: ethernet-phy@0 {
131 reg = <0>;
132 phy-mode = "sgmii";
133 qca,mib-poll-interval = <500>;
134
135 qca,ar8327-initvals = <
136 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
137 0x7c 0x0000007e /* PORT0_STATUS */
138 >;
139 };
140 };
141
142 &eth0 {
143 status = "okay";
144
145 pll-data = <0x03000101 0x00000101 0x00001919>;
146
147 phy-mode = "sgmii";
148 nvmem-cells = <&macaddr_art_0 0>;
149 nvmem-cell-names = "mac-address";
150 phy-handle = <&phy0>;
151 };
152
153 &wmac {
154 status = "okay";
155
156 mtd-cal-data = <&art 0x1000>;
157 nvmem-cells = <&macaddr_art_0 10>;
158 nvmem-cell-names = "mac-address";
159 };