Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, "Hristo Venev" <hristo@venev.name>,
	"René Rebe" <rene@exactcode.de>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Radu Sabau" <radu.sabau@analog.com>
Subject: Re: [PATCH 2/3] hwmon: Add support for SPD5118 compliant temperature sensors
Date: Thu, 30 May 2024 23:02:32 +0200	[thread overview]
Message-ID: <0a2ed64d-06d9-45e8-a054-4ded4429f952@t-8ch.de> (raw)
In-Reply-To: <16e448f1-cfc9-4e88-b3f1-55e1856d1405@roeck-us.net>

On 2024-05-30 13:46:48+0000, Guenter Roeck wrote:
> On 5/30/24 13:20, Thomas Weißschuh wrote:
> > On 2024-05-29 13:52:03+0000, Guenter Roeck wrote:
> > > Add support for SPD5118 (Jedec JESD300-5B.01) compliant temperature
> > > sensors. Such sensors are typically found on DDR5 memory modules.
> > 
> > I can get the module to automatically probe with this change:
> > 
> > diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c
> > index 97f338b123b1..8d9218f755d7 100644
> > --- a/drivers/i2c/i2c-smbus.c
> > +++ b/drivers/i2c/i2c-smbus.c
> > @@ -382,6 +386,10 @@ void i2c_register_spd(struct i2c_adapter *adap)
> >          case 0x1E:      /* LPDDR4 */
> >                  name = "ee1004";
> >                  break;
> > +       case 0x22:      /* DDR5 */
> > +       case 0x23:      /* LPDDR5 */
> > +               name = "spd5118";
> > +               break;
> >          default:
> >                  dev_info(&adap->dev,
> >                           "Memory type 0x%02x not supported yet, not instantiating SPD\n",
> > 
> > (Credits go to Paul Menzel [0])
> > 
> > Maybe you can add that to your series.
> > 
> 
> That is specifically for SPD (eeprom) support, which I didn't provide
> in the driver. It does not register the equivalent jc42.4 temperature
> sensor either. Given that, using the code to register a temperature
> sensor seems inappropriate.

I see, I wasn't aware about the specifics of SPD.

It felt like a nice way to get automatic probing.
(I was wondering about that today before)

> I didn't include accessing the SPD eeprom to the driver because I don't
> have a use case. I don't mind adding it, though, if others think that it is
> important.

Wolfgang seems to think it's important:
https://lore.kernel.org/lkml/tdia472d4pow2osabef24y2ujkkquplfajxmmtk5pnxllsdxsz@wxzynz7llasr/

> > To also work with my PIIX4 I2C bus, I also need:
> > 
> > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> > index fe6e8a1bb607..ff66e883b348 100644
> > --- a/drivers/i2c/busses/Kconfig
> > +++ b/drivers/i2c/busses/Kconfig
> > @@ -195,6 +195,7 @@ config I2C_ISMT
> >   config I2C_PIIX4
> >          tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)"
> >          depends on PCI && HAS_IOPORT
> > +       select I2C_SMBUS
> >          help
> >            If you say yes to this option, support will be included for the Intel
> >            PIIX4 family of mainboard I2C interfaces.  Specifically, the following
> > diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
> > index 6a0392172b2f..f8d81f8c0cb3 100644
> > --- a/drivers/i2c/busses/i2c-piix4.c
> > +++ b/drivers/i2c/busses/i2c-piix4.c
> > @@ -29,6 +29,7 @@
> >   #include <linux/stddef.h>
> >   #include <linux/ioport.h>
> >   #include <linux/i2c.h>
> > +#include <linux/i2c-smbus.h>
> >   #include <linux/slab.h>
> >   #include <linux/dmi.h>
> >   #include <linux/acpi.h>
> > @@ -982,6 +983,8 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
> >                  return retval;
> >          }
> > 
> > +       i2c_register_spd(adap);
> > +
> >          *padap = adap;
> >          return 0;
> >   }
> > 
> > Though I guess it's not the right place to call i2c_register_sdp(),
> > I'll look at it some more and then submit it.
> > 
> 
> Hmm, I didn't find a better place though.
> 
> Please copy me when you submit a patch; I can test it on an AMD system with
> DDR4.

Will do.


Thomas

  reply	other threads:[~2024-05-30 21:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 20:52 [PATCH 0/3] hwmon: Add support for SPD5118 compliant temperature sensors Guenter Roeck
2024-05-29 20:52 ` [PATCH 1/3] dt-bindings: hwmon: jedec,spd5118: Add bindings Guenter Roeck
2024-05-29 20:52 ` [PATCH 2/3] hwmon: Add support for SPD5118 compliant temperature sensors Guenter Roeck
2024-05-30  8:08   ` Armin Wolf
2024-05-30 13:23     ` Guenter Roeck
2024-05-30 13:39       ` Guenter Roeck
2024-05-30 16:45         ` Armin Wolf
2024-05-30 16:51           ` Guenter Roeck
2024-05-30 17:06             ` Armin Wolf
2024-05-30  9:08   ` Thomas Weißschuh
2024-05-30 13:27     ` Guenter Roeck
2024-05-30 10:51   ` Thomas Weißschuh
2024-05-30 13:47     ` Guenter Roeck
2024-05-30 13:57       ` Thomas Weißschuh
2024-05-30 14:07         ` Guenter Roeck
2024-05-30 17:03   ` Armin Wolf
2024-05-30 17:33     ` Guenter Roeck
2024-05-30 17:41       ` Armin Wolf
2024-05-30 17:36     ` Guenter Roeck
2024-05-30 20:20   ` Thomas Weißschuh
2024-05-30 20:46     ` Guenter Roeck
2024-05-30 21:02       ` Thomas Weißschuh [this message]
2024-05-30 22:33         ` Guenter Roeck
2024-05-31  9:31           ` Wolfram Sang
2024-05-31 10:01             ` René Rebe
2024-05-31 10:37               ` Thomas Weißschuh
2024-05-31 13:14               ` Guenter Roeck
2024-05-31 13:20                 ` René Rebe
2024-05-31 13:55                   ` Guenter Roeck
2024-05-29 20:52 ` [RFT PATCH 3/3] hwmon: (spd5118) Add PEC support 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=0a2ed64d-06d9-45e8-a054-4ded4429f952@t-8ch.de \
    --to=thomas@t-8ch.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hristo@venev.name \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=radu.sabau@analog.com \
    --cc=rene@exactcode.de \
    --cc=robh@kernel.org \
    /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