ramips: Use dts alias based status led
[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 #address-cells = <1>;
48 #size-cells = <0>;
49 poll-interval = <20>;
50
51 reset {
52 label = "reset";
53 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56
57 BTN_0 {
58 label = "BTN_0";
59 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 };
62
63 BTN_1 {
64 label = "BTN_1";
65 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_1>;
67 };
68 };
69
70 gpio_export {
71 compatible = "gpio-export";
72 #size-cells = <0>;
73
74 usb {
75 gpio-export,name = "usb";
76 gpio-export,output = <1>;
77 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
78 };
79 };
80
81 };
82
83 &pinctrl {
84 state_default: pinctrl0 {
85 gpio {
86 ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
87 ralink,function = "gpio";
88 };
89 };
90 };
91
92 &ethernet {
93 mtd-mac-address = <&factory 0x4>;
94 };
95
96 &wmac {
97 status = "okay";
98 ralink,mtd-eeprom = <&factory 0x0>;
99 };
100
101 &spi0 {
102 status = "okay";
103
104 m25p80@0 {
105 #address-cells = <1>;
106 #size-cells = <1>;
107 compatible = "jedec,spi-nor";
108 reg = <0>;
109 spi-max-frequency = <10000000>;
110 m25p,chunked-io = <32>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x0 0x30000>;
115 read-only;
116 };
117
118 partition@30000 {
119 label = "u-boot-env";
120 reg = <0x30000 0x10000>;
121 read-only;
122 };
123
124 factory: partition@40000 {
125 label = "factory";
126 reg = <0x40000 0x10000>;
127 read-only;
128 };
129
130 partition@50000 {
131 label = "firmware";
132 reg = <0x50000 0xfb0000>;
133 };
134 };
135 };
136
137 &uart1 {
138 status = "okay";
139 };
140
141 &ehci {
142 status = "okay";
143 };
144
145 &ohci {
146 status = "okay";
147 };