From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76CAE4547F for ; Mon, 17 Jun 2024 11:53:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66DD140B8C; Mon, 17 Jun 2024 11:53:42 +0200 (CEST) Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by mails.dpdk.org (Postfix) with ESMTP id 7555C40687; Mon, 17 Jun 2024 11:53:39 +0200 (CEST) X-QQ-mid: bizesmtpsz13t1718618016tgc34c X-QQ-Originating-IP: 6tOueDwo4qJqWL4S2mgaoeXRbLEn5FXuzs5deV7CTMQ= Received: from lap-jiawenwu.trustnetic.com ( [183.159.97.141]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 17 Jun 2024 17:53:35 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4328863456158378669 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH 07/19] net/ngbe: special config for YT8531SH-CA PHY Date: Mon, 17 Jun 2024 17:53:17 +0800 Message-Id: <20240617095319.16664-8-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20240617095319.16664-1-jiawenwu@trustnetic.com> References: <20240617095319.16664-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpsz:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org YT8531SH-CA PHY will switch to SDS space automatically when UTP and SDS media are not present, causing failure to link up. Add the special configuration to fix it. Fixes: 3d0af7066759 ("net/ngbe: setup PHY link") Fixes: 1c44384fce76 ("net/ngbe: support custom PHY interfaces") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/ngbe/base/ngbe_phy_yt.c | 4 ++++ drivers/net/ngbe/base/ngbe_phy_yt.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c index ea313cd9a5..a374b015fd 100644 --- a/drivers/net/ngbe/base/ngbe_phy_yt.c +++ b/drivers/net/ngbe/base/ngbe_phy_yt.c @@ -320,6 +320,10 @@ s32 ngbe_setup_phy_link_yt(struct ngbe_hw *hw, u32 speed, value |= value_r4; ngbe_write_phy_reg_mdi(hw, YT_ANA, 0, value); + /* config for yt8531sh-ca */ + ngbe_write_phy_reg_ext_yt(hw, YT_SPEC_CONF, 0, + YT_SPEC_CONF_8531SH_CA); + /* software reset to make the above configuration * take effect */ diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.h b/drivers/net/ngbe/base/ngbe_phy_yt.h index ddf992e79a..c45bec7ce7 100644 --- a/drivers/net/ngbe/base/ngbe_phy_yt.h +++ b/drivers/net/ngbe/base/ngbe_phy_yt.h @@ -32,6 +32,8 @@ #define YT_MISC 0xA006 #define YT_MISC_FIBER_PRIO MS16(8, 0x1) /* 0 for UTP */ #define YT_MISC_RESV MS16(0, 0x1) +#define YT_SPEC_CONF 0xA023 +#define YT_SPEC_CONF_8531SH_CA 0x4031 /* SDS EXT */ #define YT_AUTO 0xA5 -- 2.27.0