ath79: WNDR3700 v1/v2: make u-boot env partition writable
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7241_tplink_tl-wr842n-v1.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 "ar7241.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
11 model = "TP-Link TL-WR842N/ND v1";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 };
19
20 keys {
21 compatible = "gpio-keys-polled";
22 poll-interval = <20>;
23
24 rfkill {
25 label = "rfkill";
26 linux,code = <KEY_RFKILL>;
27 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30
31 reset {
32 label = "reset";
33 linux,code = <KEY_RESTART>;
34 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 };
37 };
38
39 gpio-leds {
40 compatible = "gpio-leds";
41
42 led_system: system {
43 label = "tp-link:green:system";
44 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
45 };
46
47 qss {
48 label = "tp-link:green:qss";
49 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50 };
51
52 led3g {
53 label = "tp-link:green:3g";
54 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
55 trigger-sources = <&hub_port>;
56 linux,default-trigger = "usbport";
57 };
58 };
59
60 ath9k-leds {
61 compatible = "gpio-leds";
62
63 wlan {
64 label = "tp-link:green:wlan";
65 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
66 linux,default-trigger = "phy0tpt";
67 };
68 };
69
70 gpio-export {
71 compatible = "gpio-export";
72
73 gpio_usb_power {
74 gpio-export,name = "tp-link:power:usb";
75 gpio-export,output = <1>;
76 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
77 };
78 };
79 };
80
81 &usb {
82 #address-cells = <1>;
83 #size-cells = <0>;
84 status = "okay";
85
86 hub_port: port@1 {
87 reg = <1>;
88 #trigger-source-cells = <0>;
89 };
90 };
91
92 &usb_phy {
93 status = "okay";
94 };
95
96 &spi {
97 status = "okay";
98 num-cs = <1>;
99
100 flash@0 {
101 compatible = "jedec,spi-nor";
102 reg = <0>;
103 spi-max-frequency = <25000000>;
104
105 partitions {
106 compatible = "fixed-partitions";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 uboot: partition@0 {
111 reg = <0x0 0x20000>;
112 label = "u-boot";
113 read-only;
114 };
115
116 partition@20000 {
117 compatible = "tplink,firmware";
118 reg = <0x20000 0x7d0000>;
119 label = "firmware";
120 };
121
122 partition@7f0000 {
123 reg = <0x7f0000 0x10000>;
124 label = "art";
125 read-only;
126 };
127 };
128 };
129 };
130
131 &pcie {
132 status = "okay";
133
134 ath9k: wifi@0,0 {
135 compatible = "pci168c,002e";
136 reg = <0x0000 0 0 0 0>;
137 #gpio-cells = <2>;
138 gpio-controller;
139 qca,no-eeprom;
140 mtd-mac-address = <&uboot 0x1fc00>;
141 };
142 };
143
144 &eth0 {
145 status = "okay";
146
147 mtd-mac-address = <&uboot 0x1fc00>;
148 mtd-mac-address-increment = <(-1)>;
149 };
150
151 &eth1 {
152 status = "okay";
153
154 mtd-mac-address = <&uboot 0x1fc00>;
155 mtd-mac-address-increment = <1>;
156 };
157
158 &gpio {
159 status = "okay";
160 };
161
162 &uart {
163 status = "okay";
164 };