[PATCH 2/7] dt-bindings: soc: imx-blk-ctrl: add MIPI CSI2 dphy support

Frank Li posted 7 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH 2/7] dt-bindings: soc: imx-blk-ctrl: add MIPI CSI2 dphy support
Posted by Frank Li 3 months, 1 week ago
Add child node dphy-rx, which export phys interface to MIPI CSI2
controller.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
imx media blk ctrl combined many small glue logic registers for display
, camera, power, clk and reset.

There are some discussion at
https://lore.kernel.org/all/4414669.ejJDZkT8p0@steina-w/
to define whole schema for this.

But there are some difficults to cover whole once.

Plan use two steps to complete it
- add all camera related property and subnode
- add all display related property and subnode
---
 .../bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
index b3554e7f9e76d..708cd00f2b896 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
@@ -46,6 +46,34 @@ properties:
       - const: csi
       - const: dsi
 
+  dphy-rx:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fsl,imx93-dphy-rx
+
+      clocks:
+        maxItems: 1
+
+      clock-names:
+        items:
+          - const: cfg
+
+      '#phy-cells':
+        const: 0
+
+      power-domains:
+        maxItems: 1
+
+    required:
+      - compatible
+      - clocks
+      - clock-names
+      - '#phy-cells'
+
+    additionalProperties: false
+
 required:
   - compatible
   - reg

-- 
2.34.1
Re: [PATCH 2/7] dt-bindings: soc: imx-blk-ctrl: add MIPI CSI2 dphy support
Posted by Krzysztof Kozlowski 3 months, 1 week ago
On 02/07/2025 00:06, Frank Li wrote:
> Add child node dphy-rx, which export phys interface to MIPI CSI2
> controller.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> imx media blk ctrl combined many small glue logic registers for display
> , camera, power, clk and reset.
> 
> There are some discussion at
> https://lore.kernel.org/all/4414669.ejJDZkT8p0@steina-w/
> to define whole schema for this.
> 
> But there are some difficults to cover whole once.
> 
> Plan use two steps to complete it
> - add all camera related property and subnode
> - add all display related property and subnode
And what was the comment there?

"Binding is supposed to be complete. We have several examples when people
added children one-by-one, everytime with different reasoning about
child addressing."

NAK. At least try to read previous discussion.

Best regards,
Krzysztof
Re: [PATCH 2/7] dt-bindings: soc: imx-blk-ctrl: add MIPI CSI2 dphy support
Posted by Krzysztof Kozlowski 3 months, 1 week ago
On 02/07/2025 00:06, Frank Li wrote:
> Add child node dphy-rx, which export phys interface to MIPI CSI2
> controller.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> imx media blk ctrl combined many small glue logic registers for display
> , camera, power, clk and reset.
> 
> There are some discussion at
> https://lore.kernel.org/all/4414669.ejJDZkT8p0@steina-w/
> to define whole schema for this.
> 
> But there are some difficults to cover whole once.
> 
> Plan use two steps to complete it
> - add all camera related property and subnode
> - add all display related property and subnode
> ---
>  .../bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml | 28 ++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> index b3554e7f9e76d..708cd00f2b896 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> @@ -46,6 +46,34 @@ properties:
>        - const: csi
>        - const: dsi
>  
> +  dphy-rx:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fsl,imx93-dphy-rx
> +
> +      clocks:
> +        maxItems: 1
> +
> +      clock-names:
> +        items:
> +          - const: cfg
> +
> +      '#phy-cells':
> +        const: 0
> +
> +      power-domains:
> +        maxItems: 1

This looks wrong. How a parent device can take one power domain and
child take a different one? If that's the same, then it is redundant,
because it is part of parent's power domain.

I have also some doubts about clock. Rarely syscon children have their
own resources which would make this entire node redundant.

Provide complete picture on this in commit msg.

> +
> +    required:
> +      - compatible
> +      - clocks
> +      - clock-names
> +      - '#phy-cells'
> +
> +    additionalProperties: false

Please place it after type:.

You also need to update the example.
> +
>  required:
>    - compatible
>    - reg
> 


Best regards,
Krzysztof