aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
diff options
context:
space:
mode:
authorLuben Tuikov <luben.tuikov@amd.com>2022-01-19 20:20:53 -0500
committerAlex Deucher <alexander.deucher@amd.com>2022-01-27 15:49:48 -0500
commit2f60dd50769efcd6eedd0dc6b3f419cdd1f1f1fa (patch)
treed1665a769e56ca6e9b4e4548b1f2b00c6b003e42 /drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
parentdrm/amdgpu: add 1.3.1/2.4.0 athub CG support (diff)
downloadlinux-dev-2f60dd50769efcd6eedd0dc6b3f419cdd1f1f1fa.tar.xz
linux-dev-2f60dd50769efcd6eedd0dc6b3f419cdd1f1f1fa.zip
drm/amd: Expose the FRU SMU I2C bus
Expose both SMU I2C buses. Some boards use the same bus for both the RAS and FRU EEPROMs and others use different buses. This enables the additional I2C bus and sets the right buses to use for RAS and FRU EEPROM access. Cc: Roy Sun <Roy.Sun@amd.com> Co-developed-by: Alex Deucher <Alexander.Deucher@amd.com> 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>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h')
-rw-r--r--drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
index ba857ca75392..2766b88ecf96 100644
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
@@ -284,6 +284,15 @@ enum ip_power_state {
/* Used to mask smu debug modes */
#define SMU_DEBUG_HALT_ON_ERROR 0x1
+#define MAX_SMU_I2C_BUSES 2
+
+struct amdgpu_smu_i2c_bus {
+ struct i2c_adapter adapter;
+ struct amdgpu_device *adev;
+ int port;
+ struct mutex mutex;
+};
+
struct amdgpu_pm {
struct mutex mutex;
u32 current_sclk;
@@ -316,8 +325,9 @@ struct amdgpu_pm {
uint32_t pp_feature;
/* Used for I2C access to various EEPROMs on relevant ASICs */
- struct i2c_adapter smu_i2c;
- struct mutex smu_i2c_mutex;
+ struct amdgpu_smu_i2c_bus smu_i2c[MAX_SMU_I2C_BUSES];
+ struct i2c_adapter *ras_eeprom_i2c_bus;
+ struct i2c_adapter *fru_eeprom_i2c_bus;
struct list_head pm_attr_list;
atomic_t pwr_state[AMD_IP_BLOCK_TYPE_NUM];