ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_d-team_pbr-d1.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "d-team,pbr-d1", "mediatek,mt7628an-soc";
8 model = "PBR-D1";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 aliases {
22 serial0 = &uart2;
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 usb {
29 label = "orange:usb";
30 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
31 trigger-sources = <&ohci_port1>, <&ehci_port1>;
32 linux,default-trigger = "usbport";
33 };
34
35 led_power: power {
36 label = "orange:power";
37 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
38 default-state = "on";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 70 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51
52 wgpio: gpio-wifi {
53 compatible = "mediatek,gpio-wifi";
54 #address-cells = <1>;
55 #size-cells = <0>;
56 gpio-controller;
57 #gpio-cells = <2>;
58 };
59 };
60
61 &state_default {
62 gpio {
63 groups = "gpio";
64 function = "gpio";
65 };
66
67 i2c {
68 groups = "i2c";
69 function = "gpio";
70 };
71
72 i2s {
73 groups = "i2s";
74 function = "gpio";
75 };
76
77 spis {
78 groups = "spis";
79 function = "gpio";
80 };
81
82 wdt {
83 groups = "wdt";
84 function = "gpio";
85 };
86 };
87
88 &spi0 {
89 status = "okay";
90
91 pinctrl-names = "default";
92 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <40000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 };
114
115 factory: partition@40000 {
116 label = "factory";
117 reg = <0x40000 0x10000>;
118 read-only;
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x50000 0x0fb0000>;
125 };
126 };
127 };
128
129 spidev@1 {
130 #address-cells = <1>;
131 #size-cells = <1>;
132 compatible = "linux,spidev";
133 reg = <1>;
134 spi-max-frequency = <40000000>;
135 };
136 };
137
138 &i2c {
139 status = "okay";
140 };
141
142 &uart1 {
143 status = "okay";
144 };
145
146 &uart2 {
147 status = "okay";
148 };
149
150 &pwm {
151 status = "okay";
152 };
153
154 &ethernet {
155 mtd-mac-address = <&factory 0x28>;
156 };
157
158 &sdhci {
159 status = "okay";
160 mediatek,cd-high;
161 };