ath79: tp9343: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / tp9343_tplink_tl-wr941hp-v1.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-wr941hp-v1", "qca,tp9343";
10 model = "TP-Link TL-WR941HP v1";
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 re {
24 label = "blue:re";
25 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
26 };
27
28 wifi {
29 label = "blue:wifi";
30 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
31 linux,default-trigger = "phy0tpt";
32 };
33
34 led_power: power {
35 label = "blue:power";
36 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
37 default-state = "on";
38 };
39
40 wan_blue {
41 label = "blue:wan";
42 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
43 };
44
45 wan_red {
46 label = "red:wan";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 };
49
50 lan {
51 label = "blue:lan";
52 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
53 };
54
55 wps {
56 label = "blue:wps";
57 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 re {
65 label = "range extender button";
66 linux,code = <BTN_0>;
67 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70
71 wifi {
72 label = "wifi button";
73 linux,code = <KEY_RFKILL>;
74 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
75 debounce-interval = <60>;
76 };
77
78 reset {
79 label = "reset button";
80 linux,code = <KEY_RESTART>;
81 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
82 debounce-interval = <60>;
83 };
84
85 wps {
86 label = "wps button";
87 linux,code = <KEY_WPS_BUTTON>;
88 gpios = <&gpio 4 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 = <0x0 0x020000>;
110 read-only;
111 };
112
113 partition@20000 {
114 compatible = "tplink,firmware";
115 label = "firmware";
116 reg = <0x020000 0x730000>;
117 };
118
119 config: partition@750000 {
120 label = "config";
121 reg = <0x750000 0x0a0000>;
122 read-only;
123
124 nvmem-layout {
125 compatible = "fixed-layout";
126 #address-cells = <1>;
127 #size-cells = <1>;
128
129 macaddr_config_8: macaddr@8 {
130 compatible = "mac-base";
131 reg = <0x8 0x6>;
132 #nvmem-cell-cells = <1>;
133 };
134 };
135 };
136
137 art: partition@7f0000 {
138 label = "art";
139 reg = <0x7f0000 0x010000>;
140 read-only;
141 };
142 };
143 };
144 };
145
146 &eth0 {
147 status = "okay";
148
149 phy-handle = <&swphy0>;
150
151 nvmem-cells = <&macaddr_config_8 1>;
152 nvmem-cell-names = "mac-address";
153 };
154
155 &eth1 {
156 status = "okay";
157
158 nvmem-cells = <&macaddr_config_8 0>;
159 nvmem-cell-names = "mac-address";
160 };
161
162 &wmac {
163 status = "okay";
164
165 mtd-cal-data = <&art 0x1000>;
166 nvmem-cells = <&macaddr_config_8 0>;
167 nvmem-cell-names = "mac-address";
168 };