From patchwork Tue Nov 5 14:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sky Huang X-Patchwork-Id: 13863131 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 8CD5CD2C13E for ; Tue, 5 Nov 2024 15:46:37 +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: 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:In-Reply-To:References:List-Owner; bh=HBLsfZDP9XEHM79ztSmUAr63z/6xw7Kd0kuMacswMm0=; b=Q0pY7T5NS9p5ZtlT7ETxpTfX/g Y/9GGN8bbMQttdfSP/9iI0qXg+ObF27bilc5RVqGtv+JTVMMnmH80JyHRbAgQiHs//qhSH4rDeq+i JMtKjCW1ux2kDAfhiVzticAC+Ny2LjD4KdJDJHuVN6sEVUlQ+pWysCIyW89wR/6XlBByh/14LB7FB YnR0FrhZDQvGY6r8Vzv3l8vRExOnAkn3CWGQvmNg+4MwoodhlTyF1lOG2lg51UQjBdBfvLlShqkyG Zndw50jnQZllTA/vFqr0YSUxFKayJSifr1I0EWEpsuZW6rA/1vl06gaPIBTRnS+HYvPLbQsIY13BA x9UMsqCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8Ll7-0000000HTLa-1wOF; Tue, 05 Nov 2024 15:46:21 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t8KP4-0000000HEyn-2fWd; Tue, 05 Nov 2024 14:19:32 +0000 X-UUID: f2f5aac89b8011ef82ff63e91e7eb18c-20241105 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=HBLsfZDP9XEHM79ztSmUAr63z/6xw7Kd0kuMacswMm0=; b=P4nyIybGLfxxN0YskyS2g11CBN7q3n0WdIGMc+5E5t7l+VLfigaNdLF69U1Tuh6/8k/Isgm/olzquSyLzWhwMjRwd+PDDRgKx9sf824xPFjOd1akAGO80ZXMo8tUJDOLHF+pwPtsH8OZ8N1x52e2qdXHQlTr9HoImFhxpKXYR/k=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.42,REQID:bb1231c4-557c-4dce-ba9f-17f340bf9f36,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:b0fcdc3,CLOUDID:4daf98e7-cb6b-4a59-bfa3-98f245b4912e,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,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,TF_CID_SPAM_ULS X-UUID: f2f5aac89b8011ef82ff63e91e7eb18c-20241105 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 816249531; Tue, 05 Nov 2024 07:19:20 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 5 Nov 2024 22:19:17 +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; Tue, 5 Nov 2024 22:19:17 +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 , Simon Horman , , , , CC: Steven Liu , Sky Huang Subject: [PATCH net-next v2 0/5] Re-organize MediaTek ethernet phy drivers and propose mtk-phy-lib Date: Tue, 5 Nov 2024 22:19:06 +0800 Message-ID: <20241105141911.13326-1-SkyLake.Huang@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241105_061930_705887_CE3F147C X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Sky Huang This patchset comes from patch 1/9, 3/9, 4/9, 5/9 and 7/9 of: https://lore.kernel.org/netdev/20241004102413.5838-1-SkyLake.Huang@mediatek.com/ This patchset changes MediaTek's ethernet phy's folder structure and integrates helper functions, including LED & token ring manipulation, into mtk-phy-lib. Signed-off-by: Sky Huang --- Change in v2: - Add correct Reviewed-by tag in each patch. --- SkyLake.Huang (5): net: phy: mediatek: Re-organize MediaTek ethernet phy drivers net: phy: mediatek: Move LED helper functions into mtk phy lib net: phy: mediatek: Improve readability of mtk-phy-lib.c's mtk_phy_led_hw_ctrl_set() net: phy: mediatek: Integrate read/write page helper functions net: phy: mediatek: add MT7530 & MT7531's PHY ID macros MAINTAINERS | 6 +- drivers/net/phy/Kconfig | 17 +- drivers/net/phy/Makefile | 3 +- drivers/net/phy/mediatek/Kconfig | 26 ++ drivers/net/phy/mediatek/Makefile | 4 + .../mtk-ge-soc.c} | 298 ++---------------- .../phy/{mediatek-ge.c => mediatek/mtk-ge.c} | 31 +- drivers/net/phy/mediatek/mtk-phy-lib.c | 270 ++++++++++++++++ drivers/net/phy/mediatek/mtk.h | 89 ++++++ 9 files changed, 437 insertions(+), 307 deletions(-) create mode 100644 drivers/net/phy/mediatek/Kconfig create mode 100644 drivers/net/phy/mediatek/Makefile rename drivers/net/phy/{mediatek-ge-soc.c => mediatek/mtk-ge-soc.c} (83%) rename drivers/net/phy/{mediatek-ge.c => mediatek/mtk-ge.c} (82%) create mode 100644 drivers/net/phy/mediatek/mtk-phy-lib.c create mode 100644 drivers/net/phy/mediatek/mtk.h