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