ramips: set usb led trigger via devicetree
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WR1200JS.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 = "youhua,wr1200js", "mediatek,mt7621-soc";
10 model = "YouHua WR1200JS";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 internet {
29 label = "wr1200js:blue:internet";
30 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
31 };
32
33 led_wps: wps {
34 label = "wr1200js:blue:wps";
35 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
36 };
37
38 usb {
39 label = "wr1200js:blue:usb";
40 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
41 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
42 linux,default-trigger = "usbport";
43 };
44 };
45
46 gpio-keys-polled {
47 compatible = "gpio-keys-polled";
48 poll-interval = <20>;
49
50 reset {
51 label = "reset";
52 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55
56 wps {
57 label = "wps";
58 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61
62 wifi {
63 label = "wifi";
64 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RFKILL>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77 m25p,chunked-io = <32>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 read-only;
94 };
95
96 factory: partition@40000 {
97 label = "factory";
98 reg = <0x40000 0x10000>;
99 read-only;
100 };
101
102 partition@50000 {
103 label = "firmware";
104 reg = <0x50000 0xfb0000>;
105 };
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie0 {
115 mt76@0,0 {
116 reg = <0x0000 0 0 0 0>;
117 mediatek,mtd-eeprom = <&factory 0x0000>;
118 };
119 };
120
121 &pcie1 {
122 mt76@0,0 {
123 reg = <0x0000 0 0 0 0>;
124 mediatek,mtd-eeprom = <&factory 0x8000>;
125 ieee80211-freq-limit = <5000000 6000000>;
126
127 led {
128 led-sources = <2>;
129 led-active-low;
130 };
131 };
132 };
133
134 &ethernet {
135 mtd-mac-address = <&factory 0xe000>;
136 };
137
138 &pinctrl {
139 state_default: pinctrl0 {
140 gpio {
141 ralink,group = "i2c", "uart2", "uart3", "wdt";
142 ralink,function = "gpio";
143 };
144 };
145 };