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