1*649663afSMario Limonciello======================= 2*649663afSMario Limonciello dGPU firmware flashing 3*649663afSMario Limonciello======================= 4*649663afSMario Limonciello 5*649663afSMario LimoncielloIFWI 6*649663afSMario Limonciello---- 7*649663afSMario LimoncielloFlashing the dGPU integrated firmware image (IFWI) is supported by GPUs that 8*649663afSMario Limonciellouse the PSP to orchestrate the update (Navi3x or newer GPUs). 9*649663afSMario LimoncielloFor supported GPUs, `amdgpu` will export a series of sysfs files that can be 10*649663afSMario Limoncielloused for the flash process. 11*649663afSMario Limonciello 12*649663afSMario LimoncielloThe IFWI flash process is: 13*649663afSMario Limonciello 14*649663afSMario Limonciello1. Ensure the IFWI image is intended for the dGPU on the system. 15*649663afSMario Limonciello2. "Write" the IFWI image to the sysfs file `psp_vbflash`. This will stage the IFWI in memory. 16*649663afSMario Limonciello3. "Read" from the `psp_vbflash` sysfs file to initiate the flash process. 17*649663afSMario Limonciello4. Poll the `psp_vbflash_status` sysfs file to determine when the flash process completes. 18*649663afSMario Limonciello 19*649663afSMario LimoncielloUSB-C PD F/W 20*649663afSMario Limonciello------------ 21*649663afSMario LimoncielloOn GPUs that support flashing an updated USB-C PD firmware image, the process 22*649663afSMario Limonciellois done using the `usbc_pd_fw` sysfs file. 23*649663afSMario Limonciello 24*649663afSMario Limonciello* Reading the file will provide the current firmware version. 25*649663afSMario Limonciello* Writing the name of a firmware payload stored in `/lib/firmware/amdgpu` to the sysfs file will initiate the flash process. 26*649663afSMario Limonciello 27*649663afSMario LimoncielloThe firmware payload stored in `/lib/firmware/amdgpu` can be named any name 28*649663afSMario Limoncielloas long as it doesn't conflict with other existing binaries that are used by 29*649663afSMario Limonciello`amdgpu`. 30*649663afSMario Limonciello 31*649663afSMario Limonciellosysfs files 32*649663afSMario Limonciello----------- 33*649663afSMario Limonciello.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 34