ramips: add support for YunCore G720
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_unielec_u7628-01.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 "mt7628an.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,u7628-01", "mediatek,mt7628an-soc";
16
17 aliases {
18 led-boot = &led_power;
19 led-failsafe = &led_power;
20 led-running = &led_power;
21 led-upgrade = &led_power;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 keys {
29 compatible = "gpio-keys";
30
31 reset {
32 label = "reset";
33 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_power: power {
42 function = LED_FUNCTION_POWER;
43 color = <LED_COLOR_ID_GREEN>;
44 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan {
48 function = LED_FUNCTION_WLAN;
49 color = <LED_COLOR_ID_GREEN>;
50 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
51 };
52
53 wan {
54 function = LED_FUNCTION_WAN;
55 color = <LED_COLOR_ID_GREEN>;
56 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
57 };
58
59 lan1 {
60 label = "green:lan1";
61 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
62 };
63
64 lan2 {
65 label = "green:lan2";
66 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
67 };
68
69 lan3 {
70 label = "green:lan3";
71 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
72 };
73
74 lan4 {
75 label = "green:lan4";
76 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
77 };
78
79 usb {
80 function = LED_FUNCTION_USB;
81 color = <LED_COLOR_ID_GREEN>;
82 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
83 trigger-sources = <&ohci_port1>, <&ehci_port1>;
84 linux,default-trigger = "usbport";
85 };
86 };
87 };
88
89 &pcie {
90 status = "okay";
91 };
92
93 &wmac {
94 status = "okay";
95
96 nvmem-cells = <&eeprom_factory_0>;
97 nvmem-cell-names = "eeprom";
98 };
99
100 &state_default {
101 gpio {
102 groups = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "wdt", "wled_an";
103 function = "gpio";
104 };
105 };