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