ramips: Fix GB-PC1 cpuclock again
[openwrt/openwrt.git] / target / linux / ramips / dts / GL-MT300A.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
10 model = "GL-MT300A";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wan {
20 label = "gl-mt300a:wan";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 lan {
25 label = "gl-mt300a:lan";
26 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan {
30 label = "gl-mt300a:wlan";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33
34 usb {
35 label = "gl-mt300a:usb";
36 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
37 };
38
39 };
40
41 gpio-keys-polled {
42 compatible = "gpio-keys-polled";
43 #address-cells = <1>;
44 #size-cells = <0>;
45 poll-interval = <20>;
46 reset {
47 label = "reset";
48 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51
52 BTN_0 {
53 label = "BTN_0";
54 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
55 linux,code = <BTN_0>;
56 };
57
58 BTN_1 {
59 label = "BTN_1";
60 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
61 linux,code = <BTN_1>;
62 };
63 };
64 };
65
66 &gpio0 {
67 status = "okay";
68 };
69
70 &gpio1 {
71 status = "okay";
72 };
73
74 &gpio2 {
75 status = "okay";
76 };
77
78 &gpio3 {
79 status = "okay";
80 };
81
82 &spi0 {
83 status = "okay";
84
85 m25p80@0 {
86 #address-cells = <1>;
87 #size-cells = <1>;
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <10000000>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107 };
108
109 partition@50000 {
110 label = "firmware";
111 reg = <0x50000 0xf80000>;
112 };
113
114 partition@ff0000 {
115 label = "art";
116 reg = <0xff0000 0x10000>;
117 };
118 };
119 };
120
121 &sdhci {
122 status = "okay";
123 };
124
125 &ehci {
126 status = "okay";
127 };
128
129 &ohci {
130 status = "okay";
131 };
132
133 &ethernet {
134 pinctrl-names = "default";
135 pinctrl-0 = <&ephy_pins>;
136 mtd-mac-address = <&factory 0x4000>;
137 mediatek,portmap = "wllll";
138 };
139
140 &wmac {
141 ralink,mtd-eeprom = <&factory 0>;
142 };
143
144 &pinctrl {
145 state_default: pinctrl0 {
146 gpio {
147 ralink,group = "wled","ephy","uartf","i2c";
148 ralink,function = "gpio";
149 };
150 };
151 };