From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Rob Herring <robh@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
Javier Martinez Canillas <javier@dowhile0.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH 2/3] regulator: dt-bindings: maxim,max77802: Convert to dtschema
Date: Tue, 11 Jan 2022 17:43:21 +0100 [thread overview]
Message-ID: <a5feb8ad-e6af-0222-db07-eeaea184dbba@canonical.com> (raw)
In-Reply-To: <YdRoyQsABBGen54D@robh.at.kernel.org>
On 04/01/2022 16:33, Rob Herring wrote:
> On Tue, Dec 28, 2021 at 05:43:04PM +0100, Krzysztof Kozlowski wrote:
>> Convert the regulators of Maxim MAX77802 PMIC to DT schema format.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>> .../bindings/regulator/max77802.txt | 111 ----------------
>> .../bindings/regulator/maxim,max77802.yaml | 118 ++++++++++++++++++
>> 2 files changed, 118 insertions(+), 111 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/regulator/max77802.txt
>> create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/regulator/max77802.txt b/Documentation/devicetree/bindings/regulator/max77802.txt
>> deleted file mode 100644
>> index b82943d83677..000000000000
>> --- a/Documentation/devicetree/bindings/regulator/max77802.txt
>> +++ /dev/null
>> @@ -1,111 +0,0 @@
>> -Binding for Maxim MAX77802 regulators
>> -
>> -This is a part of device tree bindings of MAX77802 multi-function device.
>> -More information can be found in bindings/mfd/max77802.txt file.
>> -
>> -The MAX77802 PMIC has 10 high-efficiency Buck and 32 Low-dropout (LDO)
>> -regulators that can be controlled over I2C.
>> -
>> -Following properties should be present in main device node of the MFD chip.
>> -
>> -Optional properties:
>> -- inb1-supply: The input supply for BUCK1
>> -- inb2-supply: The input supply for BUCK2
>> -- inb3-supply: The input supply for BUCK3
>> -- inb4-supply: The input supply for BUCK4
>> -- inb5-supply: The input supply for BUCK5
>> -- inb6-supply: The input supply for BUCK6
>> -- inb7-supply: The input supply for BUCK7
>> -- inb8-supply: The input supply for BUCK8
>> -- inb9-supply: The input supply for BUCK9
>> -- inb10-supply: The input supply for BUCK10
>> -- inl1-supply: The input supply for LDO8 and LDO15
>> -- inl2-supply: The input supply for LDO17, LDO27, LDO30 and LDO35
>> -- inl3-supply: The input supply for LDO3, LDO5, LDO6 and LDO7
>> -- inl4-supply: The input supply for LDO10, LDO11, LDO13 and LDO14
>> -- inl5-supply: The input supply for LDO9 and LDO19
>> -- inl6-supply: The input supply for LDO4, LDO21, LDO24 and LDO33
>> -- inl7-supply: The input supply for LDO18, LDO20, LDO28 and LDO29
>> -- inl9-supply: The input supply for LDO12, LDO23, LDO25, LDO26, LDO32 and LDO34
>> -- inl10-supply: The input supply for LDO1 and LDO2
>> -
>> -Optional nodes:
>> -- regulators : The regulators of max77802 have to be instantiated
>> - under subnode named "regulators" using the following format.
>> -
>> - regulator-name {
>> - standard regulator constraints....
>> - };
>> - refer Documentation/devicetree/bindings/regulator/regulator.txt
>> -
>> -The regulator node name should be initialized with a string to get matched
>> -with their hardware counterparts as follow. The valid names are:
>> -
>> - -LDOn : for LDOs, where n can lie in ranges 1-15, 17-21, 23-30
>> - and 32-35.
>> - example: LDO1, LDO2, LDO35.
>> - -BUCKn : for BUCKs, where n can lie in range 1 to 10.
>> - example: BUCK1, BUCK5, BUCK10.
>> -
>> -The max77802 regulator supports two different operating modes: Normal and Low
>> -Power Mode. Some regulators support the modes to be changed at startup or by
>> -the consumers during normal operation while others only support to change the
>> -mode during system suspend. The standard regulator suspend states binding can
>> -be used to configure the regulator operating mode.
>> -
>> -The regulators that support the standard "regulator-initial-mode" property,
>> -changing their mode during normal operation are: LDOs 1, 3, 20 and 21.
>> -
>> -The possible values for "regulator-initial-mode" and "regulator-mode" are:
>> - 1: Normal regulator voltage output mode.
>> - 3: Low Power which reduces the quiescent current down to only 1uA
>> -
>> -The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h
>> -header and can be included by device tree source files.
>> -
>> -The standard "regulator-mode" property can only be used for regulators that
>> -support changing their mode to Low Power Mode during suspend. These regulators
>> -are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has
>> -been enabled for the given suspend state using "regulator-on-in-suspend" and
>> -has not been disabled for that state using "regulator-off-in-suspend".
>> -
>> -Example:
>> -
>> - max77802@9 {
>> - compatible = "maxim,max77802";
>> - interrupt-parent = <&wakeup_eint>;
>> - interrupts = <26 0>;
>> - reg = <0x09>;
>> - #address-cells = <1>;
>> - #size-cells = <0>;
>> -
>> - inb1-supply = <&parent_reg>;
>> -
>> - regulators {
>> - ldo1_reg: LDO1 {
>> - regulator-name = "vdd_1v0";
>> - regulator-min-microvolt = <1000000>;
>> - regulator-max-microvolt = <1000000>;
>> - regulator-always-on;
>> - regulator-initial-mode = <MAX77802_OPMODE_LP>;
>> - };
>> -
>> - ldo11_reg: LDO11 {
>> - regulator-name = "vdd_ldo11";
>> - regulator-min-microvolt = <1900000>;
>> - regulator-max-microvolt = <1900000>;
>> - regulator-always-on;
>> - regulator-state-mem {
>> - regulator-on-in-suspend;
>> - regulator-mode = <MAX77802_OPMODE_LP>;
>> - };
>> - };
>> -
>> - buck1_reg: BUCK1 {
>> - regulator-name = "vdd_mif";
>> - regulator-min-microvolt = <950000>;
>> - regulator-max-microvolt = <1300000>;
>> - regulator-always-on;
>> - regulator-boot-on;
>> - };
>> - };
>> diff --git a/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
>> new file mode 100644
>> index 000000000000..01e1c40685ff
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
>> @@ -0,0 +1,118 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/regulator/maxim,max77802.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Maxim MAX77802 Power Management IC regulators
>> +
>> +maintainers:
>> + - Javier Martinez Canillas <javier@dowhile0.org>
>> + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> +
>> +description: |
>> + This is a part of device tree bindings for Maxim MAX77802 Power Management
>> + Integrated Circuit (PMIC).
>> +
>> + The Maxim MAX77686 provides 10 high-efficiency Buck and 32 Low-DropOut (LDO)
>> + regulators.
>> +
>> + See also Documentation/devicetree/bindings/mfd/maxim,max77802.yaml for
>> + additional information and example.
>> +
>> + Certain regulators support "regulator-initial-mode" and "regulator-mode".
>> + The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h
>> + and their meaning is:
>> + 1 - Normal regulator voltage output mode.
>> + 3 - Low Power which reduces the quiescent current down to only 1uA
>> +
>> + The standard "regulator-mode" property can only be used for regulators that
>> + support changing their mode to Low Power Mode during suspend. These
>> + regulators are: bucks 2-4 and LDOs 1-35. Also, it only takes effect if the
>> + regulator has been enabled for the given suspend state using
>> + "regulator-on-in-suspend" and has not been disabled for that state using
>> + "regulator-off-in-suspend".
>> +
>> +patternProperties:
>> + # LDO1, LDO3, LDO20, LDO21
>> + "^LDO([13]|2[01])$":
>> + type: object
>> + $ref: regulator.yaml#
>> + unevaluatedProperties: false
>> + description:
>> + LDOs supporting the regulator-initial-mode property and changing their
>> + mode during normal operation.
>> +
>> + properties:
>> + regulator-initial-mode: true
>
> Same issues here as the other series.
Right.
>
>> +
>> + patternProperties:
>> + regulator-state-(standby|mem|disk):
>> + type: object
>> + properties:
>> + regulator-mode: true
>
> Is this the only valid property?
>
No. I will skip entire patternProperties for regulators where there are
no constraints about other properties.
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-01-11 16:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 16:43 [PATCH 0/3] regulator/mfd: dt-bindings: maxim,max77802: convert " Krzysztof Kozlowski
2021-12-28 16:43 ` [PATCH 1/3] ARM: dts: exynos: drop unsupported MAX77802 regulators on Odroid XU Krzysztof Kozlowski
2022-01-23 17:09 ` (subset) " Krzysztof Kozlowski
2021-12-28 16:43 ` [PATCH 2/3] regulator: dt-bindings: maxim,max77802: Convert to dtschema Krzysztof Kozlowski
2022-01-04 15:33 ` Rob Herring
2022-01-11 16:43 ` Krzysztof Kozlowski [this message]
2021-12-28 16:43 ` [PATCH 3/3] dt-bindings: mfd: " Krzysztof Kozlowski
2022-01-04 15:35 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a5feb8ad-e6af-0222-db07-eeaea184dbba@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=javier@dowhile0.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome