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