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