linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in
@ 2018-11-14 23:05 Martin Blumenstingl
  2018-11-29  0:30 ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Blumenstingl @ 2018-11-14 23:05 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, linux, Martin Blumenstingl

Some Meson8b boards (Odroid-C1, EC-100) use a PWM regulator which is the
voltage supply of the CPU cores (this regulator is typically called
"VCCK").
Now that we are preparing support for CPU frequency scaling on Meson8,
Meson8b and Meson8m2 we should build the pwm-meson driver into the
kernel so we can configure the CPU voltage early in the boot process.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/configs/multi_v7_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 63af6234c1b6..525316285570 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -928,7 +928,7 @@ CONFIG_PWM_ATMEL_TCB=m
 CONFIG_PWM_BCM2835=y
 CONFIG_PWM_BRCMSTB=m
 CONFIG_PWM_FSL_FTM=m
-CONFIG_PWM_MESON=m
+CONFIG_PWM_MESON=y
 CONFIG_PWM_RCAR=m
 CONFIG_PWM_RENESAS_TPU=y
 CONFIG_PWM_ROCKCHIP=m
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in
  2018-11-14 23:05 [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in Martin Blumenstingl
@ 2018-11-29  0:30 ` Kevin Hilman
  2018-11-29 22:35   ` Martin Blumenstingl
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2018-11-29  0:30 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, linux, Martin Blumenstingl

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Some Meson8b boards (Odroid-C1, EC-100) use a PWM regulator which is the
> voltage supply of the CPU cores (this regulator is typically called
> "VCCK").
> Now that we are preparing support for CPU frequency scaling on Meson8,
> Meson8b and Meson8m2 we should build the pwm-meson driver into the
> kernel so we can configure the CPU voltage early in the boot process.

Can you explain a little more why the configuration of CPU voltage
cannot wait a bit so this could be properly probed?

Kevin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in
  2018-11-29  0:30 ` Kevin Hilman
@ 2018-11-29 22:35   ` Martin Blumenstingl
  2018-11-29 23:28     ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Blumenstingl @ 2018-11-29 22:35 UTC (permalink / raw)
  To: khilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, linux

Hi Kevin,

On Thu, Nov 29, 2018 at 1:30 AM Kevin Hilman <khilman@baylibre.com> wrote:
>
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
> > Some Meson8b boards (Odroid-C1, EC-100) use a PWM regulator which is the
> > voltage supply of the CPU cores (this regulator is typically called
> > "VCCK").
> > Now that we are preparing support for CPU frequency scaling on Meson8,
> > Meson8b and Meson8m2 we should build the pwm-meson driver into the
> > kernel so we can configure the CPU voltage early in the boot process.
>
> Can you explain a little more why the configuration of CPU voltage
> cannot wait a bit so this could be properly probed?
I was under the impression that cpufreq-dt would still initialize even
if the regulator is not ready yet. however (after reading the code
again) this is clearly NOT the case.

there's still a benefit with this change: your Odroid-C1 in your
KernelCI lab would also be able to change the CPU frequency (so in
case something breaks we could spot it there).
will you accept this patch after I updated the description to mention
that it's for KernelCI test coverage?


Regards
Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in
  2018-11-29 22:35   ` Martin Blumenstingl
@ 2018-11-29 23:28     ` Kevin Hilman
  2018-11-29 23:37       ` Martin Blumenstingl
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2018-11-29 23:28 UTC (permalink / raw)
  To: Martin Blumenstingl; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, linux

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Hi Kevin,
>
> On Thu, Nov 29, 2018 at 1:30 AM Kevin Hilman <khilman@baylibre.com> wrote:
>>
>> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>>
>> > Some Meson8b boards (Odroid-C1, EC-100) use a PWM regulator which is the
>> > voltage supply of the CPU cores (this regulator is typically called
>> > "VCCK").
>> > Now that we are preparing support for CPU frequency scaling on Meson8,
>> > Meson8b and Meson8m2 we should build the pwm-meson driver into the
>> > kernel so we can configure the CPU voltage early in the boot process.
>>
>> Can you explain a little more why the configuration of CPU voltage
>> cannot wait a bit so this could be properly probed?
>
> I was under the impression that cpufreq-dt would still initialize even
> if the regulator is not ready yet. however (after reading the code
> again) this is clearly NOT the case.

Hmm, a quick look at cpufreq-dt suggests that it should -EPROBE_DEFER if
the regulator isn't ready yet.  Why doesn't that work?

> there's still a benefit with this change: your Odroid-C1 in your
> KernelCI lab would also be able to change the CPU frequency (so in
> case something breaks we could spot it there).
> will you accept this patch after I updated the description to mention
> that it's for KernelCI test coverage?

Possibly, but I'd still rather see the dependencies worked out correctly
so that this can be module, and cpufreq-dt would defer until it's ready.

Kevin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in
  2018-11-29 23:28     ` Kevin Hilman
@ 2018-11-29 23:37       ` Martin Blumenstingl
  2018-11-30  0:51         ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Blumenstingl @ 2018-11-29 23:37 UTC (permalink / raw)
  To: khilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, linux

Hi Kevin,

On Fri, Nov 30, 2018 at 12:28 AM Kevin Hilman <khilman@baylibre.com> wrote:
>
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
> > Hi Kevin,
> >
> > On Thu, Nov 29, 2018 at 1:30 AM Kevin Hilman <khilman@baylibre.com> wrote:
> >>
> >> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
> >>
> >> > Some Meson8b boards (Odroid-C1, EC-100) use a PWM regulator which is the
> >> > voltage supply of the CPU cores (this regulator is typically called
> >> > "VCCK").
> >> > Now that we are preparing support for CPU frequency scaling on Meson8,
> >> > Meson8b and Meson8m2 we should build the pwm-meson driver into the
> >> > kernel so we can configure the CPU voltage early in the boot process.
> >>
> >> Can you explain a little more why the configuration of CPU voltage
> >> cannot wait a bit so this could be properly probed?
> >
> > I was under the impression that cpufreq-dt would still initialize even
> > if the regulator is not ready yet. however (after reading the code
> > again) this is clearly NOT the case.
>
> Hmm, a quick look at cpufreq-dt suggests that it should -EPROBE_DEFER if
> the regulator isn't ready yet.  Why doesn't that work?
sorry for not being clear:
I was under the impression that cpufreq-dt wouldn't handle -EPROBE_DEFER.
I'm not sure why I assumed that. As you already said: deferred probing
of the regulator works fine.

> > there's still a benefit with this change: your Odroid-C1 in your
> > KernelCI lab would also be able to change the CPU frequency (so in
> > case something breaks we could spot it there).
> > will you accept this patch after I updated the description to mention
> > that it's for KernelCI test coverage?
>
> Possibly, but I'd still rather see the dependencies worked out correctly
> so that this can be module, and cpufreq-dt would defer until it's ready.
KernelCI shows multiple "pwm-regulator regulator-vcck: Failed to get
PWM: -517" messages on Odroid-C1.
however, what I failed to notice so far is that there's a
"pwm-regulator: supplied by regulator-dummy" at the end of the boot
process. does this mean that the Odroid-C1 in your KernelCI lab can
load kernel modules? in that case this patch can be ignored.

(I will still send a PWM regulator related patch: that "Failed to get
PWM: -517" message is very noisy and we typically suppress that in
other drivers)


Regards
Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in
  2018-11-29 23:37       ` Martin Blumenstingl
@ 2018-11-30  0:51         ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2018-11-30  0:51 UTC (permalink / raw)
  To: Martin Blumenstingl; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, linux

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Hi Kevin,
>
> On Fri, Nov 30, 2018 at 12:28 AM Kevin Hilman <khilman@baylibre.com> wrote:
>>
>> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>>
>> > Hi Kevin,
>> >
>> > On Thu, Nov 29, 2018 at 1:30 AM Kevin Hilman <khilman@baylibre.com> wrote:
>> >>
>> >> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>> >>
>> >> > Some Meson8b boards (Odroid-C1, EC-100) use a PWM regulator which is the
>> >> > voltage supply of the CPU cores (this regulator is typically called
>> >> > "VCCK").
>> >> > Now that we are preparing support for CPU frequency scaling on Meson8,
>> >> > Meson8b and Meson8m2 we should build the pwm-meson driver into the
>> >> > kernel so we can configure the CPU voltage early in the boot process.
>> >>
>> >> Can you explain a little more why the configuration of CPU voltage
>> >> cannot wait a bit so this could be properly probed?
>> >
>> > I was under the impression that cpufreq-dt would still initialize even
>> > if the regulator is not ready yet. however (after reading the code
>> > again) this is clearly NOT the case.
>>
>> Hmm, a quick look at cpufreq-dt suggests that it should -EPROBE_DEFER if
>> the regulator isn't ready yet.  Why doesn't that work?
> sorry for not being clear:
> I was under the impression that cpufreq-dt wouldn't handle -EPROBE_DEFER.
> I'm not sure why I assumed that. As you already said: deferred probing
> of the regulator works fine.
>
>> > there's still a benefit with this change: your Odroid-C1 in your
>> > KernelCI lab would also be able to change the CPU frequency (so in
>> > case something breaks we could spot it there).
>> > will you accept this patch after I updated the description to mention
>> > that it's for KernelCI test coverage?
>>
>> Possibly, but I'd still rather see the dependencies worked out correctly
>> so that this can be module, and cpufreq-dt would defer until it's ready.
> KernelCI shows multiple "pwm-regulator regulator-vcck: Failed to get
> PWM: -517" messages on Odroid-C1.
> however, what I failed to notice so far is that there's a
> "pwm-regulator: supplied by regulator-dummy" at the end of the boot
> process. does this mean that the Odroid-C1 in your KernelCI lab can
> load kernel modules? in that case this patch can be ignored.

All boards in my lab can load modules.  The boot with a minimal
buildroot-based ramdisk that uses eudev, so any drivers that are present
in DT will be loaded (if they're modules) or probed.

> (I will still send a PWM regulator related patch: that "Failed to get
> PWM: -517" message is very noisy and we typically suppress that in
> other drivers)

Sure, no objections to that one.

Kevin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-30  0:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14 23:05 [PATCH] ARM: multi_v7_defconfig: switch CONFIG_PWM_MESON to built-in Martin Blumenstingl
2018-11-29  0:30 ` Kevin Hilman
2018-11-29 22:35   ` Martin Blumenstingl
2018-11-29 23:28     ` Kevin Hilman
2018-11-29 23:37       ` Martin Blumenstingl
2018-11-30  0:51         ` Kevin Hilman

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).