[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffd72953-ecd2-405a-ad6d-236143b26946@roeck-us.net>
Date: Thu, 30 May 2024 15:33:34 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Thomas Weißschuh <thomas@...ch.de>
Cc: linux-hwmon@...r.kernel.org, Hristo Venev <hristo@...ev.name>,
René Rebe <rene@...ctcode.de>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Radu Sabau <radu.sabau@...log.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Paul Menzel <pmenzel@...gen.mpg.de>
Subject: Re: [PATCH 2/3] hwmon: Add support for SPD5118 compliant temperature
sensors
On 5/30/24 14:02, Thomas Weißschuh wrote:
> 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/
>
Ok, but that doesn't explain the reason. Wolfram, Paul, why do you
think this is needed ? Note that I am not opposed to adding spd
eeprom support, but I'd like to know why I am doing it before
I spend time on it.
Auto detection would be nice, though, because with that we could
drop support for the _detect function (which is kind of risky
on the i2c address range normally used for eeproms).
Thanks,
Guenter
Powered by blists - more mailing lists