ramips: Fix WiFi after 5f7396ebef09b224edf08b0bda113613a42f0928
[openwrt/openwrt.git] / target / linux / ramips / dts / R6220.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 = "netgear,r6220", "mediatek,mt7621-soc";
10 model = "Netgear R6220";
11
12 memory@0 {
13 device_type = "memory";
14 reg = <0x0 0x8000000>;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600";
19 };
20
21 gpio-leds {
22 compatible = "gpio-leds";
23
24 power {
25 label = "r6220:green:power";
26 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
27 };
28
29 usb {
30 label = "r6220:green:usb";
31 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
32 };
33
34 internet {
35 label = "r6220:green:wan";
36 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi {
40 label = "r6220:green:wifi";
41 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
42 };
43
44 wps {
45 label = "r6220:green:wps";
46 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 gpio-keys-polled {
51 compatible = "gpio-keys-polled";
52 #address-cells = <1>;
53 #size-cells = <0>;
54 poll-interval = <20>;
55
56 wps {
57 label = "wps";
58 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61
62 wifi {
63 label = "wifi";
64 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
65 linux,code = <KEY_RFKILL>;
66 };
67
68 reset {
69 label = "reset";
70 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
71 linux,code = <KEY_RESTART>;
72 };
73 };
74
75 gpio_export {
76 compatible = "gpio-export";
77 #size-cells = <0>;
78
79 usbpower {
80 gpio-export,name = "usbpower";
81 gpio-export,output = <1>;
82 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
83 };
84 };
85 };
86
87 &nand {
88 status = "okay";
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x100000>;
93 read-only;
94 };
95
96 partition@100000 {
97 label = "SC PID";
98 reg = <0x100000 0x100000>;
99 read-only;
100 };
101
102 partition@200000 {
103 label = "kernel";
104 reg = <0x200000 0x400000>;
105 };
106
107 partition@600000 {
108 label = "ubi";
109 reg = <0x600000 0x1c00000>;
110 };
111
112 factory: partition@2e00000 {
113 label = "factory";
114 reg = <0x2e00000 0x100000>;
115 read-only;
116 };
117
118 partition@4200000 {
119 label = "reserved";
120 reg = <0x4200000 0x3c00000>;
121 read-only;
122 };
123 };
124
125 &pcie {
126 status = "okay";
127
128 pcie0 {
129 mt76@0,0 {
130 mediatek,mtd-eeprom = <&factory 0x8000>;
131 ieee80211-freq-limit = <5000000 6000000>;
132 };
133 };
134
135 pcie1 {
136 mt76@1,0 {
137 mediatek,mtd-eeprom = <&factory 0x0000>;
138 ieee80211-freq-limit = <2400000 2500000>;
139 };
140 };
141 };
142
143 &ethernet {
144 mtd-mac-address = <&factory 0x00000004>;
145 };
146
147 &pinctrl {
148 state_default: pinctrl0 {
149 gpio {
150 ralink,group = "uart3", "jtag";
151 ralink,function = "gpio";
152 };
153 };
154 };