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