ramips: fix dtc warnings
[openwrt/openwrt.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 #address-cells = <1>;
99 #size-cells = <1>;
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <10000000>;
103 m25p,chunked-io = <32>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x0 0x20000>;
108 read-only;
109 };
110
111 partition@20000 {
112 label = "firmware";
113 reg = <0x20000 0x5e0000>;
114 };
115
116 config: partition@600000 {
117 label = "config";
118 reg = <0x600000 0x50000>;
119 read-only;
120 };
121
122 radio: partition@7f0000 {
123 label = "radio";
124 reg = <0x7f0000 0x10000>;
125 read-only;
126 };
127 };
128 };
129
130 &pcie {
131 status = "okay";
132 };
133
134 &pcie0 {
135 mt76@0,0 {
136 reg = <0x0000 0 0 0 0>;
137 mediatek,mtd-eeprom = <&radio 0>;
138 mtd-mac-address = <&config 0x10008>;
139 mtd-mac-address-increment = <1>;
140 };
141 };
142
143 &pcie1 {
144 mt76@0,0 {
145 reg = <0x0000 0 0 0 0>;
146 mediatek,mtd-eeprom = <&radio 0x8000>;
147 ieee80211-freq-limit = <5000000 6000000>;
148 mtd-mac-address = <&config 0x10008>;
149 mtd-mac-address-increment = <2>;
150 };
151 };
152
153 &ethernet {
154 mtd-mac-address = <&config 0x10008>;
155 };
156
157 &pinctrl {
158 state_default: pinctrl0 {
159 gpio {
160 ralink,group = "rgmii2", "wdt";
161 ralink,function = "gpio";
162 };
163 };
164 };