hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
 *
 */
 
/dts-v1/;
 
#include "rk3568-hinlink-h6xk.dtsi"
 
/ {
   model = "HINLINK H68K";
   compatible = "hinlink,h68k", "rockchip,rk3568";
 
   aliases {
       ethernet0 = &gmac0;
       ethernet1 = &gmac1;
   };
};
 
&gmac0 {
   phy-mode = "rgmii";
   clock_in_out = "output";
 
   snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
   snps,reset-active-low;
   /* Reset time is 20ms, 100ms for rtl8211f */
   snps,reset-delays-us = <0 20000 100000>;
 
   assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
   assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
   assigned-clock-rates = <0>, <125000000>;
 
   pinctrl-names = "default";
   pinctrl-0 = <&gmac0_miim
            &gmac0_tx_bus2
            &gmac0_rx_bus2
            &gmac0_rgmii_clk
            &gmac0_rgmii_bus>;
 
   tx_delay = <0x3c>;
   rx_delay = <0x2f>;
 
   phy-handle = <&rgmii_phy0>;
   status = "okay";
};
 
&gmac1 {
   phy-mode = "rgmii";
   clock_in_out = "output";
 
   snps,reset-gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
   snps,reset-active-low;
   /* Reset time is 20ms, 100ms for rtl8211f */
   snps,reset-delays-us = <0 20000 100000>;
 
   assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
   assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
   assigned-clock-rates = <0>, <125000000>;
 
   pinctrl-names = "default";
   pinctrl-0 = <&gmac1m1_miim
            &gmac1m1_tx_bus2
            &gmac1m1_rx_bus2
            &gmac1m1_rgmii_clk
            &gmac1m1_rgmii_bus>;
 
   tx_delay = <0x4f>;
   rx_delay = <0x26>;
 
   phy-handle = <&rgmii_phy1>;
   status = "okay";
};
 
&mdio0 {
   rgmii_phy0: phy@0 {
       compatible = "ethernet-phy-ieee802.3-c22";
       reg = <0x0>;
   };
};
 
&mdio1 {
   rgmii_phy1: phy@0 {
       compatible = "ethernet-phy-ieee802.3-c22";
       reg = <0x0>;
   };
};
 
&vcc3v3_pcie {
   gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
};