ath79: WNDR3700 v1/v2: make u-boot env partition writable
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink_tl-wr841-v8.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9341.dtsi"
8
9 / {
10 model = "TP-Link TL-WR841N/ND v8";
11 compatible = "tplink,tl-wr841-v8", "qca,ar9341";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &system;
16 led-failsafe = &system;
17 led-running = &system;
18 led-upgrade = &system;
19 };
20
21 keys {
22 compatible = "gpio-keys-polled";
23 poll-interval = <20>;
24
25 pinctrl-names = "default";
26 pinctrl-0 = <&jtag_disable_pins>;
27
28 reset {
29 label = "Reset";
30 linux,code = <KEY_RESTART>;
31 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
32 debounce-interval = <60>;
33 };
34
35 rfkill {
36 label = "WiFi";
37 linux,code = <KEY_RFKILL>;
38 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
39 debounce-interval = <60>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 system: power {
47 label = "tp-link:green:power";
48 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
49 default-state = "on";
50 };
51
52 wlan {
53 label = "tp-link:green:wlan";
54 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
55 linux,default-trigger = "phy0tpt";
56 };
57
58 qss {
59 label = "tp-link:green:qss";
60 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
61 };
62
63 wan {
64 label = "tp-link:green:wan";
65 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
66 };
67
68 lan1 {
69 label = "tp-link:green:lan1";
70 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
71 };
72
73 lan2 {
74 label = "tp-link:green:lan2";
75 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
76 };
77
78 lan3 {
79 label = "tp-link:green:lan3";
80 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
81 };
82
83 lan4 {
84 label = "tp-link:green:lan4";
85 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
86 };
87 };
88 };
89
90 &ref {
91 clock-frequency = <25000000>;
92 };
93
94 &uart {
95 status = "okay";
96 };
97
98 &gpio {
99 status = "okay";
100 };
101
102 &spi {
103 num-cs = <1>;
104
105 status = "okay";
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 reg = <0>;
110 spi-max-frequency = <25000000>;
111
112 partitions {
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 uboot: partition@0 {
118 label = "u-boot";
119 reg = <0x000000 0x020000>;
120 read-only;
121 };
122
123 partition@20000 {
124 compatible = "tplink,firmware";
125 label = "firmware";
126 reg = <0x020000 0x3d0000>;
127 };
128
129 art: partition@3f0000 {
130 label = "art";
131 reg = <0x3f0000 0x010000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &eth0 {
139 status = "okay";
140
141 phy-handle = <&swphy0>;
142 mtd-mac-address = <&uboot 0x1fc00>;
143 mtd-mac-address-increment = <(-1)>;
144 };
145
146 &eth1 {
147 status = "okay";
148
149 mtd-mac-address = <&uboot 0x1fc00>;
150
151 pll-data = <0x06000000 0x00000101 0x00001616>;
152
153 gmac-config {
154 device = <&gmac>;
155 switch-phy-swap = <1>;
156 };
157 };
158
159 &wmac {
160 status = "okay";
161
162 mtd-cal-data = <&art 0x1000>;
163 mtd-mac-address = <&uboot 0x1fc00>;
164 };