lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Nov 2022 14:23:02 +0000
From:   Daniel Golle <daniel@...rotopia.org>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Sam Shih <sam.shih@...iatek.com>, linux-pwm@...r.kernel.org,
        linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Thierry Reding <thierry.reding@...il.com>,
        Matthias Brugger <matthias.bgg@...il.com>
Subject: Re: [PATCH 1/2] pwm: mediatek: Add support for MT7986

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@...rotopia.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/ |

/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ