ramips: add support for ELECOM WRH-300CR
[openwrt.git] / target / linux / ramips / dts / WRH-300CR.dts
1 /dts-v1/;
2
3 /include/ "mt7620n.dtsi"
4
5 / {
6         compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
7         model = "ELECOM WRH-300CR";
8
9         palmbus@10000000 {
10                 gpio1: gpio@638 {
11                         status = "okay";
12                 };
13
14                 gpio2: gpio@660 {
15                         status = "okay";
16                 };
17
18                 gpio3: gpio@688 {
19                         status = "okay";
20                 };
21
22                 spi@b00 {
23                         status = "okay";
24
25                         m25p80@0 {
26                                 #address-cells = <1>;
27                                 #size-cells = <1>;
28                                 compatible = "jedec,spi-nor";
29                                 reg = <0 0>;
30                                 linux,modalias = "m25p80", "mx25l12805d";
31                                 spi-max-frequency = <10000000>;
32
33                                 partition@0 {
34                                         label = "u-boot";
35                                         reg = <0x0 0x30000>;
36                                         read-only;
37                                 };
38
39                                 partition@30000 {
40                                         label = "u-boot-env";
41                                         reg = <0x30000 0x10000>;
42                                 };
43
44                                 factory: partition@40000 {
45                                         label = "factory";
46                                         reg = <0x40000 0x10000>;
47                                         read-only;
48                                 };
49
50                                 partition@50000 {
51                                         label = "recover";
52                                         reg = <0x50000 0x1c0000>;
53                                         read-only;
54                                 };
55
56                                 partition@210000 {
57                                         label = "firmware";
58                                         reg = <0x210000 0xdf0000>;
59                                 };
60                         };
61                 };
62         };
63
64         ehci@101c0000 {
65                 status = "okay";
66         };
67
68         ohci@101c1000 {
69                 status = "okay";
70         };
71
72         ethernet@10100000 {
73                 mtd-mac-address = <&factory 0x2e>;
74                 mediatek,portmap = "llllw";
75         };
76
77         wmac@10180000 {
78                 ralink,mtd-eeprom = <&factory 0>;
79         };
80
81         pinctrl {
82                 state_default: pinctrl0 {
83                         default {
84                                 ralink,group = "i2c", "ephy", "wled";
85                                 ralink,function = "gpio";
86                         };
87                 };
88         };
89
90         gpio-leds {
91                 compatible = "gpio-leds";
92
93                 wps {
94                         label = "wrh-300cr:green:wps";
95                         gpios = <&gpio2 0 1>;
96                 };
97
98                 ethernet {
99                         label = "wrh-300cr:green:ethernet";
100                         gpios = <&gpio2 3 1>;
101                 };
102
103                 wlan {
104                         label = "wrh-300cr:green:wlan";
105                         gpios = <&gpio3 0 1>;
106                 };
107         };
108
109         gpio-keys-polled {
110                 compatible = "gpio-keys-polled";
111                 #address-cells = <1>;
112                 #size-cells = <0>;
113                 poll-interval = <20>;
114
115                 reset {
116                         label = "reset";
117                         gpios = <&gpio0 1 1>;
118                         linux,code = <0x198>;
119                 };
120
121                 wps {
122                         label = "wps";
123                         gpios = <&gpio0 2 1>;
124                         linux,code = <0x211>;
125                 };
126         };
127 };