Skip to content

Commit cd845df

Browse files
committed
Merge tag 'riscv-soc-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers
RISC-V SoC drivers for v6.8 There's only one set of changes here, the addition of "Auto Update" support for PolarFire SoC. Auto Update is one of the ways that the FPGA bitstream can be updated, and the only one suitable for use from Linux as it does not immediately initiate a reboot when started. The driver was not accepted in the FPGA manager subsystem as the update only occurs after a reboot and makes no use of the FPGA manager framework. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> * tag 'riscv-soc-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: MAINTAINERS: add auto-update driver to mpfs entry firmware: microchip: Replace of_device.h with explicit include firmware: microchip: add PolarFire SoC Auto Update support soc: microchip: mpfs: add auto-update subdev to system controller soc: microchip: mpfs: print service status in warning message soc: microchip: mpfs: enable access to the system controller's flash dt-bindings: soc: microchip: add a property for system controller flash firmware_loader: Expand Firmware upload error codes with firmware invalid error Link: https://lore.kernel.org/r/20231221-droop-unblock-81e4fe14acee@spud Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 418188d + 0f2d06d commit cd845df

13 files changed

Lines changed: 559 additions & 3 deletions

File tree

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ properties:
2626
compatible:
2727
const: microchip,mpfs-sys-controller
2828

29+
microchip,bitstream-flash:
30+
$ref: /schemas/types.yaml#/definitions/phandle
31+
description:
32+
The SPI flash connected to the system controller's QSPI controller.
33+
The system controller may retrieve FPGA bitstreams from this flash to
34+
perform In-Application Programming (IAP) or during device initialisation
35+
for Auto Update. The MSS and system controller have separate QSPI
36+
controllers and this flash is connected to both. Software running in the
37+
MSS can write bitstreams to the flash.
38+
2939
required:
3040
- compatible
3141
- mboxes

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18638,6 +18638,7 @@ F: Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
1863818638
F: arch/riscv/boot/dts/microchip/
1863918639
F: drivers/char/hw_random/mpfs-rng.c
1864018640
F: drivers/clk/microchip/clk-mpfs*.c
18641+
F: drivers/firmware/microchip/mpfs-auto-update.c
1864118642
F: drivers/i2c/busses/i2c-microchip-corei2c.c
1864218643
F: drivers/mailbox/mailbox-mpfs.c
1864318644
F: drivers/pci/controller/pcie-microchip-host.c

drivers/base/firmware_loader/sysfs_upload.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static const char * const fw_upload_err_str[] = {
2727
[FW_UPLOAD_ERR_INVALID_SIZE] = "invalid-file-size",
2828
[FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
2929
[FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
30+
[FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
3031
};
3132

3233
static const char *fw_upload_progress(struct device *dev,

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)