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