drm/amdgpu: support psp ip block for psp v14

Support PSP ip block for psp v14.
Add psp ip block for psp v14_0_2 and v14_0_3.

v2: sqaush in 14.0.3 firmware fix (Alex)

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Likun Gao 2023-08-10 15:16:05 +08:00 committed by Alex Deucher
parent f19cb91615
commit a78791c2b2
3 changed files with 17 additions and 0 deletions

View file

@ -38,6 +38,7 @@
#include "psp_v12_0.h"
#include "psp_v13_0.h"
#include "psp_v13_0_4.h"
#include "psp_v14_0.h"
#include "amdgpu_ras.h"
#include "amdgpu_securedisplay.h"
@ -224,6 +225,11 @@ static int psp_early_init(void *handle)
psp_v13_0_4_set_psp_funcs(psp);
psp->autoload_supported = true;
break;
case IP_VERSION(14, 0, 2):
case IP_VERSION(14, 0, 3):
psp_v14_0_set_psp_funcs(psp);
psp->autoload_supported = true;
break;
default:
return -EINVAL;
}
@ -3959,3 +3965,11 @@ const struct amdgpu_ip_block_version psp_v13_0_4_ip_block = {
.rev = 4,
.funcs = &psp_ip_funcs,
};
const struct amdgpu_ip_block_version psp_v14_0_ip_block = {
.type = AMD_IP_BLOCK_TYPE_PSP,
.major = 14,
.minor = 0,
.rev = 0,
.funcs = &psp_ip_funcs,
};

View file

@ -463,6 +463,7 @@ extern const struct amdgpu_ip_block_version psp_v11_0_8_ip_block;
extern const struct amdgpu_ip_block_version psp_v12_0_ip_block;
extern const struct amdgpu_ip_block_version psp_v13_0_ip_block;
extern const struct amdgpu_ip_block_version psp_v13_0_4_ip_block;
extern const struct amdgpu_ip_block_version psp_v14_0_ip_block;
extern int psp_wait_for(struct psp_context *psp, uint32_t reg_index,
uint32_t field_val, uint32_t mask, bool check_changed);

View file

@ -32,6 +32,7 @@
#include "mp/mp_14_0_2_sh_mask.h"
MODULE_FIRMWARE("amdgpu/psp_14_0_2_sos.bin");
MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos.bin");
/* For large FW files the time to complete can be very long */
#define USBC_PD_POLLING_LIMIT_S 240
@ -61,6 +62,7 @@ static int psp_v14_0_init_microcode(struct psp_context *psp)
switch (amdgpu_ip_version(adev, MP0_HWIP, 0)) {
case IP_VERSION(14, 0, 2):
case IP_VERSION(14, 0, 3):
err = psp_init_sos_microcode(psp, ucode_prefix);
if (err)
return err;