devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	robh+dt@kernel.org, mark.rutland@arm.com,
	linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] pwm: hibvt: Add hi3559v100 support
Date: Fri, 22 Feb 2019 13:15:53 +0100	[thread overview]
Message-ID: <CANVeeZyQU_NAKYaqKQStWzCOAmidTqLAph0SupfmD7zrH5K_9g@mail.gmail.com> (raw)
In-Reply-To: <20190221195641.hqvjxixhj7fi4gff@pengutronix.de>

Hi Uwe,

> The patch looks fine now. (If you have to do another round:
> s/again/twice/ in the commit log and s/once more/twice/ in the comment
> below.)

Ok.

>
> I wonder if this behaviour is a bug or a feature of the hardware. Is
> this additional enable needed to apply changes to both period and
> duty_cycle atomically? Is the 2nd enable needed independent of the PWM
> already running? Can you share the relevant part of the documentation
> without violating an NDA?

The same goes for the period, so I'll precise it in v4. This behaviour
is not documented in the SoC manual.
I discovered it by hitting the problem. Hisilicon support confirmed it
was needed without any
further details. It looks like this behaviour is "by design" because
there are 2 registers for duty cycle and period
and 2 state registers for duty cycle and period. When the first two
registers are edited, the state registers are
only updated on sending a new "1" in pwm enable.

I don't know if the two boards already supported by hibvt driver have
the same design but it seems quite likely.
Maybe this enable thing could be done for all boards and not
considered as a quirk.

Thanks,

Mathieu

  reply	other threads:[~2019-02-22 12:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  9:58 [PATCH v3 1/3] pwm: hibvt: Use individual struct per of-data Mathieu Othacehe
2019-02-19  9:58 ` [PATCH v3 2/3] dt-bindings: pwm: hibvt: Add hi3559v100 support Mathieu Othacehe
2019-02-19  9:58 ` [PATCH v3 3/3] " Mathieu Othacehe
2019-02-21 19:56   ` Uwe Kleine-König
2019-02-22 12:15     ` Mathieu Othacehe [this message]
2019-02-21 19:50 ` [PATCH v3 1/3] pwm: hibvt: Use individual struct per of-data Uwe Kleine-König
2019-03-04 10:42 ` Thierry Reding

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=CANVeeZyQU_NAKYaqKQStWzCOAmidTqLAph0SupfmD7zrH5K_9g@mail.gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).