ath79: qca: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wa850re-v2.dts
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 compatible = "tplink,tl-wa850re-v2", "qca,qca9533";
10 model = "TP-Link TL-WA850RE v2";
11
12 aliases {
13 led-boot = &led_re;
14 led-failsafe = &led_re;
15 led-running = &led_re;
16 led-upgrade = &led_re;
17 label-mac-device = &wmac;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 pinctrl-names = "default";
24 pinctrl-0 = <&jtag_disable_pins>;
25
26 lan {
27 label = "blue:lan";
28 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
29 };
30
31 led_re: re {
32 label = "blue:re";
33 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
34 };
35
36 signal1 {
37 label = "blue:signal1";
38 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
39 };
40
41 signal2 {
42 label = "blue:signal2";
43 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44 };
45
46 signal3 {
47 label = "blue:signal3";
48 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
49 };
50
51 signal4 {
52 label = "blue:signal4";
53 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
54 };
55
56 led_signal5: signal5 {
57 label = "blue:signal5";
58 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
59 };
60
61 wlan {
62 label = "blue:wlan";
63 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy0tpt";
65 };
66 };
67
68 keys {
69 compatible = "gpio-keys";
70
71 reset {
72 label = "Reset button";
73 linux,code = <KEY_RESTART>;
74 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
75 };
76
77 wps {
78 label = "WPS button";
79 linux,code = <KEY_RFKILL>;
80 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
81 };
82 };
83 };
84
85 &gpio {
86 led_enable {
87 gpio-hog;
88 gpios = <15 GPIO_ACTIVE_HIGH>;
89 line-name = "tp-link:power:led";
90 output-high;
91 };
92 };
93
94 &spi {
95 status = "okay";
96
97 flash@0 {
98 #address-cells = <1>;
99 #size-cells = <1>;
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <25000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x000000 0x020000>;
112 read-only;
113 };
114
115 partition@20000 {
116 label = "firmware";
117 reg = <0x020000 0x390000>;
118 compatible = "tplink,firmware";
119 };
120
121 partition@3b0000 {
122 label = "partition-table";
123 reg = <0x3b0000 0x010000>;
124 read-only;
125 };
126
127 info: partition@3c0000 {
128 label = "info";
129 reg = <0x3c0000 0x010000>;
130 read-only;
131
132 nvmem-layout {
133 compatible = "fixed-layout";
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 macaddr_info_8: macaddr@8 {
138 reg = <0x8 0x6>;
139 };
140 };
141 };
142
143 partition@3d0000 {
144 label = "config";
145 reg = <0x3d0000 0x020000>;
146 read-only;
147 };
148
149 art: partition@3f0000 {
150 label = "art";
151 reg = <0x3f0000 0x010000>;
152 read-only;
153 };
154 };
155 };
156 };
157
158 &eth0 {
159 status = "okay";
160
161 phy-handle = <&swphy4>;
162
163 nvmem-cells = <&macaddr_info_8>;
164 nvmem-cell-names = "mac-address";
165 };
166
167 &eth1 {
168 compatible = "syscon", "simple-mfd";
169 };
170
171 &wmac {
172 status = "okay";
173
174 mtd-cal-data = <&art 0x1000>;
175 nvmem-cells = <&macaddr_info_8>;
176 nvmem-cell-names = "mac-address";
177 };