Received: by 2002:a05:6a10:eb0a:0:0:0:0 with SMTP id hx10csp3393402pxb; Tue, 8 Mar 2022 18:22:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB9LgQGxWC8cGtr6T9GhHCjlbQOpeGT5RFnj+Ol1boKvhCaElGmDxtoHRmceZBf/LvLGYo X-Received: by 2002:a63:87c2:0:b0:380:93c6:e29a with SMTP id i185-20020a6387c2000000b0038093c6e29amr4453719pge.310.1646792560003; Tue, 08 Mar 2022 18:22:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646792559; cv=none; d=google.com; s=arc-20160816; b=0fdHjmZKdsA0EZ5lsOhCnbhv+Fl5PsfTpuT9xNWSOHU1EUDc84mltBHLKwN3Bz3gqK MJ5qzFDoMdlzOcSWMcit1CdQ60pY0fln9JR+XCZiWNQZbYwJ3xl055taZItgI9nZHK5I 1bh90HVFA2fPm4rYDKYKiYYoeoqXVZC8tN0SG8/epFZ31xlYlWGGUrEPdI4E2a5z8SEM KfVfm9Mdoqk3g6z9DiUKo6FwaAXjD+TZgDuq/r4rn/wJ6vcnWHp7o6U2V+bM2Ua9hgzY WeDTz/tOC8oL+wFIiyfkqiN5zKeM9G8Bs1T8sn+pLGrTGeIk9RaP8lnNUU4TeAjPfeRk tIZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=eX/AjvgUx7dimDDaqYJ1aR1sSqjm7p16ve0NHEEsMvQ=; b=ety16fUR73hQ/kLZjIRWWQu0TmwIZkptgjS64zIaVjfoWGS0TII2EgQrAwvRhmBiSI 7tTx20DwTIANcJTSLEdLbefwku7sQNOF/qLH+zv00HY4NOj1VqW8BWR76ilDKxhyENZ9 AmEaqPd1iunR+bsDLGiOg401mbMr0SXQR0ysFYO78Xs0t2JJUosGn7r41oyRKfUjAERs ldOF0ulShGXidtkHeIMZl2e92JWp/ICfCdZRFcipmwJ0JCXr/lhfHCwYrTmFYHngoBMd 3FxYHQrUMDr33uh0jXATSwz1Y5ya0QZQYmToIsVVGOk4c5F6QHKLHT1/rX6iDM+WGzXp 47ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o7-20020a17090ad24700b001bd14e01fb9si688582pjw.167.2022.03.08.18.22.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 18:22:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 32F0B3586E; Tue, 8 Mar 2022 17:23:51 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230257AbiCIBX4 (ORCPT + 99 others); Tue, 8 Mar 2022 20:23:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231937AbiCIBXn (ORCPT ); Tue, 8 Mar 2022 20:23:43 -0500 Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 777D0C7920; Tue, 8 Mar 2022 17:22:09 -0800 (PST) Received: by mail-oo1-f45.google.com with SMTP id y27-20020a4a9c1b000000b0032129651bb0so1161518ooj.2; Tue, 08 Mar 2022 17:22:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eX/AjvgUx7dimDDaqYJ1aR1sSqjm7p16ve0NHEEsMvQ=; b=8DiXPWtfA6N0nw3LJFI3yF6lCTbtE6bAFW46UWcnVdDC62DsieFCjDy6FTw4nbTiOT kMCuww4gSFN5sHqzI56Itbz1FdYeceU9TNMJ/rc8N/rvDe0lRZkS5NjFQDSfdcGruznz vycSyxQf2ppuxU1JbQmyHe+chS4iWoBl5SO02J4YUGgjgodHqWgIXGSqlkiRdiNS4U/J ztfmHZVsYsLpxkOnDQCfSCDeBQiP9tSkDDxwcyyRC8RGQ37kKRj1caBwRF4AJv5ablGY ugYB7PGWK6TPYZswzSwoKAam+nP5ZpxiUjHyd5qceOm8xHDrsDmEpLZ2vyvhL9d2QY22 FlSw== X-Gm-Message-State: AOAM532G3JHDQH9Twcx5ZwnrSDP/x5ElXGPphCNKInHWGds9IFQxXUjk VM9HznPfxx+mTXeGypZYNmC2S39M/w== X-Received: by 2002:a05:6870:32ce:b0:d9:a0ee:44b3 with SMTP id r14-20020a05687032ce00b000d9a0ee44b3mr4390721oac.142.1646788845214; Tue, 08 Mar 2022 17:20:45 -0800 (PST) Received: from rob (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id z192-20020a4a49c9000000b003213bf4bf0csm235322ooa.31.2022.03.08.17.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 17:20:44 -0800 (PST) Received: (nullmailer pid 1709815 invoked by uid 1000); Wed, 09 Mar 2022 01:20:43 -0000 Date: Tue, 8 Mar 2022 18:20:43 -0700 From: Rob Herring To: Lucas Tanure Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Rhodes Subject: Re: [PATCH v3 15/16] ASoC: dt-bindings: cs35l41: Document CS35l41 External Boost Message-ID: <20220309012043.GA1694603@robh.at.kernel.org> References: <20220308171730.454587-1-tanureal@opensource.cirrus.com> <20220308171730.454587-16-tanureal@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220308171730.454587-16-tanureal@opensource.cirrus.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 08, 2022 at 05:17:29PM +0000, Lucas Tanure wrote: > From: David Rhodes > > Document internal and external boost feature for ASoC CS35L41. > For internal boost the following properties are required: > - cirrus,boost-peak-milliamp > - cirrus,boost-ind-nanohenry > - cirrus,boost-cap-microfarad > > For external boost, the GPIO1 must be configured as output, > so the following properties are required: > - cirrus,gpio1-src-select = <1> > - cirrus,gpio1-output-enable > > Signed-off-by: David Rhodes > Signed-off-by: Lucas Tanure > --- > .../bindings/sound/cirrus,cs35l41.yaml | 44 +++++++++++++++++-- > 1 file changed, 41 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l41.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l41.yaml > index 3235702ce402..09b515924c59 100644 > --- a/Documentation/devicetree/bindings/sound/cirrus,cs35l41.yaml > +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l41.yaml > @@ -75,6 +75,19 @@ properties: > maximum: 3 > default: 2 > > + cirrus,boost-type: > + description: > + Configures the type of Boost being used. > + Internal boost requires boost-peak-milliamp, boost-ind-nanohenry and > + boost-cap-microfarad. > + External Boost must have GPIO1 as GPIO output. GPIO1 will be set high to > + enable boost voltage. > + 0 = Internal Boost > + 1 = External Boost > + $ref: "/schemas/types.yaml#/definitions/uint32" > + minimum: 0 > + maximum: 1 What does not present mean? Might be better to make this boolean depending on what you are trying to accomplish. > + > cirrus,gpio1-polarity-invert: > description: > Boolean which specifies whether the GPIO1 > @@ -131,9 +144,32 @@ required: > - compatible > - reg > - "#sound-dai-cells" > - - cirrus,boost-peak-milliamp > - - cirrus,boost-ind-nanohenry > - - cirrus,boost-cap-microfarad > + > +allOf: > + - if: > + properties: > + cirrus,boost-type: > + const: 0 Note that this will be true if cirrus,boost-type is not present. You probably want to add 'required'. > + then: > + required: > + - cirrus,boost-peak-milliamp > + - cirrus,boost-ind-nanohenry > + - cirrus,boost-cap-microfarad > + else: > + if: > + properties: > + cirrus,boost-type: > + const: 1 > + then: > + required: > + - cirrus,gpio1-output-enable > + - cirrus,gpio1-src-select > + properties: > + cirrus,boost-peak-milliamp: false > + cirrus,boost-ind-nanohenry: false > + cirrus,boost-cap-microfarad: false > + cirrus,gpio1-src-select: > + enum: [1] > > additionalProperties: false > > @@ -150,6 +186,8 @@ examples: > VA-supply = <&dummy_vreg>; > VP-supply = <&dummy_vreg>; > reset-gpios = <&gpio 110 0>; > + > + cirrus,boost-type = <0>; > cirrus,boost-peak-milliamp = <4500>; > cirrus,boost-ind-nanohenry = <1000>; > cirrus,boost-cap-microfarad = <15>; > -- > 2.35.1 > >