mbox series

[0/6] drm/msm/hdmi: integrate msm8960 HDMI PHY with DT clocks infrastructure

Message ID 20230119132219.2479775-1-dmitry.baryshkov@linaro.org
Headers show
Series drm/msm/hdmi: integrate msm8960 HDMI PHY with DT clocks infrastructure | expand

Message

Dmitry Baryshkov Jan. 19, 2023, 1:22 p.m. UTC
Make msm8960's HDMI PHY accept clocks from DT and also register it as a
DT clock provider.

Dmitry Baryshkov (6):
  dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider
  drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data
  drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
  ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node
  ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock

 .../bindings/phy/qcom,hdmi-phy-other.yaml     | 27 ++++++++++++++++---
 arch/arm/boot/dts/qcom-apq8064.dtsi           |  3 ++-
 drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c      | 21 +++++++++------
 3 files changed, 39 insertions(+), 12 deletions(-)

Comments

Konrad Dybcio Jan. 19, 2023, 2:01 p.m. UTC | #1
On 19.01.2023 14:22, Dmitry Baryshkov wrote:
> On MSM8960 the HDMI PHY provides the PLL clock to the MMCC. As we are
> preparing to convert the MSM8960 to use DT clocks properties (rather
> than global clock names), register the OF clock provider.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
> index c3e7ff45e52a..cb35a297afbd 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
> @@ -422,8 +422,7 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct hdmi_pll_8960 *pll;
> -	struct clk *clk;
> -	int i;
> +	int i, ret;
>  
>  	/* sanity check: */
>  	for (i = 0; i < (ARRAY_SIZE(freqtbl) - 1); i++)
> @@ -443,10 +442,16 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev)
>  	pll->pdev = pdev;
>  	pll->clk_hw.init = &pll_init;
>  
> -	clk = devm_clk_register(dev, &pll->clk_hw);
> -	if (IS_ERR(clk)) {
> +	ret = devm_clk_hw_register(dev, &pll->clk_hw);
> +	if (ret < 0) {
>  		DRM_DEV_ERROR(dev, "failed to register pll clock\n");
> -		return -EINVAL;
> +		return ret;
> +	}
> +
> +	ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, &pll->clk_hw);
> +	if (ret) {
> +		DRM_DEV_ERROR(dev, "%s: failed to register clk provider: %d\n", __func__, ret);
> +		return ret;
>  	}
>  
>  	return 0;
Dmitry Baryshkov Jan. 26, 2023, 7 p.m. UTC | #2
On Thu, 19 Jan 2023 15:22:13 +0200, Dmitry Baryshkov wrote:
> Make msm8960's HDMI PHY accept clocks from DT and also register it as a
> DT clock provider.
> 
> Dmitry Baryshkov (6):
>   dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
>   dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider
>   drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data
>   drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
>   ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node
>   ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock
> 
> [...]

Applied, thanks!

[1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
      https://gitlab.freedesktop.org/lumag/msm/-/commit/56a80fe57691
[2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider
      https://gitlab.freedesktop.org/lumag/msm/-/commit/a0abe758ccc4
[3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data
      https://gitlab.freedesktop.org/lumag/msm/-/commit/71e8a4509c8d
[4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
      https://gitlab.freedesktop.org/lumag/msm/-/commit/4f62d9764273

Best regards,
Bjorn Andersson Feb. 9, 2023, 4:22 a.m. UTC | #3
On Thu, 19 Jan 2023 15:22:13 +0200, Dmitry Baryshkov wrote:
> Make msm8960's HDMI PHY accept clocks from DT and also register it as a
> DT clock provider.
> 
> Dmitry Baryshkov (6):
>   dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
>   dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider
>   drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data
>   drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
>   ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node
>   ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock
> 
> [...]

Applied, thanks!

[5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node
      commit: c9f678afe0bbdfb3748c1db5ac94d1c02a6eb64b
[6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock
      commit: f1a359db6d9d198b84877e2340dd7c37809a4882

Best regards,