ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / RT-N14U.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "asus,rt-n14u", "ralink,mt7620n-soc";
10 model = "Asus RT-N14U";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wan {
20 label = "rt-n14u:blue:wan";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 lan {
25 label = "rt-n14u:blue:lan";
26 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
27 };
28
29 usb {
30 label = "rt-n14u:blue:usb";
31 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
32 };
33
34 led_power: power {
35 label = "rt-n14u:blue:power";
36 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
37 };
38
39 air {
40 label = "rt-n14u:blue:air";
41 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 gpio-keys-polled {
46 compatible = "gpio-keys-polled";
47 #address-cells = <1>;
48 #size-cells = <0>;
49 poll-interval = <20>;
50
51 reset {
52 label = "reset";
53 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56
57 wps {
58 label = "wps";
59 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_WPS_BUTTON>;
61 };
62 };
63 };
64
65 &gpio2 {
66 status = "okay";
67 };
68
69 &gpio3 {
70 status = "okay";
71 };
72
73 &spi0 {
74 status = "okay";
75
76 m25p80@0 {
77 #address-cells = <1>;
78 #size-cells = <1>;
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <10000000>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x10000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99 };
100
101 partition@50000 {
102 label = "firmware";
103 reg = <0x50000 0xfb0000>;
104 };
105 };
106 };
107
108 &ehci {
109 status = "okay";
110 };
111
112 &ohci {
113 status = "okay";
114 };
115
116 &ethernet {
117 mtd-mac-address = <&factory 0x4>;
118 mediatek,portmap = "wllll";
119 };
120
121 &wmac {
122 ralink,mtd-eeprom = <&factory 0>;
123 };
124
125 &pinctrl {
126 state_default: pinctrl0 {
127 default {
128 ralink,group = "ephy", "wled", "i2c";
129 ralink,function = "gpio";
130 };
131 };
132 };