ath79: convert ath10k calibration data to NVMEM (built-in MAC)
[openwrt/staging/dangole.git] / target / linux / ath79 / dts / qca9563_qxwlan_e1700ac.dtsi
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 aliases {
10 label-mac-device = &eth0;
11 led-boot = &led_system;
12 led-failsafe = &led_system;
13 led-running = &led_system;
14 led-upgrade = &led_system;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 linux,code = <KEY_RESTART>;
23 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
24 debounce-interval = <60>;
25 };
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_system: system {
32 label = "green:system";
33 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
34 default-state = "on";
35 };
36
37 usb {
38 label = "green:usb";
39 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
40 trigger-sources = <&hub_port0>;
41 linux,default-trigger = "usbport";
42 };
43
44 wlan2g {
45 label = "green:wlan2g";
46 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy1tpt";
48 };
49 };
50 };
51
52 &pcie {
53 status = "okay";
54
55 wifi@0,0 {
56 compatible = "qcom,ath10k";
57 reg = <0x0000 0 0 0 0>;
58 nvmem-cells = <&cal_art_5000>;
59 nvmem-cell-names = "calibration";
60 };
61 };
62
63 &spi {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <25000000>;
70
71 partitions: partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x000000 0x040000>;
79 read-only;
80 };
81
82 partition@40000 {
83 label = "u-boot-env";
84 reg = <0x040000 0x010000>;
85 read-only;
86 };
87
88 pridata: partition@50000 {
89 label = "pri-data";
90 reg = <0x050000 0x010000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 macaddr_pridata_400: macaddr@400 {
99 reg = <0x400 0x6>;
100 };
101 };
102 };
103
104 art: partition@60000 {
105 label = "art";
106 reg = <0x060000 0x010000>;
107 read-only;
108
109 nvmem-layout {
110 compatible = "fixed-layout";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 cal_art_5000: calibration@5000 {
115 reg = <0x5000 0x844>;
116 };
117 };
118 };
119 };
120 };
121 };
122
123 &mdio0 {
124 status = "okay";
125
126 phy0: ethernet-phy@0 {
127 reg = <0>;
128 phy-mode = "sgmii";
129 qca,mib-poll-interval = <500>;
130
131 qca,ar8327-initvals = <
132 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
133 0x7c 0x0000007e /* PORT0_STATUS */
134 >;
135 };
136 };
137
138 &eth0 {
139 status = "okay";
140
141 pll-data = <0x03000101 0x00000101 0x00001919>;
142
143 phy-mode = "sgmii";
144 phy-handle = <&phy0>;
145
146 nvmem-cells = <&macaddr_pridata_400>;
147 nvmem-cell-names = "mac-address";
148 };
149
150 &usb_phy0 {
151 status = "okay";
152 };
153
154 &usb0 {
155 status = "okay";
156 };
157
158 &usb_phy1 {
159 status = "okay";
160 };
161
162 &usb1 {
163 status = "okay";
164 };
165
166 &wmac {
167 status = "okay";
168
169 mtd-cal-data = <&art 0x1000>;
170 };