* [PATCH RESEND 0/2] regulator: mt6315: add regulator supplies @ 2026-03-24 5:30 Chen-Yu Tsai 2026-03-24 5:30 ` [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add " Chen-Yu Tsai 2026-03-24 5:30 ` [PATCH RESEND 2/2] regulator: " Chen-Yu Tsai 0 siblings, 2 replies; 7+ messages in thread From: Chen-Yu Tsai @ 2026-03-24 5:30 UTC (permalink / raw) To: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno Cc: Chen-Yu Tsai, linux-arm-kernel, linux-mediatek, devicetree (Resent with correct subject on cover letter) Hi, This series is part of a broader collection of regulator related cleanups for MediaTek Chromebooks. This one covers the MT6315 PMIC. Patch 1 adds the names of the power supply inputs to the binding. Patch 2 adds the supply names from the DT binding change in patch 1 to the regulator descriptions in the driver. This patch has a checkpatch.pl warnings, but I wonder if it's because the context size for checking complex macros is not large enough. Device tree changes will be sent separately. The goal is to get the regulator tree as complete as possible. This includes adding supply names to other regulator DT bindings, and adding all the supply links to the existing DTs. Please have a look. Thanks ChenYu Chen-Yu Tsai (2): regulator: dt-bindings: mt6315: Add regulator supplies regulator: mt6315: Add regulator supplies .../bindings/regulator/mt6315-regulator.yaml | 13 +++++++++++++ drivers/regulator/mt6315-regulator.c | 11 ++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) -- 2.53.0.983.g0bb29b3bc5-goog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add regulator supplies 2026-03-24 5:30 [PATCH RESEND 0/2] regulator: mt6315: add regulator supplies Chen-Yu Tsai @ 2026-03-24 5:30 ` Chen-Yu Tsai 2026-03-25 8:56 ` Krzysztof Kozlowski 2026-03-24 5:30 ` [PATCH RESEND 2/2] regulator: " Chen-Yu Tsai 1 sibling, 1 reply; 7+ messages in thread From: Chen-Yu Tsai @ 2026-03-24 5:30 UTC (permalink / raw) To: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno Cc: Chen-Yu Tsai, linux-arm-kernel, linux-mediatek, devicetree The MT6315 family of PMICs has 4 buck regulators. Each regulator has a separate supply. Add these supplies to the device tree binding. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> --- .../bindings/regulator/mt6315-regulator.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml index fa6743bb269d..ba99a0d02bc7 100644 --- a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml @@ -29,6 +29,16 @@ properties: type: object description: List of regulators and its properties + properties: + pvdd1-supply: + description: Supply for vbuck1 + pvdd2-supply: + description: Supply for vbuck2 + pvdd3-supply: + description: Supply for vbuck3 + pvdd4-supply: + description: Supply for vbuck4 + patternProperties: "^vbuck[1-4]$": type: object @@ -51,6 +61,9 @@ examples: reg = <0x6 0>; regulators { + pvdd1-supply = <&pp4200_z2>; + pvdd3-supply = <&pp4200_z2>; + vbuck1 { regulator-min-microvolt = <300000>; regulator-max-microvolt = <1193750>; -- 2.53.0.983.g0bb29b3bc5-goog ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add regulator supplies 2026-03-24 5:30 ` [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add " Chen-Yu Tsai @ 2026-03-25 8:56 ` Krzysztof Kozlowski 2026-03-25 16:55 ` Mark Brown 0 siblings, 1 reply; 7+ messages in thread From: Krzysztof Kozlowski @ 2026-03-25 8:56 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek, devicetree On Tue, Mar 24, 2026 at 01:30:28PM +0800, Chen-Yu Tsai wrote: > diff --git a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml > index fa6743bb269d..ba99a0d02bc7 100644 > --- a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml > +++ b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml > @@ -29,6 +29,16 @@ properties: > type: object > description: List of regulators and its properties > > + properties: > + pvdd1-supply: > + description: Supply for vbuck1 > + pvdd2-supply: > + description: Supply for vbuck2 > + pvdd3-supply: > + description: Supply for vbuck3 > + pvdd4-supply: > + description: Supply for vbuck4 These all look per-regulator supplies, so I think they should be in each regulator node (see also regulator.yaml). Or in top-level, but not in "regulators" node. The regulators is only wrapping node for children. I wonder what should be our preference - have supplies per regulator or in top-level node. @Mark, any preference from your side? > + > patternProperties: > "^vbuck[1-4]$": > type: object > @@ -51,6 +61,9 @@ examples: > reg = <0x6 0>; > > regulators { > + pvdd1-supply = <&pp4200_z2>; > + pvdd3-supply = <&pp4200_z2>; Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add regulator supplies 2026-03-25 8:56 ` Krzysztof Kozlowski @ 2026-03-25 16:55 ` Mark Brown 2026-03-26 4:14 ` Chen-Yu Tsai 0 siblings, 1 reply; 7+ messages in thread From: Mark Brown @ 2026-03-25 16:55 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Chen-Yu Tsai, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek, devicetree [-- Attachment #1: Type: text/plain, Size: 792 bytes --] On Wed, Mar 25, 2026 at 09:56:00AM +0100, Krzysztof Kozlowski wrote: > On Tue, Mar 24, 2026 at 01:30:28PM +0800, Chen-Yu Tsai wrote: > > + pvdd4-supply: > > + description: Supply for vbuck4 > These all look per-regulator supplies, so I think they should be in each > regulator node (see also regulator.yaml). > Or in top-level, but not in "regulators" node. The regulators is only > wrapping node for children. > I wonder what should be our preference - have supplies per regulator or > in top-level node. @Mark, any preference from your side? The top level, so people can figure out where to describe supplies without having to read the bindings so much - the supplies go into the chip, even if they're distributed within it. Please don't add random characters to my name. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add regulator supplies 2026-03-25 16:55 ` Mark Brown @ 2026-03-26 4:14 ` Chen-Yu Tsai 2026-03-26 11:08 ` Mark Brown 0 siblings, 1 reply; 7+ messages in thread From: Chen-Yu Tsai @ 2026-03-26 4:14 UTC (permalink / raw) To: Mark Brown, Krzysztof Kozlowski Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek, devicetree On Thu, Mar 26, 2026 at 12:55 AM Mark Brown <broonie@kernel.org> wrote: > > On Wed, Mar 25, 2026 at 09:56:00AM +0100, Krzysztof Kozlowski wrote: > > On Tue, Mar 24, 2026 at 01:30:28PM +0800, Chen-Yu Tsai wrote: > > > > + pvdd4-supply: > > > + description: Supply for vbuck4 > > > These all look per-regulator supplies, so I think they should be in each > > regulator node (see also regulator.yaml). > > > Or in top-level, but not in "regulators" node. The regulators is only > > wrapping node for children. > > > I wonder what should be our preference - have supplies per regulator or > > in top-level node. @Mark, any preference from your side? > > The top level, so people can figure out where to describe supplies > without having to read the bindings so much - the supplies go into the > chip, even if they're distributed within it. OK. What about the more complicated mfd PMICs? We already added *-supplies for the regulator side of these PMICs in - regulator/mediatek,mt6358-regulator.yaml - regulator/mediatek,mt6363-regulator.yaml And my other series for the MT6359 also adds them in this manner. Thanks ChenYu ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add regulator supplies 2026-03-26 4:14 ` Chen-Yu Tsai @ 2026-03-26 11:08 ` Mark Brown 0 siblings, 0 replies; 7+ messages in thread From: Mark Brown @ 2026-03-26 11:08 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Krzysztof Kozlowski, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek, devicetree [-- Attachment #1: Type: text/plain, Size: 717 bytes --] On Thu, Mar 26, 2026 at 12:14:32PM +0800, Chen-Yu Tsai wrote: > On Thu, Mar 26, 2026 at 12:55 AM Mark Brown <broonie@kernel.org> wrote: > > The top level, so people can figure out where to describe supplies > > without having to read the bindings so much - the supplies go into the > > chip, even if they're distributed within it. > OK. What about the more complicated mfd PMICs? We already added > *-supplies for the regulator side of these PMICs in > - regulator/mediatek,mt6358-regulator.yaml > - regulator/mediatek,mt6363-regulator.yaml > And my other series for the MT6359 also adds them in this manner. Existing bindings are existing bindings, we can't really do anything with them. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH RESEND 2/2] regulator: mt6315: Add regulator supplies 2026-03-24 5:30 [PATCH RESEND 0/2] regulator: mt6315: add regulator supplies Chen-Yu Tsai 2026-03-24 5:30 ` [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add " Chen-Yu Tsai @ 2026-03-24 5:30 ` Chen-Yu Tsai 1 sibling, 0 replies; 7+ messages in thread From: Chen-Yu Tsai @ 2026-03-24 5:30 UTC (permalink / raw) To: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno Cc: Chen-Yu Tsai, linux-arm-kernel, linux-mediatek, devicetree The MT6315 family of PMICs has 4 buck regulators. Each regulator has a separate supply. Add these supplies to the driver. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> --- drivers/regulator/mt6315-regulator.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c index d3f93aae0fc5..231e64fb0596 100644 --- a/drivers/regulator/mt6315-regulator.c +++ b/drivers/regulator/mt6315-regulator.c @@ -31,10 +31,11 @@ struct mt6315_chip { struct regmap *regmap; }; -#define MT_BUCK(_name, _bid, _vsel) \ +#define MT_BUCK(_name, _bid, _supply, _vsel) \ [_bid] = { \ .desc = { \ .name = _name, \ + .supply_name = _supply, \ .of_match = of_match_ptr(_name), \ .regulators_node = "regulators", \ .ops = &mt6315_volt_range_ops, \ @@ -190,10 +191,10 @@ static const struct regulator_ops mt6315_volt_range_ops = { }; static const struct mt6315_regulator_info mt6315_regulators[MT6315_VBUCK_MAX] = { - MT_BUCK("vbuck1", MT6315_VBUCK1, MT6315_BUCK_TOP_ELR0), - MT_BUCK("vbuck2", MT6315_VBUCK2, MT6315_BUCK_TOP_ELR2), - MT_BUCK("vbuck3", MT6315_VBUCK3, MT6315_BUCK_TOP_ELR4), - MT_BUCK("vbuck4", MT6315_VBUCK4, MT6315_BUCK_TOP_ELR6), + MT_BUCK("vbuck1", MT6315_VBUCK1, "pvdd1", MT6315_BUCK_TOP_ELR0), + MT_BUCK("vbuck2", MT6315_VBUCK2, "pvdd2", MT6315_BUCK_TOP_ELR2), + MT_BUCK("vbuck3", MT6315_VBUCK3, "pvdd3", MT6315_BUCK_TOP_ELR4), + MT_BUCK("vbuck4", MT6315_VBUCK4, "pvdd4", MT6315_BUCK_TOP_ELR6), }; static const struct regmap_config mt6315_regmap_config = { -- 2.53.0.983.g0bb29b3bc5-goog ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-03-26 11:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-03-24 5:30 [PATCH RESEND 0/2] regulator: mt6315: add regulator supplies Chen-Yu Tsai 2026-03-24 5:30 ` [PATCH RESEND 1/2] regulator: dt-bindings: mt6315: Add " Chen-Yu Tsai 2026-03-25 8:56 ` Krzysztof Kozlowski 2026-03-25 16:55 ` Mark Brown 2026-03-26 4:14 ` Chen-Yu Tsai 2026-03-26 11:08 ` Mark Brown 2026-03-24 5:30 ` [PATCH RESEND 2/2] regulator: " Chen-Yu Tsai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox