lantiq: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / ar9_netgear_dgn3500.dtsi
1 #include "ar9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5
6 / {
7 chosen {
8 bootargs = "root= console=ttyLTQ0,115200";
9 };
10
11 aliases {
12 led-boot = &power_green;
13 led-failsafe = &power_red;
14 led-running = &power_green;
15 led-upgrade = &power_green;
16
17 led-dsl = &dsl;
18 led-internet = &internet;
19 led-usb = &led_usb;
20 led-wifi = &wifi_green;
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 rtl8366rb {
29 compatible = "realtek,rtl8366rb";
30 gpio-sda = <&gpio 35 GPIO_ACTIVE_HIGH>;
31 gpio-sck = <&gpio 37 GPIO_ACTIVE_HIGH>;
32
33 realtek,initvals = <
34 0x0000 0x0830
35 0x0400 0x8130
36 0x000a 0x83ed
37 0x0f51 0x0017
38 0x02f5 0x0048
39 0x02fa 0xffdf
40 0x02fb 0xffe0
41 0x0450 0x0000
42 0x0401 0x0000
43 0x0431 0x0960
44 >;
45 };
46
47 keys {
48 compatible = "gpio-keys-polled";
49 poll-interval = <100>;
50
51 rfkill {
52 label = "rfkill";
53 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RFKILL>;
55 };
56 wps {
57 label = "wps";
58 gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61 reset {
62 label = "reset";
63 gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_RESTART>;
65 };
66 };
67
68 leds {
69 compatible = "gpio-leds";
70 internet: internet {
71 label = "green:internet";
72 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
73 };
74 internet2 {
75 label = "red:internet";
76 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
77 };
78 dsl: dsl {
79 label = "green:dsl";
80 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
81 };
82 led_usb: usb {
83 function = LED_FUNCTION_USB;
84 color = <LED_COLOR_ID_GREEN>;
85 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
86 };
87 power_green: power {
88 function = LED_FUNCTION_POWER;
89 color = <LED_COLOR_ID_GREEN>;
90 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
91 default-state = "keep";
92 };
93 power_red: power2 {
94 function = LED_FUNCTION_POWER;
95 color = <LED_COLOR_ID_RED>;
96 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
97 };
98 wifi_green: wifi {
99 label = "green:wireless";
100 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
101 };
102 wifi2 {
103 label = "amber:wireless";
104 gpios = <&gpio 51 GPIO_ACTIVE_LOW>;
105 };
106 wps {
107 function = LED_FUNCTION_WPS;
108 color = <LED_COLOR_ID_GREEN>;
109 gpios = <&gpio 52 GPIO_ACTIVE_LOW>;
110 };
111 };
112 };
113
114 &gpio {
115 pinctrl-names = "default";
116 pinctrl-0 = <&state_default>;
117
118 state_default: pinmux {
119 exin {
120 lantiq,groups = "exin1";
121 lantiq,function = "exin";
122 };
123 };
124 };
125
126 &gsw {
127 phy-mode = "mii";
128 };
129
130 &pci0 {
131 status = "okay";
132
133 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
134 pinctrl-names = "default";
135
136 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
137
138 wifi@168c,0029 {
139 compatible = "pci168c,0029";
140 reg = <0x7000 0 0 0 0>;
141 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
142 };
143 };
144
145 &spi {
146 status = "okay";
147
148 flash@4 {
149 compatible = "jedec,spi-nor";
150 reg = <4>;
151 spi-max-frequency = <20000000>;
152
153 partitions {
154 compatible = "fixed-partitions";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 partition@0 {
159 reg = <0x0 0x10000>;
160 label = "uboot";
161 read-only;
162 };
163
164 partition@10000 {
165 reg = <0x10000 0x10000>;
166 label = "u-boot-env";
167 read-only;
168 };
169
170 ath9k_cal: partition@20000 {
171 reg = <0x20000 0x10000>;
172 label = "calibration";
173 read-only;
174 };
175
176 partition@50000 {
177 reg = <0x50000 0xfa0000>;
178 label = "firmware";
179 };
180 };
181 };
182 };
183
184 &usb_phy0 {
185 status = "okay";
186 };
187
188 &usb0 {
189 status = "okay";
190 };