From: Heiner Kallweit <hkallweit1@gmail.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: "Jerome Brunet" <jbrunet@baylibre.com>,
"Neil Armstrong" <narmstrong@baylibre.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>,
linux-pwm@vger.kernel.org
Subject: Re: [PATCH v4 4/4] pwm: meson: make full use of common clock framework
Date: Sun, 16 Apr 2023 23:34:56 +0200 [thread overview]
Message-ID: <7601c976-3195-a35d-236c-9bd386dfe8e0@gmail.com> (raw)
In-Reply-To: <CAFBinCCxQvB_fY0r4jkwy7zW1F9s2vrxmcRaTs6hG5ay_Gf8mw@mail.gmail.com>
On 16.04.2023 21:26, Martin Blumenstingl wrote:
> Hi Heiner,
>
> On Sat, Apr 15, 2023 at 8:39 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>>
>> On 14.04.2023 21:39, Martin Blumenstingl wrote:
>>> Hello Heiner,
>>>
>>> On Thu, Apr 13, 2023 at 7:55 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>>> [...]
>>>> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>>> Unfortunately I have some bad news and I need to take back my Tested-by :-(
>>> Previously my test was: cycle through all available CPU frequencies
>>> while stressing the CPU.
>>> My assumption was: if the system doesn't lock up everything's fine
>>> because we have a high enough voltage.
>>>
>>> This evening however I got a memory corruption error while trying to
>>> log in via UART - which I thought was strange.
>>> So I connected my logic analyzer to my Odroid-C1 and did some experiments:
>>>
>>> period = 30518, duty cycle = 15259 (typically used for the 32kHz
>>> output to the SDIO wifi chip)
>>> before your patches / after applying your patches:
>>> PWM: duty cycle: 50.000000% / 50.000000%
>>> PWM: period: 30.6 µs / 30.5 µs
>>> Timing: Time: 15.292 µs (65.395 kHz) / 15.250 µs (65.574 kHz)
>>> Timing: Average: 15.296 µs (65.377 kHz) / 15.264 µs (65.513 kHz)
>>> driver debug messages with your patches applied:
>>> fin_freq: 850000000 Hz
>>> period=30518 cnt=25940
>>> duty=15259 duty_cnt=12970
>>>
>>> Then I tried period = 12218, duty cycle = 0 (typically used for the
>>> highest CPU voltage):
>>> before your patches / after applying your patches:
>>> PWM: duty cycle: 0.338983% / n/a (constant low output)
>>> PWM: period: 12.3 µs / n/a
>>> Timing: Time: 12.250 µs (81.633 kHz) / n/a
>>> Timing: Average: 6.148 µs (162.668 kHz) / n/a
>>> driver debug messages with your patches applied:
>>> fin_freq: 850000000 Hz
>>> period=12218 cnt=10385
>>>
>> With a 850MHz input clock we should see a 0.01% duty cycle with 1.2ns
>> clock pulses. Can we rule out an issue with the measuring equipment?
>> Is your logic analyzer able to display such short clock pulses?
> Oh, you're right: my logic analyzer maxes out at 24MHz (~42ns).
> So we can ignore this case.
>
>>> Finally I tried period = 12218, duty cycle = 12218 (typically used for
>>> the lowest CPU voltage):
>>> before your patches / after applying your patches:
>>> PWM: duty cycle: 99.661017% / n/a (constant low output)
> I have to correct myself: for this case my logic analyzer sees a:
> constant high signal
>
So conclusion is that the PWM output is as expected? If yes, then the
memory corruption you saw supposedly had another root cause?
Eventually your Tested-by could be re-instantiated?
>>> PWM: period: 12.3 µs / n/a
>>> Timing: Time: 12.250 µs (81.633 kHz) / n/a
>>> Timing: Average: 6.148 µs (162.668 kHz) / n/a
>>> driver debug messages with your patches applied:
>>> fin_freq: 850000000 Hz
>>> period=12218 cnt=10385
>>>
>> Here I have no idea yet.
> [...]
>> At first I'd like to verify that the registers have the expected values.
>> Can you provide the values of PWM_A/B (depending on which channel is used in your
>> case) and PWM_MISC_AB at the end of meson_pwm_enable()? Thanks!
> I'm testing with PWM_B and I get:
> REG_MISC_AB = 0x008000c2, channel reg = 0x28910000
>
> This register value looks correct to me.
>
To me as well.
> This is now my last line in meson_pwm_enable() in case you want to
> sanity-check what I did:
> dev_err(meson->chip.dev, "REG_MISC_AB = 0x%08x, channel reg = 0x%08x",
> value, readl(meson->base + channel_data->reg_offset));
>
>
> Best regards,
> Martin
Heiner
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-04-16 21:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 5:48 [PATCH v4 0/4] pwm: meson: make full use of common clock framework Heiner Kallweit
2023-04-13 5:49 ` [PATCH v4 1/4] pwm: meson: switch to using struct clk_parent_data for mux parents Heiner Kallweit
2023-04-13 5:50 ` [PATCH v4 2/4] pwm: meson: don't use hdmi/video clock as mux parent Heiner Kallweit
2023-04-13 5:51 ` [PATCH v4 3/4] pwm: meson: change clk/pwm gate from mask to bit Heiner Kallweit
2023-04-13 5:54 ` [PATCH v4 4/4] pwm: meson: make full use of common clock framework Heiner Kallweit
2023-04-14 19:39 ` Martin Blumenstingl
2023-04-15 6:39 ` Heiner Kallweit
2023-04-16 19:26 ` Martin Blumenstingl
2023-04-16 21:34 ` Heiner Kallweit [this message]
2023-04-23 20:55 ` Martin Blumenstingl
2023-04-17 7:23 ` Neil Armstrong
2023-04-17 9:17 ` Thierry Reding
2023-04-17 9:53 ` Heiner Kallweit
2023-04-17 9:59 ` neil.armstrong
2023-04-17 10:36 ` Heiner Kallweit
2023-04-17 12:21 ` neil.armstrong
2023-04-19 19:58 ` Heiner Kallweit
2023-04-21 7:39 ` neil.armstrong
2023-04-23 20:58 ` Martin Blumenstingl
2023-05-01 13:39 ` Heiner Kallweit
2023-05-19 15:30 ` Dmitry Rokosov
2023-05-19 16:53 ` Heiner Kallweit
2023-05-22 13:37 ` Dmitry Rokosov
2023-05-22 20:10 ` Heiner Kallweit
2023-05-23 10:28 ` Dmitry Rokosov
2023-05-23 19:22 ` Heiner Kallweit
2023-04-17 7:19 ` [PATCH v4 0/4] " Neil Armstrong
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=7601c976-3195-a35d-236c-9bd386dfe8e0@gmail.com \
--to=hkallweit1@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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