ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wiznet_wizfi630s.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "wiznet,wizfi630s", "mediatek,mt7628an-soc";
10 model = "WIZnet WizFi630S";
11
12 chosen {
13 bootargs = "console=ttyS1,115200";
14 };
15
16 aliases {
17 led-boot = &led_run;
18 led-failsafe = &led_run;
19 led-running = &led_run;
20 led-upgrade = &led_run;
21 serial0 = &uart1;
22 serial1 = &uartlite;
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_run: run {
29 label = "green:run";
30 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
31 };
32
33 ledwps {
34 label = "green:wps";
35 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
36 };
37
38 leduart1 {
39 label = "green:uart1";
40 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
41 };
42
43 leduart2 {
44 label = "green:uart2";
45 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 keys {
50 compatible = "gpio-keys";
51
52 #address-cells = <1>;
53 #size-cells = <0>;
54
55 reset {
56 label = "reset";
57 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60
61 wps {
62 label = "wps";
63 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_WPS_BUTTON>;
65 };
66
67 scm1 {
68 label = "SCM1";
69 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
70 linux,code = <BTN_1>;
71 linux,input-type = <EV_SW>;
72 };
73
74 scm2 {
75 label = "SCM2";
76 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
77 linux,code = <BTN_2>;
78 linux,input-type = <EV_SW>;
79 };
80 };
81 };
82
83 &state_default {
84 gpio {
85 groups = "gpio", "i2s", "i2c", "wdt", "refclk", "p1led_an", "p2led_an";
86 function = "gpio";
87 };
88 };
89
90 &spi0 {
91 status = "okay";
92
93 pinctrl-names = "default";
94 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
95
96 flash@0 {
97 compatible = "jedec,spi-nor";
98 reg = <0>;
99 spi-max-frequency = <40000000>;
100
101 partitions {
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 partition@0 {
107 label = "u-boot";
108 reg = <0x0 0x30000>;
109 read-only;
110 };
111
112 partition@30000 {
113 label = "u-boot-env";
114 reg = <0x30000 0x10000>;
115 read-only;
116 };
117
118 factory: partition@40000 {
119 label = "factory";
120 reg = <0x40000 0x10000>;
121 read-only;
122 };
123
124 partition@50000 {
125 compatible = "denx,uimage";
126 label = "firmware";
127 reg = <0x50000 0x1fb0000>;
128 };
129 };
130 };
131 };
132
133 &uart1 {
134 status = "okay";
135 };
136
137 &uart2 {
138 status = "okay";
139 };
140
141 &pwm {
142 status = "okay";
143 };
144
145 &ethernet {
146 mtd-mac-address = <&factory 0x2e>;
147 };
148
149 &esw {
150 mediatek,portmap = <0x3e>;
151 mediatek,portdisable = <0x26>;
152 };
153
154 &sdhci {
155 status = "okay";
156 mediatek,cd-high;
157 };
158
159 &wmac {
160 status = "okay";
161 };