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