Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Gabriel C <nix.or.die@googlemail.com>
Cc: linux-hwmon@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Wei Huang <wei.huang2@amd.com>
Subject: Re: k10temp: ZEN3 readings are broken
Date: Mon, 21 Dec 2020 19:58:42 -0800	[thread overview]
Message-ID: <9d621d34-e5ce-301a-1b89-92c0791fe348@roeck-us.net> (raw)
In-Reply-To: <CAEJqkgiiU7miC13iT6DufjFAsHkNZk6rBAw=KRRnHe47kTZDnw@mail.gmail.com>

Hi,

On 12/21/20 5:45 PM, Gabriel C wrote:
> Hello Guenter,
> 
> while trying to add ZEN3 support for zenpower out of tree modules, I find out
> the in-kernel k10temp driver is broken with ZEN3 ( and partially ZEN2 even ).
> 
> commit 55163a1c00fcb526e2aa9f7f952fb38d3543da5e added:
> 
> case 0x0 ... 0x1:       /* Zen3 */
> 
> however, this is wrong, we look for a model which is 0x21 for ZEN3,
> these seem to
> be steppings?
> 
> Also, PLANE0/1 are wrong too, Icore has zero readouts even when fixing
> the model.
> 
> Looking at these ( there is something missing for 0x71 ZEN2 Ryzens
> also ) that should be:
> 
> PLANE0  (ZEN_SVI_BASE + 0x10)
> PLANE1  (ZEN_SVI_BASE + 0xc)
> 
> Which is the same as for ZEN2 >= 0x71. Since this is not really
> documented and I have some
> confirmations of these numbers from *somewhere* :-) I created a demo patch only.
> 
> I would like AMD people to really have a look at the driver and
> confirm the changes, since
> getting information from *somewhere*,  dosen't mean they are 100%
> correct. However, the driver
> is working with these changes.
> 
> In any way the model needs changing to 0x21 even if we let the other
> readings broken.
> 
> There is my demo patch:
> 
> https://crazy.dev.frugalware.org/fix-ZEN2-ZEN3-test1.patch
> 
> Also, there is some discuss and testing for both drivers:
> 
> https://github.com/ocerman/zenpower/issues/39
> 

Thanks for the information. However, since I do not have time to actively maintain
the driver, since each chip variant seems to use different addresses and scales,
and since the information about voltages and currents is unpublished by AMD,
I'll remove support for voltage/current readings from the upstream driver.
I plan to send the patch doing that to Linus shortly after the commit window
closes (or even before that).

Thanks,
Guenter

  reply	other threads:[~2020-12-22  3:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  1:45 k10temp: ZEN3 readings are broken Gabriel C
2020-12-22  3:58 ` Guenter Roeck [this message]
2020-12-22  4:33   ` Wei Huang
2020-12-22  5:09     ` Gabriel C
2020-12-22  6:08       ` Wei Huang
2020-12-22  4:33   ` Gabriel C
2020-12-22  6:07     ` Guenter Roeck
2020-12-22  6:16     ` Guenter Roeck
2020-12-22 15:26       ` Gabriel C
2020-12-22 15:51         ` Guenter Roeck
2020-12-23 10:41   ` Jan Engelhardt
2020-12-23 11:22     ` Gabriel C
2020-12-23 11:27     ` Gabriel C
2020-12-23 14:25     ` Guenter Roeck

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=9d621d34-e5ce-301a-1b89-92c0791fe348@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix.or.die@googlemail.com \
    --cc=wei.huang2@amd.com \
    /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