Skip to content

Commit caedbf1

Browse files
rawoullumag
authored andcommitted
drm/msm: add msm8998 hdmi phy/pll support
Add support for the HDMI PHY as present on the Qualcomm MSM8998 SoC. This code is mostly copy & paste of the vendor code from msm-4.4 kernel.lnx.4.4.r38-rel. Signed-off-by: Arnaud Vrac <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Marc Gonzalez <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/605631/ Link: https://lore.kernel.org/r/[email protected] [DB: replaced division with do_div64 to fix build issues on ARM32] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent a61eb17 commit caedbf1

File tree

5 files changed

+882
-0
lines changed

5 files changed

+882
-0
lines changed

drivers/gpu/drm/msm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ msm-display-$(CONFIG_DRM_MSM_HDMI) += \
3737
hdmi/hdmi_phy.o \
3838
hdmi/hdmi_phy_8960.o \
3939
hdmi/hdmi_phy_8996.o \
40+
hdmi/hdmi_phy_8998.o \
4041
hdmi/hdmi_phy_8x60.o \
4142
hdmi/hdmi_phy_8x74.o \
4243
hdmi/hdmi_pll_8960.o \

drivers/gpu/drm/msm/hdmi/hdmi.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ enum hdmi_phy_type {
137137
MSM_HDMI_PHY_8960,
138138
MSM_HDMI_PHY_8x74,
139139
MSM_HDMI_PHY_8996,
140+
MSM_HDMI_PHY_8998,
140141
MSM_HDMI_PHY_MAX,
141142
};
142143

@@ -154,6 +155,7 @@ extern const struct hdmi_phy_cfg msm_hdmi_phy_8x60_cfg;
154155
extern const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg;
155156
extern const struct hdmi_phy_cfg msm_hdmi_phy_8x74_cfg;
156157
extern const struct hdmi_phy_cfg msm_hdmi_phy_8996_cfg;
158+
extern const struct hdmi_phy_cfg msm_hdmi_phy_8998_cfg;
157159

158160
struct hdmi_phy {
159161
struct platform_device *pdev;
@@ -184,6 +186,7 @@ void __exit msm_hdmi_phy_driver_unregister(void);
184186
#ifdef CONFIG_COMMON_CLK
185187
int msm_hdmi_pll_8960_init(struct platform_device *pdev);
186188
int msm_hdmi_pll_8996_init(struct platform_device *pdev);
189+
int msm_hdmi_pll_8998_init(struct platform_device *pdev);
187190
#else
188191
static inline int msm_hdmi_pll_8960_init(struct platform_device *pdev)
189192
{
@@ -194,6 +197,11 @@ static inline int msm_hdmi_pll_8996_init(struct platform_device *pdev)
194197
{
195198
return -ENODEV;
196199
}
200+
201+
static inline int msm_hdmi_pll_8998_init(struct platform_device *pdev)
202+
{
203+
return -ENODEV;
204+
}
197205
#endif
198206

199207
/*

drivers/gpu/drm/msm/hdmi/hdmi_phy.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ static int msm_hdmi_phy_pll_init(struct platform_device *pdev,
118118
case MSM_HDMI_PHY_8996:
119119
ret = msm_hdmi_pll_8996_init(pdev);
120120
break;
121+
case MSM_HDMI_PHY_8998:
122+
ret = msm_hdmi_pll_8998_init(pdev);
123+
break;
121124
/*
122125
* we don't have PLL support for these, don't report an error for now
123126
*/
@@ -193,6 +196,8 @@ static const struct of_device_id msm_hdmi_phy_dt_match[] = {
193196
.data = &msm_hdmi_phy_8x74_cfg },
194197
{ .compatible = "qcom,hdmi-phy-8996",
195198
.data = &msm_hdmi_phy_8996_cfg },
199+
{ .compatible = "qcom,hdmi-phy-8998",
200+
.data = &msm_hdmi_phy_8998_cfg },
196201
{}
197202
};
198203

0 commit comments

Comments
 (0)