Lines Matching +full:i2c +full:- +full:thermtrip
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
66 * A well-defined subset of the MRQ messages that the CPU sends to the
130 * -BPMP_EBADMSG and ignore the request.
144 …* | -------------------- | ------------------------------------ | --------------------------------…
223 * calculated by BPMP, -BPMP_EBADMSG will be returned and the request will
388 * @defgroup I2C I2C
402 * @defgroup CC3 Auto-CC3
457 * mrq_ping_request challenge left shifted by 1 with the carry-bit
548 * The BPMP firmware implements a pseudo-filesystem called
637 * |-------------------|-------|
643 /** @brief Sub-command (@ref mrq_debugfs_commands) */
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) */
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)
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 | - |
963 * @brief Issue an i2c transaction
971 * @addtogroup I2C
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)
991 * @brief Serializable i2c request
993 * Instances of this structure are packed (little-endian) into
996 * an i2c bus.
1006 /** @brief I2C slave address */
1010 /** @brief Length of I2C transaction in bytes */
1017 * @brief Trigger one or more i2c transactions
1041 * @brief Container for data read from the i2c bus
1044 * zero or more I2C reads. The data read from the bus is serialized
1050 /** @brief I2c read data */
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
1082 /** @} I2C */
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
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 | - |
1676 * framework interally to implement various temperature-dependent
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.
1726 * * -#BPMP_EINVAL: Invalid request parameters.
1727 * * -#BPMP_ENOENT: No driver registered for thermal zone.
1728 * * -#BPMP_EFAULT: Problem setting trip point.
1742 * @brief Get the thermtrip of the specified zone.
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
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
1855 * thermtrip: HW shutdown temperature in millicelsius.
1858 int32_t thermtrip; member
1862 * Host->BPMP request data.
1880 * BPMP->Host request data.
1893 * Data in reply to a Host->BPMP request.
1925 * disabled, and non-zero throttle is enabled.
1929 * -#BPMP_ENODEV otherwise.
1989 /** post-multiplier for vindex value */
1991 /** post-divider for vindex value */
2022 * 3. A bug is discovered in an existing implementation of the BPMP-FW
2035 * reply with mrq_response::err = -#BPMP_ERANGE to indicate that
2036 * BPMP-FW cannot interoperate correctly with the requester. Requester
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
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
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 * |----------------------------|---------------------------------------|
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 * |---------------------------- |------------------------------------|
2686 * @brief Query CPU cluster auto-CC3 configuration
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
2737 * BPMP-FW, the RX (receive) and TX (transmit) buffers. Characters can be read
2767 * -#BPMP_ENODEV otherwise
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
2821 * @brief BPMP->Host response data for request type #CMD_RINGBUF_CONSOLE_READ
2832 * @brief Host->BPMP request data for request type #CMD_RINGBUF_CONSOLE_WRITE
2843 * @brief BPMP->Host response data for request type #CMD_RINGBUF_CONSOLE_WRITE
2859 * @brief BPMP->Host reply data for request type #CMD_RINGBUF_CONSOLE_GET_FIFO
2874 * @brief Host->BPMP request data.
2895 * @brief Host->BPMP reply data
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 * |---------------------------- |------------------------|
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 |- |
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
3377 /** @brief Parity error from on-chip SRAM/FIFO
3456 * |---------------------------------|---------------------------|
3476 * |---------------------------------|---------------------------|
3492 * |---------------------------------|-----------------------|
3506 * |--------------------------------- |----------------------|
3521 * |----------------------------------------|------------------------|
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 * |----------------------------|------------------------|
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
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 | - |
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 */