Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2896341pxb; Mon, 17 Jan 2022 07:51:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2PDfA8oh++GNnkmB+295OF0bpkK5VG2yhS6qxKafNhpJGRHHiyMeuz725ufGD8+pGe/B8 X-Received: by 2002:a17:90a:6288:: with SMTP id d8mr16634577pjj.199.1642434702905; Mon, 17 Jan 2022 07:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642434702; cv=none; d=google.com; s=arc-20160816; b=ZE3gZFi/+2hzWxdxddqSHzOFguN8aFsScS58UBCnLdQxc6Ad2gZm/QyiUrhwHBFcDt Ey8w5Y3pyDNpZJszyPcgabH53oMRoEim4KyzsCEHwXrcXHLyxQRVAK6ZQFUA6IM5dzrE GRYmy8BAa1WXJX1JCwILagHYIhQQyJoRy/2PygzoIEHHelcetOqvblcsgytkz5UujmGp AXXhD1rzC98/wWWxhn5GpXzZkrDQrPq1jYzyfBEmebTLIeTRGuz607CRiCWEOuxZp4QO Pfjapw1IUJYioWuoOZ3rRlK0kISud4Eg2h+1gY2O6b9BA2IYIW2J4tqdZlRQWJmxrXfs tUTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=592xPFnqgIalaJHE1B4D3D/L9D5Ny7zR4CNBDoRDF30=; b=jmAToZa/y+xGC1abvUMgU1mbpxDqOpSVeeglZRViL+6beZ+nNalCjbPbVar2htvYKR sTe6G0Dl7gAymzdX3kDZ/NM7V4Pn8+Z0jnfSkBg4NFXO8Aj/hVJ4yQtHnmCELCaYAp9a ZOGfkjiO4/HiYKAq+pYS7aRWJdZLuAZ+8ifPdvAIFevGLLEdijL7A1eyTgwlUOOFqPMq z8s2WF0VAeryt99nZ77z0L2F0HeZmaC9Sa0R22Wf6DUXHYDpj53FVoJylo/GBmh47mzC UtxxIzPXp06eZTaIRHfOIkrL+Jyw3Ql5A+iDuV/D+4nxCrHlLdtVFAi1DCzp8nbU7XJy NTfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si16434354plg.314.2022.01.17.07.51.30; Mon, 17 Jan 2022 07:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237443AbiAQHHc (ORCPT + 99 others); Mon, 17 Jan 2022 02:07:32 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:34966 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S237362AbiAQHHU (ORCPT ); Mon, 17 Jan 2022 02:07:20 -0500 X-UUID: c201c919b2b746eebadd01a0c71f8820-20220117 X-UUID: c201c919b2b746eebadd01a0c71f8820-20220117 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 489000300; Mon, 17 Jan 2022 15:07:16 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 17 Jan 2022 15:07:14 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 17 Jan 2022 15:07:13 +0800 From: Biao Huang To: , Jakub Kicinski , Rob Herring , CC: Matthias Brugger , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Biao Huang , , , , , , , , , Subject: [PATCH net-next v12 4/7] arm64: dts: mt2712: update ethernet device node Date: Mon, 17 Jan 2022 15:07:03 +0800 Message-ID: <20220117070706.17853-5-biao.huang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220117070706.17853-1-biao.huang@mediatek.com> References: <20220117070706.17853-1-biao.huang@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since there are some changes in ethernet driver: update ethernet device node in dts to accommodate to it. 1. stmmac_probe_config_dt() in stmmac_platform.c will initialize specified parameters according to compatible string "snps,dwmac-4.20a", then, dwmac-mediatek.c can skip the initialization if add compatible string "snps,dwmac-4.20a" in eth device node. 2. commit 882007ed7832 ("net-next: dt-binding: dwmac-mediatek: add more description for RMII") added rmii internal support, we should add corresponding clocks/clocks-names in eth device node. 3. add "snps,reset-delays-us = <0 10000 10000>;" to ensure reset delay can meet PHY requirement. Signed-off-by: Biao Huang --- arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 1 + arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt2712-evb.dts b/arch/arm64/boot/dts/mediatek/mt2712-evb.dts index 7d369fdd3117..11aa135aa0f3 100644 --- a/arch/arm64/boot/dts/mediatek/mt2712-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt2712-evb.dts @@ -110,6 +110,7 @@ ð { phy-handle = <ðernet_phy0>; mediatek,tx-delay-ps = <1530>; snps,reset-gpio = <&pio 87 GPIO_ACTIVE_LOW>; + snps,reset-delays-us = <0 10000 10000>; pinctrl-names = "default", "sleep"; pinctrl-0 = <ð_default>; pinctrl-1 = <ð_sleep>; diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index a9cca9c146fd..9e850e04fffb 100644 --- a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi @@ -726,7 +726,7 @@ queue2 { }; eth: ethernet@1101c000 { - compatible = "mediatek,mt2712-gmac"; + compatible = "mediatek,mt2712-gmac", "snps,dwmac-4.20a"; reg = <0 0x1101c000 0 0x1300>; interrupts = ; interrupt-names = "macirq"; @@ -734,15 +734,19 @@ eth: ethernet@1101c000 { clock-names = "axi", "apb", "mac_main", - "ptp_ref"; + "ptp_ref", + "rmii_internal"; clocks = <&pericfg CLK_PERI_GMAC>, <&pericfg CLK_PERI_GMAC_PCLK>, <&topckgen CLK_TOP_ETHER_125M_SEL>, - <&topckgen CLK_TOP_ETHER_50M_SEL>; + <&topckgen CLK_TOP_ETHER_50M_SEL>, + <&topckgen CLK_TOP_ETHER_50M_RMII_SEL>; assigned-clocks = <&topckgen CLK_TOP_ETHER_125M_SEL>, - <&topckgen CLK_TOP_ETHER_50M_SEL>; + <&topckgen CLK_TOP_ETHER_50M_SEL>, + <&topckgen CLK_TOP_ETHER_50M_RMII_SEL>; assigned-clock-parents = <&topckgen CLK_TOP_ETHERPLL_125M>, - <&topckgen CLK_TOP_APLL1_D3>; + <&topckgen CLK_TOP_APLL1_D3>, + <&topckgen CLK_TOP_ETHERPLL_50M>; power-domains = <&scpsys MT2712_POWER_DOMAIN_AUDIO>; mediatek,pericfg = <&pericfg>; snps,axi-config = <&stmmac_axi_setup>; -- 2.25.1