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