Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Set FRU bus for Aldebaran and Vega 20

The FRU and RAS EEPROMs share the same I2C bus on Aldebaran and Vega 20
ASICs. Set the FRU bus "pointer" to this single bus, as access to the FRU
is sought through that bus "pointer" and not through the RAS bus "pointer".

Cc: Roy Sun <Roy.Sun@amd.com>
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Fixes: 2f60dd50769efc ("drm/amd: Expose the FRU SMU I2C bus")
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Luben Tuikov and committed by
Alex Deucher
00d6936d 447c7997

+3 -1
+2 -1
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
··· 741 741 i2c_set_adapdata(control, smu_i2c); 742 742 743 743 adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter; 744 - adev->pm.fru_eeprom_i2c_bus = NULL; 744 + adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter; 745 745 746 746 res = i2c_add_adapter(control); 747 747 if (res) ··· 756 756 757 757 i2c_del_adapter(control); 758 758 adev->pm.ras_eeprom_i2c_bus = NULL; 759 + adev->pm.fru_eeprom_i2c_bus = NULL; 759 760 } 760 761 761 762 /*
+1
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
··· 1583 1583 } 1584 1584 1585 1585 adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter; 1586 + adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter; 1586 1587 1587 1588 return 0; 1588 1589 Out_err: