ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WRH-300CR.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 = "elecom,wrh-300cr", "ralink,mt7620n-soc";
10 model = "ELECOM WRH-300CR";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_wps: wps {
20 label = "wrh-300cr:green:wps";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 ethernet {
25 label = "wrh-300cr:green:ethernet";
26 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan {
30 label = "wrh-300cr:green:wlan";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 gpio-keys-polled {
36 compatible = "gpio-keys-polled";
37 #address-cells = <1>;
38 #size-cells = <0>;
39 poll-interval = <20>;
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53 };
54
55 &gpio1 {
56 status = "okay";
57 };
58
59 &gpio2 {
60 status = "okay";
61 };
62
63 &gpio3 {
64 status = "okay";
65 };
66
67 &spi0 {
68 status = "okay";
69
70 m25p80@0 {
71 #address-cells = <1>;
72 #size-cells = <1>;
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <10000000>;
76
77 partition@0 {
78 label = "u-boot";
79 reg = <0x0 0x30000>;
80 read-only;
81 };
82
83 partition@30000 {
84 label = "u-boot-env";
85 reg = <0x30000 0x10000>;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92 };
93
94 partition@50000 {
95 label = "recover";
96 reg = <0x50000 0x1c0000>;
97 read-only;
98 };
99
100 partition@210000 {
101 label = "firmware";
102 reg = <0x210000 0xdf0000>;
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 0x2e>;
117 mediatek,portmap = "llllw";
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 };