Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1098829pxb; Thu, 4 Mar 2021 03:18:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJynBlpVE3v7BtJJlhhZYSEZmjkEMHLVSoOvBFlMCiVa5LW4Kv28eFF9zqBpMyWwQC+rF7Jj X-Received: by 2002:a17:906:684b:: with SMTP id a11mr3495572ejs.329.1614856686562; Thu, 04 Mar 2021 03:18:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614856686; cv=none; d=google.com; s=arc-20160816; b=DuufpPRMCDjD6lKUPjQlRJ7fZR42rZZCliTaWyycAMQNAF+L8mKVaSDHwf4zMM/OPl 72cn/5E99VIsD11QKK2IVTt2qZvrtFbnym2Nsv01z1xLzJQJoqcW80XZmXFBPYOdGpBo 23DXOM7k1DDDkWFH9Ak1XSvMsKp1TkCBocLXEztgvghmDOyvx7spm5KJuRbRaRS6rJI2 l5+IdeRnTatrhm3SouIS+5C7D/Y3aXaU0rpBdAyOzwQ6oNnfYnsBdZk5DWIXxBspJyFw fxJj3jW6hZOLwVLX8E0Ol4ZAC1KU5CKbKillE8dMSyAqJwRYL+uCJixVppiPSpqWwr9s gI1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=Pg9UcnXmNNJDfqbP+jEVxc2qlx2KGMB67XjQuDCqIh8=; b=TGNmGZvR9LyglTiX9v7Hhpyj79PxTE4mJVt9guWB/FpqzZCkx8xRAluY+8TGHv8GRQ ssblOGDdN7nGXDFLfr34bgVIpfrjbYJCeeZL1ilupajOe5Sepu5xphG3YkGQKl5FObwA mDCBWvTyZe548jA0M/JjeSquo7bmKaYrM/3LiPjLDMAIEKW0d9WLvEKGGzn0b5jlg2Jh DVaBFItPErSJO00Nz+qynlIhUG+J0o8+aUrb8esjqUI58hWEqSEt75zksigqCtu7V4mM M28AfmOiINhKkzW5R4SvUC/nTmims3EJwZQmcdeq4s77VMyDQHYqme0RQVkmUww8DSIO jOkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=F6GtZzCb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si17324572ejr.574.2021.03.04.03.17.43; Thu, 04 Mar 2021 03:18:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=F6GtZzCb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1576052AbhCCR75 (ORCPT + 99 others); Wed, 3 Mar 2021 12:59:57 -0500 Received: from m42-2.mailgun.net ([69.72.42.2]:56321 "EHLO m42-2.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242548AbhCCOz4 (ORCPT ); Wed, 3 Mar 2021 09:55:56 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1614783268; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=Pg9UcnXmNNJDfqbP+jEVxc2qlx2KGMB67XjQuDCqIh8=; b=F6GtZzCbsm8pCRC6BkLMsWdYepwMnTzPeILi1AO1stnL8/YXUSi+PwPPIHgSZ4CYIRc3k9El fc+Alb8daxIQxMZkOqhl17RQZPX0s/FujdhJpicKBC0Nji2cJYgBBJdFhmvS6GpGYhUtUkCj ApovQBEHuQNgW/wbb90fTafzyuk= X-Mailgun-Sending-Ip: 69.72.42.2 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 603fa30364e0747df9ec69d0 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 03 Mar 2021 14:53:55 GMT Sender: skakit=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9ADD9C433C6; Wed, 3 Mar 2021 14:53:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: skakit) by smtp.codeaurora.org (Postfix) with ESMTPSA id F090FC433CA; Wed, 3 Mar 2021 14:53:53 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 03 Mar 2021 20:23:53 +0530 From: skakit@codeaurora.org To: Rob Herring Cc: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rajendra Nayak , linux-arm-msm , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Kiran Gunda Subject: Re: [PATCH 1/7] dt-bindings: regulator: Convert regulator bindings to YAML format In-Reply-To: References: <1614155592-14060-1-git-send-email-skakit@codeaurora.org> <1614155592-14060-2-git-send-email-skakit@codeaurora.org> Message-ID: <6fd80f9c8d36deee7ed36f9dab5ad5c1@codeaurora.org> X-Sender: skakit@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Thanks for reviewing the patch! >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: >> http://devicetree.org/schemas/regulator/qcom,rpmh-regulator.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm Technologies, Inc. RPMh Regulators >> + >> +maintainers: >> + - David Collins >> + >> +description: > > I assume you want the formatting here maintained, so you need a '|' at > the end. > Ok. >> + rpmh-regulator devices support PMIC regulator management via the >> Voltage >> + Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh >> accelerators. The APPS >> + processor communicates with these hardware blocks via a Resource >> State >> + Coordinator (RSC) using command packets. The VRM allows changing >> three >> + parameters for a given regulator, enable state, output voltage, >> and operating >> + mode. The XOB allows changing only a single parameter for a >> given regulator, >> + its enable state. Despite its name, the XOB is capable of >> controlling the >> + enable state of any PMIC peripheral. It is used for clock >> buffers, low-voltage >> + switches, and LDO/SMPS regulators which have a fixed voltage and >> mode. >> + >> + ======================= >> + Required Node Structure >> + ======================= >> + >> + RPMh regulators must be described in two levels of device nodes. >> The first >> + level describes the PMIC containing the regulators and must >> reside within an >> + RPMh device node. The second level describes each regulator >> within the PMIC >> + which is to be used on the board. Each of these regulators maps >> to a single >> + RPMh resource. >> + >> + The names used for regulator nodes must match those supported by >> a given PMIC. >> + Supported regulator node names are >> + For PM8005, smps1 - smps4 >> + For PM8009, smps1 - smps2, ldo1 - ldo7 >> + For PM8150, smps1 - smps10, ldo1 - ldo18 >> + For PM8150L, smps1 - smps8, ldo1 - ldo11, bob, flash, rgb > > flash and rgb aren't documented. > Ok will add them. >> + For PM8350, smps1 - smps12, ldo1 - ldo10 >> + For PM8350C, smps1 - smps10, ldo1 - ldo13, bob >> + For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2 >> + For PMI8998, bob >> + For PM6150, smps1 - smps5, ldo1 - ldo19 >> + For PM6150L, smps1 - smps8, ldo1 - ldo11, bob >> + For PMX55, smps1 - smps7, ldo1 - ldo16 >> + >> +properties: >> + compatible: >> + enum: >> + - qcom,pm8005-rpmh-regulators >> + - qcom,pm8009-rpmh-regulators >> + - qcom,pm8009-1-rpmh-regulators >> + - qcom,pm8150-rpmh-regulators >> + - qcom,pm8150l-rpmh-regulators >> + - qcom,pm8350-rpmh-regulators >> + - qcom,pm8350c-rpmh-regulators >> + - qcom,pm8998-rpmh-regulators >> + - qcom,pmi8998-rpmh-regulators >> + - qcom,pm6150-rpmh-regulators >> + - qcom,pm6150l-rpmh-regulators >> + - qcom,pmx55-rpmh-regulators >> + >> + qcom,pmic-id: >> + description: RPMh resource name suffix used for the >> regulators found on >> + this PMIC. Typical values are "a", "b", "c", >> "d", "e", "f". > > Sounds like constraints. Make the values a schema. > Ok >> + $ref: /schemas/types.yaml#/definitions/string >> + >> + qcom,always-wait-for-ack: >> + description: Boolean flag which indicates that the >> application processor >> + must wait for an ACK or a NACK from RPMh for >> every request >> + sent for this regulator including those which >> are for a >> + strictly lower power state. >> + $ref: /schemas/types.yaml#/definitions/string > > Boolean or string? > Ok, will change it to /schemas/types.yaml#/definitions/flag >> + >> +patternProperties: >> + ".*-supply$": > > You can drop '.*'. That's already the case without '^'. > Ok. > The supply names need to be defined. > you mean I should define like this "^vdd-s|l([0-9]+)-supply$": ? >> + description: phandle of the parent supply regulator of one or >> more of the >> + regulators for this PMIC. >> + >> + "^((smps|ldo|lvs)[0-9]*)$": > > s/*/+/ as 1 digit is always required, right? > ok >> + type: object >> + allOf: > > Don't need allOf. > ok, will drop this. >> + - $ref: "regulator.yaml#" >> + description: List of regulator parent supply phandles > > This is a node, not a list of phandles. > Okay. >> + >> + "bob$": > > 'foobob' is okay as that would be allowed? If a fixed string, put > under 'properties'. > It is fixed string, will move it to properties. >> + type: object >> + allOf: >> + - $ref: "regulator.yaml#" >> + description: BOB regulator parent supply phandle >> + >> +additionalProperties: false >> + >> +required: >> + - compatible >> + - qcom,pmic-id >> + >> +examples: >> + - | >> + #include >> + >> + pm8998-rpmh-regulators { >> + compatible = "qcom,pm8998-rpmh-regulators"; >> + qcom,pmic-id = "a"; >> + >> + vdd-l7-l12-l14-l15-supply = <&pm8998_s5>; >> + >> + smps2 { >> + regulator-min-microvolt = <1100000>; >> + regulator-max-microvolt = <1100000>; >> + }; >> + >> + pm8998_s5: smps5 { > > Drop unused labels. > Okay. >> + regulator-min-microvolt = <1904000>; >> + regulator-max-microvolt = <2040000>; >> + }; >> + >> + ldo7 { >> + regulator-min-microvolt = <1800000>; >> + regulator-max-microvolt = <1800000>; >> + regulator-initial-mode = ; >> + regulator-allowed-modes = >> + > + RPMH_REGULATOR_MODE_HPM>; >> + regulator-allow-set-load; >> + }; >> + >> + lvs1 { >> + regulator-min-microvolt = <1800000>; >> + regulator-max-microvolt = <1800000>; >> + }; >> + }; >> + >> + pmi8998-rpmh-regulators { >> + compatible = "qcom,pmi8998-rpmh-regulators"; >> + qcom,pmic-id = "b"; >> + >> + bob { >> + regulator-min-microvolt = <3312000>; >> + regulator-max-microvolt = <3600000>; >> + regulator-allowed-modes = >> + > + RPMH_REGULATOR_MODE_HPM>; >> + regulator-initial-mode = ; >> + }; >> + }; >> +... >> -- >> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a >> member >> of Code Aurora Forum, hosted by The Linux Foundation >> Thanks, Satya Priya