Request and Release a Device From Linux - 2020.2 English

Versal ACAP System Software Developers Guide (UG1304)

Document ID
UG1304
Release Date
2020-11-24
Version
2020.2 English

The Linux ZynqMP (see https://github.com/torvalds/linux/blob/master/drivers/soc/xilinx/zynqmp_pm_domains.c) manages device usage request, and sets requirement and release of a device.

You must provide the Device ID as the power domain ID in the respective device node. The zynqmp-firmware node works as the power domain provider. For example:

firmware {
zynqmp_firmware: zynqmp-firmware {
...
#power-domain-cells = <1>;
...
};
};
usb0 {
...
power-domains = <&zynqmp_firmware 0x18224018U>;
...
};

The Linux ZynqMP power domain driver sets PM_CAP_ACCESS when the device is in use. During runtime suspend, the power domain driver sets the requirement to PM_CAP_UNUSABLE (where only the clock is disabled). If the device is not in use, the power domain driver releases it. In this case, if there is no other subsystem using the device, the platform management firmware power gates, disables the clock, and resets the device.