Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp610301pxb; Sat, 16 Jan 2021 01:16:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLY0fkbN4CRgepEnXUkqRbHGlOA/gUFq1NK9lFGSJn0lKJdCqgKODedF0SF4Cw/baP1U1h X-Received: by 2002:a17:906:edd1:: with SMTP id sb17mr11417540ejb.118.1610788613429; Sat, 16 Jan 2021 01:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610788613; cv=none; d=google.com; s=arc-20160816; b=C5SGc/+bHgFnOk2kfZsyLinZfJHId5q3YeS2fJ8ZcuGkg/XOtyr1tPWdTMb3t9tak/ fvi4CuRJa3U0knoh4xIYEmy02iPL4ZINo3yu8FoERF8zjsNptxPTgYDii5lJfhoWnNl0 cZhUAfcwgO2Cmzo8WSnQkxq593f3HBL2hp4Y9GKKOlnL0s1OvSR9sOy9RrPY5LrG1g9x ziVHReF1/TSJVb3LLahSb/S3cXnFpd78MO95LKju0rtZv0jAn3LQe5NWIwb1RXH0AcAB LyC+Tc9fNjR6twjUrMMzq+N7iAnZeZJypTpoL4VQZmk7VCQEQULCBFLCGoXBIavVulP0 k/Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=qy3r2KfWc3KUOKO3ll/ljSaxOl7iNga1bgWOLKzzQvg=; b=p+Gvj3dcf9SNBi1kNOEOvgmVwhH7pW1Z4hwO79/fPPiyg+WWzEdVKB4Nui/ui3g4J7 mQDkJBkXtOFos04zDvORFax3KMGLMnnTUhzCkGP/GaDYzdSynLS9iLU7/faoHJXF6UMS 9f+U+fiBHb4dv6t19r+ZuYUHrGMtniKDt0R+X+6OXKr/lwSN1LLr6NXmC/3XFB2ni70K 2tSex5mBXJ8LtMIurr3YIWS+0QTg84fc/E+fuvw3pW4oHxM0GLKMehjs0IjUA7ObMzlE fffg5ayTR+IH1dEDXNakTqz3JNzNmofOLZNYdrisUUxATIC5SLM2j9hGSSixGUINbDrD bm7Q== 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=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si1436502ejf.556.2021.01.16.01.16.29; Sat, 16 Jan 2021 01:16:53 -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=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726253AbhAPJNi (ORCPT + 99 others); Sat, 16 Jan 2021 04:13:38 -0500 Received: from thoth.sbs.de ([192.35.17.2]:56821 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbhAPJNh (ORCPT ); Sat, 16 Jan 2021 04:13:37 -0500 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 10G9CPm5022645 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 16 Jan 2021 10:12:28 +0100 Received: from [167.87.253.56] ([167.87.253.56]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 10G9CLSN015701; Sat, 16 Jan 2021 10:12:22 +0100 Subject: Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr To: Wong Vee Khee , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong , Voon Wei Feng References: <20201106094341.4241-1-vee.khee.wong@intel.com> From: Jan Kiszka Message-ID: Date: Sat, 16 Jan 2021 10:12:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201106094341.4241-1-vee.khee.wong@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06.11.20 10:43, Wong Vee Khee wrote: > From: Voon Weifeng > > Set all EHL/TGL phy_addr to -1 so that the driver will automatically > detect it at run-time by probing all the possible 32 addresses. > > Signed-off-by: Voon Weifeng > Signed-off-by: Wong Vee Khee > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > index b6e5e3e36b63..7c1353f37247 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > @@ -236,6 +236,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, > int ret; > int i; > > + plat->phy_addr = -1; > plat->clk_csr = 5; > plat->has_gmac = 0; > plat->has_gmac4 = 1; > @@ -345,7 +346,6 @@ static int ehl_sgmii_data(struct pci_dev *pdev, > struct plat_stmmacenet_data *plat) > { > plat->bus_id = 1; > - plat->phy_addr = 0; > plat->phy_interface = PHY_INTERFACE_MODE_SGMII; > > plat->serdes_powerup = intel_serdes_powerup; > @@ -362,7 +362,6 @@ static int ehl_rgmii_data(struct pci_dev *pdev, > struct plat_stmmacenet_data *plat) > { > plat->bus_id = 1; > - plat->phy_addr = 0; > plat->phy_interface = PHY_INTERFACE_MODE_RGMII; > > return ehl_common_data(pdev, plat); > @@ -376,7 +375,6 @@ static int ehl_pse0_common_data(struct pci_dev *pdev, > struct plat_stmmacenet_data *plat) > { > plat->bus_id = 2; > - plat->phy_addr = 1; > return ehl_common_data(pdev, plat); > } > > @@ -408,7 +406,6 @@ static int ehl_pse1_common_data(struct pci_dev *pdev, > struct plat_stmmacenet_data *plat) > { > plat->bus_id = 3; > - plat->phy_addr = 1; > return ehl_common_data(pdev, plat); > } > > @@ -450,7 +447,6 @@ static int tgl_sgmii_data(struct pci_dev *pdev, > struct plat_stmmacenet_data *plat) > { > plat->bus_id = 1; > - plat->phy_addr = 0; > plat->phy_interface = PHY_INTERFACE_MODE_SGMII; > plat->serdes_powerup = intel_serdes_powerup; > plat->serdes_powerdown = intel_serdes_powerdown; > This fixes PHY detection on one of our EHL-based boards. Can this also be applied to stable 5.10? Thanks, Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux