Lines Matching +full:cpu +full:- +full:bpmp +full:- +full:tx
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
44 * @brief Messages sent to/from BPMP via IPC
56 * The CPU requests the BPMP to perform a particular service by
61 * The BPMP processes the data and replies with an IVC frame (on the
66 * A well-defined subset of the MRQ messages that the CPU sends to the
67 * BPMP can lead to BPMP eventually sending an MRQ message to the
68 * CPU. For example, when the CPU uses an #MRQ_THERMAL message to set
69 * a thermal trip point, the BPMP may eventually send a single
70 * #MRQ_THERMAL message of its own to the CPU indicating that the trip
91 * |-----|--------------------------------------------|
167 * @brief Maximum MRQ code to be sent by CPU software to
168 * BPMP. Subject to change in future
186 * @defgroup Vhint CPU Voltage hint
188 * @defgroup CPU NDIV Limits
192 * @defgroup CC3 Auto-CC3
216 * * Targets: BPMP
220 * Behavior is equivalent to a simple #MRQ_PING except that BPMP
244 * mrq_ping_request challenge left shifted by 1 with the carry-bit
256 * @brief Query BPMP firmware's tag (i.e. unique identifer)
262 * * Targets: BPMP
284 * @brief Query BPMP firmware's tag (i.e. unique identifier)
288 * * Targets: BPMP
310 * @brief Dynamically load a BPMP code module
315 * * Targets: BPMP
367 * * Targets: BPMP
396 * * Targets: BPMP
441 * * Targets: BPMP
446 * values. err is -#BPMP_EINVAL if size is zero or area is NULL or
459 * is treated as a byte-aligned pointer in the recipient's address
509 * * Targets: BPMP
523 /** @brief Module-specific mail payload
525 * The length of data[ ] is unknown to the BPMP core firmware
536 /** @brief Module-specific mail payload
538 * The length of data[ ] is unknown to the BPMP core firmware
548 * @brief Interact with BPMP's debugfs file nodes
554 * * Targets: BPMP
563 * The BPMP firmware implements a pseudo-filesystem called
566 * software on the CPU writes to a debugfs file, debugfs passes the
568 * the CPU reads a debugfs file, debugfs queries the driver for the
569 * data to return to the CPU. The intention of the debugfs filesystem
574 * BPMP firmware's ABI. debugfs files may be added or removed in any
652 * |-------------------|-------|
658 /** @brief Sub-command (@ref mrq_debugfs_commands) */
694 * @brief Interact with BPMP's debugfs file nodes. Use message payload
697 * When software running on CPU tries to read a debugfs file,
701 * between BPMP and CPU until the transaction completes.
705 * * Targets: BPMP
734 * @brief Maximum size of null-terminated file name string in bytes.
739 * 120 - 4 dbg_cmd(32bit) = 116
741 #define DEBUG_FNAME_MAX_SZ (MSG_DATA_MIN_SZ - 4)
748 /** @brief File name - Null-terminated string with maximum
784 #define DEBUG_READ_MAX_SZ (MSG_DATA_MIN_SZ - 4)
803 #define DEBUG_WRITE_MAX_SZ (MSG_DATA_MIN_SZ - 12)
841 * |-------------------|-------|
849 /** @brief Sub-command (@ref mrq_debug_commands) */
882 * * Targets: BPMP
895 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
896 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
897 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
904 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
905 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
906 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
913 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
914 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
915 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
922 * -#BPMP_ENODEV if no reset domains are supported (number of IDs is 0)
933 * Used by the sender of an #MRQ_RESET message to request BPMP to
944 * @brief Response for MRQ_RESET sub-command CMD_RESET_GET_MAX_ID. When
945 * this sub-command is not supported, firmware will return -BPMP_EBADCMD
956 * Each sub-command supported by @ref mrq_reset_request may return
957 * sub-command-specific data. Some do and some do not as indicated
960 * | sub-command | payload |
961 * |----------------------|------------------|
962 * | CMD_RESET_ASSERT | - |
963 * | CMD_RESET_DEASSERT | - |
964 * | CMD_RESET_MODULE | - |
982 * * Targets: BPMP
989 #define TEGRA_I2C_IPC_MAX_IN_BUF_SIZE (MSG_DATA_MIN_SZ - 12U)
990 #define TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE (MSG_DATA_MIN_SZ - 4U)
1008 * Instances of this structure are packed (little-endian) into
1048 * Processing an cmd_i2c_xfer_request::data_buf causes BPMP to execute
1074 * -#BPMP_EBADCMD: if mrq_i2c_request::cmd is other than 1
1075 * -#BPMP_EINVAL: if cmd_i2c_xfer_request does not contain correctly formatted request
1076 * -#BPMP_ENODEV: if cmd_i2c_xfer_request::bus_id is not supported by BPMP
1077 * -#BPMP_EACCES: if i2c transaction is not allowed due to firewall rules
1078 * -#BPMP_ETIMEDOUT: if i2c transaction times out
1079 * -#BPMP_ENXIO: if i2c slave device does not reply with ACK to the transaction
1080 * -#BPMP_EAGAIN: if ARB_LOST condition is detected by the i2c controller
1081 * -#BPMP_EIO: any other i2c controller error code than NO_ACK or ARB_LOST
1096 * * Targets: BPMP
1176 * @brief Response data to #MRQ_CLK sub-command CMD_CLK_IS_ENABLED
1249 * clk_request is split into several sub-commands. Some sub-commands
1250 * require no additional data. Others have a sub-command specific
1253 * |sub-command |payload |
1254 * |----------------------------|-----------------------|
1255 * |CMD_CLK_GET_RATE |- |
1258 * |CMD_CLK_GET_PARENT |- |
1260 * |CMD_CLK_IS_ENABLED |- |
1261 * |CMD_CLK_ENABLE |- |
1262 * |CMD_CLK_DISABLE |- |
1263 * |CMD_CLK_GET_ALL_INFO |- |
1264 * |CMD_CLK_GET_MAX_CLK_ID |- |
1265 * |CMD_CLK_GET_FMAX_AT_VMIN |-
1271 /** @brief Sub-command and clock id concatenated to 32-bit word.
1272 * - bits[31..24] is the sub-cmd.
1273 * - bits[23..0] is the clock id
1304 * Each sub-command supported by @ref mrq_clk_request may return
1305 * sub-command-specific data. Some do and some do not as indicated in
1308 * |sub-command |payload |
1309 * |----------------------------|------------------------|
1316 * |CMD_CLK_ENABLE |- |
1317 * |CMD_CLK_DISABLE |- |
1376 /** @brief 0 if queried MRQ is supported. Else, -#BPMP_ENODEV */
1383 * @brief Read the power-gating state of a partition
1388 * * Targets: BPMP
1425 * @brief Modify the power-gating state of a partition. In contrast to
1432 * * Targets: BPMP
1441 * Used by #MRQ_PG_UPDATE_STATE call to request BPMP to change the
1448 * @details Ignored by many versions of the BPMP
1474 * @brief Control power-gating state of a partition. In contrast to
1478 * @note BPMP-FW forcefully turns off some partitions as part of SC7 entry
1485 * * Targets: BPMP
1494 * @brief Check whether the BPMP driver supports the specified
1498 * supported and -#BPMP_ENODEV otherwise.
1509 * -#BPMP_EINVAL: Invalid request parameters
1520 * -#BPMP_EINVAL: Invalid request parameters
1529 * -#BPMP_EINVAL: Invalid request parameters
1540 * -#BPMP_EINVAL: Invalid request parameters
1601 * partitions. The pg_request is split into several sub-commands. Some
1602 * sub-commands require no additional data. Others have a sub-command
1605 * |sub-command |payload |
1606 * |----------------------------|-----------------------|
1609 * |CMD_PG_GET_STATE | - |
1610 * |CMD_PG_GET_NAME | - |
1611 * |CMD_PG_GET_MAX_ID | - |
1626 * Each sub-command supported by @ref mrq_pg_request may return
1627 * sub-command-specific data. Some do and some do not as indicated in
1630 * |sub-command |payload |
1631 * |----------------------------|-----------------------|
1632 * |CMD_PG_QUERY_ABI | - |
1633 * |CMD_PG_SET_STATE | - |
1651 * @brief Interact with BPMP thermal framework
1661 * The BPMP firmware includes a thermal framework. Drivers within the
1662 * bpmp firmware register with the framework to provide thermal
1667 * hits the indicated temperature. The BPMP firmware uses this thermal
1668 * framework interally to implement various temperature-dependent
1671 * Software on the CPU can use #MRQ_THERMAL (with payload @ref
1672 * mrq_thermal_host_to_bpmp_request) to interact with the BPMP thermal
1673 * framework. The CPU must It can query the number of supported zones,
1676 * When a trip point set by the CPU gets crossed, BPMP firmware issues
1677 * an IPC to the CPU having mrq_request::mrq = #MRQ_THERMAL and a
1683 * @brief Check whether the BPMP driver supports the specified
1689 * supported and -#BPMP_ENODEV otherwise.
1700 * * -#BPMP_EINVAL: Invalid request parameters.
1701 * * -#BPMP_ENOENT: No driver registered for thermal zone..
1702 * * -#BPMP_EFAULT: Problem reading temperature measurement.
1712 * temperature hits a trip point, the BPMP will send a message
1713 * to the CPU having MRQ=MRQ_THERMAL and
1718 * * -#BPMP_EINVAL: Invalid request parameters.
1719 * * -#BPMP_ENOENT: No driver registered for thermal zone.
1720 * * -#BPMP_EFAULT: Problem setting trip point.
1740 * * -#BPMP_EINVAL: Invalid request parameters.
1741 * * -#BPMP_ENOENT: No driver registered for thermal zone.
1742 * * -#BPMP_ERANGE if thermtrip is invalid or disabled.
1743 * * -#BPMP_EFAULT: Problem reading zone information.
1747 /** @brief: number of supported host-to-bpmp commands. May
1759 * BPMP needs to supply request parameters. Host only needs to
1764 /** @brief: number of supported bpmp-to-host commands. May
1771 * Host->BPMP request data for request type CMD_THERMAL_QUERY_ABI
1780 * Host->BPMP request data for request type CMD_THERMAL_GET_TEMP
1789 * BPMP->Host reply data for request CMD_THERMAL_GET_TEMP
1792 * -BPMP_EINVAL if request parameters were invalid.
1793 * -BPMP_ENOENT if no driver was registered for the specified thermal zone.
1794 * -BPMP_EFAULT for other thermal zone driver errors.
1802 * Host->BPMP request data for request type CMD_THERMAL_SET_TRIP
1817 * BPMP->Host request data for request type CMD_THERMAL_HOST_TRIP_REACHED
1826 * BPMP->Host reply data for request type CMD_THERMAL_GET_NUM_ZONES
1836 * Host->BPMP request data for request type CMD_THERMAL_GET_THERMTRIP
1845 * BPMP->Host reply data for request CMD_THERMAL_GET_THERMTRIP
1854 * Host->BPMP request data.
1872 * BPMP->Host request data.
1885 * Data in reply to a Host->BPMP request.
1897 * @brief Query CPU voltage hint data
1902 * * Targets: BPMP
1914 * from BPMP to memory space pointed by #addr. CCPLEX is responsible
1916 * appropriately map it for BPMP before sending the request.
1926 * @brief Description of the CPU v/f relation
1944 /** post-multiplier for vindex value */
1946 /** post-divider for vindex value */
1961 * * Targets: BPMP
1976 * 3. A bug is discovered in an existing implementation of the BPMP-FW
1988 * If ratchet is less than BPMP's #BPMP_ABI_RATCHET_VALUE, BPMP may
1989 * reply with mrq_response::err = -#BPMP_ERANGE to indicate that
1990 * BPMP-FW cannot interoperate correctly with the requester. Requester
1991 * should cease further communication with BPMP.
2004 * against which BPMP firwmare was compiled.
2007 * the requster must either interoperate with BPMP according to an ABI
2009 * communication with BPMP.
2016 /** @brief BPMP's ratchet value */
2028 * * Targets: BPMP
2061 * @brief CPU freq. limits in ndiv
2066 * * Targets: BPMP
2069 * @addtogroup CPU
2103 * @brief Query CPU cluster auto-CC3 configuration
2108 * * Targets: BPMP
2113 * Queries from BPMP auto-CC3 configuration (allowed/not allowed) for a
2115 * device tree auto-CC3 settings, so that BPMP device tree is a single source of
2116 * auto-CC3 platform configuration.
2122 * @brief Request for auto-CC3 configuration of a cluster
2134 * @brief auto-CC3 configuration
2136 * - bits[31..10] reserved.
2137 * - bits[9..1] cc3 ndiv
2138 * - bit [0] if "1" auto-CC3 is allowed, if "0" auto-CC3 is not allowed
2155 * * Targets: BPMP
2181 * @brief A ring buffer debug console for BPMP
2186 * BPMP-FW, the RX (receive) and TX (transmit) buffers. Characters can be read
2194 * BPMP
2203 * BPMP
2212 * @brief Check whether the BPMP driver supports the specified request
2216 * -#BPMP_ENODEV otherwise
2220 * @brief Perform a read operation on the BPMP TX buffer
2226 * @brief Perform a write operation on the BPMP RX buffer
2229 * -#BPMP_ENODEV otherwise
2237 * -#BPMP_ENODEV otherwise
2244 * @brief Host->BPMP request data for request type
2259 * @brief Host->BPMP request data for request type #CMD_RINGBUF_CONSOLE_READ
2263 * @brief Number of bytes requested to be read from the BPMP TX buffer
2270 * @brief BPMP->Host response data for request type #CMD_RINGBUF_CONSOLE_READ
2273 /** @brief The actual data read from the BPMP TX buffer */
2281 * @brief Host->BPMP request data for request type #CMD_RINGBUF_CONSOLE_WRITE
2284 /** @brief The actual data to be written to the BPMP RX buffer */
2292 * @brief BPMP->Host response data for request type #CMD_RINGBUF_CONSOLE_WRITE
2295 /** @brief Number of bytes of available space in the BPMP RX buffer */
2297 /** @brief Number of bytes that were written to the BPMP RX buffer */
2308 * @brief BPMP->Host reply data for request type #CMD_RINGBUF_CONSOLE_GET_FIFO
2311 /** @brief Physical address of the BPMP TX buffer */
2313 /** @brief Physical address of the BPMP TX buffer head counter */
2315 /** @brief Physical address of the BPMP TX buffer tail counter */
2317 /** @brief Length of the BPMP TX buffer */
2323 * @brief Host->BPMP request data.
2344 * @brief Host->BPMP reply data
2359 * @brief Set a strap value controlled by BPMP
2364 * * Targets: BPMP
2375 * BPMP owns registers which act as straps to various units. It
2413 * * Targets: BPMP
2468 * The uphy_request is split into several sub-commands. Some sub-commands
2469 * require no additional data. Others have a sub-command specific payload
2471 * |sub-command |payload |
2472 * |------------------------------------ |----------------------------------------|
2484 /** @brief Sub-command id. */
2499 * Each sub-command supported by @ref mrq_uphy_request may return
2500 * sub-command-specific data. Some do and some do not as indicated in
2503 * |sub-command |payload |
2504 * |---------------------------- |------------------------|
2527 * * Targets: BPMP
2596 * sub-commands. Some sub-commands require no additional data.
2597 * Others have a sub-command specific payload
2599 * |sub-command |payload |
2600 * |----------------------------|-----------------------|
2602 * |CMD_FMON_GEAR_FREE |- |
2603 * |CMD_FMON_GEAR_GET |- |
2608 /** @brief Sub-command and clock id concatenated to 32-bit word.
2609 * - bits[31..24] is the sub-cmd.
2610 * - bits[23..0] is monitored clock id used to select target
2628 * Each sub-command supported by @ref mrq_fmon_request may
2629 * return sub-command-specific data as indicated below.
2631 * |sub-command |payload |
2632 * |----------------------------|------------------------|
2633 * |CMD_FMON_GEAR_CLAMP |- |
2634 * |CMD_FMON_GEAR_FREE |- |
2661 * * Targets: BPMP
2676 * -#BPMP_ENODEV if target EC is not owned by BPMP @n
2677 * -#BPMP_EACCES if target EC power domain is turned off @n
2678 * -#BPMP_EBADCMD if subcommand is not supported
2688 * -#BPMP_ENODEV if target EC is not owned by BPMP @n
2689 * -#BPMP_EACCES if target EC power domain is turned off @n
2690 * -#BPMP_EBADCMD if subcommand is not supported
2696 /** @brief BPMP ECs error types */
2728 /** @brief Parity error from on-chip SRAM/FIFO
2805 * |---------------------------------|---------------------------|
2821 * |---------------------------------|---------------------------|
2837 * |---------------------------------|---------------------------|
2851 * |--------------------------------- |--------------------------|
2866 * |----------------------------------------|---------------------------|
2952 * by BPMP.
2955 * |sub-command |payload |
2956 * |----------------------------|-----------------------|
2960 * |sub-command |payload |
2961 * |----------------------------|-----------------------|
2967 /** @brief Sub-command id. */
2979 * Each sub-command supported by @ref mrq_ec_request may return
2980 * sub-command-specific data as indicated below.
2983 * |sub-command |payload |
2984 * |----------------------------|------------------------|
2988 * |sub-command |payload |
2989 * |----------------------------|------------------------|
3024 /** @brief Bad sub-MRQ command */