ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wr841hp-v3.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-wr841hp-v3", "qca,qca9533";
10 model = "TP-Link TL-WR841HP v3";
11
12 aliases {
13 label-mac-device = &wmac;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wifi {
24 label = "green:wifi";
25 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
26 linux,default-trigger = "phy0tpt";
27 };
28
29 led_power: power {
30 label = "green:power";
31 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
32 default-state = "on";
33 };
34
35 wan_green {
36 label = "green:wan";
37 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38 };
39
40 wan_amber {
41 label = "amber:wan";
42 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
43 };
44
45 lan {
46 label = "green:lan";
47 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
48 };
49
50 wps {
51 label = "green:wps";
52 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
53 };
54
55 re {
56 label = "green:re";
57 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 reset {
65 label = "Reset button";
66 linux,code = <KEY_RESTART>;
67 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70
71 wifi {
72 label = "WiFi button";
73 linux,code = <KEY_RFKILL>;
74 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
75 debounce-interval = <60>;
76 };
77
78 wps {
79 label = "WPS button";
80 linux,code = <KEY_WPS_BUTTON>;
81 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
82 debounce-interval = <60>;
83 };
84
85 re {
86 label = "RE button";
87 linux,code = <BTN_0>;
88 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
89 debounce-interval = <60>;
90 };
91 };
92 };
93
94 &spi {
95 status = "okay";
96
97 flash@0 {
98 compatible = "jedec,spi-nor";
99 reg = <0>;
100 spi-max-frequency = <25000000>;
101
102 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 uboot: partition@0 {
108 label = "u-boot";
109 reg = <0x000000 0x020000>;
110 read-only;
111
112 nvmem-layout {
113 compatible = "fixed-layout";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 macaddr_uboot_1fc00: macaddr@1fc00 {
118 reg = <0x1fc00 0x6>;
119 };
120 };
121 };
122
123 partition@20000 {
124 compatible = "tplink,firmware";
125 label = "firmware";
126 reg = <0x020000 0x7d0000>;
127 };
128
129 art: partition@7f0000 {
130 label = "art";
131 reg = <0x7f0000 0x010000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &eth0 {
139 status = "okay";
140
141 phy-handle = <&swphy4>;
142
143 nvmem-cells = <&macaddr_uboot_1fc00>;
144 nvmem-cell-names = "mac-address";
145 mac-address-increment = <1>;
146 };
147
148 &eth1 {
149 nvmem-cells = <&macaddr_uboot_1fc00>;
150 nvmem-cell-names = "mac-address";
151 };
152
153 &wmac {
154 status = "okay";
155
156 mtd-cal-data = <&art 0x1000>;
157 nvmem-cells = <&macaddr_uboot_1fc00>;
158 nvmem-cell-names = "mac-address";
159 };