lantiq: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / ar9_bt_homehub-v3a.dts
1 #include "ar9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5
6 / {
7 compatible = "bt,homehub-v3a", "lantiq,xway", "lantiq,ar9";
8 model = "BT Home Hub 3A"; /* SoC: Lantiq ar9 @ 333MHz */
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power_orange;
16 led-failsafe = &power_red;
17 led-running = &power_blue;
18 led-upgrade = &power_blue;
19
20 led-dsl = &broadband_blue;
21 led-wifi = &wireless_blue;
22 };
23
24 memory@0 { /* RAM: Samsung K4H511638F-LC 64MB */
25 device_type = "memory";
26 reg = <0x0 0x4000000>;
27 };
28
29 keys {
30 compatible = "gpio-keys-polled";
31 poll-interval = <100>;
32 reset {
33 label = "reset";
34 gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 restart {
38 label = "restart";
39 gpios = <&gpio 52 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_POWER>;
41 };
42 wps {
43 label = "wps";
44 gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_WPS_BUTTON>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 wireless-red {
53 label = "red:wireless";
54 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
55 };
56 wireless-orange {
57 label = "orange:wireless";
58 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
59 };
60 wireless_blue: wireless-blue {
61 label = "blue:wireless";
62 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
63 };
64
65 broadband-red {
66 label = "red:broadband";
67 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
68 };
69 broadband-orange {
70 label = "orange:broadband";
71 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
72 };
73 broadband_blue: broadband-blue {
74 label = "blue:broadband";
75 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
76 };
77
78 power_red: power-red {
79 function = LED_FUNCTION_POWER;
80 color = <LED_COLOR_ID_RED>;
81 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
82 };
83 power_orange: power-orange {
84 function = LED_FUNCTION_POWER;
85 color = <LED_COLOR_ID_ORANGE>;
86 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
87 default-state = "keep";
88 };
89 power_blue: power-blue {
90 function = LED_FUNCTION_POWER;
91 color = <LED_COLOR_ID_BLUE>;
92 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
93 };
94 };
95
96 usb_vbus: regulator-usb-vbus {
97 compatible = "regulator-fixed";
98
99 regulator-name = "USB_VBUS";
100
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
103
104 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
105 enable-active-high;
106 };
107 };
108
109 &gpio {
110 pinctrl-names = "default";
111 pinctrl-0 = <&state_default>;
112
113 state_default: pinmux {
114 pci_rst {
115 lantiq,pins = "io21";
116 lantiq,output = <1>;
117 lantiq,open-drain = <0>;
118 };
119 };
120 };
121
122 &gsw {
123 phy-mode = "rgmii";
124 };
125
126 &localbus {
127 flash@1 { /* NAND Flash: Samsung K9F5608U0D-JIB0 32MB */
128 compatible = "lantiq,nand-xway";
129 lantiq,cs = <1>;
130 bank-width = <2>;
131 reg = <1 0x0 0x2000000 >;
132 req-mask = <0x1>; /* PCI request lines to mask during NAND access */
133
134 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
135 pinctrl-names = "default";
136
137 nand-use-soft-ecc-engine;
138
139 partitions {
140 compatible = "fixed-partitions";
141 #address-cells = <1>;
142 #size-cells = <1>;
143
144 partition@0 {
145 label = "preboot";
146 reg = <0x00000 0x8000>;
147 read-only;
148 };
149 partition@8000 {
150 label = "u-boot";
151 reg = <0x8000 0x05c000>;
152 read-only;
153 };
154 partition@64000 {
155 label = "u-boot-env";
156 reg = <0x64000 0x004000>;
157 };
158 ath9k_cal: partition@68000 {
159 label = "art-copy";
160 reg = <0x68000 0x004000>;
161 };
162 partition@6c000 {
163 label = "kernel";
164 reg = <0x6c000 0x200000>;
165 };
166 partition@26c000 {
167 label = "ubi";
168 reg = <0x26c000 0x1d94000>;
169 };
170 };
171 };
172 };
173
174 &pci0 {
175 status = "okay";
176
177 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
178 pinctrl-names = "default";
179
180 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
181
182 wifi@7000 {
183 reg = <0x7000 0 0 0 0>;
184 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
185 };
186 };
187
188 &usb_phy0 {
189 status = "okay";
190 };
191
192 &usb0 {
193 status = "okay";
194 vbus-supply = <&usb_vbus>;
195 };