Lines Matching +full:zynqmp +full:- +full:firmware

1 // SPDX-License-Identifier: GPL-2.0
3 * Xilinx Zynq MPSoC Firmware layer
5 * Copyright (C) 2014-2020 Xilinx, Inc.
13 #include <linux/arm-smccc.h>
25 #include <linux/firmware/xlnx-zynqmp.h>
26 #include "zynqmp-debug.h"
35 * struct pm_api_feature_data - PM API Feature data
53 * zynqmp_pm_ret_code() - Convert PMU-FW error codes to Linux error codes
65 return -ENOTSUPP; in zynqmp_pm_ret_code()
67 return -EACCES; in zynqmp_pm_ret_code()
69 return -ECANCELED; in zynqmp_pm_ret_code()
71 return -EUSERS; in zynqmp_pm_ret_code()
76 return -EINVAL; in zynqmp_pm_ret_code()
83 return -ENODEV; in do_fw_call_fail()
93 * do_fw_call_smc() - Call system-level platform management layer (SMC)
121 * do_fw_call_hvc() - Call system-level platform management layer (HVC)
128 * HVC-based for communication through hypervisor
151 * zynqmp_pm_feature() - Check weather given feature is supported or not
169 if (feature_data->pm_api_id == api_id) in zynqmp_pm_feature()
170 return feature_data->feature_status; in zynqmp_pm_feature()
176 return -ENOMEM; in zynqmp_pm_feature()
178 feature_data->pm_api_id = api_id; in zynqmp_pm_feature()
184 ret = -EOPNOTSUPP; in zynqmp_pm_feature()
188 feature_data->feature_status = ret; in zynqmp_pm_feature()
189 hash_add(pm_api_features_map, &feature_data->hentry, api_id); in zynqmp_pm_feature()
195 * zynqmp_pm_invoke_fn() - Invoke the system-level platform management layer
197 * @pm_api_id: Requested PM-API call
198 * @arg0: Argument 0 to requested PM-API call
199 * @arg1: Argument 1 to requested PM-API call
200 * @arg2: Argument 2 to requested PM-API call
201 * @arg3: Argument 3 to requested PM-API call
214 * PM_SIP_SVC - Registered ZynqMP SIP Service Call.
215 * PM_API_ID - Platform Management API ID.
245 * zynqmp_pm_get_api_version() - Get version number of PMU PM firmware
256 return -EINVAL; in zynqmp_pm_get_api_version()
271 * zynqmp_pm_get_chipid - Get silicon ID registers
284 return -EINVAL; in zynqmp_pm_get_chipid()
295 * zynqmp_pm_get_trustzone_version() - Get secure trustzone firmware version
306 return -EINVAL; in zynqmp_pm_get_trustzone_version()
321 * get_set_conduit_method() - Choose SMC or HVC based communication
324 * Use SMC or HVC-based functions to communicate with EL2/EL3.
334 return -ENXIO; in get_set_conduit_method()
344 return -EINVAL; in get_set_conduit_method()
351 * zynqmp_pm_query_data() - Get query data from firmware
374 * zynqmp_pm_clock_enable() - Enable the clock for given id
389 * zynqmp_pm_clock_disable() - Disable the clock for given id
404 * zynqmp_pm_clock_getstate() - Get the clock state for given id
427 * zynqmp_pm_clock_setdivider() - Set the clock divider for given id
444 * zynqmp_pm_clock_getdivider() - Get the clock divider for given id
467 * zynqmp_pm_clock_setrate() - Set the clock rate for given id
485 * zynqmp_pm_clock_getrate() - Get the clock rate for given id
508 * zynqmp_pm_clock_setparent() - Set the clock parent for given id
524 * zynqmp_pm_clock_getparent() - Get the clock parent for given id
547 * zynqmp_pm_set_pll_frac_mode() - PM API for set PLL mode
564 * zynqmp_pm_get_pll_frac_mode() - PM API for get PLL mode
581 * zynqmp_pm_set_pll_frac_data() - PM API for setting pll fraction data
599 * zynqmp_pm_get_pll_frac_data() - PM API for getting pll fraction data
616 * zynqmp_pm_set_sd_tapdelay() - Set tap delay for the SD device
634 * zynqmp_pm_sd_dll_reset() - Reset DLL logic
651 * zynqmp_pm_write_ggs() - PM API for writing global general storage (ggs)
667 * zynqmp_pm_write_ggs() - PM API for reading global general storage (ggs)
683 * zynqmp_pm_write_pggs() - PM API for writing persistent global general
700 * zynqmp_pm_write_pggs() - PM API for reading persistent global general
717 * zynqmp_pm_set_boot_health_status() - PM API for setting healthy boot status
721 * to firmware.
732 * zynqmp_pm_reset_assert - Request setting of reset (1 - assert, 0 - release)
748 * zynqmp_pm_reset_get_status - Get status of the reset
760 return -EINVAL; in zynqmp_pm_reset_get_status()
771 * zynqmp_pm_fpga_load - Perform the fpga load
775 * -XILINX_ZYNQMP_PM_FPGA_FULL: FPGA full reconfiguration
776 * -XILINX_ZYNQMP_PM_FPGA_PARTIAL: FPGA partial reconfiguration
791 * zynqmp_pm_fpga_get_status - Read value from PCAP status register
805 return -EINVAL; in zynqmp_pm_fpga_get_status()
815 * zynqmp_pm_init_finalize() - PM call to inform firmware that the caller
830 * zynqmp_pm_set_suspend_mode() - Set system suspend mode
844 * zynqmp_pm_request_node() - Request a node with specific capabilities
850 * This function is used by master to request particular node from firmware.
864 * zynqmp_pm_release_node() - Release a node
867 * This function is used by master to inform firmware that master
869 * without re-request.
880 * zynqmp_pm_set_requirement() - PM call to set requirement for PM slaves
901 * zynqmp_pm_aes - Access AES hardware to encrypt/decrypt the data using
902 * AES-GCM core.
914 return -EINVAL; in zynqmp_pm_aes_engine()
926 * zynqmp_pm_system_shutdown - PM call to request a system shutdown or restart
939 * struct zynqmp_pm_shutdown_scope - Struct for shutdown scope
969 * zynqmp_pm_is_shutdown_scope_valid - Check if shutdown scope string is valid
1018 return -EINVAL; in shutdown_scope_store()
1021 scope->subtype); in shutdown_scope_store()
1081 return -EINVAL; in ggs_store()
1085 count = -EFAULT; in ggs_store()
1091 count = -EFAULT; in ggs_store()
1149 return -EINVAL; in pggs_store()
1153 count = -EFAULT; in pggs_store()
1159 count = -EFAULT; in pggs_store()
1224 struct device *dev = &pdev->dev; in zynqmp_firmware_probe()
1228 np = of_find_compatible_node(NULL, NULL, "xlnx,zynqmp"); in zynqmp_firmware_probe()
1238 ret = get_set_conduit_method(dev->of_node); in zynqmp_firmware_probe()
1245 panic("%s Platform Management API version error. Expected: v%d.%d - Found: v%d.%d\n", in zynqmp_firmware_probe()
1260 panic("%s Trustzone version error. Expected: v%d.%d - Found: v%d.%d\n", in zynqmp_firmware_probe()
1268 ret = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, firmware_devs, in zynqmp_firmware_probe()
1271 dev_err(&pdev->dev, "failed to add MFD devices %d\n", ret); in zynqmp_firmware_probe()
1277 return of_platform_populate(dev->of_node, NULL, NULL, dev); in zynqmp_firmware_probe()
1285 mfd_remove_devices(&pdev->dev); in zynqmp_firmware_remove()
1289 hash_del(&feature_data->hentry); in zynqmp_firmware_remove()
1297 {.compatible = "xlnx,zynqmp-firmware"},
1298 {.compatible = "xlnx,versal-firmware"},