Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Sam Shih <sam.shih@mediatek.com>,
	linux-pwm@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH 1/2] pwm: mediatek: Add support for MT7986
Date: Thu, 17 Nov 2022 14:23:02 +0000	[thread overview]
Message-ID: <Y3ZDxqLT3YdLzTiU@makrotopia.org> (raw)
In-Reply-To: <20221117115624.t2kbwscxvkvffo7x@pengutronix.de>

On Thu, Nov 17, 2022 at 12:56:24PM +0100, Uwe Kleine-König wrote:
> On Tue, Oct 25, 2022 at 02:35:43PM +0800, Sam Shih wrote:
> > Hi Daniel:
> > 
> > On Fri, 2022-10-21 at 16:24 +0100, Daniel Golle wrote:
> > > Add support for PWM on MT7986 which has 2 PWM channels, one of them
> > > is
> > > typically used for a temperature controlled fan.
> > > 
> > > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> > > ---
> > >  drivers/pwm/pwm-mediatek.c | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > > 
> > > diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
> > > index 6901a44dc428de..2219cba033e348 100644
> > > --- a/drivers/pwm/pwm-mediatek.c
> > > +++ b/drivers/pwm/pwm-mediatek.c
> > > @@ -329,6 +329,12 @@ static const struct pwm_mediatek_of_data
> > > mt8365_pwm_data = {
> > >  	.has_ck_26m_sel = true,
> > >  };
> > >  
> > > +static const struct pwm_mediatek_of_data mt7986_pwm_data = {
> > > +	.num_pwms = 2,
> > > +	.pwm45_fixup = false,
> > > +	.has_ck_26m_sel = true,
> > 
> > For MT7986 SoC, I think the value of "has_ck_26m_sel" should be 'false' 
> 
> The status of the discussion isn't clear to me. You didn't visibly agree
> which value is right now. Will there be a v2 of this patch? Or is it
> expected to be picked up as is.

The patch has been tested thoroughly and works well as-is.
The CK_26M_SEL register does exist on MT7986 and, at least according to
the datasheet[1], is set to the wrong value (selecting 26M clock) on
reset (but probably then already set to 0 to select the bus clock, e.g.
by the bootloader). So in the worst case, this is a no-op.

[1]: MT7986 Reference Manual, version 1.0 released 2022-05-29, page 428
     available at https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Documents

> 
> From my side (i.e. not having checked the hw details just judging with
> the PWM hat on) the patch is fine.
> 
> Best regards
> Uwe
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

/


  reply	other threads:[~2022-11-17 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 15:24 [PATCH 1/2] pwm: mediatek: Add support for MT7986 Daniel Golle
2022-10-25  6:35 ` Sam Shih
2022-10-25 11:57   ` Daniel Golle
2022-10-26  6:17     ` Sam Shih
2022-10-26 10:00       ` Daniel Golle
2022-11-17 11:56   ` Uwe Kleine-König
2022-11-17 14:23     ` Daniel Golle [this message]
2022-11-24  4:47     ` Sam Shih (史碩三)

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=Y3ZDxqLT3YdLzTiU@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=sam.shih@mediatek.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