ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_hnet_c108.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
4 * All rights reserved.
5 */
6
7 #include "mt7620a.dtsi"
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 compatible = "hnet,c108", "ralink,mt7620a-soc";
14 model = "HNET C108";
15
16 aliases {
17 led-boot = &led_lan_green;
18 led-failsafe = &led_lan_green;
19 led-running = &led_lan_green;
20 led-upgrade = &led_lan_green;
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200";
25 };
26
27 gpio-export {
28 compatible = "gpio-export";
29 #size-cells = <0>;
30
31 power_modem {
32 gpio-export,name = "power_modem";
33 gpio-export,output = <1>;
34 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 sdcard {
42 label = "green:sdcard";
43 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
44 };
45
46 modem_green {
47 label = "green:modem";
48 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
49 };
50
51 modem_red {
52 label = "red:modem";
53 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
54 };
55
56 lan_red {
57 label = "red:lan";
58 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
59 };
60
61 led_lan_green: lan_green {
62 label = "green:lan";
63 gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
64 };
65 };
66
67 keys {
68 compatible = "gpio-keys";
69
70 reset {
71 label = "reset";
72 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75 };
76 };
77
78 &gpio1 {
79 status = "okay";
80 };
81
82 &gpio2 {
83 status = "okay";
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <10000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "u-boot-env";
107 reg = <0x30000 0x10000>;
108 read-only;
109 };
110
111 factory: partition@40000 {
112 label = "factory";
113 reg = <0x40000 0x10000>;
114 read-only;
115 };
116
117 partition@50000 {
118 compatible = "denx,uimage";
119 label = "firmware";
120 reg = <0x50000 0xfb0000>;
121 };
122 };
123 };
124 };
125
126 &sdhci {
127 status = "okay";
128 };
129
130 &ehci {
131 status = "okay";
132 };
133
134 &ohci {
135 status = "okay";
136 };
137
138 &ethernet {
139 mtd-mac-address = <&factory 0x28>;
140 };
141
142 &wmac {
143 ralink,mtd-eeprom = <&factory 0x0>;
144 };
145
146 &state_default {
147 default {
148 groups = "i2c", "uartf", "spi refclk", "ephy";
149 function = "gpio";
150 };
151 };
152
153 &pcie {
154 status = "okay";
155 };