From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Dmitry Osipenko <digetx@gmail.com>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Lucas Stach <l.stach@pengutronix.de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
peron.clem@gmail.com, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Rafael Wysocki <rjw@rjwysocki.net>,
linux-samsung-soc@vger.kernel.org,
Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [PATCH v2] soc: samsung: Add simple voltage coupler for Exynos5800
Date: Thu, 4 Jun 2020 15:28:24 +0200 [thread overview]
Message-ID: <3fffeb5b-85d5-7528-9edf-2a047d57e9a1@samsung.com> (raw)
In-Reply-To: <4a5874c1-6b4e-2da5-4dd1-dd5537fe6de7@gmail.com>
Hi Dmitry,
On 02.06.2020 17:15, Dmitry Osipenko wrote:
> 02.06.2020 16:02, Marek Szyprowski пишет:
>> Add a simple custom voltage regulator coupler for Exynos5800 SoCs, which
>> require coupling between "vdd_arm" and "vdd_int" regulators. This coupler
>> ensures that the voltage balancing for the coupled regulators is done
>> only when clients for the each regulator apply their constraints, so the
>> voltage values don't go beyond the bootloader-selected operation point
>> during the boot process. This also ensures proper voltage balancing if
>> any of the client driver is missing.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> (...)
> Hello Marek,
>
> Does this mean that you're going to allow to violate the coupling
> constraints while coupled regulator has no consumers?
>
> I don't think that you may want to skip the coupled balancing ever.
> Instead you may want to assume that the min-voltage constraint equals to
> the current regulator's voltage while the coupled regulator has no
> consumers.
>
> Yours variant of the balancer doesn't prevent the voltage dropping on
> regulator's enabling while coupled regulator doesn't have active
> consumers. This is the problem which we previously had once OPP code was
> changed to enable regulator.
>
> Secondly, yours variant of the balancer also doesn't handle the case
> where set_voltage() is invoked while one of the couples doesn't have
> active consumers because voltage of this couple may drop more than
> allowed on the voltage re-balancing.
Indeed. I've focused on disabling balancing when there are no consumers
and I didn't notice that the max_spread might be violated in such case.
> I'd suggest to simply change the regulator_get_optimal_voltage() to
> limit the desired_min_uV to the current voltage if coupled regulator has
> no consumers.
Right, this sounds like a best solution. I have an idea to try to add it
again to the core as a simple check: if regultor is boot_on, use current
voltage as min_uV until a consumer is registered. I've checked and this
approach fixes the issue. I will submit a patch in a few minutes.
> I don't think that any of the today's upstream kernel coupled-regulator
> users really need to support the case where a regulator couple is
> allowed *not* to have active consumers, so for now it should be fine to
> change the core code to accommodate the needs of the Exynos regulators
> (IMO). We may get back to this later on once there will be a real need
> support that case.
>
> Please also note that I'm assuming that each of the coupled regulators
> doesn't have more than one consumer at a time in yours case (correct?),
> because yours solution won't work well in a case of multiple consumers.
> There is no universal solution for this bootstrapping problem yet.
There are only a single consumers for each coupled regulator (cpufreq
for vdd_arm and devfreq for vdd_int).
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2020-06-04 13:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200529124948eucas1p175379ead8afd1932f7b7ae61e35cf632@eucas1p1.samsung.com>
2020-05-29 12:49 ` [PATCH 0/2] Fix regulators coupling " Marek Szyprowski
[not found] ` <CGME20200529124951eucas1p213c748fb481a37cf98918caae5e30fd2@eucas1p2.samsung.com>
2020-05-29 12:49 ` [PATCH 1/2] regulator: extract voltage balancing code to the separate function Marek Szyprowski
[not found] ` <CGME20200529124952eucas1p2565c598c3c0164b5dec6ed83e19148b8@eucas1p2.samsung.com>
2020-05-29 12:49 ` [PATCH 2/2] soc: samsung: Add simple voltage coupler for Exynos5800 Marek Szyprowski
2020-05-29 17:43 ` Krzysztof Kozlowski
2020-06-01 6:28 ` Marek Szyprowski
[not found] ` <CGME20200602130931eucas1p1cd784c8f692fa91dc566504543a927de@eucas1p1.samsung.com>
2020-06-02 13:02 ` [PATCH v2] " Marek Szyprowski
2020-06-02 15:15 ` Dmitry Osipenko
2020-06-04 13:28 ` Marek Szyprowski [this message]
2020-05-29 16:52 ` [PATCH 0/2] Fix regulators coupling " Mark Brown
2020-05-29 16:58 ` Mark Brown
2020-05-29 17:33 ` Krzysztof Kozlowski
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=3fffeb5b-85d5-7528-9edf-2a047d57e9a1@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=digetx@gmail.com \
--cc=krzk@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=nm@ti.com \
--cc=peron.clem@gmail.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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®