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