ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_unielec_u7621-06.dtsi
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
4 * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
5 * All rights reserved.
6 */
7
8 #include "mt7621.dtsi"
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/leds/common.h>
13
14 / {
15 compatible = "unielec,u7621-06", "mediatek,mt7621-soc";
16
17 aliases {
18 led-boot = &led_status;
19 led-failsafe = &led_status;
20 led-running = &led_status;
21 led-upgrade = &led_status;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 gpio-export {
29 compatible = "gpio-export";
30 #size-cells = <0>;
31
32 modem_reset {
33 gpio-export,name = "modem_reset";
34 gpio-export,output = <1>;
35 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 reset {
43 label = "reset";
44 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 led_status: status {
53 function = LED_FUNCTION_STATUS;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
56 };
57
58 led4 {
59 label = "green:led4";
60 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
61 };
62
63 led5 {
64 label = "green:led5";
65 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
66 };
67 };
68 };
69
70 &sdhci {
71 status = "okay";
72 };
73
74 &pcie {
75 status = "okay";
76 };
77
78 &gmac1 {
79 status = "okay";
80 label = "wan";
81 phy-handle = <&ethphy4>;
82 };
83
84 &mdio {
85 ethphy4: ethernet-phy@4 {
86 reg = <4>;
87 };
88 };
89
90 &switch0 {
91 ports {
92 port@0 {
93 status = "okay";
94 label = "lan1";
95 };
96
97 port@1 {
98 status = "okay";
99 label = "lan2";
100 };
101
102 port@2 {
103 status = "okay";
104 label = "lan3";
105 };
106
107 port@3 {
108 status = "okay";
109 label = "lan4";
110 };
111 };
112 };
113
114 &state_default {
115 gpio {
116 groups = "jtag", "uart2", "wdt";
117 function = "gpio";
118 };
119 };