[PATCH v23 1/3] dt-bindings: clock: npcm845: Add reference 25m clock property

Tomer Maimon posted 3 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH v23 1/3] dt-bindings: clock: npcm845: Add reference 25m clock property
Posted by Tomer Maimon 1 year, 10 months ago
The NPCM8XX clock driver uses a 25Mhz external clock, therefore adding
clock property.

The new required clock property does not break the NPCM8XX clock ABI
since the NPCM8XX clock driver hasn't merged yet to the Linux vanilla.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
 .../bindings/clock/nuvoton,npcm845-clk.yaml          | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
index b901ca13cd25..7060891d0c32 100644
--- a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
+++ b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
@@ -21,6 +21,14 @@ properties:
   reg:
     maxItems: 1
 
+  clocks:
+    items:
+      - description: 25Mhz reference clock
+
+  clock-names:
+    items:
+      - const: refclk
+
   '#clock-cells':
     const: 1
     description:
@@ -30,6 +38,8 @@ properties:
 required:
   - compatible
   - reg
+  - clocks
+  - clock-names
   - '#clock-cells'
 
 additionalProperties: false
@@ -44,6 +54,8 @@ examples:
             compatible = "nuvoton,npcm845-clk";
             reg = <0x0 0xf0801000 0x0 0x1000>;
             #clock-cells = <1>;
+            clocks = <&refclk>;
+            clock-names = "refclk";
         };
     };
 ...
-- 
2.34.1
Re: [PATCH v23 1/3] dt-bindings: clock: npcm845: Add reference 25m clock property
Posted by Stephen Boyd 1 year, 9 months ago
Quoting Tomer Maimon (2024-01-31 10:26:51)
> diff --git a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
> index b901ca13cd25..7060891d0c32 100644
> --- a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
> +++ b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
> @@ -44,6 +54,8 @@ examples:
>              compatible = "nuvoton,npcm845-clk";
>              reg = <0x0 0xf0801000 0x0 0x1000>;
>              #clock-cells = <1>;
> +            clocks = <&refclk>;
> +            clock-names = "refclk";

The driver seems to want this to be a child of the mfd syscon. Is that
right?
Re: [PATCH v23 1/3] dt-bindings: clock: npcm845: Add reference 25m clock property
Posted by Tomer Maimon 1 year, 9 months ago
Hi Stephen,

The plan is for both the clock and reset will be under only the memory
region handle like
                sysctrl: system-controller@f0801000 {
                        compatible = "syscon", "simple-mfd";
                        reg = <0x0 0xf0801000 0x0 0x1000>;

                        rstc: reset-controller {
                                compatible = "nuvoton,npcm845-reset";
                                reg = <0x0 0xf0801000 0x0 0xC4>;
                                #reset-cells = <2>;
                                nuvoton,sysgcr = <&gcr>;
                        };

                        clk: clock-controller {
                                compatible = "nuvoton,npcm845-clk";
                                #clock-cells = <1>;
                                clocks = <&refclk>;
                                clock-names = "refclk";
                        };
                };

is it problematic?

But this commit is not related to it.

Thanks,

Tomer

On Thu, 22 Feb 2024 at 07:58, Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Tomer Maimon (2024-01-31 10:26:51)
> > diff --git a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
> > index b901ca13cd25..7060891d0c32 100644
> > --- a/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
> > +++ b/Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml
> > @@ -44,6 +54,8 @@ examples:
> >              compatible = "nuvoton,npcm845-clk";
> >              reg = <0x0 0xf0801000 0x0 0x1000>;
> >              #clock-cells = <1>;
> > +            clocks = <&refclk>;
> > +            clock-names = "refclk";
>
> The driver seems to want this to be a child of the mfd syscon. Is that
> right?
Re: [PATCH v23 1/3] dt-bindings: clock: npcm845: Add reference 25m clock property
Posted by Krzysztof Kozlowski 1 year, 10 months ago
On 31/01/2024 19:26, Tomer Maimon wrote:
> The NPCM8XX clock driver uses a 25Mhz external clock, therefore adding
> clock property.
> 
> The new required clock property does not break the NPCM8XX clock ABI
> since the NPCM8XX clock driver hasn't merged yet to the Linux vanilla.
> 
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---

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

Best regards,
Krzysztof