ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.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 poll-interval = <20>;
67
68 led {
69 label = "led";
70 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_0>;
72 };
73
74 reset {
75 label = "reset";
76 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RESTART>;
78 };
79
80 power {
81 label = "power";
82 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_POWER>;
84 };
85
86 wps {
87 label = "wps";
88 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_WPS_BUTTON>;
90 };
91 };
92 };
93
94 &spi0 {
95 status = "okay";
96
97 w25q64@0 {
98 compatible = "jedec,spi-nor";
99 reg = <0>;
100 spi-max-frequency = <10000000>;
101 m25p,chunked-io = <32>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "u-boot";
110 reg = <0x0 0x20000>;
111 read-only;
112 };
113
114 partition@20000 {
115 label = "firmware";
116 reg = <0x20000 0x5e0000>;
117 };
118
119 config: partition@600000 {
120 label = "config";
121 reg = <0x600000 0x50000>;
122 read-only;
123 };
124
125 radio: partition@7f0000 {
126 label = "radio";
127 reg = <0x7f0000 0x10000>;
128 read-only;
129 };
130 };
131 };
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 mt76@0,0 {
140 reg = <0x0000 0 0 0 0>;
141 mediatek,mtd-eeprom = <&radio 0>;
142 mtd-mac-address = <&config 0x10008>;
143 mtd-mac-address-increment = <1>;
144 };
145 };
146
147 &pcie1 {
148 mt76@0,0 {
149 reg = <0x0000 0 0 0 0>;
150 mediatek,mtd-eeprom = <&radio 0x8000>;
151 ieee80211-freq-limit = <5000000 6000000>;
152 mtd-mac-address = <&config 0x10008>;
153 mtd-mac-address-increment = <2>;
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 };