ramips: set usb led trigger via devicetree
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / Newifi-D2.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 = "d-team,newifi-d2", "mediatek,mt7621-soc";
10 model = "Newifi-D2";
11
12 aliases {
13 led-status = &led_power_blue;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 power-amber {
29 label = "newifi-d2:amber:power";
30 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
31 };
32
33 led_power_blue: power-blue {
34 label = "newifi-d2:blue:power";
35 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
36 };
37
38 internet-amber {
39 label = "newifi-d2:amber:internet";
40 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
41 };
42
43 internet-blue {
44 label = "newifi-d2:blue:internet";
45 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan2g {
49 label = "newifi-d2:blue:wlan2g";
50 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
51 };
52
53 wlan5g {
54 label = "newifi-d2:blue:wlan5g";
55 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
56 };
57
58 usb {
59 label = "newifi-d2:blue:usb";
60 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
61 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
62 linux,default-trigger = "usbport";
63 };
64 };
65
66 gpio-keys-polled {
67 compatible = "gpio-keys-polled";
68 poll-interval = <20>;
69
70 reset {
71 label = "reset";
72 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 wps {
77 label = "wps";
78 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_WPS_BUTTON>;
80 };
81 };
82
83 gpio_export {
84 compatible = "gpio-export";
85 #size-cells = <0>;
86
87 power_usb3 {
88 gpio-export,name = "power_usb3";
89 gpio-export,output = <1>;
90 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
91 };
92 };
93 };
94
95 &spi0 {
96 status = "okay";
97
98 m25p80@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <10000000>;
102 m25p,chunked-io = <32>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x0 0x30000>;
112 read-only;
113 };
114
115 partition@30000 {
116 label = "u-boot-env";
117 reg = <0x30000 0x10000>;
118 read-only;
119 };
120
121 factory: partition@40000 {
122 label = "factory";
123 reg = <0x40000 0x10000>;
124 read-only;
125 };
126
127 partition@50000 {
128 label = "firmware";
129 reg = <0x50000 0x1fb0000>;
130 };
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 };
152 };
153
154 &ethernet {
155 mtd-mac-address = <&factory 0xe000>;
156 };
157
158 &pinctrl {
159 state_default: pinctrl0 {
160 gpio {
161 ralink,group = "i2c", "jtag", "uart2", "uart3";
162 ralink,function = "gpio";
163 };
164 };
165 };