devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver
@ 2022-09-09 13:20 Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

- Update hdmi_pll_8960 to use parent_data rather than parent_names,
- Make hdmi_pll_8960 the clock provider,
- Update the apq8064.dtsi to provide pxo clock and to link hdmi_phy as
  provider for MMCC's hdmipll.

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(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
@ 2022-09-09 13:20 ` Dmitry Baryshkov
  2022-09-09 13:30   ` Krzysztof Kozlowski
  2022-09-09 13:20 ` [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider Dmitry Baryshkov
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

Add pxo clock to the 8960 bindings (used by the HDMI PLL)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/phy/qcom,hdmi-phy-other.yaml     | 23 ++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
index fdb277edebeb..2c21e120ff8d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
@@ -53,7 +53,6 @@ allOf:
           contains:
             enum:
               - qcom,hdmi-phy-8660
-              - qcom,hdmi-phy-8960
     then:
       properties:
         clocks:
@@ -63,6 +62,24 @@ allOf:
             - const: slave_iface
         vddio-supply: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,hdmi-phy-8960
+    then:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 2
+        clock-names:
+          minItems: 1
+          items:
+            - const: slave_iface
+            - const: pxo
+        vddio-supply: false
+
   - if:
       properties:
         compatible:
@@ -98,7 +115,7 @@ examples:
             <0x4a00500 0x100>;
       #phy-cells = <0>;
       power-domains = <&mmcc 1>;
-      clock-names = "slave_iface";
-      clocks = <&clk 21>;
+      clock-names = "slave_iface", "pxo";
+      clocks = <&clk 21>, <&pxo_board>;
       core-vdda-supply = <&pm8921_hdmi_mvs>;
     };
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider
  2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
@ 2022-09-09 13:20 ` Dmitry Baryshkov
  2022-09-09 13:31   ` Krzysztof Kozlowski
  2022-09-09 13:20 ` [PATCH 3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data Dmitry Baryshkov
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

Eventually all HDMI PHYs are going to provide the HDMI PLL clock to the
MMCC. Add #clock-cells property required to provide the HDMI PLL clock to
other devices.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/phy/qcom,hdmi-phy-other.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
index 2c21e120ff8d..0c8f03b78608 100644
--- a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
@@ -43,6 +43,9 @@ properties:
   vddio-supply:
     description: phandle to VDD I/O supply regulator
 
+  '#clock-cells':
+    const: 0
+
   '#phy-cells':
     const: 0
 
@@ -113,6 +116,7 @@ examples:
                   "hdmi_pll";
       reg = <0x4a00400 0x60>,
             <0x4a00500 0x100>;
+      #clock-cells = <0>;
       #phy-cells = <0>;
       power-domains = <&mmcc 1>;
       clock-names = "slave_iface", "pxo";
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data
  2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider Dmitry Baryshkov
@ 2022-09-09 13:20 ` Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider Dmitry Baryshkov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

Replace parent_names usage with parent_data. Note, that this makes the
PLL default to board's `pxo_board' clock rather than just `pxo' clock,
as we are on a way to deprecate the global cxo/pxo clocks.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
index be4b0b67e797..c3e7ff45e52a 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
@@ -406,14 +406,14 @@ static const struct clk_ops hdmi_pll_ops = {
 	.set_rate = hdmi_pll_set_rate,
 };
 
-static const char * const hdmi_pll_parents[] = {
-	"pxo",
+static const struct clk_parent_data hdmi_pll_parents[] = {
+	{ .fw_name = "pxo", .name = "pxo_board" },
 };
 
 static struct clk_init_data pll_init = {
 	.name = "hdmi_pll",
 	.ops = &hdmi_pll_ops,
-	.parent_names = hdmi_pll_parents,
+	.parent_data = hdmi_pll_parents,
 	.num_parents = ARRAY_SIZE(hdmi_pll_parents),
 	.flags = CLK_IGNORE_UNUSED,
 };
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
  2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2022-09-09 13:20 ` [PATCH 3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data Dmitry Baryshkov
@ 2022-09-09 13:20 ` Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Dmitry Baryshkov
  2022-09-09 13:20 ` [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Dmitry Baryshkov
  5 siblings, 0 replies; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

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>
---
 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;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node
  2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2022-09-09 13:20 ` [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider Dmitry Baryshkov
@ 2022-09-09 13:20 ` Dmitry Baryshkov
  2022-09-09 13:31   ` Krzysztof Kozlowski
  2022-09-09 13:20 ` [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Dmitry Baryshkov
  5 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

Add #clock-cells property to the HDMI PHY device node to let other nodes
resolve the hdmipll clock.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 942aa2278355..decd18217523 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -1498,6 +1498,7 @@ hdmi_phy: hdmi-phy@4a00400 {
 			clocks = <&mmcc HDMI_S_AHB_CLK>;
 			clock-names = "slave_iface";
 			#phy-cells = <0>;
+			#clock-cells = <0>;
 		};
 
 		mdp: mdp@5100000 {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock
  2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2022-09-09 13:20 ` [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Dmitry Baryshkov
@ 2022-09-09 13:20 ` Dmitry Baryshkov
  2022-09-09 13:31   ` Krzysztof Kozlowski
  5 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 13:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

Link hdmi_phy as a clock provider of "hdmipll" clock to the MMCC.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index decd18217523..28a0e2a4a254 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -868,7 +868,7 @@ mmcc: clock-controller@4000000 {
 				 <&dsi0_phy 0>,
 				 <0>,
 				 <0>,
-				 <0>;
+				 <&hdmi_phy>;
 			clock-names = "pxo",
 				      "pll3",
 				      "pll8_vote",
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2022-09-09 13:20 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
@ 2022-09-09 13:30   ` Krzysztof Kozlowski
  2022-09-09 15:03     ` Dmitry Baryshkov
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-09 13:30 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 15:20, Dmitry Baryshkov wrote:
> Add pxo clock to the 8960 bindings (used by the HDMI PLL)
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../bindings/phy/qcom,hdmi-phy-other.yaml     | 23 ++++++++++++++++---
>  1 file changed, 20 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
> index fdb277edebeb..2c21e120ff8d 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
> @@ -53,7 +53,6 @@ allOf:
>            contains:
>              enum:
>                - qcom,hdmi-phy-8660
> -              - qcom,hdmi-phy-8960
>      then:
>        properties:
>          clocks:
> @@ -63,6 +62,24 @@ allOf:
>              - const: slave_iface
>          vddio-supply: false
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,hdmi-phy-8960
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 2
> +        clock-names:
> +          minItems: 1
> +          items:
> +            - const: slave_iface
> +            - const: pxo

Why pxo is optional? Commit msg does not say much here.

It seems you also miss the DTS change adding the clock.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider
  2022-09-09 13:20 ` [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider Dmitry Baryshkov
@ 2022-09-09 13:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-09 13:31 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 15:20, Dmitry Baryshkov wrote:
> Eventually all HDMI PHYs are going to provide the HDMI PLL clock to the
> MMCC. Add #clock-cells property required to provide the HDMI PLL clock to
> other devices.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node
  2022-09-09 13:20 ` [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Dmitry Baryshkov
@ 2022-09-09 13:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-09 13:31 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 15:20, Dmitry Baryshkov wrote:
> Add #clock-cells property to the HDMI PHY device node to let other nodes
> resolve the hdmipll clock.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock
  2022-09-09 13:20 ` [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Dmitry Baryshkov
@ 2022-09-09 13:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-09 13:31 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 15:20, Dmitry Baryshkov wrote:
> Link hdmi_phy as a clock provider of "hdmipll" clock to the MMCC.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +-


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Although this depends on the driver change for bisectability.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2022-09-09 13:30   ` Krzysztof Kozlowski
@ 2022-09-09 15:03     ` Dmitry Baryshkov
  2022-09-09 16:44       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 15:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 16:30, Krzysztof Kozlowski wrote:
> On 09/09/2022 15:20, Dmitry Baryshkov wrote:
>> Add pxo clock to the 8960 bindings (used by the HDMI PLL)
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   .../bindings/phy/qcom,hdmi-phy-other.yaml     | 23 ++++++++++++++++---
>>   1 file changed, 20 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
>> index fdb277edebeb..2c21e120ff8d 100644
>> --- a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
>> +++ b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
>> @@ -53,7 +53,6 @@ allOf:
>>             contains:
>>               enum:
>>                 - qcom,hdmi-phy-8660
>> -              - qcom,hdmi-phy-8960
>>       then:
>>         properties:
>>           clocks:
>> @@ -63,6 +62,24 @@ allOf:
>>               - const: slave_iface
>>           vddio-supply: false
>>   
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - qcom,hdmi-phy-8960
>> +    then:
>> +      properties:
>> +        clocks:
>> +          minItems: 1
>> +          maxItems: 2
>> +        clock-names:
>> +          minItems: 1
>> +          items:
>> +            - const: slave_iface
>> +            - const: pxo
> 
> Why pxo is optional? Commit msg does not say much here.

It's optional as it is not present in current DT files. The driver will 
fallback to 'pxo_board' if the clock is not present.

> It seems you also miss the DTS change adding the clock.

Oh, I'll add it to v2.

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2022-09-09 15:03     ` Dmitry Baryshkov
@ 2022-09-09 16:44       ` Krzysztof Kozlowski
  2022-09-09 20:29         ` Dmitry Baryshkov
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-09 16:44 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 17:03, Dmitry Baryshkov wrote:
>>> +    then:
>>> +      properties:
>>> +        clocks:
>>> +          minItems: 1
>>> +          maxItems: 2
>>> +        clock-names:
>>> +          minItems: 1
>>> +          items:
>>> +            - const: slave_iface
>>> +            - const: pxo
>>
>> Why pxo is optional? Commit msg does not say much here.
> 
> It's optional as it is not present in current DT files. The driver will 
> fallback to 'pxo_board' if the clock is not present.
> 
>> It seems you also miss the DTS change adding the clock.
> 
> Oh, I'll add it to v2.

How about adding it to DTS and making it required in the bindings? I did
not check the driver, but isn't the driver fail if clock is missing thus
the clock is really required?


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2022-09-09 16:44       ` Krzysztof Kozlowski
@ 2022-09-09 20:29         ` Dmitry Baryshkov
  2022-09-10  7:53           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2022-09-09 20:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I



On 9 September 2022 19:44:11 GMT+03:00, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>On 09/09/2022 17:03, Dmitry Baryshkov wrote:
>>>> +    then:
>>>> +      properties:
>>>> +        clocks:
>>>> +          minItems: 1
>>>> +          maxItems: 2
>>>> +        clock-names:
>>>> +          minItems: 1
>>>> +          items:
>>>> +            - const: slave_iface
>>>> +            - const: pxo
>>>
>>> Why pxo is optional? Commit msg does not say much here.
>> 
>> It's optional as it is not present in current DT files. The driver will 
>> fallback to 'pxo_board' if the clock is not present.
>> 
>>> It seems you also miss the DTS change adding the clock.
>> 
>> Oh, I'll add it to v2.
>
>How about adding it to DTS and making it required in the bindings? I did
>not check the driver, but isn't the driver fail if clock is missing thus
>the clock is really required?

I had the impression that we cannot make a clock mandatory of it wasn't present before. Please correct me if I'm wrong.

No, the driver will not fail. It will fallback to the lookup of the `pxo_board' clock from the system clock list.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2022-09-09 20:29         ` Dmitry Baryshkov
@ 2022-09-10  7:53           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-10  7:53 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, Vinod Koul, linux-phy,
	Kishon Vijay Abraham I

On 09/09/2022 22:29, Dmitry Baryshkov wrote:
> 
> 
> On 9 September 2022 19:44:11 GMT+03:00, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>> On 09/09/2022 17:03, Dmitry Baryshkov wrote:
>>>>> +    then:
>>>>> +      properties:
>>>>> +        clocks:
>>>>> +          minItems: 1
>>>>> +          maxItems: 2
>>>>> +        clock-names:
>>>>> +          minItems: 1
>>>>> +          items:
>>>>> +            - const: slave_iface
>>>>> +            - const: pxo
>>>>
>>>> Why pxo is optional? Commit msg does not say much here.
>>>
>>> It's optional as it is not present in current DT files. The driver will 
>>> fallback to 'pxo_board' if the clock is not present.
>>>
>>>> It seems you also miss the DTS change adding the clock.
>>>
>>> Oh, I'll add it to v2.
>>
>> How about adding it to DTS and making it required in the bindings? I did
>> not check the driver, but isn't the driver fail if clock is missing thus
>> the clock is really required?
> 
> I had the impression that we cannot make a clock mandatory of it wasn't present before. Please correct me if I'm wrong.

We cannot break the ABI which means implementation must accept old DTS.
As you wrote below, the implementation will handle this case. Whether we
can require new DTS properties (if implementation respects ABI) is a
different problem and I believe that we can. Bindings can grow, even
with necessary changes, because no ABI is actually broken here.

> 
> No, the driver will not fail. It will fallback to the lookup of the `pxo_board' clock from the system clock list.

Ah, good!


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2023-01-19 13:22 [PATCH 0/6] drm/msm/hdmi: integrate msm8960 HDMI PHY with DT clocks infrastructure Dmitry Baryshkov
@ 2023-01-19 13:22 ` Dmitry Baryshkov
  2023-01-26 11:20   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Baryshkov @ 2023-01-19 13:22 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

Add pxo clock to the 8960 bindings (used by the HDMI PLL)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/phy/qcom,hdmi-phy-other.yaml     | 23 ++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
index fdb277edebeb..2c21e120ff8d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
@@ -53,7 +53,6 @@ allOf:
           contains:
             enum:
               - qcom,hdmi-phy-8660
-              - qcom,hdmi-phy-8960
     then:
       properties:
         clocks:
@@ -63,6 +62,24 @@ allOf:
             - const: slave_iface
         vddio-supply: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,hdmi-phy-8960
+    then:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 2
+        clock-names:
+          minItems: 1
+          items:
+            - const: slave_iface
+            - const: pxo
+        vddio-supply: false
+
   - if:
       properties:
         compatible:
@@ -98,7 +115,7 @@ examples:
             <0x4a00500 0x100>;
       #phy-cells = <0>;
       power-domains = <&mmcc 1>;
-      clock-names = "slave_iface";
-      clocks = <&clk 21>;
+      clock-names = "slave_iface", "pxo";
+      clocks = <&clk 21>, <&pxo_board>;
       core-vdda-supply = <&pm8921_hdmi_mvs>;
     };
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock
  2023-01-19 13:22 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
@ 2023-01-26 11:20   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-26 11:20 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Clark, Sean Paul, Abhinav Kumar, Rob Herring,
	Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

On 19/01/2023 14:22, Dmitry Baryshkov wrote:
> Add pxo clock to the 8960 bindings (used by the HDMI PLL)
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../bindings/phy/qcom,hdmi-phy-other.yaml     | 23 ++++++++++++++++---
>  1 file changed, 20 insertions(+), 3 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-01-26 11:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
2022-09-09 13:20 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
2022-09-09 13:30   ` Krzysztof Kozlowski
2022-09-09 15:03     ` Dmitry Baryshkov
2022-09-09 16:44       ` Krzysztof Kozlowski
2022-09-09 20:29         ` Dmitry Baryshkov
2022-09-10  7:53           ` Krzysztof Kozlowski
2022-09-09 13:20 ` [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider Dmitry Baryshkov
2022-09-09 13:31   ` Krzysztof Kozlowski
2022-09-09 13:20 ` [PATCH 3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data Dmitry Baryshkov
2022-09-09 13:20 ` [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider Dmitry Baryshkov
2022-09-09 13:20 ` [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Dmitry Baryshkov
2022-09-09 13:31   ` Krzysztof Kozlowski
2022-09-09 13:20 ` [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Dmitry Baryshkov
2022-09-09 13:31   ` Krzysztof Kozlowski
  -- strict thread matches above, loose matches on Subject: below --
2023-01-19 13:22 [PATCH 0/6] drm/msm/hdmi: integrate msm8960 HDMI PHY with DT clocks infrastructure Dmitry Baryshkov
2023-01-19 13:22 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
2023-01-26 11:20   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).