ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rt-ac57u.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "asus,rt-ac57u", "mediatek,mt7621-soc";
11         model = "ASUS RT-AC57U";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_power;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,57600";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "rt-ac57u:blue:power";
29                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
30                 };
31
32                 usb {
33                         label = "rt-ac57u:blue:usb";
34                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
35                         trigger-sources = <&ehci_port2>;
36                         linux,default-trigger = "usbport";
37                 };
38         };
39
40         keys {
41                 compatible = "gpio-keys";
42
43                 wps {
44                         label = "wps";
45                         gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
46                         linux,code = <KEY_WPS_BUTTON>;
47                         debounce-interval = <60>;
48                 };
49
50                 reset {
51                         label = "reset";
52                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
53                         linux,code = <KEY_RESTART>;
54                         debounce-interval = <60>;
55                 };
56         };
57
58         led-regulator {
59                 compatible = "regulator-fixed";
60                 regulator-name = "LED-Power";
61                 gpio = <&gpio1 14 GPIO_ACTIVE_LOW>;
62                 regulator-min-microvolt = <3300000>;
63                 regulator-max-microvolt = <3300000>;
64                 regulator-always-on;
65         };
66 };
67
68 &spi0 {
69         status = "okay";
70
71         flash@0 {
72                 compatible = "jedec,spi-nor";
73                 reg = <0>;
74                 spi-max-frequency = <10000000>;
75
76                 partitions {
77                         compatible = "fixed-partitions";
78                         #address-cells = <1>;
79                         #size-cells = <1>;
80
81                         partition@0 {
82                                 label = "u-boot";
83                                 reg = <0x0 0x30000>;
84                                 read-only;
85                         };
86
87                         partition@30000 {
88                                 label = "config";
89                                 reg = <0x30000 0x10000>;
90                                 read-only;
91                         };
92
93                         factory: partition@40000 {
94                                 label = "factory";
95                                 reg = <0x40000 0x10000>;
96                                 read-only;
97                         };
98
99                         partition@50000 {
100                                 compatible = "denx,uimage";
101                                 label = "firmware";
102                                 reg = <0x50000 0xfb0000>;
103                         };
104                 };
105         };
106 };
107
108 &pcie {
109         status = "okay";
110 };
111
112 &pcie0 {
113         wifi@0,0 {
114                 compatible = "mediatek,mt76";
115                 reg = <0x0000 0 0 0 0>;
116                 mediatek,mtd-eeprom = <&factory 0x8000>;
117
118                 led {
119                         led-sources = <2>;
120                         led-active-low;
121                 };
122         };
123 };
124
125 &pcie1 {
126         wifi@0,0 {
127                 compatible = "mediatek,mt76";
128                 reg = <0x0000 0 0 0 0>;
129                 mediatek,mtd-eeprom = <&factory 0x0000>;
130
131                 led {
132                         led-active-low;
133                 };
134         };
135 };
136
137 &ethernet {
138         mtd-mac-address = <&factory 0xe000>;
139 };
140
141 &pinctrl {
142         state_default: pinctrl0 {
143                 gpio {
144                         ralink,group = "sdhci";
145                         ralink,function = "gpio";
146                 };
147         };
148 };