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