ath79: convert ath10k calibration data to NVMEM (built-in MAC)
[openwrt/staging/dangole.git] / target / linux / ath79 / dts / qca9563_asus_pl-ac56.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 = "ASUS PL-AC56";
10 compatible = "asus,pl-ac56", "qca,qca9563";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &eth0;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 linux,code = <BTN_0>;
24 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
25 debounce-interval = <60>;
26 };
27
28 wps {
29 linux,code = <KEY_WPS_BUTTON>;
30 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
31 debounce-interval = <60>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_power: power {
39 label = "red:power";
40 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
41 };
42
43 lan {
44 label = "green:lan";
45 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan2g {
49 label = "green:wlan2g";
50 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
51 };
52
53 wlan5g {
54 label = "green:wlan5g";
55 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
56 };
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 = <&cal_art_5000>;
67 nvmem-cell-names = "calibration";
68 };
69 };
70
71 &spi {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <50000000>;
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 0x40000>;
87 read-only;
88 };
89
90 partition@40000 {
91 label = "u-boot-env";
92 reg = <0x040000 0x10000>;
93 read-only;
94 };
95
96 art: partition@50000 {
97 label = "art";
98 reg = <0x050000 0x10000>;
99 read-only;
100
101 nvmem-layout {
102 compatible = "fixed-layout";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_art_1002: macaddr@1002 {
107 reg = <0x1002 0x6>;
108 };
109
110 cal_art_5000: calibration@5000 {
111 reg = <0x5000 0x844>;
112 };
113 };
114 };
115
116 partition@60000 {
117 compatible = "denx,uimage";
118 label = "firmware";
119 reg = <0x060000 0xf20000>;
120 };
121
122 partition@f80000 {
123 label = "plc";
124 reg = <0xf80000 0x80000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &mdio0 {
132 status = "okay";
133
134 phy-mask = <0>;
135
136 phy0: ethernet-phy@0 {
137 reg = <0>;
138 phy-mode = "sgmii";
139 qca,mib-poll-interval = <500>;
140
141 qca,ar8327-initvals = <
142 0x04 0x80000080 /* AR8327_REG_PAD0_MODE */
143 0x08 0x01000000 /* AR8327_REG_PAD5_MODE */
144 0x0c 0x07500000 /* AR8327_REG_PAD6_MODE */
145 0x10 0x602613a0 /* AR8327_REG_POWER_ON_STRAP */
146 0x50 0xcc35cc35 /* AR8327_REG_LED_CTRL0 */
147 0x54 0xca35ca35 /* AR8327_REG_LED_CTRL1 */
148 0x58 0xc935c935 /* AR8327_REG_LED_CTRL2 */
149 0x5c 0x03ffff00 /* AR8327_REG_LED_CTRL3 */
150 0x7c 0x0000007e /* AR8327_REG_PORT_STATUS(0) */
151 0x94 0x0000007e /* AR8327_REG_PORT_STATUS(6) */
152 >;
153 };
154 };
155
156 &eth0 {
157 status = "okay";
158
159 phy-mode = "sgmii";
160 nvmem-cells = <&macaddr_art_1002>;
161 nvmem-cell-names = "mac-address";
162 phy-handle = <&phy0>;
163 };
164
165 &wmac {
166 status = "okay";
167
168 qca,no-eeprom;
169 };