Re: [PATCH v2 1/2] dt-binding: clock: cs2600: Add support for the CS2600

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

 



On Wed, Dec 18, 2024 at 08:46:30PM -0600, Paul Handrigan wrote:
> +  clock-output-names:
> +    maxItems: 3
> +    description: Names for CLK_OUT, BCLK_OUT and FSYNC_OUT clocks.
> +
> +  cirrus,aux-output-source:
> +    description:
> +      Specifies the function of the auxiliary output pin
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum:
> +      - 0 # CS2600_AUX_OUTPUT_FREQ_UNLOCK: Frequency unlock notification
> +      - 1 # CS2600_AUX_OUTPUT_PHASE_UNLOCK: Phase unlock notification
> +      - 2 # CS2600_AUX_OUTPUT_NO_CLKIN: CLK_IN is not available

I still do not understand how "clk_in", which is required, could be not
available. To me it contradicts itself, but maybe just description is a
bit incomplete.

Anyway, why this cannot be simple string?


> +    default: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - '#clock-cells'
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/cirrus,cs2600.h>
> +
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      clock-controller@2c {
> +        #clock-cells = <1>;

Use order from DTS coding style.

> +        compatible = "cirrus,cs2600";
> +        reg = <0x2c>;
> +        clocks = <&xtl_clk>, <&sync_clock>;
> +        clock-names = "xti", "clk_in";
> +        clock-output-names = "audio_clk_out", "audio_bclk", "audio_lrclk";
> +        vdd-supply = <&vreg>;
> +      };
> +    };
> diff --git a/include/dt-bindings/clock/cirrus,cs2600.h b/include/dt-bindings/clock/cirrus,cs2600.h
> new file mode 100644
> index 000000000000..86065f94a2b2
> --- /dev/null
> +++ b/include/dt-bindings/clock/cirrus,cs2600.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
> +/*
> + * Copyright (c) 2024 Cirrus Logic, Inc. and
> + *		      Cirrus Logic International Simiconductor Ltd.
> + *
> + * Author: Paul Handrigan <paulha@xxxxxxxxxxxxxxxxxxxxx>
> + *
> + */
> +
> +#ifndef _DT_BINDINGS_CLK_CIRRUS_CS2600_H
> +#define _DT_BINDINGS_CLK_CIRRUS_CS2600_H
> +
> +/* CS2600 Clocks  */
> +#define CS2600_PLL      0 /* Internal clock */
> +#define CS2600_CLK		1
> +#define CS2600_BCLK		2
> +#define CS2600_FSYNC	3
> +
> +/* CS2600 Auxiliary Output */
> +#define CS2600_AUX_OUTPUT_FREQ_UNLOCK	0
> +#define CS2600_AUX_OUTPUT_PHASE_UNLOCK	1
> +#define CS2600_AUX_OUTPUT_NO_CLKIN	2

I still don't see why these three are supposed to be bindings. Drop
them.

Best regards,
Krzysztof





[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