f6ab3e453714bf6d05d742d71014e339626cee62
[openwrt/staging/wigyori.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 #address-cells = <1>;
85 #size-cells = <1>;
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x30000>;
93 };
94
95 partition@30000 {
96 label = "u-boot-env";
97 reg = <0x30000 0x10000>;
98 read-only;
99 };
100
101 factory: partition@40000 {
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105 };
106
107 partition@50000 {
108 label = "firmware";
109 reg = <0x50000 0xf80000>;
110 };
111
112 partition@ff0000 {
113 label = "art";
114 reg = <0xff0000 0x10000>;
115 };
116 };
117 };
118
119 &sdhci {
120 status = "okay";
121 };
122
123 &ehci {
124 status = "okay";
125 };
126
127 &ohci {
128 status = "okay";
129 };
130
131 &ethernet {
132 mtd-mac-address = <&factory 0x4000>;
133 mediatek,portmap = "wllll";
134 };
135
136 &wmac {
137 ralink,mtd-eeprom = <&factory 0>;
138 };
139
140 &pinctrl {
141 state_default: pinctrl0 {
142 gpio {
143 ralink,group = "wled","ephy","uartf","i2c";
144 ralink,function = "gpio";
145 };
146 };
147 };