9c9b3d3bf9fcf5868ca1ccc04993dd9dbc143332
[openwrt/staging/hauke.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 &gpio2 {
66 status = "okay";
67 };
68
69 &gpio3 {
70 status = "okay";
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <10000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x30000>;
89 };
90
91 partition@30000 {
92 label = "u-boot-env";
93 reg = <0x30000 0x10000>;
94 read-only;
95 };
96
97 factory: partition@40000 {
98 label = "factory";
99 reg = <0x40000 0x10000>;
100 read-only;
101 };
102
103 partition@50000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x50000 0xf80000>;
107 };
108
109 partition@ff0000 {
110 label = "art";
111 reg = <0xff0000 0x10000>;
112 };
113 };
114 };
115 };
116
117 &sdhci {
118 status = "okay";
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };
128
129 &ethernet {
130 nvmem-cells = <&macaddr_factory_4000>;
131 nvmem-cell-names = "mac-address";
132
133 mediatek,portmap = "wllll";
134 };
135
136 &wmac {
137 ralink,mtd-eeprom = <&factory 0x0>;
138 };
139
140 &state_default {
141 gpio {
142 groups = "wled","ephy","uartf","i2c";
143 function = "gpio";
144 };
145 };
146
147 &factory {
148 compatible = "nvmem-cells";
149 #address-cells = <1>;
150 #size-cells = <1>;
151
152 macaddr_factory_4000: macaddr@4000 {
153 reg = <0x4000 0x6>;
154 };
155 };