<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwmon/k10temp.c, branch v5.7-rc2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwmon: (k10temp) make some symbols static</title>
<updated>2020-04-12T22:12:51+00:00</updated>
<author>
<name>Jason Yan</name>
<email>yanaijie@huawei.com</email>
</author>
<published>2020-04-09T08:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e786f328b382e6df64f31390973b81f8fb9a044'/>
<id>0e786f328b382e6df64f31390973b81f8fb9a044</id>
<content type='text'>
Fix the following sparse warning:

drivers/hwmon/k10temp.c:189:12: warning: symbol 'k10temp_temp_label' was
not declared. Should it be static?
drivers/hwmon/k10temp.c:202:12: warning: symbol 'k10temp_in_label' was
not declared. Should it be static?
drivers/hwmon/k10temp.c:207:12: warning: symbol 'k10temp_curr_label' was
not declared. Should it be static?

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Link: https://lore.kernel.org/r/20200409084502.42126-1-yanaijie@huawei.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following sparse warning:

drivers/hwmon/k10temp.c:189:12: warning: symbol 'k10temp_temp_label' was
not declared. Should it be static?
drivers/hwmon/k10temp.c:202:12: warning: symbol 'k10temp_in_label' was
not declared. Should it be static?
drivers/hwmon/k10temp.c:207:12: warning: symbol 'k10temp_curr_label' was
not declared. Should it be static?

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Link: https://lore.kernel.org/r/20200409084502.42126-1-yanaijie@huawei.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Reorganize and simplify temperature support detection</title>
<updated>2020-03-09T03:35:46+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-23T16:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60465245e6ce06691f1aa5d89c59b26679df7617'/>
<id>60465245e6ce06691f1aa5d89c59b26679df7617</id>
<content type='text'>
Use a bit map to describe if temperature channels are supported,
and use it for all temperature channels. Use a separate flag,
independent of Tdie support, to indicate if the system is running
on a Ryzen CPU.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a bit map to describe if temperature channels are supported,
and use it for all temperature channels. Use a separate flag,
independent of Tdie support, to indicate if the system is running
on a Ryzen CPU.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Swap Tdie and Tctl on Family 17h CPUs</title>
<updated>2020-03-09T03:35:46+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-23T15:57:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b02c6857389da66b09e447103bdb247ccd182456'/>
<id>b02c6857389da66b09e447103bdb247ccd182456</id>
<content type='text'>
Traditionally, the temperature displayed by k10temp was Tctl.
On Family 17h CPUs, Tdie was displayed instead. To reduce confusion,
Tctl was added later as second temperature. This resulted in Tdie
being reported as temp1_input, and Tctl as temp2_input. This is
different to non-Ryzen CPUs, where Tctl is displayed as temp1_input.
Swap temp1_input and temp2_input on Family 17h CPUs, such that Tctl
is now reported as temp1_input and Tdie is reported as temp2_input,
to align with other CPUs, streamline the code, and make it less
confusing. Coincidentally, this also aligns the code with its
documentation, which states that Tdie is reported as temp2_input.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Traditionally, the temperature displayed by k10temp was Tctl.
On Family 17h CPUs, Tdie was displayed instead. To reduce confusion,
Tctl was added later as second temperature. This resulted in Tdie
being reported as temp1_input, and Tctl as temp2_input. This is
different to non-Ryzen CPUs, where Tctl is displayed as temp1_input.
Swap temp1_input and temp2_input on Family 17h CPUs, such that Tctl
is now reported as temp1_input and Tdie is reported as temp2_input,
to align with other CPUs, streamline the code, and make it less
confusing. Coincidentally, this also aligns the code with its
documentation, which states that Tdie is reported as temp2_input.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Display up to eight sets of CCD temperatures</title>
<updated>2020-01-23T23:17:59+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-23T02:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fd8bdb23b91876ac1e624337bb88dc1dcc21d67e'/>
<id>fd8bdb23b91876ac1e624337bb88dc1dcc21d67e</id>
<content type='text'>
In HWiNFO, we see support for Tccd1, Tccd3, Tccd5, and Tccd7 temperature
sensors on Zen2 based Threadripper CPUs. Checking register maps on
Threadripper 3970X confirms SMN register addresses and values for those
sensors.

Register values observed in an idle system:

0x059950: 00000000 00000abc 00000000 00000ad8
0x059960: 00000000 00000ade 00000000 00000ae4

Under load:

0x059950: 00000000 00000c02 00000000 00000c14
0x059960: 00000000 00000c30 00000000 00000c22

More analysis shows that EPYC CPUs support up to 8 CCD temperature
sensors. EPYC 7601 supports three CCD temperature sensors. Unlike
Zen2 CPUs, the register space in Zen1 CPUs supports a maximum of four
sensors, so only search for a maximum of four sensors on Zen1 CPUs.

On top of that, in thm_10_0_sh_mask.h in the Linux kernel, we find
definitions for THM_DIE{1-3}_TEMP__VALID_MASK, set to 0x00000800, as well
as matching SMN addresses. This lets us conclude that bit 11 of the
respective registers is a valid bit. With this assumption, the temperature
offset is now 49 degrees C. This conveniently matches the documented
temperature offset for Tdie, again suggesting that above registers indeed
report temperatures sensor values. Assume that bit 11 is indeed a valid
bit, and add support for the additional sensors.

With this patch applied, output from 3970X (idle) looks as follows:

k10temp-pci-00c3
Adapter: PCI adapter
Tdie:         +55.9°C
Tctl:         +55.9°C
Tccd1:        +39.8°C
Tccd3:        +43.8°C
Tccd5:        +43.8°C
Tccd7:        +44.8°C

Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In HWiNFO, we see support for Tccd1, Tccd3, Tccd5, and Tccd7 temperature
sensors on Zen2 based Threadripper CPUs. Checking register maps on
Threadripper 3970X confirms SMN register addresses and values for those
sensors.

Register values observed in an idle system:

0x059950: 00000000 00000abc 00000000 00000ad8
0x059960: 00000000 00000ade 00000000 00000ae4

Under load:

0x059950: 00000000 00000c02 00000000 00000c14
0x059960: 00000000 00000c30 00000000 00000c22

More analysis shows that EPYC CPUs support up to 8 CCD temperature
sensors. EPYC 7601 supports three CCD temperature sensors. Unlike
Zen2 CPUs, the register space in Zen1 CPUs supports a maximum of four
sensors, so only search for a maximum of four sensors on Zen1 CPUs.

On top of that, in thm_10_0_sh_mask.h in the Linux kernel, we find
definitions for THM_DIE{1-3}_TEMP__VALID_MASK, set to 0x00000800, as well
as matching SMN addresses. This lets us conclude that bit 11 of the
respective registers is a valid bit. With this assumption, the temperature
offset is now 49 degrees C. This conveniently matches the documented
temperature offset for Tdie, again suggesting that above registers indeed
report temperatures sensor values. Assume that bit 11 is indeed a valid
bit, and add support for the additional sensors.

With this patch applied, output from 3970X (idle) looks as follows:

k10temp-pci-00c3
Adapter: PCI adapter
Tdie:         +55.9°C
Tctl:         +55.9°C
Tccd1:        +39.8°C
Tccd3:        +43.8°C
Tccd5:        +43.8°C
Tccd7:        +44.8°C

Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Add debugfs support</title>
<updated>2020-01-23T21:15:11+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-22T05:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9c4a38f19ed2bda2df2765e98ed661daf61b2cb2'/>
<id>9c4a38f19ed2bda2df2765e98ed661daf61b2cb2</id>
<content type='text'>
Show thermal and SVI registers for Family 17h CPUs.

Tested-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Show thermal and SVI registers for Family 17h CPUs.

Tested-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Don't show temperature limits on Ryzen (Zen) CPUs</title>
<updated>2020-01-23T21:15:11+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-17T14:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=70831c8a91845434c3792b0c3ef966dc30741ec0'/>
<id>70831c8a91845434c3792b0c3ef966dc30741ec0</id>
<content type='text'>
The maximum Tdie or Tctl is not published for Ryzen CPUs. What is
known, however, is that the traditional value of 70 degrees C is no
longer correct. On top of that, the limit applies to Tctl, not to Tdie.
Displaying it in either context is meaningless, confusing, and wrong.
Stop doing it.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The maximum Tdie or Tctl is not published for Ryzen CPUs. What is
known, however, is that the traditional value of 70 degrees C is no
longer correct. On top of that, the limit applies to Tctl, not to Tdie.
Displaying it in either context is meaningless, confusing, and wrong.
Stop doing it.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Show core and SoC current and voltages on Ryzen CPUs</title>
<updated>2020-01-23T21:15:11+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-15T01:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b00647c46c9d7f6ee1ff6aaf335906101755e614'/>
<id>b00647c46c9d7f6ee1ff6aaf335906101755e614</id>
<content type='text'>
Ryzen CPUs report core and SoC voltages and currents. Add support
for it to the k10temp driver.

For the time being, only report voltages and currents for Ryzen
CPUs. Threadripper and EPYC appear to use a different mechanism.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ryzen CPUs report core and SoC voltages and currents. Add support
for it to the k10temp driver.

For the time being, only report voltages and currents for Ryzen
CPUs. Threadripper and EPYC appear to use a different mechanism.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Report temperatures per CPU die</title>
<updated>2020-01-23T21:15:11+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2020-01-15T01:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c757938929c9e1de52e31400f673fac02e1f26bb'/>
<id>c757938929c9e1de52e31400f673fac02e1f26bb</id>
<content type='text'>
Zen2 reports reporting temperatures per CPU die (called Core Complex Dies,
or CCD, by AMD). Add support for it to the k10temp driver.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Zen2 reports reporting temperatures per CPU die (called Core Complex Dies,
or CCD, by AMD). Add support for it to the k10temp driver.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hmon: (k10temp) Convert to use devm_hwmon_device_register_with_info</title>
<updated>2020-01-23T21:15:11+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2019-12-24T15:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d547552a1bf1deb321e787a6e6e2a9774573a35f'/>
<id>d547552a1bf1deb321e787a6e6e2a9774573a35f</id>
<content type='text'>
Convert driver to use devm_hwmon_device_register_with_info to simplify
the code and to reduce its size.

Old size (x86_64):
   text	   data	    bss	    dec	    hex	filename
   8247	   4488	     64	  12799	   31ff	drivers/hwmon/k10temp.o
New size:
   text	   data	    bss	    dec	    hex	filename
   6778	   2792	     64	   9634	   25a2	drivers/hwmon/k10temp.o

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert driver to use devm_hwmon_device_register_with_info to simplify
the code and to reduce its size.

Old size (x86_64):
   text	   data	    bss	    dec	    hex	filename
   8247	   4488	     64	  12799	   31ff	drivers/hwmon/k10temp.o
New size:
   text	   data	    bss	    dec	    hex	filename
   6778	   2792	     64	   9634	   25a2	drivers/hwmon/k10temp.o

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) Use bitops</title>
<updated>2020-01-23T21:15:11+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-04-29T15:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a6d210da1a01cb5c3fd4d2dd7b5920642f66677c'/>
<id>a6d210da1a01cb5c3fd4d2dd7b5920642f66677c</id>
<content type='text'>
Using bitops makes bit masks and shifts easier to read.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using bitops makes bit masks and shifts easier to read.

Tested-by: Brad Campbell &lt;lists2009@fnarfbargle.com&gt;
Tested-by: Bernhard Gebetsberger &lt;bernhard.gebetsberger@gmx.at&gt;
Tested-by: Holger Kiehl &lt;holger.kiehl@dwd.de&gt;
Tested-by: Michael Larabel &lt;michael@phoronix.com&gt;
Tested-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Tested-by: Ken Moffat &lt;zarniwhoop73@googlemail.com&gt;
Tested-by: Darren Salt &lt;devspam@moreofthesa.me.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
