6922b958db464c491d2a8d73a5822b8a45f64b35
[openwrt/openwrt.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 = "w25q128";
88 reg = <0>;
89 linux,modalias = "m25p80", "w25q128";
90 spi-max-frequency = <10000000>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107 };
108
109 partition@50000 {
110 label = "firmware";
111 reg = <0x50000 0xf80000>;
112 };
113
114 partition@ff0000 {
115 label = "art";
116 reg = <0xff0000 0x10000>;
117 };
118 };
119 };
120
121 &sdhci {
122 status = "okay";
123 };
124
125 &ehci {
126 status = "okay";
127 };
128
129 &ohci {
130 status = "okay";
131 };
132
133 &ethernet {
134 pinctrl-names = "default";
135 pinctrl-0 = <&ephy_pins>;
136 mtd-mac-address = <&factory 0x4000>;
137 ralink,port-map = "wllll";
138 };
139
140 &wmac {
141 ralink,mtd-eeprom = <&factory 0>;
142 };
143
144 &pcie {
145 status = "okay";
146
147 pcie-bridge {
148 mt76@0,0 {
149 reg = <0x0000 0 0 0 0>;
150 device_type = "pci";
151 mediatek,mtd-eeprom = <&factory 0x8000>;
152 mediatek,2ghz = <0>;
153 };
154 };
155 };
156
157 &pinctrl {
158 state_default: pinctrl0 {
159 gpio {
160 ralink,group = "wled","ephy","uartf","i2c";
161 ralink,function = "gpio";
162 };
163 };
164 };