Skip to contentSkip to conversation

i2c: smbus: add DDR support for SPD

PATCH Applied Corentin Labbe 3 participants 3 messages Nov 14, 2022 – Nov 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 i2c: smbus: add DDR support for SPD

On my x05 laptop I got:
Memory type 0x12 not supported yet, not instantiating SPD

Adding the 0x12 case lead to a successful instantiated SPD AT24 EEPROM. i801_smbus 0000:00:1f.3: SMBus using polling
i2c i2c-6: 2/2 memory slots populated (from DMI)
at24 6-0050: 256 byte spd EEPROM, read-only
i2c i2c-6: Successfully instantiated SPD at 0x50
at24 6-0051: 256 byte spd EEPROM, read-only

And then, I decoded it successfully via decode-dimms.

---
Changes since v1:
- Added memory type document link
- Added case for LPDDR

 drivers/i2c/i2c-smbus.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/i2c/i2c-smbus.c +6 -0
index 07c92c8495a3..c85710ed9548 100644
@@ -361,9 +361,15 @@ void i2c_register_spd(struct i2c_adapter *adap)
 		return;
 	}
 
+	/*
+	 * Memory types could be found at section 7.18.2 (Memory Device — Type), table 78
+	 * https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.6.0.pdf
+	 */
 	switch (common_mem_type) {
+	case 0x12:	/* DDR */
 	case 0x13:	/* DDR2 */
 	case 0x18:	/* DDR3 */
+	case 0x1B:	/* LPDDR */
 	case 0x1C:	/* LPDDR2 */
 	case 0x1D:	/* LPDDR3 */
 		name = "spd";
Signature · 1 line
2.37.4
Reviewed-by on v2 1/1
#1 lore raw

Hi Corentin,

Quoted 31 lines · Corentin Labbe

On my x05 laptop I got:
Memory type 0x12 not supported yet, not instantiating SPD

Adding the 0x12 case lead to a successful instantiated SPD AT24 EEPROM. i801_smbus 0000:00:1f.3: SMBus using polling
i2c i2c-6: 2/2 memory slots populated (from DMI)
at24 6-0050: 256 byte spd EEPROM, read-only
i2c i2c-6: Successfully instantiated SPD at 0x50
at24 6-0051: 256 byte spd EEPROM, read-only

And then, I decoded it successfully via decode-dimms.

---
Changes since v1:
- Added memory type document link
- Added case for LPDDR

 drivers/i2c/i2c-smbus.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/i2c/i2c-smbus.c +2 -0
index 07c92c8495a3..c85710ed9548 100644
@@ -361,9 +361,15 @@ void i2c_register_spd(struct i2c_adapter *adap)
 		return;
 	}
 
+	/*
+	 * Memory types could be found at section 7.18.2 (Memory Device — Type), table 78

drivers/i2c/i2c-smbus.c void i2c_register_spd(struct i2c_adapter *adap) · line 375

Quoted 10 lines
drivers/i2c/i2c-smbus.c +4 -0
+	 * https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.6.0.pdf
+	 */
 	switch (common_mem_type) {
+	case 0x12:	/* DDR */
 	case 0x13:	/* DDR2 */
 	case 0x18:	/* DDR3 */
+	case 0x1B:	/* LPDDR */
 	case 0x1C:	/* LPDDR2 */
 	case 0x1D:	/* LPDDR3 */
 		name = "spd";

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
Applied
#2 lore raw
In reply to Corentin Labbe
Quoted 10 lines · Corentin Labbe

On my x05 laptop I got:
Memory type 0x12 not supported yet, not instantiating SPD

Adding the 0x12 case lead to a successful instantiated SPD AT24 EEPROM. i801_smbus 0000:00:1f.3: SMBus using polling
i2c i2c-6: 2/2 memory slots populated (from DMI)
at24 6-0050: 256 byte spd EEPROM, read-only
i2c i2c-6: Successfully instantiated SPD at 0x50
at24 6-0051: 256 byte spd EEPROM, read-only

Quoted 3 lines

And then, I decoded it successfully via decode-dimms.

Applied to for-current, thanks!