ramips: add preliminary support for WIO ONE
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_re350-v1.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,re350-v1", "mediatek,mt7621-soc";
10 model = "TP-LINK RE350 v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 label = "re350-v1:blue:power";
28 gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
29 };
30
31 wifi2g {
32 label = "re350-v1:blue:wifi2G";
33 gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
34 };
35
36 wifi5g {
37 label = "re350-v1:blue:wifi5G";
38 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
39 };
40
41 wps_r {
42 label = "re350-v1:red:wps";
43 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
44 };
45
46 wps_b {
47 label = "re350-v1:blue:wps";
48 gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
49 };
50
51 eth {
52 label = "re350-v1:green:eth_act";
53 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
54 };
55
56 eth2 {
57 label = "re350-v1:green:eth_link";
58 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
59 };
60 };
61
62 keys {
63 compatible = "gpio-keys-polled";
64 poll-interval = <20>;
65
66 led {
67 label = "led";
68 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
69 linux,code = <BTN_0>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 };
77
78 power {
79 label = "power";
80 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_POWER>;
82 };
83
84 wps {
85 label = "wps";
86 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_WPS_BUTTON>;
88 };
89 };
90 };
91
92 &spi0 {
93 status = "okay";
94
95 w25q64@0 {
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <10000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x0 0x20000>;
108 read-only;
109 };
110
111 partition@20000 {
112 compatible = "tplink,firmware";
113 label = "firmware";
114 reg = <0x20000 0x5e0000>;
115 };
116
117 config: partition@600000 {
118 label = "config";
119 reg = <0x600000 0x50000>;
120 read-only;
121 };
122
123 radio: partition@7f0000 {
124 label = "radio";
125 reg = <0x7f0000 0x10000>;
126 read-only;
127 };
128 };
129 };
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136 &pcie0 {
137 mt76@0,0 {
138 reg = <0x0000 0 0 0 0>;
139 mediatek,mtd-eeprom = <&radio 0>;
140 mtd-mac-address = <&config 0x10008>;
141 mtd-mac-address-increment = <1>;
142 };
143 };
144
145 &pcie1 {
146 mt76@0,0 {
147 reg = <0x0000 0 0 0 0>;
148 mediatek,mtd-eeprom = <&radio 0x8000>;
149 ieee80211-freq-limit = <5000000 6000000>;
150 mtd-mac-address = <&config 0x10008>;
151 mtd-mac-address-increment = <2>;
152 };
153 };
154
155 &ethernet {
156 mtd-mac-address = <&config 0x10008>;
157 };
158
159 &pinctrl {
160 state_default: pinctrl0 {
161 gpio {
162 ralink,group = "rgmii2", "wdt";
163 ralink,function = "gpio";
164 };
165 };
166 };