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