From patchwork Fri Jul 29 09:08:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Ning X-Patchwork-Id: 594375 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 A5497C00144 for ; Fri, 29 Jul 2022 09:10:44 +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 580A51674; Fri, 29 Jul 2022 11:09:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 580A51674 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1659085842; bh=1kiaumpZYSpUvwnJefPlp+ypOuilzkCh5+6qePnfjyo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Sn2Vk2QVHL3PumJuzGWjGIvDUUOycnSl2b6q6qMSFj2vc8q+GJk2sO2oLSnj9VHq7 e0VBA5Pzvc99y/SsG6pkx6Y5IrLEiB/qLOHG44TCBc/OQzsC0dTfOqthiH8LYtRCVG d0KIwTOiKzNIbPXBLZX1sIUbRZTMj1wt08SHNALo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BC2EEF80543; Fri, 29 Jul 2022 11:09:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 71C39F8015B; Fri, 29 Jul 2022 11:09:18 +0200 (CEST) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F0A39F80224 for ; Fri, 29 Jul 2022 11:09:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F0A39F80224 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KSvU33lv" Received: by mail-pl1-x62c.google.com with SMTP id y15so4041500plp.10 for ; Fri, 29 Jul 2022 02:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=hCbUDfewVNfxco0jKTNS446yrXoa8F7t2H5Ga7NL5pw=; b=KSvU33lvVjaXWP9ysUOK/wPTjk/mtsTWRhVl425C/RkAOhkyKgWN9h2hqBuLvJAAbW iofrSIb+EGHDrx883BnQFKM0yKLsvTwkw5L9+UhE5sm1qrESrhl/rzXK7hFlY3pycKKH S7NOu4AXE2812CtB1kz3rsRgmI+5XmG+RUCdH7fxb+/D7WjkiKCpVnL8BWbN35yjLQUF o5gFRX8o96hc/tp+uL6eNKwFcRcw0mkw16S4aNh0pl7NGYtbYWt5clJW5bPmTUpmxnD/ 9xPqcI5UEQaOqHftXBKeqNxkfNZ77bs5TvrNG3OiyZT3tlsmEkDwuhRscpRhkKXP0DLC b4Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=hCbUDfewVNfxco0jKTNS446yrXoa8F7t2H5Ga7NL5pw=; b=5BsJOaonKPrdbpa9Qe2i3bdJZ9dyjoHO3PlflvzGNk8qrtoVFALXm1AhoU6H3NjgtL grIRkqJH9su5unJdlQcBWOZe5fmjxIVss86EEnIGJ29hk7fk2tEB3WbDH0JW6opGo6mH NeW5OBhSpJk1wT7GF/2iY39Czxqbj+9GrY15VUsPNx5ftdmjSYmpYk3X+Z0rTBZFcwqK 8u9vVCNEU5UPLg3QFyMzBkXQjfoImAP2BchSI5vLUrsleH/xLEcJCF2CSW4/mgsjX+AR Cr15DY5j8UBQn5RbX7zPnxR1YQGio9I47hlAblVazjfylbsXRwSMfLaR9rE/oxywkGic bZHA== X-Gm-Message-State: ACgBeo0AWNnnOZAr6IA4acU6oj4DxcWQ/o2TTTiiXkEj8qJNnEsezAsL TE7wXgIg8g07hZwU8vBG54qGFvnz8oQXRFVN X-Google-Smtp-Source: AA6agR7mSPMQjbv34yhsmlYgC5w2oGSgf9nxlR/7bSoxSsjeEQYz1ShM0oyPzjva5iMt43bk5qKOpA== X-Received: by 2002:a17:902:b10a:b0:16c:51cd:a6f with SMTP id q10-20020a170902b10a00b0016c51cd0a6fmr2846747plr.42.1659085749274; Fri, 29 Jul 2022 02:09:09 -0700 (PDT) Received: from a-VirtualBox.. ([116.233.75.140]) by smtp.gmail.com with ESMTPSA id s3-20020a170902ea0300b0016d763967f8sm2954832plg.107.2022.07.29.02.09.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:09:09 -0700 (PDT) From: Zhu Ning To: alsa-devel@alsa-project.org Subject: [PATCH v4 2/2] ASoC: dt-bindings: Add Everest ES8326 audio CODEC Date: Fri, 29 Jul 2022 17:08:57 +0800 Message-Id: <20220729090857.579785-2-zhuning0077@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220729090857.579785-1-zhuning0077@gmail.com> References: <20220729090857.579785-1-zhuning0077@gmail.com> MIME-Version: 1.0 Cc: robh@kernel.org, Zhu Ning , devicetree@vger.kernel.org, pierre-louis.bossart@linux.intel.com, tiwai@suse.com, broonie@kernel.org, Zhu Ning , David Yang 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" Add device tree binding documentation for Everest ES8326 Signed-off-by: David Yang Signed-off-by: Zhu Ning ---- v4 add properity for reg58 and reg59 --- .../bindings/sound/everest,es8326.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100755 Documentation/devicetree/bindings/sound/everest,es8326.yaml diff --git a/Documentation/devicetree/bindings/sound/everest,es8326.yaml b/Documentation/devicetree/bindings/sound/everest,es8326.yaml new file mode 100755 index 000000000000..d957211516f0 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/everest,es8326.yaml @@ -0,0 +1,116 @@ +# 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 + + everest,jack-pol: + description: + just the value of reg 57. Bit(3) decides whether the jack polarity is inverted. + Bit(2) decides whether the button on the headset is inverted. + Bit(1)/(0) decides the mic properity to be OMTP/CTIA or auto. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 0x00 + maximum: 0x0f + default: 0x0f + + everest,mic1-src: + description: + the value of reg 2A when headset plugged. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 0x00 + maximum: 0x77 + default: 0x22 + + everest,mic2-src: + description: + the value of reg 2A when headset unplugged. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 0x00 + maximum: 0x77 + default: 0x44 + + everest,jack-detect-inverted: + description: + Defined to invert the jack detection. + $ref: /schemas/types.yaml#/definitions/flag + + everest,interrupt-src: + description: + value of reg 0x58, Defines the interrupt source. + Bit(2) 1 means button press triggers irq, 0 means not. + Bit(3) 1 means PIN9 is the irq source for jack detection. When set to 0, + bias change on PIN9 do not triggers irq. + Bit(4) 1 means PIN27 is the irq source for jack detection. + Bit(5) 1 means PIN9 is the irq source after MIC detect. + Bit(6) 1 means PIN27 is the irq source after MIC detect. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 0 + maximum: 0x3c + default: 0x08 + + everest,interrupt-clk: + description: + value of reg 0x59, Defines the interrupt output behavior. + Bit(0-3) 0 means irq pulse equals 512*internal clock + 1 means irq pulse equals 1024*internal clock + 2 means ... + 7 means irq pulse equals 65536*internal clock + 8 means irq mutes PA + 9 means irq mutes PA and DAC output + Bit(4) 1 means we invert the interrupt output. + Bit(6) 1 means the chip do not detect jack type after button released. + 0 means the chip detect jack type again after button released. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 0 + maximum: 0x7f + default: 0x45 + +required: + - compatible + - reg + - "#sound-dai-cells" + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + es8326: codec@19 { + compatible = "everest,es8326"; + reg = <0x19>; + clocks = <&clks 10>; + clock-names = "mclk"; + #sound-dai-cells = <0>; + everest,mic1-src = [22]; + everest,mic2-src = [44]; + everest,jack-pol = [0e]; + everest,interrupt-src = [08]; + everest,interrupt-clk = [45]; + }; + };