]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i2c: smbus: Support DDR5 and LPDDR5 SPD EEPROMs
authorGuenter Roeck <linux@roeck-us.net>
Sat, 1 Jun 2024 13:44:47 +0000 (06:44 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 10 Jun 2024 16:13:41 +0000 (09:13 -0700)
Detect (LP)DDR5 memory and instantiate the SPD5118 driver automatically.

Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/i2c/i2c-smbus.c

index 97f338b123b11872402df5d84ef7c20ef33454f2..f809f0ef200444eed0735615b5806047a59c9679 100644 (file)
@@ -308,7 +308,7 @@ EXPORT_SYMBOL_GPL(i2c_free_slave_host_notify_device);
  * target systems are the same.
  * Restrictions to automatic SPD instantiation:
  *  - Only works if all filled slots have the same memory type
- *  - Only works for DDR, DDR2, DDR3 and DDR4 for now
+ *  - Only works for (LP)DDR memory types up to DDR5
  *  - Only works on systems with 1 to 8 memory slots
  */
 #if IS_ENABLED(CONFIG_DMI)
@@ -382,6 +382,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",