Re: Bug(?) in PMBus core, Issue with UCD90120

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guenter,

On Thu, Jan 30, 2014 at 08:01:02PM -0800, Guenter Roeck wrote:
> Hi Sören,
> 
> On Thu, Jan 30, 2014 at 05:13:42PM -0800, Sören Brinkmann wrote:
> > Hi Guenther,
> > 
> > I recently became aware of some weird behavior when using the UCD9000
> > driver for voltage monitoring. We use that device on our zc706 Zynq
> > platform to generate 5 voltage rails. Observing the voltages in Linux
> > showed a correct value for rail 1 but a 2x error in in rails 2-3 and a
> > 4x error in rail 5. Digging through specs, docs and sources I could
> > track this down to this:
> >  - The PMBus core assumes one VOUT_MODE register per chip
> >  - UCD90120 has VOUT_MODE registers per rail
> > 
> > In our setup we have an exponent of -14 for rail 1, -13 for rails 2-4 and
> > -14 for rail 5. The PMBus core only reads and uses the first one and
> > applies it to all rails.
> > 
> > I'm not sure whether the UCD devices don't comply to spec or whether
> > this is a bug in the PMBus core, either way, the reported values from
> > the driver are prone to be wrong/scaled by an unknown factor.
> > 
> The PMBus specification is sufficiently vague to ensure that pretty much
> any interpretation of it is PMBus compliant.
> 
> > Is this somehow known behavior for which a workaround might be
> > available? Otherwise, if you know how an acceptable solution might look
> > like, I might find some time and give it a shot.
> > 
> I think we may have to expand the driver to detect and configure the exponent
> per rail/page. At least I can not think of another solution right now.
> 
> Can you test the patch below ? Completely untested, but it compiles.
> It will likely need some refinement (for example, other chips may not even 
> have the VOUT_MODE command on non-zero pages), but should be useful for
> testing.

That was fast, thanks. The patch works. With it, the driver reports the
correct voltages.

I suspect that the UCD9200 were affected as well. Unfortunately, in our
configs for those the exponents across all rails are the same, so I
don't see things go wrong.

You can add my
Tested-by: Sören Brinkmann <soren.brinkmann@xxxxxxxxxx>

Let me know if you need a different patch to be tested.

	Thanks,
	Sören



_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors





[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux