Lines Matching +full:cpu +full:- +full:bpmp +full:- +full:rx

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2014-2022, 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
79 * at BPMP. For requests originating in BPMP, this flag is optional except
130 * -BPMP_EBADMSG and ignore the request.
144 …* | -------------------- | ------------------------------------ | --------------------------------…
223 * calculated by BPMP, -BPMP_EBADMSG will be returned and the request will
374 * @brief Maximum MRQ code to be sent by CPU software to
375 * BPMP. Subject to change in future
394 * @defgroup Vhint CPU Voltage hint
398 * @defgroup CPU NDIV Limits
402 * @defgroup CC3 Auto-CC3
429 * * Targets: BPMP
433 * Behavior is equivalent to a simple #MRQ_PING except that BPMP
457 * mrq_ping_request challenge left shifted by 1 with the carry-bit
469 * @brief Query BPMP firmware's tag (i.e. unique identifer)
475 * * Targets: BPMP
497 * @brief Query BPMP firmware's tag (i.e. unique identifier)
501 * * Targets: BPMP
533 * @brief Interact with BPMP's debugfs file nodes
539 * * Targets: BPMP
548 * The BPMP firmware implements a pseudo-filesystem called
551 * software on the CPU writes to a debugfs file, debugfs passes the
553 * the CPU reads a debugfs file, debugfs queries the driver for the
554 * data to return to the CPU. The intention of the debugfs filesystem
559 * BPMP firmware's ABI. debugfs files may be added or removed in any
637 * |-------------------|-------|
643 /** @brief Sub-command (@ref mrq_debugfs_commands) */
679 * @brief Interact with BPMP's debugfs file nodes. Use message payload
682 * When software running on CPU tries to read a debugfs file,
686 * between BPMP and CPU until the transaction completes.
690 * * Targets: BPMP
719 * @brief Maximum size of null-terminated file name string in bytes.
724 * 120 - 4 dbg_cmd(32bit) = 116
726 #define DEBUG_FNAME_MAX_SZ (MSG_DATA_MIN_SZ - 4)
733 /** @brief File name - Null-terminated string with maximum
769 #define DEBUG_READ_MAX_SZ (MSG_DATA_MIN_SZ - 4)
788 #define DEBUG_WRITE_MAX_SZ (MSG_DATA_MIN_SZ - 12)
826 * |-------------------|-------|
834 /** @brief Sub-command (@ref mrq_debug_commands) */
867 * * Targets: BPMP
880 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
881 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
882 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
889 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
890 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
891 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
898 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
899 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
900 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
907 * -#BPMP_ENODEV if no reset domains are supported (number of IDs is 0)
918 * Used by the sender of an #MRQ_RESET message to request BPMP to
929 * @brief Response for MRQ_RESET sub-command CMD_RESET_GET_MAX_ID. When
930 * this sub-command is not supported, firmware will return -BPMP_EBADCMD
941 * Each sub-command supported by @ref mrq_reset_request may return
942 * sub-command-specific data. Some do and some do not as indicated
945 * | sub-command | payload |
946 * |----------------------|------------------|
947 * | CMD_RESET_ASSERT | - |
948 * | CMD_RESET_DEASSERT | - |
949 * | CMD_RESET_MODULE | - |
967 * * Targets: BPMP
974 #define TEGRA_I2C_IPC_MAX_IN_BUF_SIZE (MSG_DATA_MIN_SZ - 12U)
975 #define TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE (MSG_DATA_MIN_SZ - 4U)
993 * Instances of this structure are packed (little-endian) into
1043 * Processing an cmd_i2c_xfer_request::data_buf causes BPMP to execute
1069 * -#BPMP_EBADCMD: if mrq_i2c_request::cmd is other than 1
1070 * -#BPMP_EINVAL: if cmd_i2c_xfer_request does not contain correctly formatted request
1071 * -#BPMP_ENODEV: if cmd_i2c_xfer_request::bus_id is not supported by BPMP
1072 * -#BPMP_EACCES: if i2c transaction is not allowed due to firewall rules
1073 * -#BPMP_ETIMEDOUT: if i2c transaction times out
1074 * -#BPMP_ENXIO: if i2c slave device does not reply with ACK to the transaction
1075 * -#BPMP_EAGAIN: if ARB_LOST condition is detected by the i2c controller
1076 * -#BPMP_EIO: any other i2c controller error code than NO_ACK or ARB_LOST
1091 * * Targets: BPMP
1128 * -#BPMP_EACCES.
1136 * -#BPMP_EACCES.
1193 * @brief Response data to #MRQ_CLK sub-command CMD_CLK_IS_ENABLED
1307 * clk_request is split into several sub-commands. Some sub-commands
1308 * require no additional data. Others have a sub-command specific
1311 * |sub-command |payload |
1312 * |----------------------------|-----------------------|
1313 * |CMD_CLK_GET_RATE |- |
1316 * |CMD_CLK_GET_PARENT |- |
1318 * |CMD_CLK_IS_ENABLED |- |
1319 * |CMD_CLK_ENABLE |- |
1320 * |CMD_CLK_DISABLE |- |
1321 * |CMD_CLK_GET_ALL_INFO |- |
1322 * |CMD_CLK_GET_MAX_CLK_ID |- |
1323 * |CMD_CLK_GET_FMAX_AT_VMIN |-
1330 * Older versions of firmware also supported following sub-commands:
1331 * |CMD_CLK_PROPERTIES |- |
1332 * |CMD_CLK_POSSIBLE_PARENTS |- |
1333 * |CMD_CLK_NUM_POSSIBLE_PARENTS|- |
1335 * |CMD_CLK_RESET_REFCOUNTS |- |
1340 /** @brief Sub-command and clock id concatenated to 32-bit word.
1341 * - bits[31..24] is the sub-cmd.
1342 * - bits[23..0] is the clock id
1382 * Each sub-command supported by @ref mrq_clk_request may return
1383 * sub-command-specific data. Some do and some do not as indicated in
1386 * |sub-command |payload |
1387 * |----------------------------|------------------------|
1394 * |CMD_CLK_ENABLE |- |
1395 * |CMD_CLK_DISABLE |- |
1404 * Older versions of firmware also supported following sub-commands:
1409 * |CMD_CLK_RESET_REFCOUNTS |- |
1471 /** @brief 0 if queried MRQ is supported. Else, -#BPMP_ENODEV */
1479 * @brief Control power-gating state of a partition. In contrast to
1484 * @note On T194 and earlier BPMP-FW forcefully turns off some partitions as
1493 * * Targets: BPMP
1502 * @brief Check whether the BPMP driver supports the specified
1506 * supported and -#BPMP_ENODEV otherwise.
1517 * -#BPMP_EINVAL: Invalid request parameters
1528 * -#BPMP_EINVAL: Invalid request parameters
1537 * -#BPMP_EINVAL: Invalid request parameters
1548 * -#BPMP_EINVAL: Invalid request parameters
1609 * partitions. The pg_request is split into several sub-commands. Some
1610 * sub-commands require no additional data. Others have a sub-command
1613 * |sub-command |payload |
1614 * |----------------------------|-----------------------|
1617 * |CMD_PG_GET_STATE | - |
1618 * |CMD_PG_GET_NAME | - |
1619 * |CMD_PG_GET_MAX_ID | - |
1634 * Each sub-command supported by @ref mrq_pg_request may return
1635 * sub-command-specific data. Some do and some do not as indicated in
1638 * |sub-command |payload |
1639 * |----------------------------|-----------------------|
1640 * |CMD_PG_QUERY_ABI | - |
1641 * |CMD_PG_SET_STATE | - |
1659 * @brief Interact with BPMP thermal framework
1669 * The BPMP firmware includes a thermal framework. Drivers within the
1670 * bpmp firmware register with the framework to provide thermal
1675 * hits the indicated temperature. The BPMP firmware uses this thermal
1676 * framework interally to implement various temperature-dependent
1679 * Software on the CPU can use #MRQ_THERMAL (with payload @ref
1680 * mrq_thermal_host_to_bpmp_request) to interact with the BPMP thermal
1681 * framework. The CPU must It can query the number of supported zones,
1684 * When a trip point set by the CPU gets crossed, BPMP firmware issues
1685 * an IPC to the CPU having mrq_request::mrq = #MRQ_THERMAL and a
1691 * @brief Check whether the BPMP driver supports the specified
1697 * supported and -#BPMP_ENODEV otherwise.
1708 * * -#BPMP_EINVAL: Invalid request parameters.
1709 * * -#BPMP_ENOENT: No driver registered for thermal zone..
1710 * * -#BPMP_EFAULT: Problem reading temperature measurement.
1720 * temperature hits a trip point, the BPMP will send a message
1721 * to the CPU having MRQ=MRQ_THERMAL and
1726 * * -#BPMP_EINVAL: Invalid request parameters.
1727 * * -#BPMP_ENOENT: No driver registered for thermal zone.
1728 * * -#BPMP_EFAULT: Problem setting trip point.
1748 * * -#BPMP_EINVAL: Invalid request parameters.
1749 * * -#BPMP_ENOENT: No driver registered for thermal zone.
1750 * * -#BPMP_ERANGE if thermtrip is invalid or disabled.
1751 * * -#BPMP_EFAULT: Problem reading zone information.
1755 /** @brief: number of supported host-to-bpmp commands. May
1767 * BPMP needs to supply request parameters. Host only needs to
1772 /** @brief: number of supported bpmp-to-host commands. May
1779 * Host->BPMP request data for request type CMD_THERMAL_QUERY_ABI
1788 * Host->BPMP request data for request type CMD_THERMAL_GET_TEMP
1797 * BPMP->Host reply data for request CMD_THERMAL_GET_TEMP
1800 * -BPMP_EINVAL if request parameters were invalid.
1801 * -BPMP_ENOENT if no driver was registered for the specified thermal zone.
1802 * -BPMP_EFAULT for other thermal zone driver errors.
1810 * Host->BPMP request data for request type CMD_THERMAL_SET_TRIP
1825 * BPMP->Host request data for request type CMD_THERMAL_HOST_TRIP_REACHED
1834 * BPMP->Host reply data for request type CMD_THERMAL_GET_NUM_ZONES
1844 * Host->BPMP request data for request type CMD_THERMAL_GET_THERMTRIP
1853 * BPMP->Host reply data for request CMD_THERMAL_GET_THERMTRIP
1862 * Host->BPMP request data.
1880 * BPMP->Host request data.
1893 * Data in reply to a Host->BPMP request.
1911 * * Targets: BPMP
1925 * disabled, and non-zero throttle is enabled.
1929 * -#BPMP_ENODEV otherwise.
1942 * @brief Query CPU voltage hint data
1947 * * Targets: BPMP
1959 * from BPMP to memory space pointed by #addr. CCPLEX is responsible
1961 * appropriately map it for BPMP before sending the request.
1971 * @brief Description of the CPU v/f relation
1989 /** post-multiplier for vindex value */
1991 /** post-divider for vindex value */
2007 * * Targets: BPMP
2022 * 3. A bug is discovered in an existing implementation of the BPMP-FW
2034 * If ratchet is less than BPMP's #BPMP_ABI_RATCHET_VALUE, BPMP may
2035 * reply with mrq_response::err = -#BPMP_ERANGE to indicate that
2036 * BPMP-FW cannot interoperate correctly with the requester. Requester
2037 * should cease further communication with BPMP.
2050 * against which BPMP firwmare was compiled.
2053 * the requster must either interoperate with BPMP according to an ABI
2055 * communication with BPMP.
2062 /** @brief BPMP's ratchet value */
2075 * * Targets: BPMP
2113 * * Targets: BPMP
2152 * * Targets: BPMP
2176 * * -#BPMP_EINVAL: invalid mode requested
2177 * * -#BPMP_ENOSYS: RFL handshake is not supported
2178 * * -#BPMP_EACCES: Permission denied
2179 * * -#BPMP_ENODEV: if disp rfl mrq is not supported by BPMP-FW
2197 * * Targets: BPMP
2208 * @brief Check whether the BPMP driver supports the specified
2212 * supported and -#BPMP_ENODEV otherwise.
2221 * * -#BPMP_EINVAL: Invalid request parameters.
2222 * * -#BPMP_ENOTSUP: Requested bw is not available.
2274 * |sub-command |payload |
2275 * |----------------------------|------------------------------|
2291 * |sub-command |payload |
2292 * |----------------------------|------------------------------|
2307 * @brief bpmp-integrated bwmgr requests
2312 * * Targets: BPMP
2322 * @brief Check whether the BPMP-FW supports the specified
2326 * supported and -#BPMP_ENODEV otherwise.
2335 * * -#BPMP_EINVAL: Invalid request parameters.
2338 * * -#BPMP_ENOTSUP: Requested bw is not available.
2340 * will be current dram-clk rate.
2345 * @brief Set a max DRAM frequency for the bandwidth-manager
2349 * * -#BPMP_ENOTSUP: Requested cap frequency is not possible.
2365 * @defgroup bwmgr_int_unit_type BWMGR_INT floor unit-types
2369 /** @brief kilobytes per second unit-type */
2371 /** @brief kilohertz unit-type */
2395 * @brief toggle to determine the unit-type of floor value.
2396 * See @ref bwmgr_int_unit_type definitions for unit-type mappings.
2418 * |sub-command |payload |
2419 * |----------------------------|-----------------------------------|
2437 * |sub-command |payload |
2438 * |----------------------------|---------------------------------------|
2458 * * Targets: BPMP
2468 * @brief Check whether the BPMP driver supports the specified
2472 * supported and -#BPMP_ENODEV otherwise.
2483 * * -#BPMP_EINVAL: Invalid request parameters.
2484 * * -#BPMP_EFAULT: Legal LA is not possible for client requested iso_bw
2494 * * -#BPMP_EINVAL: Invalid request parameters.
2495 * * -#BPMP_EFAULT: Failed to calculate or program MC registers.
2504 * * -#BPMP_EINVAL: Invalid request parameters.
2576 /* @brief max possible iso-bw in kBps */
2596 * |sub-command |payload |
2597 * |------------------------------------ |----------------------------------------|
2619 * Each sub-command supported by @ref mrq_iso_client_request may return
2620 * sub-command-specific data. Some do and some do not as indicated in
2623 * |sub-command |payload |
2624 * |---------------------------- |------------------------------------|
2644 * @brief CPU freq. limits in ndiv
2649 * * Targets: BPMP
2652 * @addtogroup CPU
2680 /** @} CPU */
2686 * @brief Query CPU cluster auto-CC3 configuration
2691 * * Targets: BPMP
2696 * Queries from BPMP auto-CC3 configuration (allowed/not allowed) for a
2698 * device tree auto-CC3 settings, so that BPMP device tree is a single source of
2699 * auto-CC3 platform configuration.
2705 * @brief Request for auto-CC3 configuration of a cluster
2717 * @brief auto-CC3 configuration
2719 * - bits[31..10] reserved.
2720 * - bits[9..1] cc3 ndiv
2721 * - bit [0] if "1" auto-CC3 is allowed, if "0" auto-CC3 is not allowed
2732 * @brief A ring buffer debug console for BPMP
2737 * BPMP-FW, the RX (receive) and TX (transmit) buffers. Characters can be read
2745 * BPMP
2754 * BPMP
2763 * @brief Check whether the BPMP driver supports the specified request
2767 * -#BPMP_ENODEV otherwise
2771 * @brief Perform a read operation on the BPMP TX buffer
2777 * @brief Perform a write operation on the BPMP RX buffer
2780 * -#BPMP_ENODEV otherwise
2788 * -#BPMP_ENODEV otherwise
2795 * @brief Host->BPMP request data for request type
2810 * @brief Host->BPMP request data for request type #CMD_RINGBUF_CONSOLE_READ
2814 * @brief Number of bytes requested to be read from the BPMP TX buffer
2821 * @brief BPMP->Host response data for request type #CMD_RINGBUF_CONSOLE_READ
2824 /** @brief The actual data read from the BPMP TX buffer */
2832 * @brief Host->BPMP request data for request type #CMD_RINGBUF_CONSOLE_WRITE
2835 /** @brief The actual data to be written to the BPMP RX buffer */
2843 * @brief BPMP->Host response data for request type #CMD_RINGBUF_CONSOLE_WRITE
2846 /** @brief Number of bytes of available space in the BPMP RX buffer */
2848 /** @brief Number of bytes that were written to the BPMP RX buffer */
2859 * @brief BPMP->Host reply data for request type #CMD_RINGBUF_CONSOLE_GET_FIFO
2862 /** @brief Physical address of the BPMP TX buffer */
2864 /** @brief Physical address of the BPMP TX buffer head counter */
2866 /** @brief Physical address of the BPMP TX buffer tail counter */
2868 /** @brief Length of the BPMP TX buffer */
2874 * @brief Host->BPMP request data.
2895 * @brief Host->BPMP reply data
2911 * @brief Set a strap value controlled by BPMP
2916 * * Targets: BPMP
2927 * BPMP owns registers which act as straps to various units. It
2962 * * Targets: BPMP
3005 /** @brief PCIE controller number, T194 valid: 0-4; T234 valid: 0-10; T239 valid: 0-3 */
3032 * The uphy_request is split into several sub-commands. CMD_UPHY_PCIE_LANE_MARGIN_STATUS
3033 * requires no additional data. Others have a sub-command specific payload. Below table
3034 * shows sub-commands with their corresponding payload data.
3036 * |sub-command |payload |
3037 * |------------------------------------ |----------------------------------------|
3052 /** @brief Sub-command id. */
3069 * Each sub-command supported by @ref mrq_uphy_request may return
3070 * sub-command-specific data. Some do and some do not as indicated in
3073 * |sub-command |payload |
3074 * |---------------------------- |------------------------|
3097 * * Targets: BPMP
3115 * -#BPMP_EACCES: FMON access error @n
3116 * -#BPMP_EBADCMD if subcommand is not supported @n
3117 * -#BPMP_EBADSLT: clamp FMON on cluster with auto-CC3 enabled @n
3118 * -#BPMP_EBUSY: fmon is already clamped at different rate @n
3119 * -#BPMP_EFAULT: self-diagnostic error @n
3120 * -#BPMP_EINVAL: invalid FMON configuration @n
3121 * -#BPMP_EOPNOTSUPP: not in production mode @n
3122 * -#BPMP_ENODEV: invalid clk_id @n
3123 * -#BPMP_ENOENT: no calibration data, uninitialized @n
3124 * -#BPMP_ENOTSUP: avfs config not set @n
3125 * -#BPMP_ENOSYS: clamp FMON on cluster clock w/ no NAFLL @n
3126 * -#BPMP_ETIMEDOUT: operation timed out @n
3136 * -#BPMP_EBADCMD if subcommand is not supported @n
3137 * -#BPMP_ENODEV: invalid clk_id @n
3138 * -#BPMP_ENOENT: no calibration data, uninitialized @n
3139 * -#BPMP_ENOTSUP: avfs config not set @n
3140 * -#BPMP_EOPNOTSUPP: not in production mode @n
3151 * -#BPMP_EBADCMD if subcommand is not supported @n
3152 * -#BPMP_ENODEV: invalid clk_id @n
3153 * -#BPMP_ENOENT: no calibration data, uninitialized @n
3154 * -#BPMP_ENOTSUP: avfs config not set @n
3155 * -#BPMP_EOPNOTSUPP: not in production mode @n
3164 * -#BPMP_EBADCMD if subcommand is not supported @n
3165 * -#BPMP_EINVAL: invalid fault type @n
3166 * -#BPMP_ENODEV: invalid clk_id @n
3167 * -#BPMP_ENOENT: no calibration data, uninitialized @n
3168 * -#BPMP_ENOTSUP: avfs config not set @n
3169 * -#BPMP_EOPNOTSUPP: not in production mode @n
3240 * sub-commands. Some sub-commands require no additional data.
3241 * Others have a sub-command specific payload
3243 * |sub-command |payload |
3244 * |----------------------------|-----------------------|
3246 * |CMD_FMON_GEAR_FREE |- |
3247 * |CMD_FMON_GEAR_GET |- |
3252 /** @brief Sub-command and clock id concatenated to 32-bit word.
3253 * - bits[31..24] is the sub-cmd.
3254 * - bits[23..0] is monitored clock id used to select target
3273 * Each sub-command supported by @ref mrq_fmon_request may
3274 * return sub-command-specific data as indicated below.
3276 * |sub-command |payload |
3277 * |----------------------------|------------------------|
3278 * |CMD_FMON_GEAR_CLAMP |- |
3279 * |CMD_FMON_GEAR_FREE |- |
3308 * * Targets: BPMP
3325 * -#BPMP_ENODEV if target EC is not owned by BPMP @n
3326 * -#BPMP_EACCES if target EC power domain is turned off @n
3327 * -#BPMP_EBADCMD if subcommand is not supported
3337 * -#BPMP_ENODEV if target EC is not owned by BPMP @n
3338 * -#BPMP_EACCES if target EC power domain is turned off @n
3339 * -#BPMP_EBADCMD if subcommand is not supported
3345 /** @brief BPMP ECs error types */
3377 /** @brief Parity error from on-chip SRAM/FIFO
3456 * |---------------------------------|---------------------------|
3476 * |---------------------------------|---------------------------|
3492 * |---------------------------------|-----------------------|
3506 * |--------------------------------- |----------------------|
3521 * |----------------------------------------|------------------------|
3607 * by BPMP.
3610 * |sub-command |payload |
3611 * |----------------------------|-----------------------|
3615 * |sub-command |payload |
3616 * |----------------------------|-----------------------|
3622 /** @brief Sub-command id. */
3634 * Each sub-command supported by @ref mrq_ec_request may return
3635 * sub-command-specific data as indicated below.
3638 * |sub-command |payload |
3639 * |----------------------------|------------------------|
3643 * |sub-command |payload |
3644 * |----------------------------|------------------------|
3672 * * Targets: BPMP
3684 * * -#BPMP_EACCES: MRQ master is not allowed to request buffer refresh
3685 * * -#BPMP_ENAVAIL: Telemetry buffer cannot be refreshed via this MRQ channel
3686 * * -#BPMP_ENOTSUP: Telemetry buffer is not supported by BPMP-FW
3687 * * -#BPMP_ENODEV: Telemetry mrq is not supported by BPMP-FW
3705 * * Targets: BPMP
3714 * @brief Check whether the BPMP-FW supports the specified
3718 * supported and -#BPMP_ENODEV otherwise.
3727 * * -#BPMP_ENODEV: Pwr limit mrq is not supported by BPMP-FW
3728 * * -#BPMP_ENAVAIL: Invalid request parameters
3729 * * -#BPMP_EACCES: Request is not accepted
3738 * * -#BPMP_ENODEV: Pwr limit mrq is not supported by BPMP-FW
3739 * * -#BPMP_ENAVAIL: Invalid request parameters
3748 * * -#BPMP_ENODEV: Pwr limit mrq is not supported by BPMP-FW
3749 * * -#BPMP_ENAVAIL: Invalid request parameters
3829 * |sub-command |payload |
3830 * |----------------------------|---------------------------------|
3849 * |sub-command |payload |
3850 * |----------------------------|---------------------------------|
3851 * |CMD_PWR_LIMIT_QUERY_ABI | - |
3852 * |CMD_PWR_LIMIT_SET | - |
3875 * * Targets: BPMP
3902 * * -#BPMP_ENODEV: MRQ is not supported by BPMP-FW
3903 * * -#BPMP_EACCES: Operation not permitted for the MRQ master
3904 * * -#BPMP_ENAVAIL: NDIV offsetting is disabled
3930 /** @brief Bad sub-MRQ command */