Re: [PATCH RFC] i2c: i801: Add i801_register_jc42, similar to i2c_register_spd

Heiner Kallweit
2023-11-21T13:34:35Z

On 19.11.2023 09:39, Jean Delvare wrote:
> Hi Heiner,
>
> On Wed, 15 Nov 2023 12:00:18 +0100, Heiner Kallweit wrote:
>> After thinking once more about it I think we have to do it from the
>> ee1004 driver for DDR4. For DDR3 from at24. Only this way we can read
>> the "temp sensor present" flag from SPD. E.g. for ee1004 the SPD EEPROM
>> may be switched to the second page and we have to switch it to the first
>> page first.
>
> We indeed need to read the EEPROM data at some point. My initial
> thinking was to instantiate the at24 or ee1004 device first (from
> i2c-smbus), then read the value from the EEPROM and instantiate the
> jc42 device (still from i2c-smbus). This requires an internal read
> function. I think we already have that in at24, because it uses the
> nvmem framework, but ee1004 lacks it as far as I can see.
>
I sent RFC patches for both, ee1004 and at24.

> But anyway, if you have another approach which works, that's equally
> fine with me.
>
>> I'll send a RFC patch for this. Unfortunately I have no RAM with temp
>> sensor to test it.
>
> Neither do I :-(
>
I organized a DDR4 module with temp sensor and the ee1004 RFC patch
properly instantiated the temp sensor.
Surprisingly I found that my old DDR4 modules also have a temp sensor,
it's just not advertised in SPD.