Devicetree
 help / color / mirror / Atom feed
* [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties
@ 2026-09-01 19:37 Frank.Li
  2026-09-02  6:14 ` Krzysztof Kozlowski
  2026-09-03 15:56 ` Rob Herring (Arm)
  0 siblings, 2 replies; 4+ messages in thread
From: Frank.Li @ 2026-09-01 19:37 UTC (permalink / raw)
  To: Abel Vesa, Peng Fan, Stephen Boyd, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	open list:NXP i.MX CLOCK DRIVERS,
	open list:NXP i.MX CLOCK DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC / LAYERSCAPE ARM ARCHIT...,
	open list
  Cc: imx

From: Frank Li <Frank.Li@nxp.com>

The i.MX5 CCM is a pure clock provider with no 'clocks' consumer
property in its binding. The dtschema framework only merges the
clocks.yaml meta-schema properties (which include assigned-clocks,
assigned-clock-parents, and assigned-clock-rates) into a binding
when the binding itself declares 'clocks:'.

For example, imx53-m53menlo.dts configures the CKO1 output clock
by setting assigned-clocks on the &clks node:

  &clks {
    assigned-clocks = <&clks IMX5_CLK_CKO1_SEL>, ...;
    assigned-clock-parents = <&clks IMX5_CLK_AHB>;
    assigned-clock-rates = <133333334>, <33333334>, <33333334>;
  };

Without explicit declarations this triggers a dtbs_check error:
  arch/arm/boot/dts/nxp/imx/imx53-m53menlo.dtb: ccm@53fd4000 (fsl,imx53-ccm): 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../devicetree/bindings/clock/imx5-clock.yaml        | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.yaml b/Documentation/devicetree/bindings/clock/imx5-clock.yaml
index 423c0142c1d33..7be1d36f41707 100644
--- a/Documentation/devicetree/bindings/clock/imx5-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/imx5-clock.yaml
@@ -35,6 +35,18 @@ properties:
   '#clock-cells':
     const: 1
 
+  assigned-clocks:
+    minItems: 1
+    maxItems: 64
+
+  assigned-clock-parents:
+    minItems: 1
+    maxItems: 64
+
+  assigned-clock-rates:
+    minItems: 1
+    maxItems: 64
+
 required:
   - compatible
   - reg
-- 
2.43.0


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

* Re: [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties
  2026-09-01 19:37 [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties Frank.Li
@ 2026-09-02  6:14 ` Krzysztof Kozlowski
  2026-09-03 16:54   ` Frank Li
  2026-09-03 15:56 ` Rob Herring (Arm)
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-02  6:14 UTC (permalink / raw)
  To: Frank.Li
  Cc: Abel Vesa, Peng Fan, Stephen Boyd, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	open list:NXP i.MX CLOCK DRIVERS,
	open list:NXP i.MX CLOCK DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC / LAYERSCAPE ARM ARCHIT...,
	open list

On Tue, Sep 01, 2026 at 03:37:19PM -0400, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
> 
> The i.MX5 CCM is a pure clock provider with no 'clocks' consumer
> property in its binding. The dtschema framework only merges the
> clocks.yaml meta-schema properties (which include assigned-clocks,
> assigned-clock-parents, and assigned-clock-rates) into a binding
> when the binding itself declares 'clocks:'.
> 
> For example, imx53-m53menlo.dts configures the CKO1 output clock
> by setting assigned-clocks on the &clks node:
> 
>   &clks {
>     assigned-clocks = <&clks IMX5_CLK_CKO1_SEL>, ...;
>     assigned-clock-parents = <&clks IMX5_CLK_AHB>;
>     assigned-clock-rates = <133333334>, <33333334>, <33333334>;
>   };
> 
> Without explicit declarations this triggers a dtbs_check error:
>   arch/arm/boot/dts/nxp/imx/imx53-m53menlo.dtb: ccm@53fd4000 (fsl,imx53-ccm): 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'
> 
> Assisted-by: Claude:claude-sonnet-4.6
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Then the DTS is wrong. If this device does not have a parent clock
input, then assigning clock parents is wrong because it is either
contradictory (you said no parents) or misplaced (clock consumer should
set it).

Best regards,
Krzysztof


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

* Re: [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties
  2026-09-01 19:37 [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties Frank.Li
  2026-09-02  6:14 ` Krzysztof Kozlowski
@ 2026-09-03 15:56 ` Rob Herring (Arm)
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2026-09-03 15:56 UTC (permalink / raw)
  To: Frank.Li
  Cc: linux-kernel, Fabio Estevam, devicetree, Abel Vesa, Brian Masney,
	Pengutronix Kernel Team, linux-clk, Conor Dooley, Peng Fan,
	Sascha Hauer, Krzysztof Kozlowski, Stephen Boyd, Jerome Brunet,
	linux-arm-kernel, imx, Frank Li


On Tue, 01 Sep 2026 15:37:19 -0400, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
> 
> The i.MX5 CCM is a pure clock provider with no 'clocks' consumer
> property in its binding. The dtschema framework only merges the
> clocks.yaml meta-schema properties (which include assigned-clocks,
> assigned-clock-parents, and assigned-clock-rates) into a binding
> when the binding itself declares 'clocks:'.
> 
> For example, imx53-m53menlo.dts configures the CKO1 output clock
> by setting assigned-clocks on the &clks node:
> 
>   &clks {
>     assigned-clocks = <&clks IMX5_CLK_CKO1_SEL>, ...;
>     assigned-clock-parents = <&clks IMX5_CLK_AHB>;
>     assigned-clock-rates = <133333334>, <33333334>, <33333334>;
>   };
> 
> Without explicit declarations this triggers a dtbs_check error:
>   arch/arm/boot/dts/nxp/imx/imx53-m53menlo.dtb: ccm@53fd4000 (fsl,imx53-ccm): 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'
> 
> Assisted-by: Claude:claude-sonnet-4.6
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../devicetree/bindings/clock/imx5-clock.yaml        | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/imx5-clock.yaml: properties: 'clocks' is a dependency of 'assigned-clocks'
	from schema $id: http://devicetree.org/meta-schemas/clocks.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/20260901193720.1066686-1-Frank.Li@oss.nxp.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties
  2026-09-02  6:14 ` Krzysztof Kozlowski
@ 2026-09-03 16:54   ` Frank Li
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Li @ 2026-09-03 16:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Abel Vesa, Peng Fan, Stephen Boyd, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	open list:NXP i.MX CLOCK DRIVERS,
	open list:NXP i.MX CLOCK DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC / LAYERSCAPE ARM ARCHIT...,
	open list

On Wed, Sep 02, 2026 at 08:14:46AM +0200, Krzysztof Kozlowski wrote:
> On Tue, Sep 01, 2026 at 03:37:19PM -0400, Frank.Li@oss.nxp.com wrote:
> > From: Frank Li <Frank.Li@nxp.com>
> >
> > The i.MX5 CCM is a pure clock provider with no 'clocks' consumer
> > property in its binding. The dtschema framework only merges the
> > clocks.yaml meta-schema properties (which include assigned-clocks,
> > assigned-clock-parents, and assigned-clock-rates) into a binding
> > when the binding itself declares 'clocks:'.
> >
> > For example, imx53-m53menlo.dts configures the CKO1 output clock
> > by setting assigned-clocks on the &clks node:
> >
> >   &clks {
> >     assigned-clocks = <&clks IMX5_CLK_CKO1_SEL>, ...;
> >     assigned-clock-parents = <&clks IMX5_CLK_AHB>;
> >     assigned-clock-rates = <133333334>, <33333334>, <33333334>;
> >   };
> >
> > Without explicit declarations this triggers a dtbs_check error:
> >   arch/arm/boot/dts/nxp/imx/imx53-m53menlo.dtb: ccm@53fd4000 (fsl,imx53-ccm): 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'
> >
> > Assisted-by: Claude:claude-sonnet-4.6
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
>
> Then the DTS is wrong. If this device does not have a parent clock
> input, then assigning clock parents is wrong because it is either
> contradictory (you said no parents) or misplaced (clock consumer should
> set it).

Make sense, CLKO may just use for debug to measure one of internal clock.

The boards is too old, not sure if it is really used for some periphal.

Frank

>
> Best regards,
> Krzysztof
>

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

end of thread, other threads:[~2026-09-03 16:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 19:37 [PATCH 1/1] dt-bindings: clock: imx5: add assigned-clock* properties Frank.Li
2026-09-02  6:14 ` Krzysztof Kozlowski
2026-09-03 16:54   ` Frank Li
2026-09-03 15:56 ` Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox