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