From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A03BB606A32F for ; Tue, 1 Dec 2026 20:13:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zoeER+xt; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EoFVCNW2 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=tDCYI19MwNtGLOjeVHo6VumOLrDdW2omyinIAQJcPs8=; b=zoeER+xt5FFNdef2Vw23BDsiCx /owMDs8kN76rE1LyWdHUjGEQ0Ir9Nws7OcRFzm6J/AvlE8aKx1BwgOu30Lsg77JkjsKkiAudD1Q3X Ar7ZLXhK9HjsfvlR26UG7ybyc6Bi8rkjarhAwpqgul2XcDdDUuVCLyQCN6DJL8jBRsuK5ValQpQ1L g9wUBRs469ULheNfKBq7g8g4zXPLK5049rh3yQumKesanzzdtL6nCpG61KnUyhX845HTYdisDz2Pk seNQCyXUe+QQvx7PKIKzSaQg1ZH/z9Ed6nwWjP4p/GkZGlNDeB3t1jo080CpJbpMv2qMXFQ+bMcgG jam5scwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYUEd-00000009JpX-1Ohw; Tue, 01 Dec 2026 20:13:55 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYUEb-00000009Jlh-0jYL; Tue, 01 Dec 2026 20:13:53 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 833B4618D0; Tue, 1 Dec 2026 20:13:52 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796156032; b=uucPhFTkGGobdfafvCpIeustVo1rkX35zwM8EHMo6AtV5pCD4ZweH4oXL2WSKLqB6ngg tgNDe3Wz18mej0jnuCTxhVS3TyW4g61BKf0q+UdGnLcAGEUQ7Kpi6hL/WzxMdR3Zrczwx IAcIN4OXoOzYm1nctgEm/ACIkcwoxKxEIa/nJszMVcvFSWfKUqSvQDPrc9iSVqkXJ1RxR jYosOmZ+Banc3fGXoE2X9tYe1TdkpUhsgGRabooOaJGR/sQcNdv/9KpqSdxOqeYfXg5eQ 9alfVJ8augQ7UBK5659R100D17rXHPNhMZaCBsfX59NrLY38IjzJywcJlpg3EERI/bQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796156032; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=eSaQKQGSQen79HbfcfVgKk/xxaeJW4bNWf9svY1ct0U=; b=0ByI9Yt0aiNq69bGhJdWh2h7Ha2PZrn0g1i22xKhDC/vORF6Zk2RxnkRFlDIxn8d7kO1 sPsIBF/76/FCEdOtgPnFZA0SWgl4EoQtbPr0EJXrfFDfgMv9hSeVpqU+JaX51HOWKWlAf RX3LzcY2oPxQk/h84As344Ubmhigz0zLKEeTHWflyXYvrz6GWgQAc389xuDcP4wYapORT DyCsdUx8guRLS8XLrKM4ArmbqOSfx6elQQkzP8nMj6y9mZx4mYpK78Zb2ETGYdzAmTUaG N7R+0I6YwRYx8sp33mqKh7vlyYmprxx5H4G6yk1+RHqSWDJD9dYxqPLIx0HrTDMebNQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 262D91F0089B; Tue, 1 Dec 2026 20:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796156032; bh=eSaQKQGSQen79HbfcfVgKk/xxaeJW4bNWf9svY1ct0U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=EoFVCNW2NVYcbuEEQt0jUkC4L7d1uk947sR1ZCXMDaW0gXLAgVyvKT7w8FNSwWTkE 2pUjOv6RGz6n9YRB1ENjBJLTPTx++jm/hpcuQfXf6Jo8x825QymdOLw80dhH3KrhWQ a2up2zFwsuE2picr/oG68UXxibMsVNkZg+gAPLoHdXq2Y+HRRqzJN3pfq19G2Fk2kB pthuG3KZZDSpFLWjmOg1faUYQdHCAyWi1KHJxLJZaoIQluC5v21E8QhfnlQglRCpmC nKxjMBGskkrawRiZov7fpCcTivNdJdjnKLOwJO+tYRtiXE+y++PXgzyT6u8NAMiotp 4qGd9PXbcs1Dg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 9AFC54F078; Tue, 1 Dec 2026 20:13:41 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Tue, 01 Dec 2026 21:12:52 +0100 Subject: [PATCH v6 04/13] phy: amlogic: rename Meson8 HDMI TX PHY driver to be SoC-generic X-Archived-By: MIME-Version: 1.0 Message-Id: <20261201-meson-drm-create-hdmitx-phy-v6-4-5ccdf57a6cf5@aliel.fr> References: <20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr> In-Reply-To: <20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=7305; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=Jb4eiFBp5J8bB7sHkzzQgVwIpLkwV/ZcHbbNBZO1qio=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQza/VmLf9gQ3joq3cl6JNx/N2cwn/1L+Ecf2k+syCucp1 P19xtjSUcrCIMbFICumyNI/1/LEu8tHz3zdo54CM4eVCWQIAxenAEzkzBFGhmOOVxc8M63eO9cm YMZBhlVbGe43iovbfVtVzzB/77fK0gkM/0xiAycXl+3ydHJa3Pttqtz5ozZKb3mdpII7XXRTN+m bMgEA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: linux-kernel-dev@aliel.fr Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Ronald Claveau The HDMI TX PHY driver is currently named after the Meson8 family (Meson8, Meson8b and Meson8m2), but the same IP block is found, with SoC-specific register programming, on the newer GXBB, GXL, GXM and G12A SoCs. In preparation for adding support for these SoCs, make the driver generic: - rename phy-meson8-hdmi-tx.c to phy-meson-hdmi-tx.c - rename the Kconfig symbol PHY_MESON8_HDMI_TX to PHY_MESON_HDMI_TX and update the Makefile accordingly - drop the "(ARCH_MESON && ARM)" dependency in favour of "ARCH_MESON", since the driver is no longer ARM32-only, and select GENERIC_PHY - rename the phy_meson8_hdmi_tx_* symbols to meson_hdmi_phy_* - update the platform driver name, the Kconfig help text and the module description - drop the unused include No functional change intended: the only supported compatible remains "amlogic,meson8-hdmi-tx-phy". Reviewed-by: Neil Armstrong Signed-off-by: Ronald Claveau --- drivers/phy/amlogic/Kconfig | 9 ++-- drivers/phy/amlogic/Makefile | 2 +- .../{phy-meson8-hdmi-tx.c => phy-meson-hdmi-tx.c} | 54 +++++++++++----------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig index ce7ba3eb2a8e..294996869e83 100644 --- a/drivers/phy/amlogic/Kconfig +++ b/drivers/phy/amlogic/Kconfig @@ -2,14 +2,15 @@ # # Phy drivers for Amlogic platforms # -config PHY_MESON8_HDMI_TX - tristate "Meson8, Meson8b and Meson8m2 HDMI TX PHY driver" - depends on (ARCH_MESON && ARM) || COMPILE_TEST +config PHY_MESON_HDMI_TX + tristate "Meson HDMI TX PHY driver" + depends on ARCH_MESON || COMPILE_TEST depends on OF + select GENERIC_PHY select MFD_SYSCON help Enable this to support the HDMI TX PHYs found in Meson8, - Meson8b and Meson8m2 SoCs. + Meson8b, Meson8m2, GXBB, GXL, GXM and G12A SoCs. If unsure, say N. config PHY_MESON8B_USB2 diff --git a/drivers/phy/amlogic/Makefile b/drivers/phy/amlogic/Makefile index 91e3b9790c03..2611ec8a056d 100644 --- a/drivers/phy/amlogic/Makefile +++ b/drivers/phy/amlogic/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_PHY_MESON8_HDMI_TX) += phy-meson8-hdmi-tx.o +obj-$(CONFIG_PHY_MESON_HDMI_TX) += phy-meson-hdmi-tx.o obj-$(CONFIG_PHY_MESON8B_USB2) += phy-meson8b-usb2.o obj-$(CONFIG_PHY_MESON_GXL_USB2) += phy-meson-gxl-usb2.o obj-$(CONFIG_PHY_MESON_G12A_USB2) += phy-meson-g12a-usb2.o diff --git a/drivers/phy/amlogic/phy-meson8-hdmi-tx.c b/drivers/phy/amlogic/phy-meson-hdmi-tx.c similarity index 68% rename from drivers/phy/amlogic/phy-meson8-hdmi-tx.c rename to drivers/phy/amlogic/phy-meson-hdmi-tx.c index f6b5df74a58f..e4e606ab4eef 100644 --- a/drivers/phy/amlogic/phy-meson8-hdmi-tx.c +++ b/drivers/phy/amlogic/phy-meson-hdmi-tx.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Meson8, Meson8b and Meson8m2 HDMI TX PHY. + * Amlogic Meson HDMI TX PHY driver + * (Meson8/8b/8m2) * * Copyright (C) 2021 Martin Blumenstingl */ @@ -13,7 +14,6 @@ #include #include #include -#include #include /* @@ -32,30 +32,30 @@ #define HHI_HDMI_PHY_CNTL2 0x3a8 -struct phy_meson8_hdmi_tx_priv { +struct meson_hdmi_phy { struct regmap *hhi; struct clk *tmds_clk; }; -static int phy_meson8_hdmi_tx_init(struct phy *phy) +static int meson_hdmi_phy_init(struct phy *phy) { - struct phy_meson8_hdmi_tx_priv *priv = phy_get_drvdata(phy); + struct meson_hdmi_phy *priv = phy_get_drvdata(phy); return clk_prepare_enable(priv->tmds_clk); } -static int phy_meson8_hdmi_tx_exit(struct phy *phy) +static int meson_hdmi_phy_exit(struct phy *phy) { - struct phy_meson8_hdmi_tx_priv *priv = phy_get_drvdata(phy); + struct meson_hdmi_phy *priv = phy_get_drvdata(phy); clk_disable_unprepare(priv->tmds_clk); return 0; } -static int phy_meson8_hdmi_tx_power_on(struct phy *phy) +static int meson_hdmi_phy_power_on(struct phy *phy) { - struct phy_meson8_hdmi_tx_priv *priv = phy_get_drvdata(phy); + struct meson_hdmi_phy *priv = phy_get_drvdata(phy); unsigned int i; u16 hdmi_ctl0; @@ -85,9 +85,9 @@ static int phy_meson8_hdmi_tx_power_on(struct phy *phy) return 0; } -static int phy_meson8_hdmi_tx_power_off(struct phy *phy) +static int meson_hdmi_phy_power_off(struct phy *phy) { - struct phy_meson8_hdmi_tx_priv *priv = phy_get_drvdata(phy); + struct meson_hdmi_phy *priv = phy_get_drvdata(phy); regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, FIELD_PREP(HHI_HDMI_PHY_CNTL0_HDMI_CTL1, 0x0841) | @@ -96,18 +96,18 @@ static int phy_meson8_hdmi_tx_power_off(struct phy *phy) return 0; } -static const struct phy_ops phy_meson8_hdmi_tx_ops = { - .init = phy_meson8_hdmi_tx_init, - .exit = phy_meson8_hdmi_tx_exit, - .power_on = phy_meson8_hdmi_tx_power_on, - .power_off = phy_meson8_hdmi_tx_power_off, +static const struct phy_ops meson_hdmi_phy_ops = { + .init = meson_hdmi_phy_init, + .exit = meson_hdmi_phy_exit, + .power_on = meson_hdmi_phy_power_on, + .power_off = meson_hdmi_phy_power_off, .owner = THIS_MODULE, }; -static int phy_meson8_hdmi_tx_probe(struct platform_device *pdev) +static int meson_hdmi_phy_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct phy_meson8_hdmi_tx_priv *priv; + struct meson_hdmi_phy *priv; struct phy_provider *phy_provider; struct resource *res; struct phy *phy; @@ -128,7 +128,7 @@ static int phy_meson8_hdmi_tx_probe(struct platform_device *pdev) if (IS_ERR(priv->tmds_clk)) return PTR_ERR(priv->tmds_clk); - phy = devm_phy_create(&pdev->dev, np, &phy_meson8_hdmi_tx_ops); + phy = devm_phy_create(&pdev->dev, np, &meson_hdmi_phy_ops); if (IS_ERR(phy)) return PTR_ERR(phy); @@ -140,21 +140,21 @@ static int phy_meson8_hdmi_tx_probe(struct platform_device *pdev) return PTR_ERR_OR_ZERO(phy_provider); } -static const struct of_device_id phy_meson8_hdmi_tx_of_match[] = { +static const struct of_device_id meson_hdmi_phy_of_match[] = { { .compatible = "amlogic,meson8-hdmi-tx-phy" }, { /* sentinel */ } }; -MODULE_DEVICE_TABLE(of, phy_meson8_hdmi_tx_of_match); +MODULE_DEVICE_TABLE(of, meson_hdmi_phy_of_match); -static struct platform_driver phy_meson8_hdmi_tx_driver = { - .probe = phy_meson8_hdmi_tx_probe, +static struct platform_driver meson_hdmi_phy_driver = { + .probe = meson_hdmi_phy_probe, .driver = { - .name = "phy-meson8-hdmi-tx", - .of_match_table = phy_meson8_hdmi_tx_of_match, + .name = "meson-hdmi-tx-phy", + .of_match_table = meson_hdmi_phy_of_match, }, }; -module_platform_driver(phy_meson8_hdmi_tx_driver); +module_platform_driver(meson_hdmi_phy_driver); MODULE_AUTHOR("Martin Blumenstingl "); -MODULE_DESCRIPTION("Meson8, Meson8b and Meson8m2 HDMI TX PHY driver"); +MODULE_DESCRIPTION("Amlogic Meson HDMI TX PHY driver"); MODULE_LICENSE("GPL v2"); -- 2.56.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic