Zynq Ultrascale+ MPSoC/Versal  firmware driver

Firmware interface driver for Zynq Ultrascale+ MPSoC/Versal


Table of Contents

ZynqMP firmware driver#Firmware interface driver for Zynq Ultrascale+ MPSoC
ZynqMP firmware driver#Introduction
ZynqMP firmware driver#HW IP features
ZynqMP firmware driver#Features supported in driver
ZynqMP firmware driver#Missing Features, Known Issues and Limitations
ZynqMP firmware driver#Devicetree
ZynqMP firmware driver#Test procedure
ZynqMP firmware driver#Mainline status
ZynqMP firmware driver#Change Log
ZynqMP firmware driver#Related Links

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

NA

Features supported in driver

Missing Features, Known Issues and Limitations

None

Kernel 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

{
       compatible = "xlnx,zynqmp";
       #address-cells = <2>;
       #size-cells = <2>;
       firmware {
               zynqmp_firmware: zynqmp-firmware {
                       compatible = "xlnx,zynqmp-firmware";
                       method = "smc";
               };
       };
}


{
       compatible = "xlnx,versal";
       #address-cells = <2>;
       #size-cells = <2>;;
       firmware {
               versal_firmware: versal-firmware {
                        compatible = "xlnx,versal-firmware";
                        method = "smc";
       };
}

Test procedure

[    0.021138] zynqmp_plat_init Platform Management API v1.0
[    0.021146] zynqmp_plat_init Trustzone version v1.0
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:
Commits:
2018.2
Summary:
Commits

Related Links


http://www.wiki.xilinx.com/Zynq+UltraScale%EF%BC%8B+MPSoC+Power+Management+-+Linux+Kernel