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