ath79: add firmware partition compatible for OCEDO
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_tplink_tl-mr3020-v1.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9331.dtsi"
8
9 / {
10 model = "TP-Link TL-MR3020 V1";
11 compatible = "tplink,tl-mr3020-v1", "qca,ar9331";
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 leds {
22 compatible = "gpio-leds";
23
24 wlan {
25 label = "tp-link:green:wlan";
26 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
27 default-state = "off";
28 linux,default-trigger = "phy0tpt";
29 };
30
31 lan {
32 label = "tp-link:green:lan";
33 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
34 default-state = "off";
35 };
36
37 system: wps {
38 label = "tp-link:green:wps";
39 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
40 default-state = "off";
41 };
42
43 led3g {
44 label = "tp-link:green:3g";
45 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
46 default-state = "off";
47 trigger-sources = <&hub_port>;
48 linux,default-trigger = "usbport";
49 };
50 };
51
52 keys {
53 compatible = "gpio-keys";
54
55 button0 {
56 label = "reset";
57 linux,code = <KEY_RESTART>;
58 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
59 debounce-interval = <60>;
60 };
61
62 button1 {
63 label = "sw1";
64 linux,input-type = <EV_SW>;
65 linux,code = <BTN_0>;
66 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
67 debounce-interval = <60>;
68 };
69
70 button2 {
71 label = "sw2";
72 linux,input-type = <EV_SW>;
73 linux,code = <BTN_1>;
74 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
75 debounce-interval = <60>;
76 };
77 };
78
79 reg_usb_vbus: reg_usb_vbus {
80 compatible = "regulator-fixed";
81 regulator-name = "usb_vbus";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
85 enable-active-high;
86 };
87 };
88
89 &ref {
90 clock-frequency = <25000000>;
91 };
92
93 &uart {
94 status = "okay";
95 };
96
97 &gpio {
98 status = "okay";
99 };
100
101 &usb {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 dr_mode = "host";
105 vbus-supply = <&reg_usb_vbus>;
106 status = "okay";
107
108 hub_port: port@1 {
109 reg = <1>;
110 #trigger-source-cells = <0>;
111 };
112 };
113
114 &usb_phy {
115 status = "okay";
116 };
117
118 &spi {
119 num-chipselects = <1>;
120 status = "okay";
121
122 /* Spansion S25FL032PIF SPI flash */
123 flash@0 {
124 compatible = "jedec,spi-nor";
125 spi-max-frequency = <104000000>;
126 reg = <0>;
127
128 partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 uboot: partition@0 {
134 label = "u-boot";
135 reg = <0x000000 0x020000>;
136 read-only;
137 };
138
139 partition@20000 {
140 label = "firmware";
141 reg = <0x020000 0x3c0000>;
142 };
143
144 partition@3e0000 {
145 label = "config";
146 reg = <0x3e0000 0x010000>;
147 read-only;
148 };
149
150 art: partition@3f0000 {
151 label = "art";
152 reg = <0x3f0000 0x010000>;
153 read-only;
154 };
155 };
156 };
157 };
158
159
160 &eth0 {
161 status = "okay";
162
163 mtd-mac-address = <&uboot 0x1fc00>;
164 gmac-config {
165 device = <&gmac>;
166
167 switch-phy-addr-swap = <0>;
168 switch-phy-swap = <0>;
169 };
170 };
171
172 &eth1 {
173 status = "okay";
174 compatible = "syscon", "simple-mfd";
175 };
176
177 &wmac {
178 status = "okay";
179 mtd-cal-data = <&art 0x1000>;
180 mtd-mac-address = <&uboot 0x1fc00>;
181 };