Re: [PATCH v1 2/2] ASoC: dt-bindings: Add Everest ES8389 audio CODEC

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

 



On Fri, Feb 28, 2025 at 06:02:45PM +0800, Zhang Yi wrote:
> Add device tree binding documentation for Everest ES8389
> 
> Signed-off-by: Zhang Yi <zhangyi@xxxxxxxxxxxxxxxx>
> ---
>  .../bindings/sound/everest,es8389.yaml        | 98 +++++++++++++++++++
>  1 file changed, 98 insertions(+)
>  create mode 100755 Documentation/devicetree/bindings/sound/everest,es8389.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/everest,es8389.yaml b/Documentation/devicetree/bindings/sound/everest,es8389.yaml
> new file mode 100755
> index 000000000000..4629a89b915e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/everest,es8389.yaml
> @@ -0,0 +1,98 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/everest,es8389.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Everest ES8389 audio CODEC
> +
> +maintainers:
> +  - Michael Zhang <zhangyi@xxxxxxxxxxxxxxxx>
> +

Add a $ref to dai-common.yaml.

> +properties:
> +  compatible:
> +    const: everest,es8389
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: clock for master clock (MCLK)
> +
> +  clock-names:
> +    items:
> +      - const: mclk
> +
> +  "#sound-dai-cells":
> +    const: 0
> +
> +  everest,adc-slot:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: |
> +      This property is used to set the slots of recording data when multiple
> +      codecs are connected in PTDM mode.
> +      please set this property to default if you are setting STDM mode.
> +    minimum: 0x00
> +    maximum: 0x07
> +    default: 0x00
> +
> +  everest,dac-slot:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: |
> +      This property is used to set the slots of playing data when multiple
> +      codecs are connected in TDM mode.
> +      please do not set this property if you use single codec.
> +    minimum: 0x00
> +    maximum: 0x07
> +    default: 0x00

Can't the dai-tdm-* properties work for you?

> +
> +  prefix_name:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: device name prefix

Why do you need this?

> +
> +  everest,dmic-enabled:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: |

Don't need '|' if no formatting.

> +      The property is a choice between PDM and AMIC
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#sound-dai-cells"
> +
> +additionalProperties: false
> +
> +examples for single codec:
> +  - |
> +    es8389: es8389@10 {

audio-codec@10 {

> +      compatible = "everest,es8389";
> +      status = "okay";

Don't need status.

> +      reg = <0x10>;
> +      everest,adc-slot = [00];
> +      everest,dac-slot = [00];
> +      prefix_name = "es8389_0";
> +      #sound-dai-cells = <0>;
> +    };
> +
> +examples for multi codecs:
> +  - |
> +    es8389: es8389@10 {
> +      compatible = "everest,es8389";
> +      status = "okay";
> +      reg = <0x10>;
> +      everest,adc-slot = [00];
> +      everest,dac-slot = [00];
> +      prefix_name = "es8389_0";
> +      #sound-dai-cells = <0>;
> +    };
> +    es8389_1: es8389@11 {
> +      compatible = "everest,es8389";
> +      status = "okay";
> +      reg = <0x11>;
> +      everest,adc-slot = [01];
> +      everest,dac-slot = [01];
> +      prefix_name = "es8389_1";
> +      clock-names = "mclk";
> +      #sound-dai-cells = <0>;
> +    };
> \ No newline at end of file

Fix this.

> -- 
> 2.17.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