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> + +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 + + prefix_name: + $ref: /schemas/types.yaml#/definitions/string + description: device name prefix + + everest,dmic-enabled: + $ref: /schemas/types.yaml#/definitions/flag + description: | + The property is a choice between PDM and AMIC + +required: + - compatible + - reg + - "#sound-dai-cells" + +additionalProperties: false + +examples for single codec: + - | + 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>; + }; + +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 -- 2.17.1