History

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.

Sandor Yu committed 1 year ago

Commit 10ed34d1 parent dfc820d2 files · +25 −1Browse files

Unified · Split

2 files
  1. include/linux/phy/phy-hdmi.h +19 −0
  2. include/linux/phy/phy.h +6 −1
include/linux/phy/phy-hdmi.h+19−0
@@ -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_ */
include/linux/phy/phy.h+6−1
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <linux/regulator/consumer.h>
1818
1919 #include <linux/phy/phy-dp.h>
20+#include <linux/phy/phy-hdmi.h>
2021 #include <linux/phy/phy-lvds.h>
2122 #include <linux/phy/phy-mipi-dphy.h>
2223
@@ -42,7 +43,8 @@ enum phy_mode { · 19 unmodified lines
4243 PHY_MODE_MIPI_DPHY,
4344 PHY_MODE_SATA,
4445 PHY_MODE_LVDS,
45− PHY_MODE_DP
46+ PHY_MODE_DP,
47+ PHY_MODE_HDMI,
4648 };
4749
4850 enum phy_media {
@@ -60,11 +62,14 @@ enum phy_media { · 11 unmodified lines
6062 * the DisplayPort protocol.
6163 * @lvds: Configuration set applicable for phys supporting
6264 * the LVDS phy mode.
65+ * @hdmi: Configuration set applicable for phys supporting
66+ * the HDMI phy mode.
6367 */
6468 union phy_configure_opts {
6569 struct phy_configure_opts_mipi_dphy mipi_dphy;
6670 struct phy_configure_opts_dp dp;
6771 struct phy_configure_opts_lvds lvds;
72+ struct phy_configure_opts_hdmi hdmi;
6873 };
6974
7075 /**