drm/amdgpu: Update EEPROM I2C address for smu v13_0_0
authorCandice Li <candice.li@amd.com>
Fri, 24 Nov 2023 01:33:47 +0000 (09:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 23:11:39 +0000 (18:11 -0500)
Check smu v13_0_0 SKU type to select EEPROM I2C address.

Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.1.x
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c

index 65aa218380be1b670ae7624726efe30897487f71..2fde93b00cab37716703cd39016834359b273845 100644 (file)
@@ -214,6 +214,12 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
                        control->i2c_address = EEPROM_I2C_MADDR_0;
                return true;
        case IP_VERSION(13, 0, 0):
+               if (strnstr(atom_ctx->vbios_pn, "D707",
+                           sizeof(atom_ctx->vbios_pn)))
+                       control->i2c_address = EEPROM_I2C_MADDR_0;
+               else
+                       control->i2c_address = EEPROM_I2C_MADDR_4;
+               return true;
        case IP_VERSION(13, 0, 6):
        case IP_VERSION(13, 0, 10):
                control->i2c_address = EEPROM_I2C_MADDR_4;