From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/6] dt-bindings: ROHM BD96801 PMIC regulators
Date: Mon, 15 Apr 2024 17:29:40 +0200 [thread overview]
Message-ID: <fd3dd25d-05fb-48e1-80d9-04b72c8dcb61@linaro.org> (raw)
In-Reply-To: <5994ff29-c916-4b5d-a634-8521e79e2417@gmail.com>
On 15/04/2024 08:51, Matti Vaittinen wrote:
> On 4/14/24 00:27, Krzysztof Kozlowski wrote:
>> On 12/04/2024 13:21, Matti Vaittinen wrote:
>>> ROHM BD96801 is a highly configurable automotive grade PMIC. Introduce
>>> DT bindings for the BD96801 regulators.
>>>
>>> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>>> ---
>>> Revision history:
>>> - No changes since RFCv1
>>
>> Subject: missing "regulator" prefix, as first.
>>
>>>
>>> .../regulator/rohm,bd96801-regulator.yaml | 69 +++++++++++++++++++
>>> 1 file changed, 69 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd96801-regulator.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd96801-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd96801-regulator.yaml
>>> new file mode 100644
>>> index 000000000000..4015802a3d84
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/regulator/rohm,bd96801-regulator.yaml
>>> @@ -0,0 +1,69 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/regulator/rohm,bd96801-regulator.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: ROHM BD96801 Power Management Integrated Circuit regulators
>>> +
>>> +maintainers:
>>> + - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
>>> +
>>> +description: |
>>> + This module is part of the ROHM BD96801 MFD device. For more details
>>> + see Documentation/devicetree/bindings/mfd/rohm,bd96801-pmic.yaml.
>>> +
>>> + The regulator controller is represented as a sub-node of the PMIC node
>>> + on the device tree.
>>> +
>>> + Regulator nodes should be named to BUCK_<number> and LDO_<number>.
>>> + The valid names for BD96801 regulator nodes are
>>> + BUCK1, BUCK2, BUCK3, BUCK4, LDO5, LDO6, LDO7
>>> +
>>> +patternProperties:
>>> + "^LDO[5-7]$":
>>
>> lowercase
>>
>>> + type: object
>>> + description:
>>> + Properties for single LDO regulator.
>>> + $ref: regulator.yaml#
>>
>> Missing unevaluatedProperties: false
>>
>>> +
>>> + properties:
>>> + regulator-name:
>>> + pattern: "^ldo[5-7]$"
>>> + description:
>>> + Name of the regulator. Should be "ldo5", ..., "ldo7"
>>
>> Why do you enforce the name? The name should match board schematics, not
>> regulator datasheet.
>
> If my memory serves me right, the slightly peculiar thing with the
> regulator core is it does matching of the regulators based on the names
> of the nodes. There was the regulator-compatible property, but I think
> it has been deprecated long ago.
>
> https://elixir.bootlin.com/linux/latest/source/drivers/regulator/of_regulator.c#L380
>
> Hence the regulators tend to have fixed names for the nodes. Unless
> there has been some recent changes I am not aware of...
Yes, names of the nodes, but not "regulator-name" property.
>
>>> + rohm,initial-voltage-microvolt:
>>> + description:
>>> + Initial voltage for regulator. Voltage can be tuned +/-150 mV from
>>> + this value. NOTE, This can be modified via I2C only when PMIC is in
>>> + STBY state.
>>> + minimum: 300000
>>> + maximum: 3300000
>>
>> Hm, regulator min/max microvolts properties don't work for you? The
>> initial will be just middle?
>
> I had not even thought of this!
>
> I think this is a good idea. The problem I see is if the system where
> the PMIC is used will need to have 'initial power level' at start-up,
> which is near the one end of the allowed voltage area. (This because the
> "tuning"-range is quite narrow after the initial voltage is set). Wide
> allowed voltage range may be needed if the PMIC is reconfigured using
> the PMIC STBY state during the runtime.
>
> Eg, sequence would look like:
>
> Bootup:
> PMIC STBY:
> - initial value 'A' from DT
> => PMIC ACTIVE
> - desired (early) voltages 'A' + 'tune'
>
> ...
>
> Voltage state differing more than the 'tune' needed due to some runtime
> use-case:
> => PMIC STBY
> - initial value 'B'
> => PMIC ACTIVE
> - desired voltages 'B' + 'tune'
>
> Now, if the 'A' can be 'far' from the mid point of the 'allowed
> voltages' -range.
>
> I have no idea how valid this use-case is though. Once again, I work for
> a component vendor and don't get to see the forest from the trees... But
> sure I would like to enable as many possible use-cases as, well, possible :)
Still I think min/max microvolt solves your case. The property is
board-specific and should match what is really on the board. Therefore
when writing DTS, one must properly set min/max which in this particular
meaning would choose the starting voltage.
I am also fine with this property if somehow min/max create confusion or
aren't solving the problem.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-04-16 15:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 11:20 [RFC PATCH v2 0/6] Support ROHM BD96801 scalable PMIC Matti Vaittinen
2024-04-12 11:21 ` [RFC PATCH v2 1/6] dt-bindings: ROHM BD96801 PMIC regulators Matti Vaittinen
2024-04-13 21:27 ` Krzysztof Kozlowski
2024-04-15 6:51 ` Matti Vaittinen
2024-04-15 15:29 ` Krzysztof Kozlowski [this message]
2024-04-12 11:21 ` [RFC PATCH v2 2/6] dt-bindings: mfd: bd96801 PMIC core Matti Vaittinen
2024-04-13 21:33 ` Krzysztof Kozlowski
2024-04-13 21:36 ` Krzysztof Kozlowski
2024-04-15 5:50 ` Matti Vaittinen
2024-04-15 6:24 ` Matti Vaittinen
2024-04-15 15:25 ` Krzysztof Kozlowski
2024-04-15 8:28 ` Matti Vaittinen
2024-04-18 17:28 ` Krzysztof Kozlowski
2024-04-19 5:48 ` Matti Vaittinen
2024-04-12 11:22 ` [RFC PATCH v2 3/6] mfd: support ROHM BD96801 " Matti Vaittinen
2024-04-12 11:22 ` [RFC PATCH v2 4/6] regulator: bd96801: ROHM BD96801 PMIC regulators Matti Vaittinen
2024-04-12 11:22 ` [RFC PATCH v2 5/6] watchdog: ROHM BD96801 PMIC WDG driver Matti Vaittinen
2024-04-17 4:29 ` George Cherian
2024-04-17 7:35 ` Matti Vaittinen
2024-04-17 18:20 ` Matti Vaittinen
2024-04-12 11:23 ` [RFC PATCH v2 6/6] MAINTAINERS: Add ROHM BD96801 'scalable PMIC' entries Matti Vaittinen
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=fd3dd25d-05fb-48e1-80d9-04b72c8dcb61@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=robh@kernel.org \
--cc=wim@linux-watchdog.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;
as well as URLs for NNTP newsgroup(s).