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