ramips: add support for EnGenius ESR600
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_ravpower_wd03.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 = "ravpower,wd03", "ralink,mt7620n-soc";
10         model = "Ravpower WD03";
11
12         chosen {
13                 bootargs = "console=ttyS0,115200";
14         };
15
16         leds {
17                 compatible = "gpio-leds";
18
19                 green-wifi {
20                         label = "wd03:green:wifi";
21                         gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
22                 };
23
24
25                 blue-wifi {
26                         label = "wd03:blue:wifi";
27                         gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
28                 };
29         };
30
31         keys {
32                 compatible = "gpio-keys-polled";
33                 poll-interval = <20>;
34
35                 reset {
36                         label = "reset";
37                         gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
38                         linux,code = <KEY_RESTART>;
39                 };
40         };
41 };
42
43 &gpio2 {
44         status = "okay";
45 };
46
47 &gpio3 {
48         status = "okay";
49 };
50
51 &i2c {
52         status = "okay";
53 };
54
55 &spi0 {
56         status = "okay";
57
58         m25p80@0 {
59                 compatible = "jedec,spi-nor";
60                 reg = <0>;
61                 spi-max-frequency = <10000000>;
62
63                 partitions {
64                         compatible = "fixed-partitions";
65                         #address-cells = <1>;
66                         #size-cells = <1>;
67
68                         partition@0 {
69                                 label = "u-boot";
70                                 reg = <0x0 0x30000>;
71                                 read-only;
72                         };
73
74                         partition@30000 {
75                                 label = "u-boot-env";
76                                 reg = <0x30000 0x10000>;
77                                 read-only;
78                         };
79
80                         factory: partition@40000 {
81                                 label = "factory";
82                                 reg = <0x40000 0x10000>;
83                                 read-only;
84                         };
85
86                         partition@50000 {
87                                 compatible = "denx,uimage";
88                                 label = "firmware";
89                                 reg = <0x50000 0x7b0000>;
90                         };
91                 };
92         };
93 };
94
95 &ehci {
96         status = "okay";
97 };
98
99 &ohci {
100         status = "okay";
101 };
102
103 &ethernet {
104         mtd-mac-address = <&factory 0x4000>;
105         ralink,port-map = "wllll";
106 };
107
108 &wmac {
109         ralink,mtd-eeprom = <&factory 0>;
110 };
111
112 &pinctrl {
113         state_default: pinctrl0 {
114                 gpio {
115                         ralink,group = "wled", "ephy";
116                         ralink,function = "gpio";
117                 };
118         };
119 };