lantiq: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / ar9_zte_h201l.dts
1 #include "ar9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5
6 / {
7 compatible = "zte,h201l", "lantiq,xway", "lantiq,ar9";
8 model = "ZTE H210L";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power_green;
16 led-failsafe = &power_green;
17 led-running = &power_green;
18 led-upgrade = &power_green;
19
20 led-dsl = &dsl;
21 led-internet = &online;
22 led-usb = &led_usb;
23 led-wifi = &wifi;
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x2000000>;
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
33 poll-interval = <100>;
34
35 reset {
36 label = "reset";
37 gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 wps {
41 label = "wps";
42 gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_WPS_BUTTON>;
44 };
45 rfkill {
46 label = "rfkill";
47 gpios = <&gpio 55 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RFKILL>;
49 };
50 };
51
52 leds {
53 compatible = "gpio-leds";
54
55 power_green: power {
56 function = LED_FUNCTION_POWER;
57 color = <LED_COLOR_ID_GREEN>;
58 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
59 default-state = "keep";
60 };
61 online: online {
62 label = "green:internet";
63 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
64 };
65 dsl: dsl {
66 label = "green:dsl";
67 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
68 };
69 phone {
70 label = "green:phone";
71 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
72 };
73 wps {
74 function = LED_FUNCTION_WPS;
75 color = <LED_COLOR_ID_GREEN>;
76 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
77 };
78 wifi: wifi {
79 function = LED_FUNCTION_WLAN;
80 color = <LED_COLOR_ID_GREEN>;
81 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
82 };
83 led_usb: usb {
84 function = LED_FUNCTION_USB;
85 color = <LED_COLOR_ID_GREEN>;
86 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
87 };
88 };
89
90 gpio_export {
91 compatible = "gpio-export";
92 #size-cells = <0>;
93
94 switch {
95 gpio-export,name = "switch";
96 gpio-export,output = <1>;
97 gpios = <&gpio 38 GPIO_ACTIVE_HIGH>;
98 };
99 usb {
100 gpio-export,name = "usb";
101 gpio-export,output = <1>;
102 gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
103 };
104 wifi {
105 gpio-export,name = "wifi";
106 gpio-export,output = <1>;
107 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
108 };
109 };
110
111 usb_vbus: regulator-usb-vbus {
112 compatible = "regulator-fixed";
113
114 regulator-name = "USB_VBUS";
115
116 regulator-min-microvolt = <5000000>;
117 regulator-max-microvolt = <5000000>;
118
119 gpio = <&gpio 36 GPIO_ACTIVE_HIGH>;
120 enable-active-high;
121 };
122 };
123
124 &gpio {
125 pinctrl-names = "default";
126 pinctrl-0 = <&state_default>;
127
128 state_default: pinmux {
129 };
130 };
131
132 &gsw {
133 phy-mode = "rgmii";
134 };
135
136 &localbus {
137 flash@0 {
138 compatible = "lantiq,nor";
139 bank-width = <2>;
140 reg = <0 0x0 0x2000000>;
141
142 partitions {
143 compatible = "fixed-partitions";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 partition@0 {
148 label = "uboot";
149 reg = <0x00000 0x20000>;
150 read-only;
151 };
152
153 partition@20000 {
154 label = "u-boot-env";
155 reg = <0x20000 0x10000>;
156 read-only;
157 };
158
159 partition@30000 {
160 label = "firmware";
161 reg = <0x30000 0x7d0000>;
162 };
163 };
164 };
165 };
166
167 &usb_phy0 {
168 status = "okay";
169 };
170
171
172 &usb0 {
173 status = "okay";
174 vbus-supply = <&usb_vbus>;
175 };