244d78f975bb084354ccb23fb20abf7a3ba023ce
[openwrt/openwrt.git] / target / linux / ramips / dts / RT-AC51U.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 = "asus,rt-ac51u", "ralink,mt7620a-soc";
10 model = "Asus RT-AC51U";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_power: power {
20 label = "rt-ac51u:blue:power";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "rt-ac51u:blue:usb";
26 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
27 };
28
29 wifi {
30 label = "rt-ac51u:blue:wifi";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 gpio-keys-polled {
36 compatible = "gpio-keys-polled";
37 #address-cells = <1>;
38 #size-cells = <0>;
39 poll-interval = <20>;
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53
54 gpio_export {
55 compatible = "gpio-export";
56 #size-cells = <0>;
57
58 enable-leds {
59 gpio-export,name = "enable-leds";
60 gpio-export,output = <1>;
61 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 m25p80@0 {
70 #address-cells = <1>;
71 #size-cells = <1>;
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "u-boot-env";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92 };
93
94 partition@50000 {
95 label = "firmware";
96 reg = <0x50000 0xfb0000>;
97 };
98 };
99 };
100
101 &ehci {
102 status = "okay";
103 };
104
105 &ohci {
106 status = "okay";
107 };
108
109 &gpio3 {
110 status = "okay";
111 };
112
113 &ethernet {
114 status = "okay";
115 mtd-mac-address = <&factory 0x4>;
116 mediatek,portmap = "wllll";
117 };
118
119 &wmac {
120 ralink,mtd-eeprom = <&factory 0>;
121 };
122
123 &pinctrl {
124 state_default: pinctrl0 {
125 gpio {
126 ralink,group = "i2c", "wled", "uartf";
127 ralink,function = "gpio";
128 };
129 };
130 };