ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_glinet_gl-mt300a.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
10         model = "GL-MT300A";
11
12         aliases {
13                 label-mac-device = &wmac;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,115200";
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 wan {
24                         label = "gl-mt300a:wan";
25                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
26                 };
27
28                 lan {
29                         label = "gl-mt300a:lan";
30                         gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
31                 };
32
33                 wlan {
34                         label = "gl-mt300a:wlan";
35                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
36                 };
37
38                 usb {
39                         label = "gl-mt300a:usb";
40                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
41                 };
42         };
43
44         keys {
45                 compatible = "gpio-keys-polled";
46                 poll-interval = <20>;
47                 reset {
48                         label = "reset";
49                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_RESTART>;
51                 };
52
53                 BTN_0 {
54                         label = "BTN_0";
55                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
56                         linux,code = <BTN_0>;
57                 };
58
59                 BTN_1 {
60                         label = "BTN_1";
61                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
62                         linux,code = <BTN_1>;
63                 };
64         };
65 };
66
67 &gpio0 {
68         status = "okay";
69 };
70
71 &gpio1 {
72         status = "okay";
73 };
74
75 &gpio2 {
76         status = "okay";
77 };
78
79 &gpio3 {
80         status = "okay";
81 };
82
83 &spi0 {
84         status = "okay";
85
86         m25p80@0 {
87                 compatible = "jedec,spi-nor";
88                 reg = <0>;
89                 spi-max-frequency = <10000000>;
90
91                 partitions {
92                         compatible = "fixed-partitions";
93                         #address-cells = <1>;
94                         #size-cells = <1>;
95
96                         partition@0 {
97                                 label = "u-boot";
98                                 reg = <0x0 0x30000>;
99                         };
100
101                         partition@30000 {
102                                 label = "u-boot-env";
103                                 reg = <0x30000 0x10000>;
104                                 read-only;
105                         };
106
107                         factory: partition@40000 {
108                                 label = "factory";
109                                 reg = <0x40000 0x10000>;
110                                 read-only;
111                         };
112
113                         partition@50000 {
114                                 compatible = "denx,uimage";
115                                 label = "firmware";
116                                 reg = <0x50000 0xf80000>;
117                         };
118
119                         partition@ff0000 {
120                                 label = "art";
121                                 reg = <0xff0000 0x10000>;
122                         };
123                 };
124         };
125 };
126
127 &sdhci {
128         status = "okay";
129 };
130
131 &ehci {
132         status = "okay";
133 };
134
135 &ohci {
136         status = "okay";
137 };
138
139 &ethernet {
140         mtd-mac-address = <&factory 0x4000>;
141         mediatek,portmap = "wllll";
142 };
143
144 &wmac {
145         ralink,mtd-eeprom = <&factory 0>;
146 };
147
148 &pinctrl {
149         state_default: pinctrl0 {
150                 gpio {
151                         ralink,group = "wled","ephy","uartf","i2c";
152                         ralink,function = "gpio";
153                 };
154         };
155 };