Re: [PATCH v3 04/15] dt-bindings: clk: sunxi-ng: document Allwinner A523 CCU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 4 Mar 2025 08:11:25 -0600
Rob Herring <robh@xxxxxxxxxx> wrote:

Hi,

> On Tue, Mar 04, 2025 at 01:27:54AM +0000, Andre Przywara wrote:
> > The Allwinner A523/T527 SoCs have four CCUs, this adds the binding for
> > the main CCU.
> > 
> > The source clock list differs in some annoying details, and folding this
> > into the existing Allwinner CCU clock binding document gets quite
> > unwieldy, so create a new document for these CCUs.
> > Add the new compatible string, along with the required input clock
> > lists. This conditionally describes the input clock list, to make for
> > an easier patch adding the other CCUs.
> > 
> > Also add the DT binding headers, listing all the clocks with their ID
> > numbers.
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
> > ---
> >  .../clock/allwinner,sun55i-a523-ccu.yaml      |  77 +++++++
> >  include/dt-bindings/clock/sun55i-a523-ccu.h   | 189 ++++++++++++++++++
> >  include/dt-bindings/reset/sun55i-a523-ccu.h   |  88 ++++++++
> >  3 files changed, 354 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
> >  create mode 100644 include/dt-bindings/clock/sun55i-a523-ccu.h
> >  create mode 100644 include/dt-bindings/reset/sun55i-a523-ccu.h
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
> > new file mode 100644
> > index 0000000000000..2eacaeaeabac7
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
> > @@ -0,0 +1,77 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/allwinner,sun55i-a523-ccu.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Allwinner A523 Clock Control Unit
> > +
> > +maintainers:
> > +  - Andre Przywara <andre.przywara@xxxxxxx>
> > +
> > +properties:
> > +  "#clock-cells":
> > +    const: 1
> > +
> > +  "#reset-cells":
> > +    const: 1
> > +
> > +  compatible:
> > +    enum:
> > +      - allwinner,sun55i-a523-ccu
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    minItems: 4
> > +    maxItems: 4
> > +
> > +  clock-names:
> > +    minItems: 4
> > +    maxItems: 4
> > +
> > +required:
> > +  - "#clock-cells"
> > +  - "#reset-cells"
> > +  - compatible
> > +  - reg
> > +  - clocks
> > +  - clock-names
> > +
> > +if:  
> 
> Put this under an allOf and use another 'if' instead of the 'else' 
> clause in the 2nd patch.

Ah, that's a neat idea! What do I do with the clocks and clock-names
above, then? Just have them as "true"?

Krzysztof, would you agree with this approach, and shall I still combine
both in just one patch?

Cheers,
Andre

> > +  properties:
> > +    compatible:
> > +      enum:
> > +        - allwinner,sun55i-a523-ccu
> > +
> > +then:
> > +  properties:
> > +    clocks:
> > +      items:
> > +        - description: High Frequency Oscillator (usually at 24MHz)
> > +        - description: Low Frequency Oscillator (usually at 32kHz)
> > +        - description: Internal Oscillator
> > +        - description: Low Frequency Oscillator fanout
> > +
> > +    clock-names:
> > +      items:
> > +        - const: hosc
> > +        - const: losc
> > +        - const: iosc
> > +        - const: losc-fanout
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    ccu: clock@2001000 {  
> 
> Drop ccu and it's 'clock-controller' not 'clock'.
> 
> > +        compatible = "allwinner,sun55i-a523-ccu";
> > +        reg = <0x2001000 0x1000>;
> > +        clocks = <&osc24M>, <&osc32k>, <&iosc>, <&r_ccu 2>;
> > +        clock-names = "hosc", "losc", "iosc", "losc-fanout";
> > +        #clock-cells = <1>;
> > +        #reset-cells = <1>;
> > +    };
> > +
> > +...  





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux