ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620n_asus_rt-n14u.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "asus,rt-n14u", "ralink,mt7620n-soc";
9 model = "Asus RT-N14U";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 wan {
22 function = LED_FUNCTION_WAN;
23 color = <LED_COLOR_ID_BLUE>;
24 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
25 };
26
27 lan {
28 function = LED_FUNCTION_LAN;
29 color = <LED_COLOR_ID_BLUE>;
30 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
31 };
32
33 usb {
34 function = LED_FUNCTION_USB;
35 color = <LED_COLOR_ID_BLUE>;
36 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&ohci_port1>, <&ehci_port1>;
38 linux,default-trigger = "usbport";
39 };
40
41 led_power: power {
42 function = LED_FUNCTION_POWER;
43 color = <LED_COLOR_ID_BLUE>;
44 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
45 };
46
47 air {
48 label = "blue:air";
49 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "reset";
58 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 wps {
63 label = "wps";
64 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67 };
68 };
69
70 &gpio2 {
71 status = "okay";
72 };
73
74 &gpio3 {
75 status = "okay";
76 };
77
78 &spi0 {
79 status = "okay";
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <10000000>;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x0 0x30000>;
94 read-only;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107
108 nvmem-layout {
109 compatible = "fixed-layout";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 eeprom_factory_0: eeprom@0 {
114 reg = <0x0 0x200>;
115 };
116
117 macaddr_factory_4: macaddr@4 {
118 reg = <0x4 0x6>;
119 };
120 };
121 };
122
123 partition@50000 {
124 compatible = "denx,uimage";
125 label = "firmware";
126 reg = <0x50000 0xfb0000>;
127 };
128 };
129 };
130 };
131
132 &ehci {
133 status = "okay";
134 };
135
136 &ohci {
137 status = "okay";
138 };
139
140 &ethernet {
141 nvmem-cells = <&macaddr_factory_4>;
142 nvmem-cell-names = "mac-address";
143
144 mediatek,portmap = "wllll";
145 };
146
147 &wmac {
148 nvmem-cells = <&eeprom_factory_0>;
149 nvmem-cell-names = "eeprom";
150 };
151
152 &state_default {
153 default {
154 groups = "ephy", "wled", "i2c";
155 function = "gpio";
156 };
157 };