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