From patchwork Sat Mar 26 04:13:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "zhuning@everest-semi.com" X-Patchwork-Id: 556270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40621C433EF for ; Tue, 29 Mar 2022 08:29:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 83B8D17DE; Tue, 29 Mar 2022 10:28:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 83B8D17DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1648542584; bh=YSKQQQJZS30x9vl5zGY4uXLSlpKvtSnxYAHyiA3Xvjk=; h=Date:From:To:Subject:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=exX9KYsgh1n954iehKSUhprzMBhSPzu3grsdvFTYuh6SJ1KxiRubGivnj2IF5RiW3 eu93AXFI7p1RaobpLWqMar+aQkRR+P8BJDjuW8VluWAZhLxkVhIRSuzYcv0zBPe9xd IrdinPUjmxN6nsvSlxYX6BIqkkSVMHDvzs7SuE8g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A1150F8050F; Tue, 29 Mar 2022 10:28:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86FB7F8019D; Sat, 26 Mar 2022 05:13:45 +0100 (CET) Received: from mail78-37.sinamail.sina.com.cn (mail78-37.sinamail.sina.com.cn [219.142.78.37]) by alsa1.perex.cz (Postfix) with ESMTP id 42A63F800AA for ; Sat, 26 Mar 2022 05:13:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 42A63F800AA Received: from unknown (HELO Dell)([116.232.54.164]) by sina.net (10.75.30.235) with ESMTP id 623E92EB00029070; Sat, 26 Mar 2022 12:13:31 +0800 (CST) X-Sender: zhuning@everest-semi.com X-Auth-ID: zhuning@everest-semi.com X-SMAIL-MID: 82B808D1E0814775A748F3EFFD2088AD X-SMAIL-UIID: 82B808D1E0814775A748F3EFFD2088AD-20220326-121331 Date: Sat, 26 Mar 2022 12:13:31 +0800 From: "zhuning@everest-semi.com" To: alsa-devel Subject: [PATCH] ASoC: codecs: add support for ES8326 dts X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7.2.21.418[cn] Mime-Version: 1.0 Message-ID: <2022032612133078633672@everest-semi.com> X-Mailman-Approved-At: Tue, 29 Mar 2022 10:28:32 +0200 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "pierre-louis.bossart" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: yangxiaohua Subject: [PATCH 1/1] ASoC: codecs: add support for ES8326 dts The ES8326 codec is not compatible with ES8316 and requires a dedicated driver. This is a separate patch for ES8326 dts Signed-off-by: David Yang --- .../bindings/sound/everest,es8326.yaml | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 Documentation/devicetree/bindings/sound/everest,es8326.yaml + the value of reg 2A when headset unplugged. + $ref: /schemas/types.yaml#/definitions/uint8-array + minimum: 0x00 + maximum: 0x77 + default: 0x44 + + everest,amic1-src: + description: + the value of reg 23 when headset plugged. + $ref: /schemas/types.yaml#/definitions/uint8-array + minimum: 0x19 + maximum: 0x29 + default: 0x19 + + everest,amic2-src: + description: + the value of reg 23 when headset unplugged. + Set to 0x19 if dmic used. Set to 0x29 if amic used. + $ref: /schemas/types.yaml#/definitions/uint8-array + minimum: 0x19 + maximum: 0x29 + default: 0x19 + + everest,jack-detect-inverted: + description: + Defined to invert the jack detection. + $ref: /schemas/types.yaml#/definitions/flag + +required: + - compatible + - reg + - "#sound-dai-cells" + + +additionalProperties: false + +examples: + - | + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + es8326: codec@19 { + compatible = "everest,es8326"; + reg = <0x19>; + clocks = <&clks 10>; + clock-names = "mclk"; + #sound-dai-cells = <0>; + mic1-src = [22]; + mic2-src = [44]; + amic1-src = [19]; + amic2-src = [19]; + jack-pol = [0e]; + }; + }; diff --git a/Documentation/devicetree/bindings/sound/everest,es8326.yaml b/Documentation/devicetree/bindings/sound/everest,es8326.yaml new file mode 100755 index 000000000000..8cae9c328dbc --- /dev/null +++ b/Documentation/devicetree/bindings/sound/everest,es8326.yaml @@ -0,0 +1,109 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/everest,es8326.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Everest ES8326 audio CODEC + +maintainers: + - David Yang + +properties: + compatible: + const: everest,es8326 + + reg: + maxItems: 1 + + clocks: + items: + - description: clock for master clock (MCLK) + + clock-names: + items: + - const: mclk + + "#sound-dai-cells": + const: 0 + + mclk-rate: + description: + clock rate of mclk + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + + everest,jack-pol: + description: + just the value of reg 57. Bit(3) decides whether the jack polarity is inverted. + Bit(2) decides whether the bottom on the headset is inverted. + Bit(1)/(0) decides the mic properity to be OMTP/CTIA or auto. + $ref: /schemas/types.yaml#/definitions/uint8-array + minimum: 0 + maximum: 0x0f + default: 0x0f + + everest,mic1-src: + description: + the value of reg 2A when headset plugged. + $ref: /schemas/types.yaml#/definitions/uint8-array + minimum: 0x00 + maximum: 0x77 + default: 0x22 + + everest,mic2-src: + description: