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