ZynqMP firmware driver
Zynq Ultrascale+ MPSoC/Versal firmware driver
Firmware interface driver for Zynq Ultrascale+ MPSoC/Versal
Table of Contents
Introduction
ZynqMP has an interface to communicate with secure firmware. Firmware driver provides an interface to firmware APIs. Interface APIs can be used by any driver to communicate to PMUFW(Platform Management Unit)(ZynqMP) or PLM(Platform Loader and Manager)(Versal). These requests include clock management, pin control, device control, power management service, FPGA service and other platform management services.
HW IP features
NAFeatures supported in driver
- Communication layer to request Platform Management Unit and Trustzone
- Control/configure devices through IOCTL
- Query platform specific information from firmware
- Clock control
- Pin control and configurations
- other platform management services like FPGA management, reset, etc
- Debug interface to debug firmware APIs
- Sysfs interface for accessing GGS and PGGS registers, setting shutdown scope, setting health boot status, accessing PMU and CSU registers
Missing Features, Known Issues and Limitations
NoneKernel Configuration
Firmware driver is by default enabled for ZynqMP platform. The following config options should be enabled in order to build the ZynqMP firmware driver:
CONFIG_ZYNQMP_FIRMWARE: Firmware interface driver is used by different to communicate with the firmware for various platform management services. Say yes to enable ZynqMP firmware interface driver. In doubt, say N Symbol: ZYNQMP_FIRMWARE [=y] Type : boolean Prompt: Enable Xilinx Zynq MPSoC firmware interface Location: -> Firmware Drivers -> Zynq MPSoC Firmware Drivers Defined at drivers/firmware/xilinx/zynqmp/Kconfig:7 Depends on: ARCH_ZYNQMP [=y] Selected by: ARCH_ZYNQMP [=y]
The following config options should be enabled in order to enable ZynqMP firmware debugfs:
CONFIG_ZYNQMP_FIRMWARE_DEBUG: Say yes to enable ZynqMP firmware interface debug APIs. In doubt, say N Symbol: ZYNQMP_FIRMWARE_DEBUG [=n] Type : boolean Prompt: Enable Xilinx Zynq MPSoC firmware debug APIs Location: -> Firmware Drivers -> Zynq MPSoC Firmware Drivers -> Enable Xilinx Zynq MPSoC firmware interface (ZYNQMP_FIRMWARE [=y]) Defined at drivers/firmware/xilinx/zynqmp/Kconfig:16 Depends on: ARCH_ZYNQMP [=y] && ZYNQMP_FIRMWARE [=y] && DEBUG_FS [=y]
Devicetree
- ZynqMP
{ compatible = "xlnx,zynqmp"; #address-cells = <2>; #size-cells = <2>; firmware { zynqmp_firmware: zynqmp-firmware { compatible = "xlnx,zynqmp-firmware"; method = "smc"; }; }; }
- Versal
{ compatible = "xlnx,versal"; #address-cells = <2>; #size-cells = <2>;; firmware { versal_firmware: versal-firmware { compatible = "xlnx,versal-firmware"; method = "smc"; }; }
Test procedure
- Firmware version running on hardware should match with expected version
[ 0.021138] zynqmp_plat_init Platform Management API v1.0
- ATF PM version should match with expected version
[ 0.021146] zynqmp_plat_init Trustzone version v1.0
- If CONFIG_ZYNQMP_FIRMWARE_DEBUG is enabled, debugfs entry should be present and pm_get_api_version should return correct value.
root@xilinx-zcu102-2018_1:~# ls /sys/kernel/debug/zynqmp-firmware/pm root@xilinx-zcu102-2018_1:~# echo pm_get_api_version > /sys/kernel/debug/zynqmp-firmware/pm root@xilinx-zcu102-2018_1:~# cat /sys/kernel/debug/zynqmp-firmware/pm root@xilinx-zcu102-2018_1:~# PM-API Version = 1.0
Mainline status
Firmware driver is up-streamed to mainline kernel.
Patches for modification of existing driver to extend support for Versal is up-streamed to mainline kernel.
Change Log
2018.1
Summary:
- Add ZynqMP firmware driver
2018.2
Summary:
Summary:
- Add sysfs and IOCTL to set boot health status
- 7e719b9 firmware: zynqmp: Add sysfs and IOCTL to set boot health status
2018.3
Summary:
Summary:
- Add support for PL configuration readback, efuse access and zynqmp-aes
Commits:
- 1f3aaff firmware: Add pm api function for PL readback
- e7dfc7c zynqmp: firmware: Adds new eemi call for reg access
- 301dde0 zynqmp: firmware: Adds zynqmp-aes support
- 5bda6a6 zynqmp: firmware: provides support to access efuse
- e732840 fpga: Fix bitstream typo error
2019.1
Summary:
- Add support for secure partition load and PDI load API
- Extend driver for versal devices and add support for feature check
Commits:
- 322324b zynqmp: firmware: provides support for secure partition load
- Validate IOCTL ids for Versal and add IOCTL ids for probe counter
Related Links
http://www.wiki.xilinx.com/Zynq+UltraScale%EF%BC%8B+MPSoC+Power+Management+-+Linux+Kernel
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy