[RFC PATCH v2 2/3] phy: amlogic: meson-hdmi-tx: add GXLX2 PHY data
Zinan Zhou
zinan at mieulab.com
Sat Dec 5 07:13:16 PST 2026
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 <zinan at mieulab.com>
---
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 */
More information about the linux-amlogic
mailing list