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