From 51d12f9d67253913edcee0aef81981c014e56a14 Mon Sep 17 00:00:00 2001 From: David Wu Date: Fri, 25 Feb 2022 17:16:35 +0800 Subject: [PATCH] ARM: dts: rockchip: Add gmac support for rv1106 Signed-off-by: David Wu Change-Id: I7a3b55fc034d99c2888a4caefb2b9d4610cfaa83 --- arch/arm/boot/dts/rv1106.dtsi | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm/boot/dts/rv1106.dtsi b/arch/arm/boot/dts/rv1106.dtsi index 0e8acd715b64..fe6a7f9ef237 100644 --- a/arch/arm/boot/dts/rv1106.dtsi +++ b/arch/arm/boot/dts/rv1106.dtsi @@ -20,6 +20,7 @@ interrupt-parent = <&gic>; aliases { + ethernet0 = &gmac; i2c0 = &i2c0; i2c1 = &i2c1; i2c2 = &i2c2; @@ -710,6 +711,61 @@ status = "disabled"; }; + gmac: ethernet@ffa80000 { + compatible = "rockchip,rv1126-gmac", "snps,dwmac-4.20a"; + reg = <0xffa80000 010000>; + interrupts = , + ; + interrupt-names = "macirq", "eth_wake_irq"; + rockchip,grf = <&grf>; + clocks = <&cru CLK_GMAC0_TX_50M_O>, <&cru CLK_GMAC0_REF_50M>, + <&cru ACLK_MAC>, <&cru PCLK_MAC>; + clock-names = "stmmaceth", "clk_mac_ref", + "aclk_mac", "pclk_mac"; + resets = <&cru SRST_A_MAC>; + reset-names = "stmmaceth"; + + snps,mixed-burst; + snps,tso; + + snps,axi-config = <&stmmac_axi_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + + phy-mode = "rmii"; + phy-handle = <&rmii_phy>; + status = "disabled"; + + mdio: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x1>; + #size-cells = <0x0>; + rmii_phy: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + clocks = <&cru CLK_MACPHY>; + resets = <&cru SRST_MACPHY>; + phy-is-integrated; + }; + }; + + stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <4>; + snps,rd_osr_lmt = <8>; + snps,blen = <0 0 0 0 16 8 4>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <1>; + queue0 {}; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <1>; + queue0 {}; + }; + }; + emmc: mmc@ffa90000 { compatible = "rockchip,rv1106-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0xffa90000 0x4000>;