ramips: fix dtc warnings
[openwrt/openwrt.git] / target / linux / ramips / dts / 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", "ralink,mt7620an-soc";
10 model = "GL-MT300N-V2";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x8000000>;
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_power: power {
29 label = "gl-mt300n-v2:green:power";
30 default-state = "on";
31 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
32 };
33
34 wan {
35 label = "gl-mt300n-v2:blue:wan";
36 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
37 };
38
39 wlan {
40 label = "gl-mt300n-v2:red:wlan";
41 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 gpio-keys {
46 compatible = "gpio-keys-polled";
47 poll-interval = <20>;
48
49 reset {
50 label = "reset";
51 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 BTN_0 {
56 label = "BTN_0";
57 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
58 linux,code = <BTN_0>;
59 };
60
61 BTN_1 {
62 label = "BTN_1";
63 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_1>;
65 };
66 };
67
68 gpio_export {
69 compatible = "gpio-export";
70 #size-cells = <0>;
71
72 usb {
73 gpio-export,name = "usb";
74 gpio-export,output = <1>;
75 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
76 };
77 };
78
79 };
80
81 &pinctrl {
82 state_default: pinctrl0 {
83 gpio {
84 ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
85 ralink,function = "gpio";
86 };
87 };
88 };
89
90 &ethernet {
91 mtd-mac-address = <&factory 0x4>;
92 };
93
94 &wmac {
95 status = "okay";
96 ralink,mtd-eeprom = <&factory 0x0>;
97 };
98
99 &spi0 {
100 status = "okay";
101
102 m25p80@0 {
103 #address-cells = <1>;
104 #size-cells = <1>;
105 compatible = "jedec,spi-nor";
106 reg = <0>;
107 spi-max-frequency = <10000000>;
108 m25p,chunked-io = <32>;
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 label = "firmware";
130 reg = <0x50000 0xfb0000>;
131 };
132 };
133 };
134
135 &uart1 {
136 status = "okay";
137 };
138
139 &ehci {
140 status = "okay";
141 };
142
143 &ohci {
144 status = "okay";
145 };