c336ba317a22a5582d0480e3e6547570d8932dd5
[librecmc/librecmc.git] / target / linux / ramips / dts / WRH-300CR.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
9         model = "ELECOM WRH-300CR";
10
11                 gpio-leds {
12                 compatible = "gpio-leds";
13
14                 wps {
15                         label = "wrh-300cr:green:wps";
16                         gpios = <&gpio2 0 1>;
17                 };
18
19                 ethernet {
20                         label = "wrh-300cr:green:ethernet";
21                         gpios = <&gpio2 3 1>;
22                 };
23
24                 wlan {
25                         label = "wrh-300cr:green:wlan";
26                         gpios = <&gpio3 0 1>;
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 1>;
39                         linux,code = <KEY_RESTART>;
40                 };
41
42                 wps {
43                         label = "wps";
44                         gpios = <&gpio0 2 1>;
45                         linux,code = <KEY_WPS_BUTTON>;
46                 };
47         };
48 };
49
50 &gpio1 {
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                 };
82
83                 factory: partition@40000 {
84                         label = "factory";
85                         reg = <0x40000 0x10000>;
86                         read-only;
87                 };
88
89                 partition@50000 {
90                         label = "recover";
91                         reg = <0x50000 0x1c0000>;
92                         read-only;
93                 };
94
95                 partition@210000 {
96                         label = "firmware";
97                         reg = <0x210000 0xdf0000>;
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 0x2e>;
112         mediatek,portmap = "llllw";
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 };