blob: 5f39b4ffdcd43f6a32268755e3e3810927224a5d [file] [log] [blame]
Rajan Vaja8cc7bc82018-10-08 11:21:43 -07001---------------------------------------------------------------------
2Xilinx Zynq MPSoC EEMI Documentation
3---------------------------------------------------------------------
4
5Xilinx Zynq MPSoC Firmware Interface
6-------------------------------------
7The zynqmp-firmware node describes the interface to platform firmware.
8ZynqMP has an interface to communicate with secure firmware. Firmware
9driver provides an interface to firmware APIs. Interface APIs can be
10used by any driver to communicate with PMC(Platform Management Controller).
11
12Embedded Energy Management Interface (EEMI)
13----------------------------------------------
14The embedded energy management interface is used to allow software
15components running across different processing clusters on a chip or
16device to communicate with a power management controller (PMC) on a
17device to issue or respond to power management requests.
18
19EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC.
20The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops
21structure. Any driver who want to communicate with PMC using EEMI APIs
22can call zynqmp_pm_get_eemi_ops().
23
24Example of EEMI ops:
25
26 /* zynqmp-firmware driver maintain all EEMI APIs */
27 struct zynqmp_eemi_ops {
28 int (*get_api_version)(u32 *version);
29 int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out);
30 };
31
32 static const struct zynqmp_eemi_ops eemi_ops = {
33 .get_api_version = zynqmp_pm_get_api_version,
34 .query_data = zynqmp_pm_query_data,
35 };
36
37Example of EEMI ops usage:
38
39 static const struct zynqmp_eemi_ops *eemi_ops;
40 u32 ret_payload[PAYLOAD_ARG_CNT];
41 int ret;
42
43 eemi_ops = zynqmp_pm_get_eemi_ops();
Rajan Vaja3d031372019-03-04 15:18:08 -080044 if (IS_ERR(eemi_ops))
45 return PTR_ERR(eemi_ops);
Rajan Vaja8cc7bc82018-10-08 11:21:43 -070046
47 ret = eemi_ops->query_data(qdata, ret_payload);
48
49IOCTL
50------
51IOCTL API is for device control and configuration. It is not a system
52IOCTL but it is an EEMI API. This API can be used by master to control
53any device specific configuration. IOCTL definitions can be platform
54specific. This API also manage shared device configuration.
55
56The following IOCTL IDs are valid for device control:
57- IOCTL_SET_PLL_FRAC_MODE 8
58- IOCTL_GET_PLL_FRAC_MODE 9
59- IOCTL_SET_PLL_FRAC_DATA 10
60- IOCTL_GET_PLL_FRAC_DATA 11
61
62Refer EEMI API guide [0] for IOCTL specific parameters and other EEMI APIs.
63
64References
65----------
66[0] Embedded Energy Management Interface (EEMI) API guide:
67 https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf