Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: Add HDMI configuration options

Allow HDMI PHYs to be configured through the generic
functions through a custom structure added to the generic union.

The parameters added here are based on HDMI PHY
implementation practices. The current set of parameters
should cover the potential users.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/d1cff6c03ec3732d2244022029245ab2d954d997.1734340233.git.Sandor.yu@nxp.com
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-1-8cb1678e7663@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Sandor Yu and committed by
Vinod Koul
10ed34d6 dfc820d2

+25 -1
+19
include/linux/phy/phy-hdmi.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright 2022,2024 NXP 4 + */ 5 + 6 + #ifndef __PHY_HDMI_H_ 7 + #define __PHY_HDMI_H_ 8 + 9 + /** 10 + * struct phy_configure_opts_hdmi - HDMI configuration set 11 + * @tmds_char_rate: HDMI TMDS Character Rate in Hertz. 12 + * 13 + * This structure is used to represent the configuration state of a HDMI phy. 14 + */ 15 + struct phy_configure_opts_hdmi { 16 + unsigned long long tmds_char_rate; 17 + }; 18 + 19 + #endif /* __PHY_HDMI_H_ */
+6 -1
include/linux/phy/phy.h
··· 17 17 #include <linux/regulator/consumer.h> 18 18 19 19 #include <linux/phy/phy-dp.h> 20 + #include <linux/phy/phy-hdmi.h> 20 21 #include <linux/phy/phy-lvds.h> 21 22 #include <linux/phy/phy-mipi-dphy.h> 22 23 ··· 43 42 PHY_MODE_MIPI_DPHY, 44 43 PHY_MODE_SATA, 45 44 PHY_MODE_LVDS, 46 - PHY_MODE_DP 45 + PHY_MODE_DP, 46 + PHY_MODE_HDMI, 47 47 }; 48 48 49 49 enum phy_media { ··· 62 60 * the DisplayPort protocol. 63 61 * @lvds: Configuration set applicable for phys supporting 64 62 * the LVDS phy mode. 63 + * @hdmi: Configuration set applicable for phys supporting 64 + * the HDMI phy mode. 65 65 */ 66 66 union phy_configure_opts { 67 67 struct phy_configure_opts_mipi_dphy mipi_dphy; 68 68 struct phy_configure_opts_dp dp; 69 69 struct phy_configure_opts_lvds lvds; 70 + struct phy_configure_opts_hdmi hdmi; 70 71 }; 71 72 72 73 /**