From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="c+HI7W2z" Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF7C41AD for ; Thu, 7 Dec 2023 00:43:48 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54d0ae6cf20so958818a12.0 for ; Thu, 07 Dec 2023 00:43:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701938627; x=1702543427; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RJsI1iyVrzkD4HE017Pl+ikJ/8c50MiFk/XRDKW8Bao=; b=c+HI7W2zzxmytyoUq6ghNTdussr0A8hv0aNNUyS9xjcbLNMhtSymK6FiOWIh2B8PS0 V5QLlrQoHBep2kbkbjSpT5PqNnOzcU54qaMFFmlYSGA5pQNgHW8YjanPIjZ0Zag1tEMD tqFoWeJnMs/apRn7viDE0ZFspWpmZt8HhSliW4eHxnp+jtNI17RNvcVWG7rsnj3bAo4A tjNV7h5idKXM9yKac8VqTGPiizlxDXQhW7irDOdRSEXcyFekLIA6qM94VqVWve0H2pCA AFoXFWZ3lDYai2iGdm0/q/xxxzOHNdsiwS+loALs0NZbmRbT3xglk9XSorN0mpd9Air+ mIsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701938627; x=1702543427; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RJsI1iyVrzkD4HE017Pl+ikJ/8c50MiFk/XRDKW8Bao=; b=W2ohTW4YODDMd+pg04h9j2SLRyHQhSJyDvJBszuthbHTD5CXEiT+iOpCQ1Wg42Cto7 8DcTFWPr0pmig9Xex3kN/CY1n5eC0oyVycWXNqrilZMydEdzJZ/FxTUCW70BILhR5Kfe I56FLVxNUNdlGqW2Rp3TeySIuX+p9u2blR2k/EoDWDLTXu06TiFkmTOgoS8z+dZBLx5C J7VMUjpf0TRJdLwIUp1MGgR++E7aDgTBK718g8YaeOADa0y+zwWFjstywcxJ0W6ptO7r EZiVtmyJRJTBBpOZr1NuXI8o8LaS3brd4cCSGvYODd7AkCe6aPcNRBrET2h5m7k8sV1Y QnHg== X-Gm-Message-State: AOJu0Yyj5IYjftsFeUysdlDFkfxHpuVhT9K1jYiIjDVsEB6szzgWlDhc GphIrJd/vMUTfjmu5NvNiwG2Xw== X-Google-Smtp-Source: AGHT+IGXAZfmHKuPnV3Z3Iqo8Tq3e9H4qHa638hZCzYhQXfJC2C4Gu3E0ImYKDSx09n2Ncmvvb3rnQ== X-Received: by 2002:a17:906:81c2:b0:a19:a1ba:da49 with SMTP id e2-20020a17090681c200b00a19a1bada49mr1467077ejx.112.1701938627315; Thu, 07 Dec 2023 00:43:47 -0800 (PST) Received: from [192.168.1.20] ([178.197.218.27]) by smtp.gmail.com with ESMTPSA id ov3-20020a170906fc0300b00a1c76114fcesm516299ejb.218.2023.12.07.00.43.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Dec 2023 00:43:46 -0800 (PST) Message-ID: <114c9baf-66d1-4055-a47c-916642b6dedd@linaro.org> Date: Thu, 7 Dec 2023 09:43:44 +0100 Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 8/8] dt-bindings: mfd: dlg,da9063: Convert da9062 to json-schema Content-Language: en-US To: Biju Das , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones Cc: Support Opensource , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Steve Twiss , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org References: <20231206155740.5278-1-biju.das.jz@bp.renesas.com> <20231206155740.5278-9-biju.das.jz@bp.renesas.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+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u4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20231206155740.5278-9-biju.das.jz@bp.renesas.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 06/12/2023 16:57, Biju Das wrote: > Convert the da9062 PMIC device tree binding documentation to json-schema. > > Update the example to match reality. > > While at it, update description with link to product information. > > Signed-off-by: Biju Das > --- > v3->v4: > * Split the thermal binding patch separate. > * Updated the description. > v2->v3: > * Fixed bot errors related to MAINTAINERS entry, invalid doc > references and thermal examples by merging patch#4. > v2: > * New patch > --- > .../bindings/input/dlg,da9062-onkey.yaml | 3 +- > .../devicetree/bindings/mfd/da9062.txt | 124 ------------ > .../devicetree/bindings/mfd/dlg,da9063.yaml | 186 +++++++++++++++++- > .../bindings/thermal/dlg,da9062-thermal.yaml | 2 +- > 4 files changed, 183 insertions(+), 132 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mfd/da9062.txt > > diff --git a/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml b/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml > index 4cff91f4bd34..18b6a3f02c07 100644 > --- a/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml > +++ b/Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml > @@ -11,8 +11,7 @@ maintainers: > > description: | > This module is part of the DA9061/DA9062/DA9063. For more details about entire > - DA9062 and DA9061 chips see Documentation/devicetree/bindings/mfd/da9062.txt > - For DA9063 see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml > + DA906{1,2,3} chips see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml > > This module provides the KEY_POWER event. > > diff --git a/Documentation/devicetree/bindings/mfd/da9062.txt b/Documentation/devicetree/bindings/mfd/da9062.txt > deleted file mode 100644 > index c8a7f119ac84..000000000000 > --- a/Documentation/devicetree/bindings/mfd/da9062.txt > +++ /dev/null > @@ -1,124 +0,0 @@ > -* Dialog DA9062 Power Management Integrated Circuit (PMIC) > - > -Product information for the DA9062 and DA9061 devices can be found here: > -- https://www.dialog-semiconductor.com/products/da9062 > -- https://www.dialog-semiconductor.com/products/da9061 > - > -The DA9062 PMIC consists of: > - > -Device Supply Names Description > ------- ------------ ----------- > -da9062-regulator : : LDOs & BUCKs > -da9062-rtc : : Real-Time Clock > -da9062-onkey : : On Key > -da9062-watchdog : : Watchdog Timer > -da9062-thermal : : Thermal > -da9062-gpio : : GPIOs > - > -The DA9061 PMIC consists of: > - > -Device Supply Names Description > ------- ------------ ----------- > -da9062-regulator : : LDOs & BUCKs > -da9062-onkey : : On Key > -da9062-watchdog : : Watchdog Timer > -da9062-thermal : : Thermal > - > -====== > - > -Required properties: > - > -- compatible : Should be > - "dlg,da9062" for DA9062 > - "dlg,da9061" for DA9061 > -- reg : Specifies the I2C slave address (this defaults to 0x58 but it can be > - modified to match the chip's OTP settings). > - > -Optional properties: > - > -- gpio-controller : Marks the device as a gpio controller. > -- #gpio-cells : Should be two. The first cell is the pin number and the > - second cell is used to specify the gpio polarity. > - > -See Documentation/devicetree/bindings/gpio/gpio.txt for further information on > -GPIO bindings. > - > -- interrupts : IRQ line information. > -- interrupt-controller > - > -See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for > -further information on IRQ bindings. > - > -Sub-nodes: > - > -- regulators : This node defines the settings for the LDOs and BUCKs. > - The DA9062 regulators are bound using their names listed below: > - > - buck1 : BUCK_1 > - buck2 : BUCK_2 > - buck3 : BUCK_3 > - buck4 : BUCK_4 > - ldo1 : LDO_1 > - ldo2 : LDO_2 > - ldo3 : LDO_3 > - ldo4 : LDO_4 > - > - The DA9061 regulators are bound using their names listed below: > - > - buck1 : BUCK_1 > - buck2 : BUCK_2 > - buck3 : BUCK_3 > - ldo1 : LDO_1 > - ldo2 : LDO_2 > - ldo3 : LDO_3 > - ldo4 : LDO_4 > - > - The component follows the standard regulator framework and the bindings > - details of individual regulator device can be found in: > - Documentation/devicetree/bindings/regulator/regulator.txt > - > - regulator-initial-mode may be specified for buck regulators using mode values > - from include/dt-bindings/regulator/dlg,da9063-regulator.h. > - > -- rtc : This node defines settings required for the Real-Time Clock associated > - with the DA9062. There are currently no entries in this binding, however > - compatible = "dlg,da9062-rtc" should be added if a node is created. > - > -- onkey : See ../input/dlg,da9062-onkey.yaml > - > -- watchdog: See ../watchdog/dlg,da9062-watchdog.yaml > - > -- thermal : See ../thermal/dlg,da9062-thermal.yaml > - > -Example: > - > - pmic0: da9062@58 { > - compatible = "dlg,da9062"; > - reg = <0x58>; > - interrupt-parent = <&gpio6>; > - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; > - interrupt-controller; > - > - rtc { > - compatible = "dlg,da9062-rtc"; > - }; > - > - regulators { > - DA9062_BUCK1: buck1 { > - regulator-name = "BUCK1"; > - regulator-min-microvolt = <300000>; > - regulator-max-microvolt = <1570000>; > - regulator-min-microamp = <500000>; > - regulator-max-microamp = <2000000>; > - regulator-initial-mode = ; > - regulator-boot-on; > - }; > - DA9062_LDO1: ldo1 { > - regulator-name = "LDO_1"; > - regulator-min-microvolt = <900000>; > - regulator-max-microvolt = <3600000>; > - regulator-boot-on; > - }; > - }; > - }; > - > diff --git a/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml b/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml > index 676b4f2566ae..54bb23dbc73f 100644 > --- a/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml > +++ b/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml > @@ -4,7 +4,7 @@ > $id: http://devicetree.org/schemas/mfd/dlg,da9063.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Dialog DA9063/DA9063L Power Management Integrated Circuit (PMIC) > +title: Dialog DA906{3L,3,2,1} Power Management Integrated Circuit (PMIC) > > maintainers: > - Steve Twiss > @@ -17,10 +17,17 @@ description: | > moment where all voltage monitors are disabled. Next, as da9063 only supports > UV *and* OV monitoring, both must be set to the same severity and value > (0: disable, 1: enable). > + Product information for the DA906{3L,3,2,1} devices can be found here: > + - https://www.dialog-semiconductor.com/products/da9063l > + - https://www.dialog-semiconductor.com/products/da9063 > + - https://www.dialog-semiconductor.com/products/da9062 > + - https://www.dialog-semiconductor.com/products/da9061 > > properties: > compatible: > enum: > + - dlg,da9061 > + - dlg,da9062 > - dlg,da9063 > - dlg,da9063l > > @@ -35,6 +42,19 @@ properties: > "#interrupt-cells": > const: 2 > > + gpio: Old binding did not have such node and nothing in commit msg explained changes from pure conversion. > + type: object > + $ref: /schemas/gpio/gpio.yaml# ?!? Why? First: It's always selected. Second, so you have two gpio controllers? And original binding had 0? Why this is not explained at all? Open the binding and look at its properties. > + unevaluatedProperties: false > + properties: > + compatible: > + const: dlg,da9062-gpio > + > + gpio-controller: true And here is the second gpio-controller... > + > + "#gpio-cells": > + const: 2 > + > onkey: > $ref: /schemas/input/dlg,da9062-onkey.yaml > > @@ -42,7 +62,7 @@ properties: > type: object > additionalProperties: false > patternProperties: > - "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": > + "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck[1-4])$": > $ref: /schemas/regulator/regulator.yaml > unevaluatedProperties: false > > @@ -52,7 +72,12 @@ properties: > unevaluatedProperties: false > properties: > compatible: > - const: dlg,da9063-rtc > + enum: > + - dlg,da9063-rtc > + - dlg,da9062-rtc > + > + thermal: > + $ref: /schemas/thermal/dlg,da9062-thermal.yaml > > watchdog: > $ref: /schemas/watchdog/dlg,da9062-watchdog.yaml > @@ -60,8 +85,65 @@ properties: > required: > - compatible > - reg > - - interrupts > - - interrupt-controller > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - dlg,da9063 > + - dlg,da9063l > + then: > + properties: > + thermal: false > + gpio: false > + gpio-controller: false > + "#gpio-cells": false > + regulators: > + patternProperties: > + "^buck[1-4]$": false > + required: > + - interrupts > + - interrupt-controller > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - dlg,da9062 > + then: > + properties: > + regulators: > + patternProperties: > + "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": false > + required: > + - gpio > + - onkey > + - rtc > + - thermal > + - watchdog > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - dlg,da9061 > + then: > + properties: > + gpio: false > + gpio-controller: false > + "#gpio-cells": false > + regulators: > + patternProperties: > + "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck4)$": false > + rtc: false > + required: > + - onkey > + - thermal > + - watchdog > > additionalProperties: false > > @@ -118,4 +200,98 @@ examples: > }; > }; > }; > + > + - | > + #include > + #include > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + pmic@58 { > + compatible = "dlg,da9062"; > + reg = <0x58>; > + #interrupt-cells = <2>; > + interrupt-parent = <&gpio1>; > + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; > + interrupt-controller; > + > + gpio { > + compatible = "dlg,da9062-gpio"; > + status = "disabled"; Why? Where are gpio-controller and cells? For this node and for parent? Why this example is incomplete? > + }; > + > + onkey { > + compatible = "dlg,da9062-onkey"; > + }; Best regards, Krzysztof