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