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