[PATCH] ARM: aspeed: Disable UCD90160 in the Witherspoon devicetree
Andrew Jeffery
andrew at aj.id.au
Sat Mar 25 10:19:20 AEDT 2017
On Fri, 2017-03-24 at 13:55 -0700, Xo Wang wrote:
> > On Thu, Mar 23, 2017 at 7:05 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> > Xo: Adding you in case you've seen any issues with Zaius that may
> > benefit from a similar work-around in the short term.
> >
>
> Thanks for the copy. I haven't seen the unsupported command errors
> from the UCD90160 on Zaius.
Right - to clarify a bit here: The PMBus core does check the status
bytes, but only on certain operations. I hacked i2c-core's smbus
emulation to query the status byte(s) after every operation[1], and the
excerpts in the commit message were observed as a results. Further, not
all operations generate errors, only some.
[1] https://github.com/amboar/linux/commit/d0ff1707c094168641ab4f687b00c6fc4d772bda
> I suspect it's because we perform less
> i2c-get/-set on our UCD, since it is already programmed to treat the
> UCD rails' control pins as output GPIOs.
Possibly, though some testing indicates that leaving the kernel driver
unbound and only doing i2c{g,s}et operations doesn't appear to lead to
problems booting (pgood timeout, due to corrupt UCD configuration[2]).
[2] https://github.com/openbmc/openbmc/issues/832
>
> Do those errors you see always come after a UCD9000 driver bind operation?
Well, due to the fact that it gets bound, yes. But they're not
necessarily related.
Andrew
>
> > The associated userspace changes for Witherspoon are here:
> >
> > https://gerrit.openbmc-project.xyz/#/q/topic:unbound-ucd+status:open
> >
> > Andrew
> >
> > On Fri, 2017-03-24 at 11:43 +1030, Andrew Jeffery wrote:
> > > This is a work-around for [1]. Binding the UCD9000 driver to the device (and
> > > possibly the sequence of unbinding, poking the UCD90160 via i2cset, then
> > > re-binding the UCD9000 driver) appears to have some negative effects.
> > > Instrumenting the transactions with reads of the PMBus status tree lead to
> > > the following observations under "normal" operation.
> > >
> > > [1] https://github.com/openbmc/openbmc/issues/832
> > >
> > > UCD9000/PMBus core sending unsupported commands:
> > >
> > > Jan 24 06:42:50 witherspoon kernel: ucd9000 11-0064: Device ID UCD90160|2.3.4.0000|110603
> > > Jan 24 06:42:50 witherspoon kernel: i2c i2c-11: Status byte indicates error: 0x3
> > > Jan 24 06:42:50 witherspoon kernel: i2c i2c-11: Unknown error
> > > Jan 24 06:42:50 witherspoon kernel: i2c i2c-11: CML status: 0x80
> > > Jan 24 06:42:50 witherspoon kernel: i2c i2c-11: Invalid Or Unsupported Command Received
> > > Jan 24 06:42:50 witherspoon kernel: i2c i2c-11: Transfer failed: -5, status was 0x3
> > > Jan 24 06:42:50 witherspoon kernel: i2c i2c-11: Aborting retries after 1 attempts, returning error -5
> > >
> > > Reading the status bytes off the UCD90160 gives -EBADMSG:
> > >
> > > Jan 24 06:43:21 witherspoon kernel: i2c i2c-11: Error reading PMBUS_STATUS_BYTE: -74
> > > ...
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Error reading PMBUS_STATUS_CML: -74
> > >
> > > "Other comms fault" errors:
> > >
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Status byte indicates error: 0x3
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Unknown error
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: CML status: 0x82
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Other comms fault
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Invalid Or Unsupported Command Received
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Transfer failed: -5, status was 0x3
> > > Jan 24 06:43:56 witherspoon kernel: i2c i2c-11: Retrying transfer (attempt 1)
> > > Jan 24 06:43:57 witherspoon kernel: i2c i2c-11: Status byte indicates error: 0x3
> > > Jan 24 06:43:57 witherspoon kernel: i2c i2c-11: Unknown error
> > > Jan 24 06:43:57 witherspoon kernel: i2c i2c-11: CML status: 0x2
> > > Jan 24 06:43:57 witherspoon kernel: i2c i2c-11: Other comms fault
> > > Jan 24 06:43:57 witherspoon kernel: i2c i2c-11: Retrying transfer (attempt 1)
> > > Jan 24 06:43:59 witherspoon kernel: i2c i2c-11: Status byte indicates error: 0x3
> > > Jan 24 06:43:59 witherspoon kernel: i2c i2c-11: Unknown error
> > > Jan 24 06:43:59 witherspoon kernel: i2c i2c-11: CML status: 0x80
> > > Jan 24 06:43:59 witherspoon kernel: i2c i2c-11: Invalid Or Unsupported Command Received
> > > Jan 24 06:43:59 witherspoon kernel: i2c i2c-11: Transfer failed: -5, status was 0x3
> > > Jan 24 06:43:59 witherspoon kernel: i2c i2c-11: Aborting retries after 1 attempts, returning error -5
> > >
> > > Reduce our problems by communicating with the UCD90160 as little as possible.
> > > With the associated userspace change, the only communication will be applying
> > > the VCS work-around.
> > >
> > > > Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
> > >
> > > ---
> > > arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > > index 4d26d4702a34..69d5897dbfde 100644
> > > --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > > @@ -253,6 +253,7 @@
> > > > };
> > > > > > > > ucd90160 at 64 {
> > > > + status = "disabled";
> > > > compatible = "ti,ucd90160";
> > > > reg = <0x64>;
> > > > };
>
> cheers
> xo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170325/bcf112e6/attachment.sig>
More information about the openbmc
mailing list