]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Vega20 SMU I2C HW engine controller.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 1 May 2019 14:57:14 +0000 (10:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 27 Aug 2019 14:17:35 +0000 (09:17 -0500)
commit59f990222c73f7c203b8c0492bd22e5ac49e2f5a
treecffdc737b07aefda49bf2432c055414df78bba8c
parentf9f6b318b12caf20ec8c8761dddd168577d134cd
drm/amdgpu: Vega20 SMU I2C HW engine controller.

Implement HW I2C enigne controller to be used by the RAS EEPROM
table manager. This is based on code from ATITOOLs.

v2:
Rename the file and all function prefixes to smu_v11_0_i2c

By Luben's observation always fill the TX fifo to full so
we don't have garbadge interpreted by the slave as valid data.

v3:
Remove preemption disable as the HW I2C controller will not
stop the clock on empty TX fifo and so it's not critical to
keep not empty queue.
Switch to fast mode 400 khz SCL clock for faster read and write.

v5:
Restore clock gating before releasing I2C bus and fix some
style comments.

v6:
squash in warning fix, fix includes (Alex)

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Luben Tuikov <Luben.Tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.h [new file with mode: 0644]