From patchwork Fri Jun 21 12:20:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sky Huang X-Patchwork-Id: 13707484 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34C56C27C4F for ; Fri, 21 Jun 2024 12:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:CC:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0xVw8A3Iu828ctl3QhmsUX5udsNh5ldF5dUV7kYnuaM=; b=StLdME23K8uMkX95BPCMB63s6k g34fXzoayoPjjShOS21lRShw4T/sm8HJArUIZIMYSs4mefF91cqfNn9kOvY5BVLxQV3mjyYNjlraB 8deKz8zWydI/YOJkvWDWnWfKKItI/CT1C8tCchoxsuu1cm946QSbvyz1f0x+2m4xbRJOPhZSWwGQv pkZsyX5VEc1OZWRoJbY6oUOCcgB3Bq0kmkxZe921uj3ySij9xeTNyI9oo+W9KSwuHn6DMpwOzfpSV +Qs640nCjIMgdvOE8E6n8a15MIqIC74vRTqVGVgjEH2PMKiqHKkA/B7JFfeklwoq4ZuqWaYBFEv6s la86Pd5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKdL4-000000097A8-317g; Fri, 21 Jun 2024 12:25:58 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKdL1-0000000978W-28iW; Fri, 21 Jun 2024 12:25:56 +0000 X-UUID: 660cd4f62fc911efb2966dae1f787272-20240621 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=0xVw8A3Iu828ctl3QhmsUX5udsNh5ldF5dUV7kYnuaM=; b=XbR9Rq/pi+sDvzhHVlQacsm9/nqe1HTjtfVoAOAHhecn7FoLO+70AM2IQufaOLgNDR4WbHMRzoaOO3MXm09vU4DZi/pweq0llFQfSRdQOz44m81h9WP5a1grYW9wJycdJkqoz8V1c+XbE+nxY7VklQMuU0HNxsHrE4jNZzVyjrY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39,REQID:e4f6b166-2a40-427e-ba66-bab26fe2b335,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:393d96e,CLOUDID:ccef5f85-4f93-4875-95e7-8c66ea833d57,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: 660cd4f62fc911efb2966dae1f787272-20240621 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1136003061; Fri, 21 Jun 2024 05:25:51 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 21 Jun 2024 20:25:48 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 21 Jun 2024 20:25:48 +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 v8 07/13] net: phy: mediatek: add MT7530 & MT7531's PHY ID macros Date: Fri, 21 Jun 2024 20:20:39 +0800 Message-ID: <20240621122045.30732-8-SkyLake.Huang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240621122045.30732-1-SkyLake.Huang@mediatek.com> References: <20240621122045.30732-1-SkyLake.Huang@mediatek.com> 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--4.064500-8.000000 X-TMASE-MatchedRID: xvSVK/1RoEY9d1nHWxkekHQIOMndeKgEj5hUmqusTPgKogmGusPLb29z j16rJNcqw1kWj7dXBL8EzzjBCQLRwdYfe9ARablSoMfp2vHck9V9LQinZ4QefPcjNeVeWlqY+gt Hj7OwNO1YDuIRWpqxhkX/MtL7E2oReoGcVPu/TRoqwbghaV/C/qviHX/zCpV+5zoAX1i4BRGis0 FjiwDE/n3drw+O5mxNDFRypPRs3lJUZQbQgW2v03ZrUbEZipAEiWT09mQz7szw9kH8zAy44SIdu k5Jkjd3wL6SxPpr1/I= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.064500-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: E3B407C5AE17354DAB7278C752E8D5D63B0F78EB3D94C836BC067D19BC7FB7992000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240621_052555_591503_B3A62877 X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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 Reviewed-by: Andrew Lunn --- drivers/net/phy/mediatek/mtk-ge.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c index c338bba..5fdd368 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 @@ -158,7 +161,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 @@ -170,9 +173,10 @@ static struct phy_driver mtk_gephy_driver[] = { .resume = genphy_resume, .read_page = mtk_phy_read_page, .write_page = mtk_phy_write_page, + .led_hw_is_supported = mt753x_phy_led_hw_is_supported, }, { - 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, @@ -196,8 +200,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) }, { } };