Revert faulty tree push
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_glinet_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", "mediatek,mt7628an-soc";
10         model = "GL-MT300N-V2";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power: power {
27                         label = "gl-mt300n-v2:green:power";
28                         default-state = "on";
29                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wan {
33                         label = "gl-mt300n-v2:green:wan";
34                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
35                 };
36
37                 wlan {
38                         label = "gl-mt300n-v2:red:wlan";
39                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
40                 };
41         };
42
43         keys {
44                 compatible = "gpio-keys-polled";
45                 poll-interval = <20>;
46
47                 reset {
48                         label = "reset";
49                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_RESTART>;
51                 };
52
53                 BTN_0 {
54                         label = "BTN_0";
55                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
56                         linux,code = <BTN_0>;
57                 };
58
59                 BTN_1 {
60                         label = "BTN_1";
61                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
62                         linux,code = <BTN_1>;
63                 };
64         };
65
66         gpio_export {
67                 compatible = "gpio-export";
68                 #size-cells = <0>;
69
70                 usb {
71                         gpio-export,name = "usb";
72                         gpio-export,output = <1>;
73                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
74                 };
75         };
76 };
77
78 &pinctrl {
79         state_default: pinctrl0 {
80                 gpio {
81                         ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
82                         ralink,function = "gpio";
83                 };
84         };
85 };
86
87 &ethernet {
88         mtd-mac-address = <&factory 0x4>;
89 };
90
91 &wmac {
92         status = "okay";
93         ralink,mtd-eeprom = <&factory 0x0>;
94 };
95
96 &spi0 {
97         status = "okay";
98
99         m25p80@0 {
100                 compatible = "jedec,spi-nor";
101                 reg = <0>;
102                 spi-max-frequency = <10000000>;
103
104                 partitions {
105                         compatible = "fixed-partitions";
106                         #address-cells = <1>;
107                         #size-cells = <1>;
108
109                         partition@0 {
110                                 label = "u-boot";
111                                 reg = <0x0 0x30000>;
112                                 read-only;
113                         };
114
115                         partition@30000 {
116                                 label = "u-boot-env";
117                                 reg = <0x30000 0x10000>;
118                                 read-only;
119                         };
120
121                         factory: partition@40000 {
122                                 label = "factory";
123                                 reg = <0x40000 0x10000>;
124                                 read-only;
125                         };
126
127                         partition@50000 {
128                                 compatible = "denx,uimage";
129                                 label = "firmware";
130                                 reg = <0x50000 0xfb0000>;
131                         };
132                 };
133         };
134 };
135
136 &uart1 {
137         status = "okay";
138 };
139
140 &ehci {
141         status = "okay";
142 };
143
144 &ohci {
145         status = "okay";
146 };