ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_xiaomi_miwifi-nano.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 = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
10 model = "Xiaomi MiWiFi Nano";
11
12 aliases {
13 led-boot = &led_status_amber;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_amber;
17 label-mac-device = &ethernet;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_blue: status_blue {
28 label = "miwifi-nano:blue:status";
29 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
30 };
31
32 led_status_red: status_red {
33 label = "miwifi-nano:red:status";
34 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
35 };
36
37 led_status_amber: status_amber {
38 label = "miwifi-nano:amber:status";
39 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &state_default {
55 gpio {
56 groups = "gpio", "refclk", "wdt", "wled_an";
57 function = "gpio";
58 };
59 };
60
61 &ehci {
62 status = "disabled";
63 };
64
65 &ohci {
66 status = "disabled";
67 };
68
69 &esw {
70 mediatek,portmap = <0x2f>;
71 mediatek,portdisable = <0x2a>;
72 };
73
74 &wmac {
75 status = "okay";
76 };
77
78 &ethernet {
79 mtd-mac-address = <&factory 0x28>;
80 };
81
82 &spi0 {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <40000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-boot-env";
103 reg = <0x30000 0x10000>;
104 };
105
106 factory: partition@40000 {
107 label = "factory";
108 reg = <0x40000 0x10000>;
109 read-only;
110 };
111
112 partition@50000 {
113 compatible = "denx,uimage";
114 label = "firmware";
115 reg = <0x50000 0xfb0000>;
116 };
117 };
118 };
119 };