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.
Showing the changes to include/linux/phy (2 of 2 files). Show all
Unified · Split
| @@ -0,0 +1,19 @@ | ||
| 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_ */ | |
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 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 | |
| @@ -42,7 +43,8 @@ enum phy_mode { · 19 unmodified lines | ||
| 42 | 43 | PHY_MODE_MIPI_DPHY, |
| 43 | 44 | PHY_MODE_SATA, |
| 44 | 45 | PHY_MODE_LVDS, |
| 45 | − PHY_MODE_DP | |
| 46 | + PHY_MODE_DP, | |
| 47 | + PHY_MODE_HDMI, | |
| 46 | 48 | }; |
| 47 | 49 | |
| 48 | 50 | enum phy_media { |
| @@ -60,11 +62,14 @@ enum phy_media { · 11 unmodified lines | ||
| 60 | 62 | * the DisplayPort protocol. |
| 61 | 63 | * @lvds: Configuration set applicable for phys supporting |
| 62 | 64 | * the LVDS phy mode. |
| 65 | + * @hdmi: Configuration set applicable for phys supporting | |
| 66 | + * the HDMI phy mode. | |
| 63 | 67 | */ |
| 64 | 68 | union phy_configure_opts { |
| 65 | 69 | struct phy_configure_opts_mipi_dphy mipi_dphy; |
| 66 | 70 | struct phy_configure_opts_dp dp; |
| 67 | 71 | struct phy_configure_opts_lvds lvds; |
| 72 | + struct phy_configure_opts_hdmi hdmi; | |
| 68 | 73 | }; |
| 69 | 74 | |
| 70 | 75 | /** |