ath79: convert ath10k calibration data to NVMEM (built-in MAC)
[openwrt/staging/dangole.git] / target / linux / ath79 / dts / qca9531_qxwlan_e600g.dtsi
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 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: keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 linux,code = <KEY_RESTART>;
23 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
24 debounce-interval = <60>;
25 };
26 };
27
28 leds: leds {
29 compatible = "gpio-leds";
30
31 led_system: system {
32 label = "blue:system";
33 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
34 default-state = "on";
35 };
36
37 wan {
38 label = "green:wan";
39 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
40 };
41
42 lan {
43 label = "green:lan";
44 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
45 };
46 };
47 };
48
49 &pcie0 {
50 status = "okay";
51
52 wifi@0,0 {
53 compatible = "qcom,ath10k";
54 reg = <0x0000 0 0 0 0>;
55 nvmem-cells = <&cal_art_5000>;
56 nvmem-cell-names = "calibration";
57 };
58 };
59
60 &spi {
61 status = "okay";
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <25000000>;
67
68 partitions: partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x000000 0x040000>;
76 read-only;
77 };
78
79 partition@40000 {
80 label = "u-boot-env";
81 reg = <0x040000 0x010000>;
82 read-only;
83 };
84
85 pridata: partition@50000 {
86 label = "pri-data";
87 reg = <0x050000 0x010000>;
88 read-only;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 macaddr_pridata_400: macaddr@400 {
96 compatible = "mac-base";
97 reg = <0x400 0x6>;
98 #nvmem-cell-cells = <1>;
99 };
100
101 cal_art_5000: calibration@5000 {
102 reg = <0x5000 0x844>;
103 };
104 };
105 };
106
107 art: partition@60000 {
108 label = "art";
109 reg = <0x060000 0x010000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &eth0 {
117 status = "okay";
118
119 phy-handle = <&swphy4>;
120
121 nvmem-cells = <&macaddr_pridata_400 1>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &eth1 {
126 nvmem-cells = <&macaddr_pridata_400 0>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &wmac {
131 status = "okay";
132
133 mtd-cal-data = <&art 0x1000>;
134 };