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