Skip to content

Commit

Permalink
firmware: microchip: add PolarFire SoC Auto Update support
Browse files Browse the repository at this point in the history
Add support for Auto Update reprogramming of the FPGA fabric on
PolarFire SoC, using the fw_upload mechanism a la the
intel-m10-bmc-sec-update driver.

This driver only writes the image to the spi flash & performs
validation on it, as the entire FPGA becomes unusable during the actual
reprogramming of a bitstream. To initiate the reprogramming itself, a
device reset is required. The SBI SRST extension's "cold reboot" can
trigger such a device reset, provided corresponding support has been
enabled in the HSS (Hart Software Services), the provider of SBI runtime
services on PolarFire SoC.

While this is a driver responsible for the reprogramming of an FPGA,
there is no dynamic discovery of devices involved, as runtime
reconfiguration is not possible due to the device reset requirements.
Therefore FPGA manager subsystem is not used by this driver and the FPGA
subsystem maintainers were unwilling to accept it there.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
  • Loading branch information
ConchuOD committed Dec 6, 2023
1 parent fad13b5 commit ec5b0f1
Show file tree
Hide file tree
Showing 5 changed files with 511 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/firmware/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ source "drivers/firmware/google/Kconfig"
source "drivers/firmware/efi/Kconfig"
source "drivers/firmware/imx/Kconfig"
source "drivers/firmware/meson/Kconfig"
source "drivers/firmware/microchip/Kconfig"
source "drivers/firmware/psci/Kconfig"
source "drivers/firmware/qcom/Kconfig"
source "drivers/firmware/smccc/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ obj-y += arm_scmi/
obj-y += broadcom/
obj-y += cirrus/
obj-y += meson/
obj-y += microchip/
obj-$(CONFIG_GOOGLE_FIRMWARE) += google/
obj-y += efi/
obj-y += imx/
Expand Down
12 changes: 12 additions & 0 deletions drivers/firmware/microchip/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only

config POLARFIRE_SOC_AUTO_UPDATE
tristate "Microchip PolarFire SoC AUTO UPDATE"
depends on POLARFIRE_SOC_SYS_CTRL
select FW_LOADER
select FW_UPLOAD
help
Support for reprogramming PolarFire SoC from within Linux, using the
Auto Upgrade feature of the system controller.

If built as a module, it will be called mpfs-auto-update.
3 changes: 3 additions & 0 deletions drivers/firmware/microchip/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_POLARFIRE_SOC_AUTO_UPDATE) += mpfs-auto-update.o
Loading

0 comments on commit ec5b0f1

Please sign in to comment.