* [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema
@ 2021-12-06 15:40 Thierry Reding
2021-12-06 15:52 ` Dmitry Osipenko
2021-12-06 20:40 ` Rob Herring
0 siblings, 2 replies; 6+ messages in thread
From: Thierry Reding @ 2021-12-06 15:40 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Rob Herring, Dmitry Osipenko, devicetree, linux-tegra, linux-kernel
From: Thierry Reding <treding@nvidia.com>
Move the NVIDIA Tegra regulator coupling bindings from the free-form
text format into the existing json-schema file for regulators.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
.../nvidia,tegra-regulators-coupling.txt | 65 -------------------
.../bindings/regulator/regulator.yaml | 22 +++++++
2 files changed, 22 insertions(+), 65 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/regulator/nvidia,tegra-regulators-coupling.txt
diff --git a/Documentation/devicetree/bindings/regulator/nvidia,tegra-regulators-coupling.txt b/Documentation/devicetree/bindings/regulator/nvidia,tegra-regulators-coupling.txt
deleted file mode 100644
index 4bf2dbf7c6cc..000000000000
--- a/Documentation/devicetree/bindings/regulator/nvidia,tegra-regulators-coupling.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-NVIDIA Tegra Regulators Coupling
-================================
-
-NVIDIA Tegra SoC's have a mandatory voltage-coupling between regulators.
-Thus on Tegra20 there are 3 coupled regulators and on NVIDIA Tegra30
-there are 2.
-
-Tegra20 voltage coupling
-------------------------
-
-On Tegra20 SoC's there are 3 coupled regulators: CORE, RTC and CPU.
-The CORE and RTC voltages shall be in a range of 170mV from each other
-and they both shall be higher than the CPU voltage by at least 120mV.
-
-Tegra30 voltage coupling
-------------------------
-
-On Tegra30 SoC's there are 2 coupled regulators: CORE and CPU. The CORE
-and CPU voltages shall be in a range of 300mV from each other and CORE
-voltage shall be higher than the CPU by N mV, where N depends on the CPU
-voltage.
-
-Required properties:
-- nvidia,tegra-core-regulator: Boolean property that designates regulator
- as the "Core domain" voltage regulator.
-- nvidia,tegra-rtc-regulator: Boolean property that designates regulator
- as the "RTC domain" voltage regulator.
-- nvidia,tegra-cpu-regulator: Boolean property that designates regulator
- as the "CPU domain" voltage regulator.
-
-Example:
-
- pmic {
- regulators {
- core_vdd_reg: core {
- regulator-name = "vdd_core";
- regulator-min-microvolt = <950000>;
- regulator-max-microvolt = <1300000>;
- regulator-coupled-with = <&rtc_vdd_reg &cpu_vdd_reg>;
- regulator-coupled-max-spread = <170000 550000>;
-
- nvidia,tegra-core-regulator;
- };
-
- rtc_vdd_reg: rtc {
- regulator-name = "vdd_rtc";
- regulator-min-microvolt = <950000>;
- regulator-max-microvolt = <1300000>;
- regulator-coupled-with = <&core_vdd_reg &cpu_vdd_reg>;
- regulator-coupled-max-spread = <170000 550000>;
-
- nvidia,tegra-rtc-regulator;
- };
-
- cpu_vdd_reg: cpu {
- regulator-name = "vdd_cpu";
- regulator-min-microvolt = <750000>;
- regulator-max-microvolt = <1125000>;
- regulator-coupled-with = <&core_vdd_reg &rtc_vdd_reg>;
- regulator-coupled-max-spread = <550000 550000>;
-
- nvidia,tegra-cpu-regulator;
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/Documentation/devicetree/bindings/regulator/regulator.yaml
index ed560ee8714e..14f269f1e877 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/regulator.yaml
@@ -224,6 +224,28 @@ properties:
description: Maximum difference between current and target voltages
that can be changed safely in a single step.
+ # NVIDIA Tegra SoC's have a mandatory voltage-coupling between regulators. Thus on Tegra20 there
+ # are 3 coupled regulators and on NVIDIA Tegra30 there are 2.
+ #
+ # The 3 coupled regulators on Tegra20 are: CORE, RTC and CPU. The CORE and RTC voltages shall be
+ # in a range of 170 mV of each other and they both shall be higher than the CPU voltage by at
+ # least 120 mV.
+ #
+ # The 2 coupled regulators on Tegra30 are: CORE and CPU. The CORE and CPU voltages shall be in
+ # a range of 300 mV of each other and CORE voltage shall be higher than the CPU by N mV, where
+ # N depends on the CPU voltage.
+ nvidia,tegra-core-regulator:
+ $ref: "/schemas/types.yaml#/definitions/flag"
+ description: if present, designates the regulator as the "CORE domain" voltage regulator
+
+ nvidia,tegra-rtc-regulator:
+ $ref: "/schemas/types.yaml#/definitions/flag"
+ description: if present, designates the regulator as the "RTC domain" voltage regulator
+
+ nvidia,tegra-cpu-regulator:
+ $ref: "/schemas/types.yaml#/definitions/flag"
+ description: if present, designates the regulator as the "CPU domain" voltage regulator
+
patternProperties:
".*-supply$":
description: Input supply phandle(s) for this node
--
2.33.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema
2021-12-06 15:40 [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema Thierry Reding
@ 2021-12-06 15:52 ` Dmitry Osipenko
2021-12-06 20:40 ` Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2021-12-06 15:52 UTC (permalink / raw)
To: Thierry Reding, Liam Girdwood, Mark Brown, Rob Herring
Cc: devicetree, linux-tegra, linux-kernel
06.12.2021 18:40, Thierry Reding пишет:
> + nvidia,tegra-core-regulator:
> + $ref: "/schemas/types.yaml#/definitions/flag"
> + description: if present, designates the regulator as the "CORE domain" voltage regulator
> +
> + nvidia,tegra-rtc-regulator:
> + $ref: "/schemas/types.yaml#/definitions/flag"
> + description: if present, designates the regulator as the "RTC domain" voltage regulator
> +
> + nvidia,tegra-cpu-regulator:
> + $ref: "/schemas/types.yaml#/definitions/flag"
> + description: if present, designates the regulator as the "CPU domain" voltage regulator
What is the difference between "boolean" and
"/schemas/types.yaml#/definitions/flag"?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema
2021-12-06 15:40 [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema Thierry Reding
2021-12-06 15:52 ` Dmitry Osipenko
@ 2021-12-06 20:40 ` Rob Herring
2021-12-06 21:55 ` Dmitry Osipenko
1 sibling, 1 reply; 6+ messages in thread
From: Rob Herring @ 2021-12-06 20:40 UTC (permalink / raw)
To: Thierry Reding
Cc: Liam Girdwood, Mark Brown, Dmitry Osipenko, devicetree,
linux-tegra, linux-kernel
On Mon, Dec 06, 2021 at 04:40:32PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Move the NVIDIA Tegra regulator coupling bindings from the free-form
> text format into the existing json-schema file for regulators.
Do we need these properties for every single regulator? This should be
its own schema file and then referenced where it is needed.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> .../nvidia,tegra-regulators-coupling.txt | 65 -------------------
> .../bindings/regulator/regulator.yaml | 22 +++++++
> 2 files changed, 22 insertions(+), 65 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/regulator/nvidia,tegra-regulators-coupling.txt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema
2021-12-06 20:40 ` Rob Herring
@ 2021-12-06 21:55 ` Dmitry Osipenko
2021-12-07 15:25 ` Rob Herring
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Osipenko @ 2021-12-06 21:55 UTC (permalink / raw)
To: Rob Herring, Thierry Reding
Cc: Liam Girdwood, Mark Brown, devicetree, linux-tegra, linux-kernel
06.12.2021 23:40, Rob Herring пишет:
> On Mon, Dec 06, 2021 at 04:40:32PM +0100, Thierry Reding wrote:
>> From: Thierry Reding <treding@nvidia.com>
>>
>> Move the NVIDIA Tegra regulator coupling bindings from the free-form
>> text format into the existing json-schema file for regulators.
>
> Do we need these properties for every single regulator? This should be
> its own schema file and then referenced where it is needed.
These properties are SoC-specific, they describe how regulators are
integrated into SoC's power subsystem. Regulators themselves are
SoC-independent, i.e. PMIC's vendor and model don't matter for SoC.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema
2021-12-06 21:55 ` Dmitry Osipenko
@ 2021-12-07 15:25 ` Rob Herring
2021-12-07 15:49 ` Dmitry Osipenko
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2021-12-07 15:25 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Thierry Reding, Liam Girdwood, Mark Brown, devicetree,
linux-tegra, linux-kernel
On Mon, Dec 6, 2021 at 3:55 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>
> 06.12.2021 23:40, Rob Herring пишет:
> > On Mon, Dec 06, 2021 at 04:40:32PM +0100, Thierry Reding wrote:
> >> From: Thierry Reding <treding@nvidia.com>
> >>
> >> Move the NVIDIA Tegra regulator coupling bindings from the free-form
> >> text format into the existing json-schema file for regulators.
> >
> > Do we need these properties for every single regulator? This should be
> > its own schema file and then referenced where it is needed.
>
> These properties are SoC-specific, they describe how regulators are
> integrated into SoC's power subsystem. Regulators themselves are
> SoC-independent, i.e. PMIC's vendor and model don't matter for SoC.
Yes, but in reality the PMIC and SoC are typically somewhat coupled.
How many PMICs do you need these properties for?
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema
2021-12-07 15:25 ` Rob Herring
@ 2021-12-07 15:49 ` Dmitry Osipenko
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2021-12-07 15:49 UTC (permalink / raw)
To: Rob Herring
Cc: Thierry Reding, Liam Girdwood, Mark Brown, devicetree,
linux-tegra, linux-kernel
07.12.2021 18:25, Rob Herring пишет:
> On Mon, Dec 6, 2021 at 3:55 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>>
>> 06.12.2021 23:40, Rob Herring пишет:
>>> On Mon, Dec 06, 2021 at 04:40:32PM +0100, Thierry Reding wrote:
>>>> From: Thierry Reding <treding@nvidia.com>
>>>>
>>>> Move the NVIDIA Tegra regulator coupling bindings from the free-form
>>>> text format into the existing json-schema file for regulators.
>>>
>>> Do we need these properties for every single regulator? This should be
>>> its own schema file and then referenced where it is needed.
>>
>> These properties are SoC-specific, they describe how regulators are
>> integrated into SoC's power subsystem. Regulators themselves are
>> SoC-independent, i.e. PMIC's vendor and model don't matter for SoC.
>
> Yes, but in reality the PMIC and SoC are typically somewhat coupled.
> How many PMICs do you need these properties for?
Three PMICs. Realistically we shouldn't have more such PMICs in upstream
in foreseeable future.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-07 15:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 15:40 [PATCH] dt-bindings: regulators: Document Tegra regulator coupling in json-schema Thierry Reding
2021-12-06 15:52 ` Dmitry Osipenko
2021-12-06 20:40 ` Rob Herring
2021-12-06 21:55 ` Dmitry Osipenko
2021-12-07 15:25 ` Rob Herring
2021-12-07 15:49 ` Dmitry Osipenko
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).