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