From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.123 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796483649; b=oSmPeNpfnRHFD/cukgpwPVD+Z7yfUssBC5YePwD6Rv3Tzs0AmxJ2KGtBH8bkMUDB6qwD rE2shszCupGkqK569gPNqG4Lk6gh+PC5SzwSXzbxdVU1u6xNezSDavRh1CeGEOKv5Qh+g aw9vXBHsQciUhVSq1Ca4xN9pFk2DB1XHHGi3BNRcGZnr9nMGrugiVkbm1tWlqvDgiHx8M GBKqXL5AQjhoWfpLy69aJfSOqRr5TTzkhxR8ZqJaDCkxlh+hikj0XFMuCzLFpuaYIllq/ JAKWjXrj42zr8ocweDdK7+umwd8FA+Apq+VYVgyVuJ9N1zq3imQmnougysX8XI/h9kw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796483649; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=R+zT5XiK9UP4ZPkN1lYEUGBPLaU5TREVKUgRL5KYxeg=; b=JY6QrlVNTXPn9W4i9DbHrs3wDbaJwde5VguP1XI2qAon7dHrzOhJaLVq0uOh0iouebJ8 k6dqF5A7oCztad8m0+0+xeW+OiFMMDUQzfa+KBiTI5dwQ/1Bb4HMdkPNHm6aui3FnK9nb J5chacErMdRLKjMi1MWxZiL+GocrPlTpTG5G0YGxLFLFHtUBOyAZV/ayyxDkL1vsuKmDU Pcn7hVDhOldvmanZPtRVZbk+dEr5G9+6uYI/hoCQwGScX92z/hsJPCobhPmvXDIUliZ94 LnkokcalxDk9d5BoNHsBAu9wav6vJAAtgwrDZKetfRUNZfdImpSnkDTqR5k/ogk08GA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mieulab.com; spf=pass smtp.mailfrom=mieulab.com; dkim=pass header.d=mieulab.com header.i=@mieulab.com header.a=rsa-sha256 header.s=key1 header.b=SUhmhVBJ; arc=none smtp.remote-ip=91.218.175.123 Received: from mta0.migadu.com (out-123.mta0.migadu.com [91.218.175.123]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 693C9606A330 for ; Sat, 5 Dec 2026 15:14:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 693C9606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mieulab.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mieulab.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mieulab.com header.i=@mieulab.com header.a=rsa-sha256 header.s=key1 header.b=SUhmhVBJ X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=PnmeG8LkZbt5908+ZjQkZaRtLl6ykonhnebdk6FlyuA=; c=simple/simple; d=mieulab.com; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796483646; v=1; x=1797088446; b=SUhmhVBJLt2g+4yrLcVnviAsGF4xXGjiHzQISgS1WMCIkzjpvLbUoH+UzZyOIEjLVBZ8u6dy R8DkilauQAgvDkqFRXvVNhVviMkH9czo5dwuHwhHpx8FJLViBCGxQ6EvvqITebdcXyfqnjPb48R DMt89VeuzNPqN+yozZChigHWTjOi5zWtqTaLpyYfOtKk/gMugW4+Zy4PnMe3MUUUV9/F6i6Cf46 r1I01fP0LjMe+NisxUQPVPDvAFrUhb4dxCZA3++eqLj2GUE9dmUPwoioap5vLeFaD+tc4bQzXsk xHYcaxiU+/ZwRiUYN3zAJGYA5uDNdFxZE+9+nIj7DLMew== X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 7760e81f6771e227; Sat, 05 Dec 2026 15:14:05 +0000 X-Mizu-Trace-ID: 7760e81f6771e227 X-Migadu-Flow: FLOW_OUT From: Zinan Zhou To: Neil Armstrong Cc: Zinan Zhou , Ronald Claveau , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Subject: [RFC PATCH v2 2/3] phy: amlogic: meson-hdmi-tx: add GXLX2 PHY data Date: Sun, 6 Dec 2026 00:13:16 +0900 Message-ID: <20261205151317.4017910-3-zinan@mieulab.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261205151317.4017910-1-zinan@mieulab.com> References: <20261205151317.4017910-1-zinan@mieulab.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The HG680-LC vendor kernel uses GXL PHY settings on GXLX2 except for CNTL0 in the 297 MHz rate bucket. Add the corresponding table and select it for the GXLX2 HHI auxiliary device and the legacy DRM PHY lookup. On the HG680-LC, 2560x1440 at 74.97 Hz produced a visible desktop at a 304.250 MHz pixel clock, exercising the GXLX2-specific table entry. Video and stereo HDMI audio also worked at 1440p59.95 (241.5 MHz). Assisted-by: Codex:gpt-5.6-sol Assisted-by: Codex:gpt-6 Signed-off-by: Zinan Zhou --- drivers/phy/amlogic/Kconfig | 2 +- drivers/phy/amlogic/phy-meson-hdmi-tx.c | 26 ++++++++++++++++++++++++++ drivers/soc/amlogic/Kconfig | 2 +- drivers/soc/amlogic/meson-gx-hhi-sysctrl.c | 1 + include/linux/phy/phy-meson-hdmi-tx.h | 1 + 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig index d6f781812b4b671b6147b94e6c551ae1b652a02f..656afc81d739e7f46a598eded9adb99ae48e12f2 100644 --- a/drivers/phy/amlogic/Kconfig +++ b/drivers/phy/amlogic/Kconfig @@ -12,7 +12,7 @@ config PHY_MESON_HDMI_TX select MFD_SYSCON help Enable this to support the HDMI TX PHYs found in Meson8, - Meson8b, Meson8m2, GXBB, GXL, GXM and G12A SoCs. + Meson8b, Meson8m2, GXBB, GXL, GXLX2, GXM and G12A SoCs. If unsure, say N. config PHY_MESON8B_USB2 diff --git a/drivers/phy/amlogic/phy-meson-hdmi-tx.c b/drivers/phy/amlogic/phy-meson-hdmi-tx.c index 66bf841411fd2783002899178c9fea10699b5879..2ac21cdd80be04671a82a79fc449e19506d8af93 100644 --- a/drivers/phy/amlogic/phy-meson-hdmi-tx.c +++ b/drivers/phy/amlogic/phy-meson-hdmi-tx.c @@ -104,6 +104,18 @@ static const struct meson_hdmi_phy_rate gxl_rates[] = { { 15900000, 0x33604142, 0x0016315b }, }; +/* GXLX2 */ +static const struct meson_hdmi_phy_rate gxlx2_rates[] = { + /* 5.94Gbps, 3.7125Gbps */ + { 371250000, 0x333d3282, 0x2136315b }, + /* 2.97Gbps */ + { 297000000, 0x33353382, 0x2036315b }, + /* 1.485Gbps */ + { 148500000, 0x33303362, 0x2016315b }, + /* 742.5Mbps, down to 159Mbps */ + { 15900000, 0x33604142, 0x0016315b }, +}; + /* G12A */ static const struct meson_hdmi_phy_rate g12a_rates[] = { /* 5.94Gbps, 3.7125Gbps */ @@ -146,6 +158,17 @@ static const struct meson_hdmi_phy_data gxl_data = { PHY_CNTL1_FIFO_WR_EN, }; +static const struct meson_hdmi_phy_data gxlx2_data = { + .rates = gxlx2_rates, + .num_rates = ARRAY_SIZE(gxlx2_rates), + .max_rate = 600000000, /* HDMI 2.0 */ + .has_cntl3 = true, + .cntl0_init = 0x0, + .cntl1_init = PHY_CNTL1_INIT, + .cntl1_en = PHY_CNTL1_CLOCK_EN | PHY_CNTL1_FIFO_EN | + PHY_CNTL1_FIFO_WR_EN, +}; + static const struct meson_hdmi_phy_data g12a_data = { .rates = g12a_rates, .num_rates = ARRAY_SIZE(g12a_rates), @@ -323,6 +346,7 @@ struct phy *meson_hdmi_phy_create_legacy(struct device *dev, static const struct meson_hdmi_phy_data *const soc_data[] = { [MESON_HDMI_PHY_GXBB] = &gxbb_data, [MESON_HDMI_PHY_GXL] = &gxl_data, + [MESON_HDMI_PHY_GXLX2] = &gxlx2_data, [MESON_HDMI_PHY_G12A] = &g12a_data, }; @@ -362,6 +386,8 @@ static int meson_hdmi_phy_aux_probe(struct auxiliary_device *auxdev, static const struct auxiliary_device_id meson_hdmi_phy_aux_id_table[] = { { .name = "meson_gx_hhi_sysctrl.gxbb-hdmi-phy", .driver_data = (kernel_ulong_t)&gxbb_data }, { .name = "meson_gx_hhi_sysctrl.gxl-hdmi-phy", .driver_data = (kernel_ulong_t)&gxl_data }, + { .name = "meson_gx_hhi_sysctrl.gxlx2-hdmi-phy", + .driver_data = (kernel_ulong_t)&gxlx2_data }, { .name = "meson_gx_hhi_sysctrl.g12a-hdmi-phy", .driver_data = (kernel_ulong_t)&g12a_data }, { /* sentinel */ } }; diff --git a/drivers/soc/amlogic/Kconfig b/drivers/soc/amlogic/Kconfig index c0d05d92078be0734363523f684c2fd7676c0478..f8ef445a9e2b797884a8f4885d4bc0db9cb8d2a5 100644 --- a/drivers/soc/amlogic/Kconfig +++ b/drivers/soc/amlogic/Kconfig @@ -45,7 +45,7 @@ config MESON_GX_HHI_SYSCTRL select GENERIC_PHY help Say yes to enable the HHI system controller driver for - Amlogic Meson GXBB, GXL, GXM and G12 SoCs. It registers + Amlogic Meson GXBB, GXL, GXLX2, GXM and G12 SoCs. It registers the system controller as the provider of the internal HDMI TX PHY. diff --git a/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c b/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c index d4ef41e422a27e7b35aca9d4b69eab6f13f99a0d..f7bf7df0e773a15e6cd1b677ec1f931cd2ca5c0a 100644 --- a/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c +++ b/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c @@ -39,6 +39,7 @@ static int meson_gx_hhi_sysctrl_probe(struct platform_device *pdev) static const struct of_device_id meson_gx_hhi_sysctrl_of_match[] = { { .compatible = "amlogic,meson-gxbb-hhi-sysctrl", .data = "gxbb-hdmi-phy" }, { .compatible = "amlogic,meson-gxl-hhi-sysctrl", .data = "gxl-hdmi-phy" }, + { .compatible = "amlogic,meson-gxlx2-hhi-sysctrl", .data = "gxlx2-hdmi-phy" }, { .compatible = "amlogic,meson-g12a-hhi-sysctrl", .data = "g12a-hdmi-phy" }, { /* sentinel */ } }; diff --git a/include/linux/phy/phy-meson-hdmi-tx.h b/include/linux/phy/phy-meson-hdmi-tx.h index fe76a5f7efdb29e39abf63356d40d6f6ede55da1..ea3d2461224a94e30bac67e910765c0765f011f6 100644 --- a/include/linux/phy/phy-meson-hdmi-tx.h +++ b/include/linux/phy/phy-meson-hdmi-tx.h @@ -9,6 +9,7 @@ enum meson_hdmi_phy_soc { MESON_HDMI_PHY_GXBB, MESON_HDMI_PHY_GXL, /* GXL and GXM */ MESON_HDMI_PHY_G12A, + MESON_HDMI_PHY_GXLX2, }; /* DEPRECATED: compat for DTs without "phys" on the HDMI TX node */