[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <293d27b4-004f-f816-23c9-3409d96ea20e@canonical.com>
Date: Mon, 7 Mar 2022 15:26:25 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: ChiYuan Huang <u0084500@...il.com>
Cc: Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
cy_huang <cy_huang@...htek.com>,
lkml <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: regulator: Add bindings for Richtek
RT5190A PMIC
On 07/03/2022 15:21, ChiYuan Huang wrote:
> HI, Krzysztof:
>
> Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com> 於 2022年3月7日 週一 下午9:27寫道:
>>
>> On 07/03/2022 14:21, ChiYuan Huang wrote:
>>> Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com> 於 2022年3月7日 週一 下午7:14寫道:
>>>>
>>>> On 07/03/2022 11:08, cy_huang wrote:
>>>>> From: ChiYuan Huang <cy_huang@...htek.com>
>>>>>
>>>>> Add bindings for Richtek RT5190A PMIC.
>>>>>
>>>>> Signed-off-by: ChiYuan Huang <cy_huang@...htek.com>
>>>>> ---
>>>>> .../regulator/richtek,rt5190a-regulator.yaml | 138 +++++++++++++++++++++
>>>>> 1 file changed, 138 insertions(+)
>>>>> create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5190a-regulator.yaml
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5190a-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5190a-regulator.yaml
>>>>> new file mode 100644
>>>>> index 00000000..b9f5836
>>>>> --- /dev/null
>>>>> +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5190a-regulator.yaml
>>>>> @@ -0,0 +1,138 @@
>>>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>>>> +%YAML 1.2
>>>>> +---
>>>>> +$id: http://devicetree.org/schemas/regulator/richtek,rt5190a-regulator.yaml#
>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>> +
>>>>> +title: Richtek RT5190A PMIC Regulator
>>>>> +
>>>>> +maintainers:
>>>>> + - ChiYuan Huang <cy_huang@...htek.com>
>>>>> +
>>>>> +description: |
>>>>> + The RT5190A integrates 1 channel buck controller, 3 channels high efficiency
>>>>> + synchronous buck converters, 1 LDO, I2C control interface and peripherial
>>>>> + logical control.
>>>>> +
>>>>> + It also supports mute AC OFF depop sound and quick setting storage while
>>>>> + input power is removed.
>>>>> +
>>>>> +properties:
>>>>> + compatible:
>>>>> + enum:
>>>>> + - richtek,rt5190a
>>>>> +
>>>>> + reg:
>>>>> + maxItems: 1
>>>>> +
>>>>> + interrupts:
>>>>> + maxItems: 1
>>>>> +
>>>>> + vin2-supply:
>>>>> + description: phandle to buck2 input voltage.
>>>>> +
>>>>> + vin3-supply:
>>>>> + description: phandle to buck3 input voltage.
>>>>> +
>>>>> + vin4-supply:
>>>>> + description: phandle to buck4 input voltage.
>>>>> +
>>>>> + vinldo-supply:
>>>>> + description: phandle to ldo input voltage
>>>>> +
>>>>> + richtek,buck1-fixed-microvolt:
>>>>> + description: buck1 fixed voltage that depends on the external resistor.
>>>>> + $ref: "/schemas/types.yaml#/definitions/uint32"
>>>>
>>>> You should use standard bindings for it.
>>>>
>>> Sorry, I didn't get the point for the meaning 'standard binding'.
>>> Do you mean to change 'richtek,buck1-fixed-microvolt' or 'uint32' definition?
>>> This voltage depends on the external resistor selection. It's 'fixed'
>>> by the application.
>>
>> I meant that you should not have dedicated binding to set regulator
>> voltage, but use regulator-min/max-microvolt instead, within one
>> regulator node. Just set min/max to same level and handle it in the
>> driver. See for example:
>> drivers/regulator/scmi-regulator.c
>>
> As I know, regulator-min/max-microvolt is used as the usage constraint.
True, bindings mention the consumers, but I don't think this is treated
literally.
>
> But out buck1/buck4/ldo vout is defined by
> Vout = VFb * (1 + R1/R2) where R1/R2 is chosen by the circuit design.
>
> It seems not similar with the scmi-regulator.
>
> Do you really suggest to use regulator-min/max-microvolt????
The same as existing fixed-regulator. Why this regulator should be
different than fixed-regulator?
Best regards,
Krzysztof
Powered by blists - more mailing lists