ramips: Use dts alias based status led
[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-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 #address-cells = <1>;
57 #size-cells = <0>;
58 poll-interval = <20>;
59
60 wps {
61 label = "wps";
62 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
63 linux,code = <KEY_WPS_BUTTON>;
64 };
65
66 wifi {
67 label = "wifi";
68 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
69 linux,code = <KEY_RFKILL>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
75 linux,code = <KEY_RESTART>;
76 };
77 };
78
79 gpio_export {
80 compatible = "gpio-export";
81 #size-cells = <0>;
82
83 usbpower {
84 gpio-export,name = "usbpower";
85 gpio-export,output = <1>;
86 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
87 };
88 };
89 };
90
91 &nand {
92 status = "okay";
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x0 0x100000>;
97 read-only;
98 };
99
100 partition@100000 {
101 label = "SC PID";
102 reg = <0x100000 0x100000>;
103 read-only;
104 };
105
106 partition@200000 {
107 label = "kernel";
108 reg = <0x200000 0x400000>;
109 };
110
111 partition@600000 {
112 label = "ubi";
113 reg = <0x600000 0x1c00000>;
114 };
115
116 factory: partition@2e00000 {
117 label = "factory";
118 reg = <0x2e00000 0x100000>;
119 read-only;
120 };
121
122 partition@4200000 {
123 label = "reserved";
124 reg = <0x4200000 0x3c00000>;
125 read-only;
126 };
127 };
128
129 &pcie {
130 status = "okay";
131
132 pcie0 {
133 mt76@0,0 {
134 reg = <0x0000 0 0 0 0>;
135 device_type = "pci";
136 mediatek,mtd-eeprom = <&factory 0x8000>;
137 ieee80211-freq-limit = <5000000 6000000>;
138 };
139 };
140
141 pcie1 {
142 mt76@1,0 {
143 reg = <0x0000 0 0 0 0>;
144 device_type = "pci";
145 mediatek,mtd-eeprom = <&factory 0x0000>;
146 ieee80211-freq-limit = <2400000 2500000>;
147 };
148 };
149 };
150
151 &ethernet {
152 mtd-mac-address = <&factory 0x00000004>;
153 };
154
155 &pinctrl {
156 state_default: pinctrl0 {
157 gpio {
158 ralink,group = "uart3", "jtag";
159 ralink,function = "gpio";
160 };
161 };
162 };