ramips: TP-Link Archer C2 v1: simplification of the dts definition
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7620a_tplink_archer-c2-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "mt7620a_tplink_archer.dtsi"
6
7 / {
8 compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
9 model = "TP-Link Archer C2 v1";
10
11 aliases {
12 led-boot = &led_wps;
13 led-failsafe = &led_wps;
14 led-running = &led_wps;
15 led-upgrade = &led_wps;
16 };
17
18
19 leds {
20 compatible = "gpio-leds";
21
22 lan {
23 function = LED_FUNCTION_LAN;
24 color = <LED_COLOR_ID_GREEN>;
25 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
26 };
27
28 usb {
29 function = LED_FUNCTION_USB;
30 color = <LED_COLOR_ID_GREEN>;
31 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
32 trigger-sources = <&ohci_port1>, <&ehci_port1>;
33 linux,default-trigger = "usbport";
34 };
35
36 led_wps: wps {
37 function = LED_FUNCTION_WPS;
38 color = <LED_COLOR_ID_GREEN>;
39 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
40 };
41
42 wan {
43 function = LED_FUNCTION_WAN;
44 color = <LED_COLOR_ID_GREEN>;
45 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan {
49 function = LED_FUNCTION_WLAN;
50 color = <LED_COLOR_ID_GREEN>;
51 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy1tpt";
53 };
54 };
55
56 rtl8367rb {
57 compatible = "realtek,rtl8367b";
58 cpu_port = <6>;
59 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
60 mii-bus = <&mdio0>;
61 };
62 };
63
64 &state_default {
65 gpio {
66 groups = "i2c", "uartf", "wled", "ephy", "spi refclk";
67 function = "gpio";
68 };
69 };
70
71 &ethernet {
72 pinctrl-names = "default";
73 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
74
75 nvmem-cells = <&macaddr_rom_f100 0>;
76 nvmem-cell-names = "mac-address";
77
78 port@5 {
79 status = "okay";
80 mediatek,fixed-link = <1000 1 1 1>;
81 phy-mode = "rgmii";
82 };
83
84 mdio0: mdio-bus {
85 status = "okay";
86 };
87 };
88
89
90 &wmac {
91 nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>;
92 nvmem-cell-names = "eeprom", "mac-address";
93 };
94
95 &wifi {
96 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
97 nvmem-cell-names = "eeprom", "mac-address";
98 };