ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.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";
64
65 led {
66 label = "led";
67 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
68 linux,code = <BTN_0>;
69 };
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
75 };
76
77 power {
78 label = "power";
79 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_POWER>;
81 };
82
83 wps {
84 label = "wps";
85 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_WPS_BUTTON>;
87 };
88 };
89 };
90
91 &spi0 {
92 status = "okay";
93
94 w25q64@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <10000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x20000>;
107 read-only;
108 };
109
110 partition@20000 {
111 compatible = "tplink,firmware";
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
131 &pcie {
132 status = "okay";
133 };
134
135 &pcie0 {
136 mt76@0,0 {
137 reg = <0x0000 0 0 0 0>;
138 mediatek,mtd-eeprom = <&radio 0>;
139 mtd-mac-address = <&config 0x10008>;
140 mtd-mac-address-increment = <1>;
141 };
142 };
143
144 &pcie1 {
145 mt76@0,0 {
146 reg = <0x0000 0 0 0 0>;
147 mediatek,mtd-eeprom = <&radio 0x8000>;
148 ieee80211-freq-limit = <5000000 6000000>;
149 mtd-mac-address = <&config 0x10008>;
150 mtd-mac-address-increment = <2>;
151 };
152 };
153
154 &ethernet {
155 mtd-mac-address = <&config 0x10008>;
156 };
157
158 &state_default {
159 gpio {
160 ralink,group = "rgmii2", "wdt";
161 ralink,function = "gpio";
162 };
163 };