ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_youhua_wr1200js.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 = "youhua,wr1200js", "mediatek,mt7621-soc";
10 model = "YouHua WR1200JS";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 internet {
25 label = "wr1200js:blue:internet";
26 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
27 };
28
29 led_wps: wps {
30 label = "wr1200js:blue:wps";
31 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
32 };
33
34 usb {
35 label = "wr1200js:blue:usb";
36 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
38 linux,default-trigger = "usbport";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56
57 wifi {
58 label = "wifi";
59 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RFKILL>;
61 };
62 };
63 };
64
65 &spi0 {
66 status = "okay";
67
68 m25p80@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <10000000>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 read-only;
88 };
89
90 factory: partition@40000 {
91 label = "factory";
92 reg = <0x40000 0x10000>;
93 read-only;
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x50000 0xfb0000>;
100 };
101 };
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 mt76@0,0 {
111 reg = <0x0000 0 0 0 0>;
112 mediatek,mtd-eeprom = <&factory 0x0000>;
113 };
114 };
115
116 &pcie1 {
117 mt76@0,0 {
118 reg = <0x0000 0 0 0 0>;
119 mediatek,mtd-eeprom = <&factory 0x8000>;
120 ieee80211-freq-limit = <5000000 6000000>;
121
122 led {
123 led-sources = <2>;
124 led-active-low;
125 };
126 };
127 };
128
129 &ethernet {
130 mtd-mac-address = <&factory 0xe000>;
131 };
132
133 &state_default {
134 gpio {
135 ralink,group = "i2c", "uart2", "uart3", "wdt";
136 ralink,function = "gpio";
137 };
138 };