ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / M2M.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "intenso,memory2move", "ralink,rt5350-soc";
10 model = "Intenso Memory 2 Move";
11
12 aliases {
13 led-status = &led_wifi;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,57600n8 root=/dev/mtdblock5";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 led_wifi: wifi {
24 label = "m2m:blue:wifi";
25 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
26 };
27
28 wan {
29 label = "m2m:green:wan";
30 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 gpio-keys-polled {
35 compatible = "gpio-keys-polled";
36 #address-cells = <1>;
37 #size-cells = <0>;
38 poll-interval = <20>;
39
40 power {
41 label = "power";
42 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_POWER>;
44 };
45
46 reset {
47 label = "reset";
48 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &spi0 {
55 status = "okay";
56
57 m25p80@0 {
58 #address-cells = <1>;
59 #size-cells = <1>;
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <10000000>;
63
64 partition@0 {
65 label = "Bootloader";
66 reg = <0x0 0x30000>;
67 read-only;
68 };
69
70 partition@30000 {
71 label = "Config";
72 reg = <0x30000 0x10000>;
73 read-only;
74 };
75
76 factory: partition@40000 {
77 label = "Factory";
78 reg = <0x40000 0x10000>;
79 read-only;
80 };
81
82 partition@50000 {
83 label = "firmware";
84 reg = <0x50000 0x7b0000>;
85 };
86 };
87 };
88
89 &pinctrl {
90 state_default: pinctrl0 {
91 gpio {
92 ralink,group = "i2c", "uartf";
93 ralink,function = "gpio";
94 };
95 };
96 };
97
98 &ethernet {
99 mtd-mac-address = <&factory 0x28>;
100 };
101
102 &esw {
103 mediatek,portmap = <0x2f>;
104 };
105
106 &ehci {
107 status = "okay";
108 };
109
110 &ohci {
111 status = "okay";
112 };
113
114 &wmac {
115 ralink,mtd-eeprom = <&factory 0x0>;
116 };