[PATCH v3 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add optional ldb property

Laurentiu Palcu posted 9 patches 1 month, 4 weeks ago
There is a newer version of this series
[PATCH v3 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add optional ldb property
Posted by Laurentiu Palcu 1 month, 4 weeks ago
Since the BLK CTL registers, like the LVDS CSR, can be used to control the
LVDS Display Bridge controllers, add optional 'ldb' property to handle
these use cases.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
---
 .../devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml         | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml b/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml
index 27403b4c52d62..836004de4460f 100644
--- a/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml
+++ b/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml
@@ -39,6 +39,11 @@ properties:
       ID in its "clocks" phandle cell. See
       include/dt-bindings/clock/nxp,imx95-clock.h
 
+patternProperties:
+  "^ldb@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/display/bridge/fsl,ldb.yaml#
+
 required:
   - compatible
   - reg
-- 
2.49.0
Re: [PATCH v3 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add optional ldb property
Posted by Krzysztof Kozlowski 1 month, 4 weeks ago
On Wed, Aug 06, 2025 at 06:05:13PM +0300, Laurentiu Palcu wrote:
> Since the BLK CTL registers, like the LVDS CSR, can be used to control the
> LVDS Display Bridge controllers, add optional 'ldb' property to handle
> these use cases.

You did not add property here. You added child node.

I don't understand the rationale at all. How the registers could appear
in this hardware? What changed that registers were not there?

Why every device here has ldb child? Why camera has ldb?

Best regards,
Krzysztof
Re: [PATCH v3 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add optional ldb property
Posted by Laurentiu Palcu 1 month, 4 weeks ago
On Thu, Aug 07, 2025 at 09:29:05AM +0200, Krzysztof Kozlowski wrote:
> On Wed, Aug 06, 2025 at 06:05:13PM +0300, Laurentiu Palcu wrote:
> > Since the BLK CTL registers, like the LVDS CSR, can be used to control the
> > LVDS Display Bridge controllers, add optional 'ldb' property to handle
> > these use cases.
> 
> You did not add property here. You added child node.
Being under 'patternProperties', I thought it was appropriate to call it
a 'property'.

> 
> I don't understand the rationale at all. How the registers could appear
> in this hardware? What changed that registers were not there?
These are "configuration and status registers"(CSR). This syscon
device binding covers the CSRs for various subsystems. However, the CSR
register map is not the same for all CSR blocks.

> 
> Why every device here has ldb child? Why camera has ldb?
I guess I see what you mean... Would something like the following change
be acceptable?

---
if:
  properties:
    compatible:
      contains:
        const: nxp,imx94-lvds-csr
then:
  patternProperties:
    "^ldb@[0-9a-f]+$":
      type: object
      $ref: /schemas/display/bridge/fsl,ldb.yaml#
---

Thanks,
Laurentiu

> 
> Best regards,
> Krzysztof
>
Re: [PATCH v3 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add optional ldb property
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 07/08/2025 14:35, Laurentiu Palcu wrote:
>>
>> Why every device here has ldb child? Why camera has ldb?
> I guess I see what you mean... Would something like the following change
> be acceptable?
> 
> ---
> if:
>   properties:
>     compatible:
>       contains:
>         const: nxp,imx94-lvds-csr
> then:
>   patternProperties:
>     "^ldb@[0-9a-f]+$":
>       type: object
>       $ref: /schemas/display/bridge/fsl,ldb.yaml#

In if:then: you only narrow the existence or constraints, so "if:not:
.... then: patternProperties:.... ^ldb@[0-9a-f]+$:false". The node
should still be defined in top level.

Best regards,
Krzysztof
Re: [PATCH v3 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add optional ldb property
Posted by Frank Li 1 month, 4 weeks ago
On Wed, Aug 06, 2025 at 06:05:13PM +0300, Laurentiu Palcu wrote:
> Since the BLK CTL registers, like the LVDS CSR, can be used to control the
> LVDS Display Bridge controllers, add optional 'ldb' property to handle
> these use cases.
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> ---
>  .../devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml         | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml b/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml
> index 27403b4c52d62..836004de4460f 100644
> --- a/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml
> +++ b/Documentation/devicetree/bindings/clock/nxp,imx95-blk-ctl.yaml
> @@ -39,6 +39,11 @@ properties:
>        ID in its "clocks" phandle cell. See
>        include/dt-bindings/clock/nxp,imx95-clock.h
>
> +patternProperties:
> +  "^ldb@[0-9a-f]+$":
> +    type: object
> +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> +
>  required:
>    - compatible
>    - reg
> --
> 2.49.0
>