Skip to content

Commit ec5b0f1

Browse files
committed
firmware: microchip: add PolarFire SoC Auto Update support
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>
1 parent fad13b5 commit ec5b0f1

5 files changed

Lines changed: 511 additions & 0 deletions

File tree

drivers/firmware/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ source "drivers/firmware/google/Kconfig"
272272
source "drivers/firmware/efi/Kconfig"
273273
source "drivers/firmware/imx/Kconfig"
274274
source "drivers/firmware/meson/Kconfig"
275+
source "drivers/firmware/microchip/Kconfig"
275276
source "drivers/firmware/psci/Kconfig"
276277
source "drivers/firmware/qcom/Kconfig"
277278
source "drivers/firmware/smccc/Kconfig"

drivers/firmware/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ obj-y += arm_scmi/
2828
obj-y += broadcom/
2929
obj-y += cirrus/
3030
obj-y += meson/
31+
obj-y += microchip/
3132
obj-$(CONFIG_GOOGLE_FIRMWARE) += google/
3233
obj-y += efi/
3334
obj-y += imx/

drivers/firmware/microchip/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
3+
config POLARFIRE_SOC_AUTO_UPDATE
4+
tristate "Microchip PolarFire SoC AUTO UPDATE"
5+
depends on POLARFIRE_SOC_SYS_CTRL
6+
select FW_LOADER
7+
select FW_UPLOAD
8+
help
9+
Support for reprogramming PolarFire SoC from within Linux, using the
10+
Auto Upgrade feature of the system controller.
11+
12+
If built as a module, it will be called mpfs-auto-update.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_POLARFIRE_SOC_AUTO_UPDATE) += mpfs-auto-update.o

0 commit comments

Comments
 (0)