From patchwork Fri Oct 28 07:38:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sit, Michael Wei Hong" X-Patchwork-Id: 13023179 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCC9DC38A02 for ; Fri, 28 Oct 2022 07:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbiJ1HjN (ORCPT ); Fri, 28 Oct 2022 03:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbiJ1HjI (ORCPT ); Fri, 28 Oct 2022 03:39:08 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D04481BE1D5; Fri, 28 Oct 2022 00:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666942747; x=1698478747; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yy8N2SDsncnaTLIJtLVtMpul3v1SLCiIy2Otfr+WZ4s=; b=CL+I8dfiiq+wu1kysWdMuV7LGvufxtGeR6fx4rB0M0ZlinH/EtWe/rG3 8vhoTeBqT+tvKIpoGojHI1EPvwnOf+KkXG7CrXl0UBq5fMjEi6IAyBmEk r/hHFCYfyLy78ILsLRjgnZ0uuOUEdTgGYRXwraH349UsFKOlYvSO848gD XD0+sxB6xjE79SQVgJQuqP6pm2SsFMnDooHwFfUbhI/LdmrdkD0eGUHik xJh9eBn6czMwDWOzqk+W67dhPwII5pDPmNNSh+/KbWdqNNAR8WJSFLKZX lQxot9t5DOLqDgykfErkQNN161WR1Trqal0tIfun62OGluUehjQOW8pWQ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10513"; a="372648535" X-IronPort-AV: E=Sophos;i="5.95,220,1661842800"; d="scan'208";a="372648535" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 00:39:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10513"; a="961929242" X-IronPort-AV: E=Sophos;i="5.95,220,1661842800"; d="scan'208";a="961929242" Received: from mike-ilbpg1.png.intel.com ([10.88.227.76]) by fmsmga005.fm.intel.com with ESMTP; 28 Oct 2022 00:38:59 -0700 From: Michael Sit Wei Hong To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Looi Hong Aun , Voon Weifeng , Song Yoong Siang , Tan Tee Min , Zulkifli Muhammad Husaini , Gan Yi Fang Subject: [PATCH net-next 1/1] stmmac: intel: Separate ADL-N and RPL-P device ID from TGL Date: Fri, 28 Oct 2022 15:38:25 +0800 Message-Id: <20221028073825.2630903-1-michael.wei.hong.sit@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Separating the ADL-N and RPL-P device IDs from TGL to handle the differences from TGL. Signed-off-by: Michael Sit Wei Hong --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 0a2afc1a3124..2eb8e31be1a2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -830,6 +830,21 @@ static int adls_sgmii_phy1_data(struct pci_dev *pdev, static struct stmmac_pci_info adls_sgmii1g_phy1_info = { .setup = adls_sgmii_phy1_data, }; + +static int adln_sgmii_phy0_data(struct pci_dev *pdev, + struct plat_stmmacenet_data *plat) +{ + plat->bus_id = 1; + plat->phy_interface = PHY_INTERFACE_MODE_SGMII; + plat->serdes_powerup = intel_serdes_powerup; + plat->serdes_powerdown = intel_serdes_powerdown; + return tgl_common_data(pdev, plat); +} + +static struct stmmac_pci_info adln_sgmii1g_phy0_info = { + .setup = adln_sgmii_phy0_data, +}; + static const struct stmmac_pci_func_data galileo_stmmac_func_data[] = { { .func = 6, @@ -1212,8 +1227,8 @@ static const struct pci_device_id intel_eth_pci_id_table[] = { { PCI_DEVICE_DATA(INTEL, TGLH_SGMII1G_1, &tgl_sgmii1g_phy1_info) }, { PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_0, &adls_sgmii1g_phy0_info) }, { PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_1, &adls_sgmii1g_phy1_info) }, - { PCI_DEVICE_DATA(INTEL, ADLN_SGMII1G, &tgl_sgmii1g_phy0_info) }, - { PCI_DEVICE_DATA(INTEL, RPLP_SGMII1G, &tgl_sgmii1g_phy0_info) }, + { PCI_DEVICE_DATA(INTEL, ADLN_SGMII1G, &adln_sgmii1g_phy0_info) }, + { PCI_DEVICE_DATA(INTEL, RPLP_SGMII1G, &adln_sgmii1g_phy0_info) }, {} }; MODULE_DEVICE_TABLE(pci, intel_eth_pci_id_table);