ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/jow.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 label-mac-device = &ethernet;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power: power {
28 label = "gl-mt300n-v2:green:power";
29 default-state = "on";
30 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
31 };
32
33 wan {
34 label = "gl-mt300n-v2:green:wan";
35 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
36 };
37
38 wlan {
39 label = "gl-mt300n-v2:red:wlan";
40 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
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 };