ramips: Fix WiFi after 5f7396ebef09b224edf08b0bda113613a42f0928
[oweals/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                         mediatek,mtd-eeprom = <&factory 0x0000>;
108                 };
109         };
110
111         pcie1 {
112                 mt76@1,0 {
113                         mediatek,mtd-eeprom = <&factory 0x8000>;
114                         ieee80211-freq-limit = <5000000 6000000>;
115
116                         led {
117                                 led-sources = <2>;
118                                 led-active-low;
119                         };
120                 };
121         };
122 };
123
124 &ethernet {
125         mtd-mac-address = <&factory 0xe000>;
126 };
127
128 &pinctrl {
129         state_default: pinctrl0 {
130                 gpio {
131                         ralink,group = "i2c", "uart2", "uart3", "wdt";
132                         ralink,function = "gpio";
133                 };
134         };
135 };