From patchwork Tue May 23 08:21:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rau X-Patchwork-Id: 686477 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 5CBB0C7EE23 for ; Tue, 23 May 2023 08:23:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 69B6182C; Tue, 23 May 2023 10:22:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69B6182C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684830185; bh=Ww064OOaXARraJEeig8eYZwsic10/5bt44Hw+6zsw0o=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=ohjx/zzeyQ3dJh5SOVOknyk666ql6+y8VwAYXfchlOE9PGwZS2WddKdurHU6HFIK8 s0lJUdiC0KvxWg+90FQvCDXSsCnbVmy6cdopdsrw6GbQDzt+gE/Nq6pn4Usgn3zape KLbCsoxeACVTHgr7k2K1xkDgp+idPvl5NElOceWA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3826F80249; Tue, 23 May 2023 10:21:52 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4427CF80425; Tue, 23 May 2023 10:21:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E689FF800DF; Tue, 23 May 2023 10:21:46 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2071b.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::71b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4E3B5F800DF for ; Tue, 23 May 2023 10:21:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4E3B5F800DF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=dm.renesas.com header.i=@dm.renesas.com header.a=rsa-sha256 header.s=selector1 header.b=D8mzwO0n ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K1Rk8OxQObx7ABBrGhVnFMp06bsYqP+g8EKqi6SwAcIkJ0LjSwrdbei0248ftD9PWgvYjnSiPkh0esIp8BFCXhhMdgzC8memD9yvWZboEvkwrDLDw1J7m7W+G24szOijoQHaVwwraK33T1myHtgwM6Zb4mKjnTVs0tQ1ierImgJMq7n7V0R6EIfVfdEUW0a8hjmexBz7mRWHY7pUKl48q9FvbGth5NB3RtFyUDFW12XxO6Png4MwrmkckbdSl7ttWolAkgDXamdPLPuFEgwPGpu29JKUH9Y8asTZ/XYGDioXIevoCBL07idIPjSej2Zu9j6Oa8QVjbydyRqRArsNbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M2tC1skomVw6R7pr+O2yYDxhqGxtD1WeQwOsrr96SlU=; b=ZwIBYg3AZIEAHL0Lm5Ha3dJzG4VO91SPAlX/6kaR1ImqAkti0fmSk36/Xtv27di1AHc9rEpGZjsFGvFuoYFm2Gj5MCy2dyJDqRYjUQAi8ieBpBaedjx5qXvKCHN9DzM+y/lyDl9Upya6VYvvNe4ZZLYB4l7u4N1ImH5YuiLHtXxez0XJ6NIIuDZ8S/M/R1RjyGgGjuV4y4pzkBP2K8aKVi9zgVC4OZYZu1nA8lT5GRxLfdXXpkB1GRpDIvbrRWD5c26CzEfFsPHo9oDNegJ9o4CfM/sOeX3KdAYxC2sOveeWaSliGrGENqjoqYeSVjh42sGcBMiMd9nbwpmy6mOwqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=dm.renesas.com; dmarc=pass action=none header.from=dm.renesas.com; dkim=pass header.d=dm.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dm.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M2tC1skomVw6R7pr+O2yYDxhqGxtD1WeQwOsrr96SlU=; b=D8mzwO0ngiPf9EiLFcPXzoJJUDTJBBog8esSRwXdiGUqDhR2EKj+vBPHC3eIOrobyjmtinIY1eGgN/3pCEyGHePWn5aT6FbA/8Rn4qOn/lUv0Q0t3rvSYAnvztlNc14H0lE6+N9TRkSGpEpo1z+xyeIfy8TVWL4xcDBivIN2imM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=dm.renesas.com; Received: from OS3PR01MB6641.jpnprd01.prod.outlook.com (2603:1096:604:10b::11) by TY3PR01MB11797.jpnprd01.prod.outlook.com (2603:1096:400:373::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 08:21:32 +0000 Received: from OS3PR01MB6641.jpnprd01.prod.outlook.com ([fe80::2de2:b2ee:d931:157]) by OS3PR01MB6641.jpnprd01.prod.outlook.com ([fe80::2de2:b2ee:d931:157%6]) with mapi id 15.20.6411.029; Tue, 23 May 2023 08:21:31 +0000 From: David Rau To: conor+dt@kernel.org Cc: support.opensource@diasemi.com, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Rau Subject: [ASoC: da7219: Add Jack insertion detection polarity selection 1/2] ASoC: dt-bindings: dialog,da7219: convert to dtschema Date: Tue, 23 May 2023 08:21:00 +0000 Message-Id: <20230523082101.380-1-David.Rau.opensource@dm.renesas.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: OS3P301CA0007.JPNP301.PROD.OUTLOOK.COM (2603:1096:604:21d::14) To OS3PR01MB6641.jpnprd01.prod.outlook.com (2603:1096:604:10b::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB6641:EE_|TY3PR01MB11797:EE_ X-MS-Office365-Filtering-Correlation-Id: 79e95256-0b38-49d4-099e-08db5b66b4e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UYrA7hwS5TTV5IxNk1CgaRU99oDmMeBQA+qnMh5viSSs8tAarfegx7oKqW17aTpHvqag/781r0AI5340BEh7PCqgG94v9++YbDC+8DiC69gqE6sXA6Tbs2XmFPJ0B9V4HXpcZkkDiH99EuPjdgrtG7DgiwxpIgxU3i/cYhi+m0hpDhJXlo/+PO2lZW/LecL3PDCl/0w+yh2B2a+GfNS/Njo54221PVZNRIu8BNatplgDvaVYAPI0Wk3uB5ayGxMNsYZvJxHE1w0WTI1v7RgEF+bm9dRs91c308b8o1DYreoFEZvCVFdQIIjAJ3YXlCbRdmWgOSYFNkABF5qpR7XzLw/ERjCIyBJGy8tPG3w1iqjWqM4jkyCdpLySJecroer2BiI0ooS62cQqpOr4gsg/eFVTlA2MoFczEp9Q/RVhzEtTpfCacZRS6DPAcm8mGmh0Nt8IGqbnQhpDB3I2pcxN9BnFYTmlyN4dcmULxtZpoSn8W8T9RE+2NyYUHO6MUj3VgjRXKWlmh9jEX3GAbmB6KtlYNiHxFREBeMdZJ0ddd857ZM9O34b/ENYShg2GRuE6ra5SddrANFeTxJvPuYhoi4YZi0icFa4hMaJlBNSUNGQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB6641.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(366004)(136003)(396003)(376002)(39860400002)(451199021)(107886003)(6512007)(8676002)(8936002)(83380400001)(103116003)(38350700002)(38100700002)(86362001)(40140700001)(6506007)(2616005)(2906002)(41300700001)(52116002)(66946007)(66556008)(66476007)(4326008)(316002)(6666004)(6486002)(966005)(5660300002)(26005)(186003)(1076003)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NYEyuf0rfYSp4Mggsy0gecyge37Fs2XATtFGpoIbDgvcGvCHAlUxHdtUStJvmyc9JtGoCAejiTngp/b5UewTLllSbfuYW35kpvhvYhnfMYmBwUQ3OzHiTHgAO8phEJY4nJFFbpKgTNNSVaEFTdEWkcbvad1pUkdQ6ul97ah5vP+8kQrmUXpKj4tbSWQXpaDxy4gzb9OLVYLVir/GLq/+hVujzCnP873DWPimS+NtPPi7dteNKj2sWU9L/Tx+HqMTGH7cih05U+0k0hBDj66MNCM7WmMnoPAgLymUkRLKTi37WW6D0N7E7842WR7yTwI5GKOD+AMd48ECoak30nYvBNdQLm81ERZjtU+dmgcE7br9O9HHeNsYoU4UT48LwGML+bUlCRPDp20wLlFQbi6NISg0FOGyrIlSSDhsiwY/2TLr9U0lmtV6xGmujK6zJ2hPFkYlBuxUYlFuoi3mH6/BMCelgP9t1osQPu8xV4a/KGat0A3x4bZIkDDIpDDJrNrvpqM/IEZlK8hmC2bhNZj+100uLS++9zkWnmm/npB8xEnylu0NIDaC4qOqDbWm1GUYJACc2vnfcogEz/R0wJ+Hjekwk9fXJoUswEyikqaNvCOy27TJ+P+ktLEMHT21JUfmrX+ypYxLMJvi6xXzS13q3vNDPt/fvv/7jVHBfMZWE6QWr3daK0ro++3e6F1LAClMpHGcNAuxebcQHqXm84x3GcSCkQVUlsYxv3ZNyW3vZ3RrF94woA8BPR0mZfec+2mMktqGpcNRUXSEtUMBUNw6KlKrLbNWoQsW6HlZg/KrzYb+CVkdSwo+/8BaZipLjBveyDtc2UxVBH+v/SPsDJT3yJzN0PI6d2A2b+JDCos0q/HP67FA9iV4955Vq3l9Dc/nPeBMNEaq6qoPnVXltiUdsojkT92ciIKB4WgV2zr31jsenhKxtrPqZgqAZJRjWfH8ALvUlnFcRJXOIod4qui6+mUv9Tl3xmN/L82tlaEXDxKvDr0b8IDXzrroQqfqPX6hfIxDILuxisggM3UfZmgpohv/pmrfo8feb2Rik2T/nBP83es8Lgmnu3OOTm6xw8qQbK9F+FwDd1VBcKq+tZa8syqE9y/Uv69YXt7Y+z/xdJqXMWimjTgtxFknuf80eDn9gh1ufFyzPRhQo4tbAsGY2Z2Q+8rquv9WQ8IfsEmzOP/1PEnJo1cozRaViWQ+rEwA8foApni0TG/iyBs0ZR+ZIKQ3EmZE9yWcK+LzqJqvn9Vxr8FEYeIS00VvFA7k+yppwcsDkfm9ANpdKW3g4fwILkxmw6FERX2uzlsRBN17Y2zEFUMD4wR6dCDx1sXCozqSxOb46DzA3tTPGSDRlk56164IjDwfXbwd46cKQ/OM06aFt287Sqyr3OVh3Al3FwlnkDUQivMl9j6PyHWa24YmvaS7FTaONFrErhavpNassSnf6gU2inGIz9xyI6qtkrxLtwg8+MdpUG7WUhlNnuUK1Hshrc2ZzEUR9cYqNf90tQCU8dFVQorSksuYy9J1maTt5kdMISIcou0IdiOpB3FsVe29XVdgT8s4sbSePLe7HKAiZxYAilAxvw7ig6ptucAKXw8h+fjJ8gma4SRaq7JPFA== X-OriginatorOrg: dm.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79e95256-0b38-49d4-099e-08db5b66b4e5 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB6641.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 08:21:31.8347 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C8SWp2u1UxV2jtFK0mAJt1FlhKTA7e+PuyKT+BWmF9kqsrNgUNZkE0oRFNFL6ENufGMlHQhN0dwHczvdKHKkmA2FeD+m7ESDcmwjpRVwICk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11797 Message-ID-Hash: UQERR4OB3DRITREMY4JJLXWIWR3KNDDY X-Message-ID-Hash: UQERR4OB3DRITREMY4JJLXWIWR3KNDDY X-MailFrom: David.Rau.opensource@dm.renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - Convert Dialog DA7219 bindings to DT schema format. - Remove unused `dlg,ldo-lvl` property. Signed-off-by: David Rau --- .../devicetree/bindings/sound/da7219.txt | 112 --------- .../bindings/sound/dialog,da7219.yaml | 230 ++++++++++++++++++ 2 files changed, 230 insertions(+), 112 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/da7219.txt create mode 100644 Documentation/devicetree/bindings/sound/dialog,da7219.yaml diff --git a/Documentation/devicetree/bindings/sound/da7219.txt b/Documentation/devicetree/bindings/sound/da7219.txt deleted file mode 100644 index add1caf26ac2..000000000000 --- a/Documentation/devicetree/bindings/sound/da7219.txt +++ /dev/null @@ -1,112 +0,0 @@ -Dialog Semiconductor DA7219 Audio Codec bindings - -DA7219 is an audio codec with advanced accessory detect features. - -====== - -Required properties: -- compatible : Should be "dlg,da7219" -- reg: Specifies the I2C slave address - -- interrupts : IRQ line info for DA7219. - (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for - further information relating to interrupt properties) - -- VDD-supply: VDD power supply for the device -- VDDMIC-supply: VDDMIC power supply for the device -- VDDIO-supply: VDDIO power supply for the device - (See Documentation/devicetree/bindings/regulator/regulator.txt for further - information relating to regulators) - -Optional properties: -- interrupt-names : Name associated with interrupt line. Should be "wakeup" if - interrupt is to be used to wake system, otherwise "irq" should be used. -- wakeup-source: Flag to indicate this device can wake system (suspend/resume). - -- #clock-cells : Should be set to '<1>', two clock sources provided; -- clock-output-names : Names given for DAI clock outputs (WCLK & BCLK); - -- clocks : phandle and clock specifier for codec MCLK. -- clock-names : Clock name string for 'clocks' attribute, should be "mclk". - -- dlg,micbias-lvl : Voltage (mV) for Mic Bias - [<1600>, <1800>, <2000>, <2200>, <2400>, <2600>] -- dlg,mic-amp-in-sel : Mic input source type - ["diff", "se_p", "se_n"] - -Deprecated properties: -- dlg,ldo-lvl : Required internal LDO voltage (mV) level for digital engine - (LDO unavailable in production HW so property no longer required). - -====== - -Child node - 'da7219_aad': - -Optional properties: -- dlg,micbias-pulse-lvl : Mic bias higher voltage pulse level (mV). - [<2800>, <2900>] -- dlg,micbias-pulse-time : Mic bias higher voltage pulse duration (ms) -- dlg,btn-cfg : Periodic button press measurements for 4-pole jack (ms) - [<2>, <5>, <10>, <50>, <100>, <200>, <500>] -- dlg,mic-det-thr : Impedance threshold for mic detection measurement (Ohms) - [<200>, <500>, <750>, <1000>] -- dlg,jack-ins-deb : Debounce time for jack insertion (ms) - [<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>] -- dlg,jack-det-rate: Jack type detection latency (3/4 pole) - ["32ms_64ms", "64ms_128ms", "128ms_256ms", "256ms_512ms"] -- dlg,jack-rem-deb : Debounce time for jack removal (ms) - [<1>, <5>, <10>, <20>] -- dlg,a-d-btn-thr : Impedance threshold between buttons A and D - [0x0 - 0xFF] -- dlg,d-b-btn-thr : Impedance threshold between buttons D and B - [0x0 - 0xFF] -- dlg,b-c-btn-thr : Impedance threshold between buttons B and C - [0x0 - 0xFF] -- dlg,c-mic-btn-thr : Impedance threshold between button C and Mic - [0x0 - 0xFF] -- dlg,btn-avg : Number of 8-bit readings for averaged button measurement - [<1>, <2>, <4>, <8>] -- dlg,adc-1bit-rpt : Repeat count for 1-bit button measurement - [<1>, <2>, <4>, <8>] - -====== - -Example: - - codec: da7219@1a { - compatible = "dlg,da7219"; - reg = <0x1a>; - - interrupt-parent = <&gpio6>; - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; - - VDD-supply = <®_audio>; - VDDMIC-supply = <®_audio>; - VDDIO-supply = <®_audio>; - - #clock-cells = <1>; - clock-output-names = "dai-wclk", "dai-bclk"; - - clocks = <&clks 201>; - clock-names = "mclk"; - - dlg,ldo-lvl = <1200>; - dlg,micbias-lvl = <2600>; - dlg,mic-amp-in-sel = "diff"; - - da7219_aad { - dlg,btn-cfg = <50>; - dlg,mic-det-thr = <500>; - dlg,jack-ins-deb = <20>; - dlg,jack-det-rate = "32ms_64ms"; - dlg,jack-rem-deb = <1>; - - dlg,a-d-btn-thr = <0xa>; - dlg,d-b-btn-thr = <0x16>; - dlg,b-c-btn-thr = <0x21>; - dlg,c-mic-btn-thr = <0x3E>; - - dlg,btn-avg = <4>; - dlg,adc-1bit-rpt = <1>; - }; - }; diff --git a/Documentation/devicetree/bindings/sound/dialog,da7219.yaml b/Documentation/devicetree/bindings/sound/dialog,da7219.yaml new file mode 100644 index 000000000000..9160f68696dd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/dialog,da7219.yaml @@ -0,0 +1,230 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/dialog,da7219.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog Semiconductor DA7219 Audio Codec + +maintainers: + - David Rau + +description: + The DA7219 is an ultra low-power audio codec with + in-built advanced accessory detection (AAD) for mobile + computing and accessory applications, which supports + sample rates up to 96 kHz at 24-bit resolution. + +properties: + compatible: + const: dlg,da7219 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + VDD-supply: + description: + VDD power supply for the device. + + VDDMIC-supply: + description: + VDDMIC power supply for the device. + + VDDIO-supply: + description: + VDDIO power supply for the device. + + interrupt-names: + description: + Should be "wakeup" if interrupt is to be used to wake system, + otherwise "irq" should be used. + enum: + - wakeup + - irq + + wakeup-source: + type: boolean + description: + Flag to indicate this device can wake system (suspend/resume). + + "#clock-cells": + const: 1 + + clock-output-names: + minItems: 2 + maxItems: 2 + description: + Name given for DAI WCLK and BCLK outputs. + + clocks: + maxItems: 1 + description: + phandle and clock specifier for codec MCLK. + + clock-names: + const: mclk + + dlg,micbias-lvl: + enum: [1600, 1800, 2000, 2200, 2400, 2600] + description: + Voltage (mV) for Mic Bias. + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,mic-amp-in-sel: + enum: ["diff", "se_p", "se_n"] + description: + Mic input source type. + + diff - Differential. + + se_p - MIC_P. + Positive differential analog microphone input. + + se_n - MIC_N. + Negative differential analog microphone input. + $ref: /schemas/types.yaml#/definitions/string + + da7219_aad: + type: object + description: + Configuration of advanced accessory detection. + properties: + dlg,micbias-pulse-lvl: + enum: [2800, 2900] + description: + Mic bias higher voltage pulse level (mV). + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,micbias-pulse-time: + description: + Mic bias higher voltage pulse duration (ms). + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + + dlg,btn-cfg: + enum: [2, 5, 10, 50, 100, 200, 500] + description: + Periodic button press measurements for 4-pole jack (ms). + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,mic-det-thr: + enum: [200, 500, 750, 1000] + description: + Impedance threshold for mic detection measurement (Ohms). + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,jack-ins-deb: + enum: [5, 10, 20, 50, 100, 200, 500, 1000] + description: + Debounce time for jack insertion (ms). + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,jack-det-rate: + enum: ["32_64", "64_128", "128_256", "256_512"] + description: + Jack type (3/4 pole) detection latency (ms). + $ref: /schemas/types.yaml#/definitions/string + + dlg,jack-rem-deb: + enum: [1, 5, 10, 20] + description: + Debounce time for jack removal (ms). + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,a-d-btn-thr: + description: + Impedance threshold between buttons A and D. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 255 + + dlg,d-b-btn-thr: + description: + Impedance threshold between buttons D and B. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 255 + + dlg,b-c-btn-thr: + description: + Impedance threshold between buttons B and C. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 255 + + dlg,c-mic-btn-thr: + description: + Impedance threshold between button C and Mic. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 255 + + dlg,btn-avg: + enum: [1, 2, 4, 8] + description: + Number of 8-bit readings for averaged button measurement. + $ref: /schemas/types.yaml#/definitions/uint32 + + dlg,adc-1bit-rpt: + enum: [1, 2, 4, 8] + description: + Repeat count for 1-bit button measurement. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - reg + - interrupts + - VDD-supply + - VDDMIC-supply + - VDDIO-supply + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + codec: da7219@1a { + compatible = "dlg,da7219"; + reg = <0x1a>; + + interrupt-parent = <&gpio6>; + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + + VDD-supply = <&vdd_reg>; + VDDMIC-supply = <&vddmic_reg>; + VDDIO-supply = <&vddio_reg>; + + #clock-cells = <1>; + clock-output-names = "da7219-dai-wclk", "da7219-dai-bclk"; + + clocks = <&clks 201>; + clock-names = "mclk"; + + dlg,micbias-lvl = <2600>; + dlg,mic-amp-in-sel = "diff"; + + da7219_aad { + dlg,btn-cfg = <50>; + dlg,mic-det-thr = <500>; + dlg,jack-ins-deb = <20>; + dlg,jack-det-rate = "32_64"; + dlg,jack-rem-deb = <1>; + + dlg,a-d-btn-thr = <0xa>; + dlg,d-b-btn-thr = <0x16>; + dlg,b-c-btn-thr = <0x21>; + dlg,c-mic-btn-thr = <0x3E>; + + dlg,btn-avg = <4>; + dlg,adc-1bit-rpt = <1>; + }; + }; + }; From patchwork Tue May 23 08:21:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rau X-Patchwork-Id: 685049 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 AFFE0C7EE23 for ; Tue, 23 May 2023 08:23:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C2F88826; Tue, 23 May 2023 10:22:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C2F88826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684830213; bh=CxoM14/2K0Qrrl0Q1Ei05D7LMP6+jfa+isXPMJgaxdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Gvd90zR7h5oxo5XKB8YyAOKnzypgsPg91HuRiTAjI+QhvAELHWk9PLxW5mXZLlYM3 xuhRisli9nmWtbBJHDR1SopJ+gemlk/REhdCyjZxk/NqMbzIyYixOgR756xUWSZzg3 p6q0nSx1aoqoDPy+fmVCItNWkiMG7A2Rh5HrFxDM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12323F80563; Tue, 23 May 2023 10:21:54 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 48A97F8024E; Tue, 23 May 2023 10:21:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 78510F8024E; Tue, 23 May 2023 10:21:48 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2071b.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::71b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75783F80086 for ; Tue, 23 May 2023 10:21:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75783F80086 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=dm.renesas.com header.i=@dm.renesas.com header.a=rsa-sha256 header.s=selector1 header.b=QwcXTx0A ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gvu7LCK/Sz/UZh7J+n+fnfFmSzFJklPJ1UZLyOTPr8qHbeNUbScLIAa1Nn+x9yadqHWI6gNLLQ+UTGk/ggKyPuLt4pTBVMPlOUPH6ctuLSQe4685iVlO3E8KdaUNRU0GbVtbSAP7mDGfiL15SvTgv30dSzmI26zD75uTG751in1aGnIBaFO4QKBehmyfmNqpR/sUBkg4Del12yG3G+2qNBwbtfQgkqo52p0ABd/C9sAtp3KILGwuEWQNOhOTbRUluoQOoZkItch9BCSrqc6AciAE4hkp9kZC+i6Rhzf9iRSgM0/HOBLecmEm+H9iRAkzYTftuHZTh4IHVKfmHYt49A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tyl0ERCDU/+Tn1KkfWVKp0nmoTdIQGLAKV6LcUxqOYE=; b=eaDFHf3faYIAgoLoxOyqC9cnBfv9Yo/EyrzL1iSFd+13WAdfdIIUU8a9IB4jUpqByZdy6h6YrduPU36PGrqKbKrbQ2wozDgnn0tmNyoKCJeDpSS5BBd9JDpcX2UpoLJhnTY1NoIBcuZDqhNTwa8JIQ474ayjdw3HpIUy3xVhxP6SnbXyxiPXiCMsQ4FPa6/D6wxQu1+CjSWfviQw1M8fSJjfh6ppcqzPNshvN4r1EBmH9ERGUXGaMAcETR75HkRxcfwai1YIndHzU9IfK2itwHuHzW+ktrXi3oyaWI7wgFPd7xdzqYK13wfU76JH7b+vCZbBcWw+qhIZgubs0SLswQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=dm.renesas.com; dmarc=pass action=none header.from=dm.renesas.com; dkim=pass header.d=dm.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dm.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tyl0ERCDU/+Tn1KkfWVKp0nmoTdIQGLAKV6LcUxqOYE=; b=QwcXTx0ADJ8bC8H+nl7DR8MnNnKWRefTcYtYks0p9ahvlwwF5xIhtBqIxmndLIIiYrsFp+q5YCT/qmBKa5esLAtGwg059qxLuKo8JGQvgXU5w7+jI8F1236qbhRkx0otkYVMP8ypuP3zzLNq+gmuOZiooK0QCm6GbLv+jv4bwbs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=dm.renesas.com; Received: from OS3PR01MB6641.jpnprd01.prod.outlook.com (2603:1096:604:10b::11) by TY3PR01MB11797.jpnprd01.prod.outlook.com (2603:1096:400:373::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 08:21:37 +0000 Received: from OS3PR01MB6641.jpnprd01.prod.outlook.com ([fe80::2de2:b2ee:d931:157]) by OS3PR01MB6641.jpnprd01.prod.outlook.com ([fe80::2de2:b2ee:d931:157%6]) with mapi id 15.20.6411.029; Tue, 23 May 2023 08:21:36 +0000 From: David Rau To: conor+dt@kernel.org Cc: support.opensource@diasemi.com, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Rau Subject: [ASoC: da7219: Add Jack insertion detection polarity selection 2/2] ASoC: dt-bindings: da7219: Add jack-ins-det-pty property Date: Tue, 23 May 2023 08:21:01 +0000 Message-Id: <20230523082101.380-2-David.Rau.opensource@dm.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230523082101.380-1-David.Rau.opensource@dm.renesas.com> References: <20230523082101.380-1-David.Rau.opensource@dm.renesas.com> X-ClientProxiedBy: OS3P301CA0007.JPNP301.PROD.OUTLOOK.COM (2603:1096:604:21d::14) To OS3PR01MB6641.jpnprd01.prod.outlook.com (2603:1096:604:10b::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB6641:EE_|TY3PR01MB11797:EE_ X-MS-Office365-Filtering-Correlation-Id: d24c3dd0-e830-420b-257d-08db5b66b9e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /OUb7z6FWh6cORLxEFEkmovgP1WoJ6BiOD5NCLXfFzj7CA7bTs79jO/cc6QRRe0ZGQoMFrnvXLH5vdTErWXRaXvU/Yo1fN87ICZwoNUBd7JvXZinLEsj5ZjqcA7Rghvn/koU46bLgObzH/PGCBGzjXINKsbR2pKJg5awM+S7vFzuqjygUnjP/k/KnJJSx63cJoTJeKX1XdW/7xOBgW9xZZKOuNbwD9wJqOrHrGIlfUcQf0aNMZ2LrzmJ51AsZ1EiVH4UrrgN0poDyTF/2vTJob47o4JaMnfu2bh65pkOSwBlxKJqYjGnaYU+UvdemsjBlwOmb4W+1/PbUnmHG2k8ZkAPA35UiV9xr1FTdoLTw7wEuKFjpdy4LA5jAKtFiphCI+qw9WdcWG5Vnz3fUYZCMII/q7/vwMDeNCyZpHeq5hLQXaafQrOW1jW0f8rZmxqWhEMbM3mqZCI/Att9ZC90HeDhigyfVeTTqFz9yT7tqnAZZp0zBY2klOO67qrda85/q/UYfOdXjyRRE9R+PSG9CZ3S2La62huW2WmU0Vxd+Fb+bKNeR5lfNCjnMwscV0oNoz8/Iy6bcs4Z4VBsxoRLHDkMzy+nrx2OwO2zrrgaVPA76Hz47wp3tZstsFZdURSv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB6641.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(366004)(136003)(396003)(376002)(39860400002)(451199021)(107886003)(6512007)(8676002)(8936002)(83380400001)(103116003)(38350700002)(38100700002)(86362001)(6506007)(2616005)(2906002)(41300700001)(52116002)(66946007)(66556008)(66476007)(4326008)(316002)(6666004)(6486002)(5660300002)(26005)(186003)(1076003)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 69l7xOLyJfplMESNRJMD+muoJUvTgxDaICVK7DiBDOtyq7ujXmfUXBsz1PrZKGAten+oBeJv4yehExde69gkrcFqhf8QE69N6j1/SH+w8eD2p25DZs3sAty7jfjj9TdfaOPssVOYFkTIAJXrfb5vpDbJvOctD14Gb5TzogjmtUGjxAQkou20ywfohHAgxXrBtV8Gs70t7ovfszdGz+QlGxLQ7/HSMc6WfUaIhKWhuzXa8UJ5+d5FyNCP9gwTwdBIMIoHqCSkGB3E6gwvsaigIhr3U/PkJrveMsL0r197XjGYdtHvjkv6wWmB5sR1692cXFwPfCKzm3UriqJFvzBWoN+aI1IXMBEu0DNMdB2tWKGvJjtHA3b910+uHT1hTBxcRR4JU5yD2i4DCWalS0ajcfOi8ERG5Z5W1nPhvWlzQ24+7BBoR+Lgb+T1BSY5kv9l49eVEPZ/e7fNBxmBdWG4iG1p1JV5HlMfY4YBFAH554yraUlL/YFJcNq9ycq6v9HRvr1yJyjjqBvhTI2EEv9QMFqgfh5VbpwB3qkGUH9bmjWWxEwznloIR+PfC3MyXPqRB+4cSeAxeAGP6aSncLixB8G10HWvKi3qw86HUq49nj8yYLcRNFakjwbk+Piuu6KdXkuNgObXOhE2yDm0z6csu+5ZNTVqKBrMlbZYbmO0p3qQ69uQ9R4mTrjy/fJ5VE/hWqkipNtE3LZ+qmMuKWXhctqC5V86hwtcTR5jcEHV7bQRq49J9jNEKUbNUnLF5msLGpt4XZS14LXvPgjKbVN+2LoHZUOtLNDME67lYBwWUnZxmBkn3fHnBmp0H7ycg8wXXqJuwkn5BEEZ0FX3AB7lWGQKMNSYsqzvrSiL6FCmIJgH30CJ2YkcnPjUnQZqf6hvuRerDMvo8UAJye94AQJYlIZllA7r4LtKdk5nfX6Fs4NPHPwUQK/1VmHWZC24h3z13wo3ktvn5hjFtYOWVmjDCXGznALWNowUnWl3R0BZXt7QW2+Se6ucJ+fOaKB44JdSUBraAgqCKBloyJ6tII6Nlv0Lt+EntYLBk/p3oDePILFsPrwk+mMqwG031Ly1d6hhjk3SYTUCFZV9Jd+OI/muFrY7JhUrTwQvj3yrSaBoMOLKOBTqUBuX3rKGbjYw+2GVJK5hAEa22Z2s8bfaoXeQdzH7j3dquiRbFgpR0nPFSf72urirAcdUpD9r26dAwNvbBHH9Jf94IPt40O7SSAark10Jm1zsZACmyYYw6vCEm3P0IFxqDpn5K1OXvQDEErRHkMqawkNPw6x5ZGGcNaaEFiMarlobQ4GlZvdRZbx5XYYZuHkXQXuQSeQbMoQhzs/ZSALGjFkbwKViakY7DgUZsA/rptOAYzsLfPb3LXmviGi6XQNWTqqpSb2/uRwC9sG14QEuLbeIdtGnz4tkHicwzaTFojHmcXe8n2vkuljNkqrbhMkJ1W3jeWnuaRlgNqnX6ppQppwWGwuSYUOugf7F131bIk0cL/85sHzfWSDk23SqsGhWC4JDUb6bzHkA/ytfKR2oRgdPf0jfpMtD3/rZfVbTaJzUZXhQ/PLNRdc1AGKdsT1DemBvO4fUoo69zY9192D7wXn3WonDrAR5gb0UuA== X-OriginatorOrg: dm.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d24c3dd0-e830-420b-257d-08db5b66b9e5 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB6641.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 08:21:36.8958 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Pz+koEk3D3wq4Hi80vuhD7xrre3SaFMbmi5WRcddSYNHT7IvJBccGvEX4T7FZEQgwWg6U6PKPsh0rduWWC5b0MwAA21k98pSaBtak7lhWCM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11797 Message-ID-Hash: E364G3OOX56SYBL4ZD6ELEHFOTZY3JVR X-Message-ID-Hash: E364G3OOX56SYBL4ZD6ELEHFOTZY3JVR X-MailFrom: David.Rau.opensource@dm.renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add `dlg,jack-ins-det-pty` property for Jack insertion detection polarity selection. Signed-off-by: David Rau Signed-off-by: David Rau --- Documentation/devicetree/bindings/sound/dialog,da7219.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/dialog,da7219.yaml b/Documentation/devicetree/bindings/sound/dialog,da7219.yaml index 9160f68696dd..bb5af48ab1e1 100644 --- a/Documentation/devicetree/bindings/sound/dialog,da7219.yaml +++ b/Documentation/devicetree/bindings/sound/dialog,da7219.yaml @@ -122,6 +122,12 @@ properties: Debounce time for jack insertion (ms). $ref: /schemas/types.yaml#/definitions/uint32 + dlg,jack-ins-det-pty: + enum: ["low", "high"] + description: + Polarity for jack insertion detection. + $ref: /schemas/types.yaml#/definitions/string + dlg,jack-det-rate: enum: ["32_64", "64_128", "128_256", "256_512"] description: @@ -215,6 +221,7 @@ examples: dlg,btn-cfg = <50>; dlg,mic-det-thr = <500>; dlg,jack-ins-deb = <20>; + dlg,jack-ins-det-pty = "low"; dlg,jack-det-rate = "32_64"; dlg,jack-rem-deb = <1>;