ramips: set usb led trigger via devicetree
[openwrt/openwrt.git] / target / linux / ramips / dts / HG255D.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "huawei,hg255d", "ralink,rt3052-soc";
10 model = "HuaWei HG255D";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 cfi@1f000000 {
17 compatible = "cfi-flash";
18 reg = <0x1f000000 0x1000000>;
19 bank-width = <2>;
20 device-width = <2>;
21
22 partitions {
23 compatible = "fixed-partitions";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 partition@0 {
28 label = "u-boot";
29 reg = <0x0 0x40000>;
30 read-only;
31 };
32
33 partition@30000 {
34 label = "u-boot-env";
35 reg = <0x40000 0x20000>;
36 read-only;
37 };
38
39 factory: partition@60000 {
40 label = "factory";
41 reg = <0x60000 0x20000>;
42 read-only;
43 };
44
45 partition@80000 {
46 label = "firmware";
47 reg = <0x80000 0xf60000>;
48 };
49
50 partition@fa0000 {
51 label = "factory-orig";
52 reg = <0xfa0000 0x20000>;
53 read-only;
54 };
55 };
56 };
57
58 gpio-leds {
59 compatible = "gpio-leds";
60
61 led_power: power {
62 label = "hg255d:green:power";
63 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
64 };
65
66 internet {
67 label = "hg255d:green:internet";
68 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
69 };
70
71 wifi {
72 label = "hg255d:green:wlan";
73 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
74 };
75
76 usb {
77 label = "hg255d:green:usb";
78 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
79 trigger-sources = <&otg_port1>;
80 linux,default-trigger = "usbport";
81 };
82
83 wps {
84 label = "hg255d:green:wps";
85 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
86 };
87
88 voice {
89 label = "hg255d:green:voice";
90 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
91 };
92 };
93
94 gpio-keys-polled {
95 compatible = "gpio-keys-polled";
96 poll-interval = <10>;
97
98 reset {
99 label = "reset";
100 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_RESTART>;
102 };
103
104 wps {
105 label = "wps";
106 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
107 linux,code = <KEY_WPS_BUTTON>;
108 };
109
110 rfkill {
111 label = "rfkill";
112 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
113 linux,code = <KEY_RFKILL>;
114 };
115 };
116 };
117
118 &pinctrl {
119 state_default: pinctrl0 {
120 gpio {
121 ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
122 ralink,function = "gpio";
123 };
124 };
125 };
126
127 &ethernet {
128 mtd-mac-address = <&factory 0x28>;
129 };
130
131 &esw {
132 mediatek,portmap = <0x2f>;
133 };
134
135 &wmac {
136 ralink,mtd-eeprom = <&factory 0>;
137 };
138
139 &otg {
140 status = "okay";
141 };