ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9561_tplink_tl-wdr6500-v2.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 compatible = "tplink,tl-wdr6500-v2", "qca,qca9561";
10 model = "TP-Link TL-WDR6500 v2";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &eth1;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "Reset button";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 lan4 {
34 label = "green:lan4";
35 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
36 };
37
38 lan3 {
39 label = "green:lan3";
40 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
41 };
42
43 lan2 {
44 label = "green:lan2";
45 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
46 };
47
48 lan1 {
49 label = "green:lan1";
50 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
51 };
52
53 wan {
54 label = "green:wan";
55 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
56 };
57
58 led_system: system {
59 label = "white:system";
60 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
61 default-state = "on";
62 };
63 };
64 };
65
66 &spi {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <25000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x000000 0x010000>;
82 read-only;
83
84 nvmem-layout {
85 compatible = "fixed-layout";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 macaddr_uboot_0fc00: macaddr@0fc00 {
90 reg = <0x0fc00 0x6>;
91 };
92 };
93 };
94
95 partition@10000 {
96 compatible = "tplink,firmware";
97 label = "firmware";
98 reg = <0x010000 0x7e0000>;
99 };
100
101 partition@7f0000 {
102 label = "art";
103 reg = <0x7f0000 0x010000>;
104 read-only;
105
106 nvmem-layout {
107 compatible = "fixed-layout";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 calibration_ath9k: calibration@1000 {
112 reg = <0x1000 0x440>;
113 };
114
115 calibration_ath10k: calibration@5000 {
116 reg = <0x5000 0x844>;
117 };
118 };
119 };
120 };
121 };
122 };
123
124 &uart {
125 status = "okay";
126 };
127
128 &pcie {
129 status = "okay";
130
131 wifi@0,0 {
132 compatible = "qcom,ath10k";
133 reg = <0 0 0 0 0>;
134
135 nvmem-cells = <&macaddr_uboot_0fc00>, <&calibration_ath10k>;
136 nvmem-cell-names = "mac-address", "calibration";
137 mac-address-increment = <(-2)>;
138 };
139 };
140
141 &mdio0 {
142 status = "okay";
143 };
144
145 &eth0 {
146 status = "okay";
147
148 phy-handle = <&swphy4>;
149
150 nvmem-cells = <&macaddr_uboot_0fc00>;
151 nvmem-cell-names = "mac-address";
152 mac-address-increment = <1>;
153 };
154
155 &eth1 {
156 status = "okay";
157
158 nvmem-cells = <&macaddr_uboot_0fc00>;
159 nvmem-cell-names = "mac-address";
160 };
161
162 &wmac {
163 status = "okay";
164
165 nvmem-cells = <&macaddr_uboot_0fc00>, <&calibration_ath9k>;
166 nvmem-cell-names = "mac-address", "calibration";
167 mac-address-increment = <(-1)>;
168 };
169
170 &usb0 {
171 status = "okay";
172 };
173
174 &usb_phy0 {
175 status = "okay";
176 };