[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBpwu0rEK_K-9tcu@standask-GA-A55M-S2HP>
Date: Tue, 6 May 2025 22:27:39 +0200
From: Stanislav Jakubek <stano.jakubek@...il.com>
To: Artur Weber <aweber.kernel@...il.com>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v8 5/9] mfd: bcm590xx: Add PMU ID/revision parsing
function
On Tue, May 06, 2025 at 09:03:15PM +0200, Artur Weber wrote:
> On 5/6/25 18:11, Stanislav Jakubek wrote:
> > Hi Artur,
> > one note below.
> >
> > On Wed, Apr 30, 2025 at 09:07:09AM +0200, Artur Weber wrote:
> > > The BCM590xx PMUs have two I2C registers for reading the PMU ID
> > > and revision. The revision is useful for subdevice drivers, since
> > > different revisions may have slight differences in behavior (for
> > > example - BCM59054 has different regulator configurations for
> > > revision A0 and A1).
> > >
> > > Check the PMU ID register and make sure it matches the DT compatible.
> > > Fetch the digital and analog revision from the PMUREV register
> > > so that it can be used in subdevice drivers.
> > >
> > > Also add some known revision values to bcm590xx.h, for convenience
> > > when writing subdevice drivers.
> > >
> > > Signed-off-by: Artur Weber <aweber.kernel@...il.com>
> > > ---
> >
> > [snip]
> >
> > > diff --git a/include/linux/mfd/bcm590xx.h b/include/linux/mfd/bcm590xx.h
> > > index 8d146e3b102a7dbce6f4dbab9f8ae5a9c4e68c0e..fbc458e94bef923ca1b69afe2cac944adf6fedf8 100644
> > > --- a/include/linux/mfd/bcm590xx.h
> > > +++ b/include/linux/mfd/bcm590xx.h
> > > @@ -17,6 +17,16 @@
> > > #define BCM590XX_PMUID_BCM59054 0x54
> > > #define BCM590XX_PMUID_BCM59056 0x56
> > > +/* Known chip revision IDs */
> > > +#define BCM59054_REV_DIGITAL_A1 1
> >
> > 1 seems to be the digital revision ID for A0 (couldn't find the analog
> > revision ID), see [1].
> >
> > Other values seems to match downstream (as far as I can tell anyway).
> >
> > [1] https://github.com/Samsung-KYLEPROXX/android_kernel_samsung_kyleproxx/blob/cm-13.0/include/linux/mfd/bcmpmu59xxx.h#L82
> From my testing on a device with the BCM59054A1 (BCM23550-based Samsung
> Galaxy Grand Neo), the digital value is also 1 on this model:
>
> bcm590xx 0-0008: PMU ID 0x54 (BCM59054), revision: dig 1 ana 2
>
> (This constant is not actually used anywhere in code yet - I just
> included it for the sake of completeness, since the BCM59056 headers
> in downstream listed both values...)
>
> Best regards
> Artur
Thanks for checking Artur!
I guess both BCM59054 A0 and A1 have the same digital revision?
Well, to be sure we'd have to get the hardware, since downstream doesn't
use this value either.
So I guess the patch is good as-is, we can add known IDs when we... know them ;)
Regards,
Stanislav
Powered by blists - more mailing lists