From patchwork Mon Jul 1 10:54:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?U2t5TGFrZSBIdWFuZyAo6buD5ZWf5r6kKQ==?= X-Patchwork-Id: 13717874 X-Patchwork-Delegate: kuba@kernel.org Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1D5C143885; Mon, 1 Jul 2024 10:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719831490; cv=none; b=mSDD2mv90T7vbIPdSGXt9J6EwQr8Cm+6YdKBzuXoKWiYtapP9jLHUh1wUDXvCYSbXnoGrvKGk8Tl/axdvoaCIUHh+EzV9w6e/7t8KTRc2INY8VmnjIoOw35zLpkb7zCo7ZxrxCPjLQgh6/JMF7GYpqVqf6mC6qVJuv2MhsNhrUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719831490; c=relaxed/simple; bh=XDGYinyjJSKmyTSslSaCX9VAEdfArJDJAoyoMguKv3o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bO9ULjIE1pnpDPaFMqhUlCo18Ia2cAtKT0lpGlJPre6imubVQeEa9y6fiDtIcc0dqYUZmNl8Or3c8j1j9ZKREhbIrjYhGmLxvqtPP7pQEnAr3EdyIPlWAq9KqhnMC4DXcrntdvSq0J3iFQfueAdniRmxvcfpaP0Swb313WeothA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=bqZdFiLH; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="bqZdFiLH" X-UUID: cb0298b0379811ef8b8f29950b90a568-20240701 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=X/5TKRLN8sXc0Xt0XNBM+SycgmXIq6C8Q6Wi57+Nr6Y=; b=bqZdFiLHzAeFRnJozNZwnacXG23Wc10DgWiM5Rh1QaImX/6G25ZcdphcKrpJGWqBJOHkh2WqK3jsHThN5z28YR/8TGYOFAheSgUsE/nC9k+BSoaXfhB4Ore48dAH+RDEffJyIDCJjGmggBvLgw8094OxN4nZ8kgzT/KTvW3hKFs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.40,REQID:5886a908-7349-46a7-8b2f-4795c8fe33ce,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:ba885a6,CLOUDID:8d8bd0d4-0d68-4615-a20f-01d7bd41f0bb,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: cb0298b0379811ef8b8f29950b90a568-20240701 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2077906188; Mon, 01 Jul 2024 18:58:05 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 1 Jul 2024 18:58:03 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 1 Jul 2024 18:58:03 +0800 From: Sky Huang To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Daniel Golle , Qingfang Deng , SkyLake Huang , Matthias Brugger , AngeloGioacchino Del Regno , , , , CC: Steven Liu , SkyLake.Huang Subject: [PATCH net-next v10 07/13] net: phy: mediatek: add MT7530 & MT7531's PHY ID macros Date: Mon, 1 Jul 2024 18:54:11 +0800 Message-ID: <20240701105417.19941-8-SkyLake.Huang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240701105417.19941-1-SkyLake.Huang@mediatek.com> References: <20240701105417.19941-1-SkyLake.Huang@mediatek.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--3.671100-8.000000 X-TMASE-MatchedRID: WkwGkWg/ZsrhtVvI3rIgyVVN8laWo90MPZjAsq/geTbfUZT83lbkECVi d0JnKEe/xQsYJKtKZl3xY0WGgfScA5TZ9V50RBQ70Xw0ILvo/uW7nrAU9KQxUfaES1Ed624zo8W MkQWv6iXBcIE78YqRWo6HM5rqDwqtMldewLvZ9UH/l/uEshBaywZzjGP+HplDleI8vcGU4qEdjG sZTL3QRYax0rzyzY6SFcb5hpqKjJJAKkaXNBH5/1UPOFeysZ3pwZBgUyJVEbl6Fw8/PpTMRaVvm iAyeA2kc5MSfkiJFI5QBJtcKcOYfpRMZUCEHkRt X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.671100-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: CB8988FCDDC8C4D9A62730FB1CB5A7811522AC6778ADAE7AD90B5822E101AA6E2000:8 X-MTK: N X-Patchwork-Delegate: kuba@kernel.org From: "SkyLake.Huang" This patch adds MT7530 & MT7531's PHY ID macros in mtk-ge.c so that it follows the same rule of mtk-ge-soc.c. Signed-off-by: SkyLake.Huang --- Changes in v9: - Remove ".led_hw_is_supported = mt753x_phy_led_hw_is_supported," in MT7530's callback function hooking of mtk-ge.c because it's mistakenly added. --- drivers/net/phy/mediatek/mtk-ge.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c index 161f2e8..b8a488c 100644 --- a/drivers/net/phy/mediatek/mtk-ge.c +++ b/drivers/net/phy/mediatek/mtk-ge.c @@ -5,6 +5,9 @@ #include "mtk.h" +#define MTK_GPHY_ID_MT7530 0x03a29412 +#define MTK_GPHY_ID_MT7531 0x03a29441 + #define MTK_EXT_PAGE_ACCESS 0x1f #define MTK_PHY_PAGE_STANDARD 0x0000 #define MTK_PHY_PAGE_EXTENDED 0x0001 @@ -153,7 +156,7 @@ static int mt753x_phy_led_hw_control_set(struct phy_device *phydev, u8 index, static struct phy_driver mtk_gephy_driver[] = { { - PHY_ID_MATCH_EXACT(0x03a29412), + PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530), .name = "MediaTek MT7530 PHY", .config_init = mt7530_phy_config_init, /* Interrupts are handled by the switch, not the PHY @@ -167,7 +170,7 @@ static struct phy_driver mtk_gephy_driver[] = { .write_page = mtk_phy_write_page, }, { - PHY_ID_MATCH_EXACT(0x03a29441), + PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531), .name = "MediaTek MT7531 PHY", .probe = mt7531_phy_probe, .config_init = mt7531_phy_config_init, @@ -191,8 +194,8 @@ static struct phy_driver mtk_gephy_driver[] = { module_phy_driver(mtk_gephy_driver); static struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = { - { PHY_ID_MATCH_EXACT(0x03a29441) }, - { PHY_ID_MATCH_EXACT(0x03a29412) }, + { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) }, + { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) }, { } };