From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Shenwei Wang <shenwei.wang@nxp.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh+dt@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>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file
Date: Mon, 28 Aug 2023 21:11:35 +0200 [thread overview]
Message-ID: <465e61a0-895d-54b9-d1b9-424265c82855@linaro.org> (raw)
In-Reply-To: <PAXPR04MB9185D87525AA88A8C3543EEA89E0A@PAXPR04MB9185.eurprd04.prod.outlook.com>
On 28/08/2023 21:09, Shenwei Wang wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: Monday, August 28, 2023 1:53 PM
>> To: Shenwei Wang <shenwei.wang@nxp.com>; Ulf Hansson
>> <ulf.hansson@linaro.org>
>> Cc: Rob Herring <robh+dt@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>;
>> imx@lists.linux.dev; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
>> dl-linux-imx <linux-imx@nxp.com>
>> Subject: [EXT] Re: [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file
>>>>>>>>> Are you suggesting to move the regulator-pd to the imx directory
>>>>>>>>> and add a company prefix to the compatible string?
>>>>>>>>
>>>>>>>> There is no such part of iMX processor as such
>>>>>>>> regulator-power-domain, so I don't recommend that approach. DTS
>>>>>>>> nodes represent hardware, not your SW layers.
>>>>>>>>
>>>>>>>
>>>>>>> That's not always the case, as we do sometimes need a virtual device.
>>>>>>> As an example, the "regulator-fixed" acts as a software
>>>>>>> abstraction layer to create virtual regulator devices by
>>>>>>> interfacing with the underlying
>>>>>> GPIO drivers.
>>>>>>
>>>>>> Not true. This is a real regulator device. Real hardware on the board.
>>>>>> You can even see and touch it.
>>>>>>
>>>>>
>>>>> The physical hardware component is the GPIO pin, which is what you
>>>>> can only
>>>> touch.
>>>>
>>>> No. The regulator is the chip.
>>>>
>>>
>>> In the definition of dts node below, where is the chip? The real hardware is just
>> a GPIO Pin.
>>> reg1: regulator-1 {
>>> compatible = "regulator-fixed";
>>> regulator-name = "REG1";
>>> regulator-min-microvolt = <3000000>;
>>> regulator-max-microvolt = <3000000>;
>>> gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>;
>>> enable-active-high;
>>> };
>>
>> There is a chip. This is the chip. If you have there only GPIO pin, then your DTS is
>> just wrong. Drop it. If you learn from wrong DTS, then sure, power-domain-
>> regulator seems like great idea...
>>
>
> When you talk about the chip, can you please be more specific?
What to say more? The device node you quoted above is the regulator. You
brought specific example and now claim this is not a regulator, but just
GPIO. Please fix your DTS.
>
> Regarding the dts node, how about the example in the fixed-regulator.yaml under the bindings directory.
That's an example, how is it related to anything?
>
> reg_1v8: regulator-1v8 {
> compatible = "regulator-fixed";
> regulator-name = "1v8";
> regulator-min-microvolt = <1800000>;
> regulator-max-microvolt = <1800000>;
> gpio = <&gpio1 16 0>;
> startup-delay-us = <70000>;
> enable-active-high;
> regulator-boot-on;
> gpio-open-drain;
> vin-supply = <&parent_reg>;
> };
>
> If you take a look at the fixed regulator driver (fixed.c), I don't think you'll find anything related to a hardware
> component (chip) other than the GPIO Pin.
That's a driver. How is it related to this discussion? Bindings are not
about drivers.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-08-28 19:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 15:34 Shenwei Wang
2023-08-18 15:34 ` [PATCH 2/2] genpd: regulator-pd: add regulator-pd driver Shenwei Wang
2023-08-18 20:51 ` [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file Rob Herring
2023-08-18 21:06 ` Shenwei Wang
2023-08-19 8:04 ` Krzysztof Kozlowski
2023-08-21 13:22 ` Shenwei Wang
2023-08-21 18:49 ` Rob Herring
2023-08-22 15:18 ` Shenwei Wang
2023-08-22 15:25 ` Krzysztof Kozlowski
2023-08-22 15:50 ` [EXT] " Shenwei Wang
2023-08-22 15:57 ` Krzysztof Kozlowski
2023-08-22 16:14 ` Shenwei Wang
2023-08-24 9:26 ` Ulf Hansson
2023-08-24 16:35 ` Shenwei Wang
2023-08-25 12:24 ` Ulf Hansson
2023-08-25 15:44 ` Shenwei Wang
2023-08-26 17:31 ` Krzysztof Kozlowski
2023-08-28 9:59 ` Ulf Hansson
2023-08-28 10:45 ` Krzysztof Kozlowski
2023-08-28 14:14 ` Shenwei Wang
2023-08-28 14:04 ` Shenwei Wang
2023-08-28 17:10 ` Krzysztof Kozlowski
2023-08-28 18:39 ` Shenwei Wang
2023-08-28 18:42 ` Krzysztof Kozlowski
2023-08-28 18:50 ` Shenwei Wang
2023-08-28 18:52 ` Krzysztof Kozlowski
2023-08-28 19:09 ` Shenwei Wang
2023-08-28 19:11 ` Krzysztof Kozlowski [this message]
2023-08-28 19:23 ` [EXT] " Shenwei Wang
2023-08-28 19:30 ` Krzysztof Kozlowski
2023-08-28 19:49 ` Shenwei Wang
2023-08-28 21:13 ` Rob Herring
2023-08-29 13:21 ` Shenwei Wang
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=465e61a0-895d-54b9-d1b9-424265c82855@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=shenwei.wang@nxp.com \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®