PolarFire SoC Auto Update Support
Status from this message: Applied to riscv-soc-for-next, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Changes in v2 from the cover letter
- per Russ' suggestion, the driver has been switched to using the firmware-upload API rather than the fpga one
- as a result of that change, the structure of the driver has changed significantly, although most of that is reshuffling existing code around
- check if the upgrade is possible in probe and fail if it isn't
- only write the image index if it is not already set
- delete the now unneeded debugfs bits
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | soc: microchip: mpfs: add a prefix to rx_callback()drivers/ | +2 | 0 replies | |
| 2/7 | dt-bindings: soc: microchip: add a property for system controller flashDocumentation/ | +10 | 0 replies | |
| 3/7 | soc: microchip: mpfs: enable access to the system controller's flashdrivers/ drivers/ include/ | +23 | 0 replies | |
| 4/7 | soc: microchip: mpfs: print service status in warning messagedrivers/ | +3 | 0 replies | |
| 5/7 | soc: microchip: mpfs: add auto-update subdev to system controllerdrivers/ | +7 | 0 replies | |
| 6/7 | fpga: add PolarFire SoC Auto Update supportdrivers/ drivers/ drivers/ | +507 | 3 replies | |
| 7/7 | riscv: dts: microchip: add the mpfs' system controller qspi & associated flasharch/ arch/ | +39 | 0 replies |
Reviews trailers per patch
1 of 7 patches has a Reviewed-by or Acked-by.
| Patch | Rob Herring |
|---|---|
| 1/7 | |
| 2/7 | R-b |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/7] PolarFire SoC Auto Update Support
Hey all,
This patchset adds support for the "Auto Update" feature on PolarFire SoC that allows for writing an FPGA bistream to the SPI flash connected to the system controller.
On powercycle (or reboot depending on how the firmware implements the openSBI SRST extension) "Auto Update" will take place, and program the FPGA with the contents of the SPI flash - provided that that image is valid and an actual upgrade from that already programmed!
Unfortunately, this series is not really testable yet - the Engineering Sample silicon on most dev boards has a bug in the QSPI controller connected to the system controller's flash and cannot access it. Pre-production and later silicon has this bug fixed.
I previously posted an RFC about my approach in this driver, since as a flash-based FPGA we are somewhat different to the existing self-reprogramming drivers here. That RFC is here:
https://lore.kernel.org/linux-fpga/[email protected]/
This series depends on the following fixes:
https://lore.kernel.org/all/d7c3ec51-8493-444a-bdec-2a30b0a15bdc@spud/
The patch adding the driver depends on the soc patches earlier in the series, so taking both through the same tree makes sense. Depending on sequencing with the dependencies, me taking it through the soc tree (with Acks etc of course) may make the most sense.
Cheers,
Conor.
Changes in v2:
- per Russ' suggestion, the driver has been switched to using the firmware-upload API rather than the fpga one
- as a result of that change, the structure of the driver has changed significantly, although most of that is reshuffling existing code around
- check if the upgrade is possible in probe and fail if it isn't
- only write the image index if it is not already set
- delete the now unneeded debugfs bits
CC: Conor Dooley <[email protected]>
CC: Daire McNamara <[email protected]>
CC: Rob Herring <[email protected]>
CC: Krzysztof Kozlowski <[email protected]>
CC: Moritz Fischer <[email protected]>
CC: Wu Hao <[email protected]>
CC: Xu Yilun <[email protected]>
CC: Tom Rix <[email protected]>
CC; Russ Weight <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
Conor Dooley (7):
soc: microchip: mpfs: add a prefix to rx_callback()
dt-bindings: soc: microchip: add a property for system controller
flash
soc: microchip: mpfs: enable access to the system controller's flash
soc: microchip: mpfs: print service status in warning message
soc: microchip: mpfs: add auto-update subdev to system controller
fpga: add PolarFire SoC Auto Update support
riscv: dts: microchip: add the mpfs' system controller qspi &
associated flash
.../microchip,mpfs-sys-controller.yaml | 10 + .../boot/dts/microchip/mpfs-icicle-kit.dts | 21 + arch/riscv/boot/dts/microchip/mpfs.dtsi | 24 +- drivers/fpga/Kconfig | 11 + drivers/fpga/Makefile | 3 +- drivers/fpga/microchip-auto-update.c | 494 ++++++++++++++++++ drivers/soc/microchip/Kconfig | 1 + drivers/soc/microchip/mpfs-sys-controller.c | 37 +- include/soc/microchip/mpfs.h | 2 + 9 files changed, 591 insertions(+), 12 deletions(-) create mode 100644 drivers/fpga/microchip-auto-update.c
Signature · 1 line
2.39.2