ramips: set F5D8235 v1 usb led trigger via devicetree
[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 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
37 linux,default-trigger = "usbport";
38 };
39
40 internet {
41 label = "r6220:green:wan";
42 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
43 };
44
45 wifi {
46 label = "r6220:green:wifi";
47 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
48 };
49
50 wps {
51 label = "r6220:green:wps";
52 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
53 };
54 };
55
56 gpio-keys-polled {
57 compatible = "gpio-keys-polled";
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 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x100000>;
102 read-only;
103 };
104
105 partition@100000 {
106 label = "SC PID";
107 reg = <0x100000 0x100000>;
108 read-only;
109 };
110
111 partition@200000 {
112 label = "kernel";
113 reg = <0x200000 0x400000>;
114 };
115
116 partition@600000 {
117 label = "ubi";
118 reg = <0x600000 0x1c00000>;
119 };
120
121 factory: partition@2e00000 {
122 label = "factory";
123 reg = <0x2e00000 0x100000>;
124 read-only;
125 };
126
127 partition@4200000 {
128 label = "reserved";
129 reg = <0x4200000 0x3c00000>;
130 read-only;
131 };
132 };
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie0 {
140 mt76@0,0 {
141 reg = <0x0000 0 0 0 0>;
142 mediatek,mtd-eeprom = <&factory 0x8000>;
143 ieee80211-freq-limit = <5000000 6000000>;
144 };
145 };
146
147 &pcie1 {
148 mt76@0,0 {
149 reg = <0x0000 0 0 0 0>;
150 mediatek,mtd-eeprom = <&factory 0x0000>;
151 ieee80211-freq-limit = <2400000 2500000>;
152 };
153 };
154
155 &ethernet {
156 mtd-mac-address = <&factory 0x00000004>;
157 };
158
159 &pinctrl {
160 state_default: pinctrl0 {
161 gpio {
162 ralink,group = "uart3", "jtag";
163 ralink,function = "gpio";
164 };
165 };
166 };