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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E681CC433FE for ; Wed, 29 Dec 2021 09:48:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239592AbhL2JsY (ORCPT ); Wed, 29 Dec 2021 04:48:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239583AbhL2JsV (ORCPT ); Wed, 29 Dec 2021 04:48:21 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34ED6C06173F for ; Wed, 29 Dec 2021 01:48:21 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id e5so43330399wrc.5 for ; Wed, 29 Dec 2021 01:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=qDjeeN3tJDfEtNHA+qox/w/ruHonloY7pzva49iuuV8=; b=zfN/b52ioOu7Frnptm6a5ZNVSxOmqgvktKzC416jd1tSZyiJJWUi/HQyso2Ve09x/Z hP9K0rDFh+nrQ864maLONXTMklb2VvWmK5Qi3jUOTHVmW+Achdn15c29ej5Yxb6cmQ7X xA1UGAoVd0wlMUp7JyAJY/YX6uUMG04odilT08pwzQCAqHAvVEzh1MBViNtt3VSqbvaz EKDWKzPe5cJ6IyKNcU1oJ95NUlBVmfJ50CIkw7+4JWIgsTSiYmJzF/4syYPR89iEgsBU Zx4FS9Tk+x/Ast2z/KiG5jknk7ObPLBByGBSmUKMKDmLmVfN8CUn1SosCxw9DU4eYN7O Lr1Q== 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:content-transfer-encoding :in-reply-to; bh=qDjeeN3tJDfEtNHA+qox/w/ruHonloY7pzva49iuuV8=; b=13U1zS1AokTn0BXo2GCWMRuX5yu2+eUcnZYF8kUwuCrtSjCgFDzq3t+jYE3gSCgyd1 8u3HcyhDd0gVNhU6qXu3TAD60J+QKvdD6b1LkKc76DNcMLNH6pqwYsIgSDJDDfjMoyt8 O1O06nO1PKkYyMMxC4qlRUsBQ9KhCnCjbYO5upiox4G4gExsRN5QRdK1JOqEa1G1s5AT 8r0s2W5TBHnd/HEJQF+wXh8aWljdv/5nZ/mqdkDuZxqQIveOlSazaIDRuQpIHKEM36pu E4gGkDL64DTb4CZ5arMCBWK1nxdlALQEgsTzIdGuCRwzN/zDSpzPUjgZ9/rhb8ShGA0e Buaw== X-Gm-Message-State: AOAM532R1D7ZGkboh9VP4txBtwv7pkh/+bxVM2PCJfA8HfGgLEalMYg4 kbDiQs6tepw7CL7E2Pymjh9uHA== X-Google-Smtp-Source: ABdhPJyZ2LPZGESrGM/hMEjjdXwayJMclO1dHfAudAX6sp6XX6ZnA4E+IdOUkZNCkNoK5I5P44o4Kg== X-Received: by 2002:a05:6000:1861:: with SMTP id d1mr20103423wri.338.1640771299663; Wed, 29 Dec 2021 01:48:19 -0800 (PST) Received: from google.com ([2.31.167.18]) by smtp.gmail.com with ESMTPSA id m17sm25076495wms.25.2021.12.29.01.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Dec 2021 01:48:19 -0800 (PST) Date: Wed, 29 Dec 2021 09:48:17 +0000 From: Lee Jones To: David Heidelberg Cc: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , ~okias/devicetree@lists.sr.ht, Caleb Connolly , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: mfd: convert to yaml Qualcomm SPMI PMIC Message-ID: References: <20211227215433.114426-1-david@ixit.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211227215433.114426-1-david@ixit.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Dec 2021, David Heidelberg wrote: > From: Caleb Connolly > > Convert Qualcomm SPMI PMIC binding to yaml format. > > Additional changes: > - filled many missing compatibles > > Co-developed-by: David Heidelberg > Signed-off-by: David Heidelberg I must admit, I'm a bit hazy on the details, but this looks odd to me. Shouldn't this have Caleb's SoB too? Also, if you apply your SoB, I'm not sure you also need to apply a CDB as well? > --- > depends on patch "arm64: dts: qcom: pms405: assign device specific compatible" > --- > .../bindings/mfd/qcom,spmi-pmic.txt | 93 ----------- > .../bindings/mfd/qcom,spmi-pmic.yaml | 152 ++++++++++++++++++ > 2 files changed, 152 insertions(+), 93 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt > create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt > deleted file mode 100644 > index 3810a80536f7..000000000000 > --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt > +++ /dev/null > @@ -1,93 +0,0 @@ > - Qualcomm SPMI PMICs multi-function device bindings > - > -The Qualcomm SPMI series presently includes PM8941, PM8841 and PMA8084 > -PMICs. These PMICs use a QPNP scheme through SPMI interface. > -QPNP is effectively a partitioning scheme for dividing the SPMI extended > -register space up into logical pieces, and set of fixed register > -locations/definitions within these regions, with some of these regions > -specifically used for interrupt handling. > - > -The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are > -interfaced to the chip via the SPMI (System Power Management Interface) bus. > -Support for multiple independent functions are implemented by splitting the > -16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes > -each. A function can consume one or more of these fixed-size register regions. > - > -Required properties: > -- compatible: Should contain one of: > - "qcom,pm660", > - "qcom,pm660l", > - "qcom,pm7325", > - "qcom,pm8004", > - "qcom,pm8005", > - "qcom,pm8019", > - "qcom,pm8028", > - "qcom,pm8110", > - "qcom,pm8150", > - "qcom,pm8150b", > - "qcom,pm8150c", > - "qcom,pm8150l", > - "qcom,pm8226", > - "qcom,pm8350c", > - "qcom,pm8841", > - "qcom,pm8901", > - "qcom,pm8909", > - "qcom,pm8916", > - "qcom,pm8941", > - "qcom,pm8950", > - "qcom,pm8994", > - "qcom,pm8998", > - "qcom,pma8084", > - "qcom,pmd9635", > - "qcom,pmi8950", > - "qcom,pmi8962", > - "qcom,pmi8994", > - "qcom,pmi8998", > - "qcom,pmk8002", > - "qcom,pmk8350", > - "qcom,pmr735a", > - "qcom,smb2351", > - or generalized "qcom,spmi-pmic". > -- reg: Specifies the SPMI USID slave address for this device. > - For more information see: > - Documentation/devicetree/bindings/spmi/spmi.yaml > - > -Required properties for peripheral child nodes: > -- compatible: Should contain "qcom,xxx", where "xxx" is a peripheral name. > - > -Optional properties for peripheral child nodes: > -- interrupts: Interrupts are specified as a 4-tuple. For more information > - see: > - Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.yaml > -- interrupt-names: Corresponding interrupt name to the interrupts property > - > -Each child node of SPMI slave id represents a function of the PMIC. In the > -example below the rtc device node represents a peripheral of pm8941 > -SID = 0. The regulator device node represents a peripheral of pm8941 SID = 1. > - > -Example: > - > - spmi { > - compatible = "qcom,spmi-pmic-arb"; > - > - pm8941@0 { > - compatible = "qcom,pm8941", "qcom,spmi-pmic"; > - reg = <0x0 SPMI_USID>; > - > - rtc { > - compatible = "qcom,rtc"; > - interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; > - interrupt-names = "alarm"; > - }; > - }; > - > - pm8941@1 { > - compatible = "qcom,pm8941", "qcom,spmi-pmic"; > - reg = <0x1 SPMI_USID>; > - > - regulator { > - compatible = "qcom,regulator"; > - regulator-name = "8941_boost"; > - }; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml > new file mode 100644 > index 000000000000..11aa2c61eded > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml > @@ -0,0 +1,152 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm SPMI PMICs multi-function device > + > +description: | > + Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced > + to the chip via the SPMI (System Power Management Interface) bus. > + Support for multiple independent functions are implemented by splitting the > + 16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes > + each. A function can consume one or more of these fixed-size register regions. > + > + The Qualcomm SPMI series includes the PM8941, PM8841, PMA8084, PM8998 and other > + PMICs. These PMICs use a "QPNP" scheme through SPMI interface. > + QPNP is effectively a partitioning scheme for dividing the SPMI extended > + register space up into logical pieces, and set of fixed register > + locations/definitions within these regions, with some of these regions > + specifically used for interrupt handling. > + > +maintainers: > + - Stephen Boyd > + > +properties: > + compatible: > + items: > + - enum: > + - qcom,pm660 > + - qcom,pm660l > + - qcom,pm6150 > + - qcom,pm6150l > + - qcom,pm6350 > + - qcom,pm7325 > + - qcom,pm8004 > + - qcom,pm8005 > + - qcom,pm8009 > + - qcom,pm8019 > + - qcom,pm8110 > + - qcom,pm8150 > + - qcom,pm8150b > + - qcom,pm8150l > + - qcom,pm8226 > + - qcom,pm8350 > + - qcom,pm8350b > + - qcom,pm8350c > + - qcom,pm8841 > + - qcom,pm8909 > + - qcom,pm8916 > + - qcom,pm8941 > + - qcom,pm8950 > + - qcom,pm8994 > + - qcom,pm8998 > + - qcom,pma8084 > + - qcom,pmd9635 > + - qcom,pmi8950 > + - qcom,pmi8962 > + - qcom,pmi8994 > + - qcom,pmi8998 > + - qcom,pmk8350 > + - qcom,pmm8155au > + - qcom,pmr735a > + - qcom,pmr735b > + - qcom,pms405 > + - qcom,smb2351 > + - const: qcom,spmi-pmic > + > + reg: true > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + > +patternProperties: > + $nodename: > + pattern: '^pmic@.*$' > + > + '(labibb|([a-z][a-z0-9]+-)?regulators)': > + type: object > + > + required: > + - compatible > + > + '@[0-9a-f]+$': > + type: object > + description: > > + Each child node of the PMIC represents a function of it. > + > + properties: > + interrupts: > + description: > > + Interrupts are specified as a 4-tuple. For more information see > + Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.yaml > + > + interrupt-names: true > + > + required: > + - compatible > + > + additionalProperties: true > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + spmi@c440000 { > + compatible = "qcom,spmi-pmic-arb"; > + reg = <0x0c440000 0x1100>, > + <0x0c600000 0x2000000>, > + <0x0e600000 0x100000>, > + <0x0e700000 0xa0000>, > + <0x0c40a000 0x26000>; > + reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; > + interrupt-names = "periph_irq"; > + interrupts = ; > + qcom,ee = <0>; > + qcom,channel = <0>; > + #address-cells = <2>; > + #size-cells = <0>; > + interrupt-controller; > + #interrupt-cells = <4>; > + cell-index = <0>; > + > + pmi8998_lsid0: pmic@2 { > + compatible = "qcom,pmi8998", "qcom,spmi-pmic"; > + reg = <0x2 SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + pmi8998_gpio: gpios@c000 { > + compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; > + reg = <0xc000>; > + gpio-controller; > + gpio-ranges = <&pmi8998_gpio 0 0 14>; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + }; > + }; -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog