diff options
| author | Thierry Reding <treding@nvidia.com> | 2026-10-03 11:47:59 +0200 |
|---|---|---|
| committer | Thierry Reding <treding@nvidia.com> | 2026-10-03 11:47:59 +0200 |
| commit | 436ae3f3ebe95cd8ee71e35fd3cc91f9fc88aae1 (patch) | |
| tree | 74f727ee172fb8a928b3f6d0fff0332676830ed8 /include/soc | |
| parent | af351a8392e5e97366c764f5de80d17145677716 (diff) | |
| parent | 1bbcf4a19f1495f769b69e9569d8c1e81df074f5 (diff) | |
| download | linux-next-436ae3f3ebe95cd8ee71e35fd3cc91f9fc88aae1.tar.gz linux-next-436ae3f3ebe95cd8ee71e35fd3cc91f9fc88aae1.zip | |
Merge branch for-7.4/firmware into for-next
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/soc')
| -rw-r--r-- | include/soc/tegra/bpmp-abi.h | 165 | ||||
| -rw-r--r-- | include/soc/tegra/bpmp.h | 2 |
2 files changed, 164 insertions, 3 deletions
diff --git a/include/soc/tegra/bpmp-abi.h b/include/soc/tegra/bpmp-abi.h index 5c64b3e02211..7c46748aa8e3 100644 --- a/include/soc/tegra/bpmp-abi.h +++ b/include/soc/tegra/bpmp-abi.h @@ -76,7 +76,7 @@ * @ingroup MRQ_Format * * Request an answer from the peer. - * This should be set in mrq_request::flags for all requests targetted + * This should be set in mrq_request::flags for all requests targeted * at BPMP. For requests originating in BPMP, this flag is optional except * for messages targeting MCE, for which the field must be set. * When this flag is not set, the remote peer must not send a response @@ -587,12 +587,13 @@ struct mrq_response { #define MRQ_HWPM 93U #define MRQ_DVFS 94U #define MRQ_PPP_PROFILE 95U +#define MRQ_SOCHUB_MBWT 96U /** * @brief Maximum MRQ code to be sent by CPU software to * BPMP. Subject to change in future */ -#define MAX_CPU_MRQ_ID 95U +#define MAX_CPU_MRQ_ID 96U /** @} */ @@ -2727,7 +2728,7 @@ struct mrq_abi_ratchet_request { * @brief Response to #MRQ_ABI_RATCHET * * #ratchet shall be #BPMP_ABI_RATCHET_VALUE from the ABI header - * against which BPMP firwmare was compiled. + * against which BPMP firmware was compiled. * * If #ratchet is less than the requester's #BPMP_ABI_RATCHET_VALUE, * the requster must either interoperate with BPMP according to an ABI @@ -6686,6 +6687,164 @@ struct mrq_ppp_profile_response { /** @} PPP */ /** @endcond */ +/** @cond (bpmp_tb500) + * @ingroup MRQ_Codes + * @def MRQ_SOCHUB_MBWT + * @brief Configure per-virtual-channel bandwidth caps for a bandwidth group using + * Memory Bandwidth Throttler (MBWT). + * + * * Initiators: Any + * * Targets: BPMP + * * Request Payload: @ref mrq_sochub_mbwt_request + * * Response Payload: @ref mrq_sochub_mbwt_response + * + * @addtogroup SOCHUB_MBWT + * @{ + */ + +/** + * @brief Sub-command identifiers for #MRQ_SOCHUB_MBWT. + */ +enum mrq_sochub_mbwt_cmd { + /** + * @brief Check whether the BPMP-FW supports the specified + * #MRQ_SOCHUB_MBWT sub-command. + * + * mrq_response::err is 0 if the specified request is + * supported and -#BPMP_ENODEV otherwise. + */ + CMD_SOCHUB_MBWT_QUERY_ABI = 0, + /** + * @brief Get bandwidth cap for a virtual channel + * + * mrq_response::err is defined as: + * + * | Value | Description | + * |----------------|------------------------------------------------| + * | 0 | Success | + * | -#BPMP_ENOTSUP | #MRQ_SOCHUB_MBWT is not supported by BPMP-FW. | + * | -#BPMP_EINVAL | Invalid request parameters. | + * | -#BPMP_EIO | Failed to retrieve the bandwidth. | + */ + CMD_SOCHUB_MBWT_GET_BW = 1, + /** + * @brief Set bandwidth cap for a virtual channel. + * + * mrq_response::err is defined as: + * + * | Value | Description | + * |----------------|------------------------------------------------| + * | 0 | Success | + * | -#BPMP_ENOTSUP | #MRQ_SOCHUB_MBWT is not supported by BPMP-FW. | + * | -#BPMP_EINVAL | Invalid request parameters. | + * | -#BPMP_EIO | Failed to set the bandwidth. | + */ + CMD_SOCHUB_MBWT_SET_BW = 2, +}; + +/** + * @brief Request data for #MRQ_SOCHUB_MBWT sub-command + * #CMD_SOCHUB_MBWT_QUERY_ABI + */ +struct cmd_sochub_mbwt_query_abi_req { + /** @brief Sub-command identifier from @ref mrq_sochub_mbwt_cmd */ + uint32_t cmd_code; +} BPMP_ABI_PACKED; + +/** + * @brief Request data for #MRQ_SOCHUB_MBWT sub-command + * #CMD_SOCHUB_MBWT_GET_BW + */ +struct cmd_sochub_mbwt_get_bw_req { + /** + * @brief Instance ID for the bandwidth group + * + * Valid range is [0, 5] + */ + uint32_t instance; + /** + * @brief Type of the virtual channel/traffic + * + * Valid values: + * + * * Value 0: PCIe read + * * Value 1: PCIe write + * * Value 2: GPU connected over the chip-to-chip link (NVCLINK) + */ + uint32_t vc_type; +} BPMP_ABI_PACKED; + +/** + * @brief Request data for #MRQ_SOCHUB_MBWT sub-command + * #CMD_SOCHUB_MBWT_SET_BW + */ +struct cmd_sochub_mbwt_set_bw_req { + /** + * @brief Instance ID for the bandwidth group + * + * Valid range is [0, 5] + */ + uint32_t instance; + /** + * @brief Type of the virtual channel/traffic + * + * Valid values: + * + * * Value 0: PCIe read + * * Value 1: PCIe write + * * Value 2: GPU connected over the chip-to-chip link (NVCLINK) + */ + uint32_t vc_type; + /** @brief Bandwidth cap in GB/s */ + uint32_t bw; +} BPMP_ABI_PACKED; + +/** + * @brief Response data for #MRQ_SOCHUB_MBWT sub-command + * #CMD_SOCHUB_MBWT_GET_BW + */ +struct cmd_sochub_mbwt_get_bw_resp { + /** @brief Bandwidth cap in GB/s */ + uint32_t bw; +} BPMP_ABI_PACKED; + +/** + * @brief Request payload for the #MRQ_SOCHUB_MBWT -command + * + * | Sub-command | Request payload | + * |-------------------------------|----------------------------------------| + * | #CMD_SOCHUB_MBWT_QUERY_ABI | #cmd_sochub_mbwt_query_abi_req | + * | #CMD_SOCHUB_MBWT_GET_BW | #cmd_sochub_mbwt_get_bw_req | + * | #CMD_SOCHUB_MBWT_SET_BW | #cmd_sochub_mbwt_set_bw_req | + */ +struct mrq_sochub_mbwt_request { + /** @brief Sub-command ID from @ref mrq_sochub_mbwt_cmd. */ + uint32_t cmd; + union { + struct cmd_sochub_mbwt_query_abi_req query_abi; + struct cmd_sochub_mbwt_get_bw_req get_bw; + struct cmd_sochub_mbwt_set_bw_req set_bw; + } BPMP_UNION_ANON; +} BPMP_ABI_PACKED; + +/** + * @brief Response payload for the #MRQ_SOCHUB_MBWT -command. + * + * | Sub-command | Response payload | + * |-------------------------------|----------------------------------------| + * | #CMD_SOCHUB_MBWT_QUERY_ABI | - | + * | #CMD_SOCHUB_MBWT_GET_BW | #cmd_sochub_mbwt_get_bw_resp | + * | #CMD_SOCHUB_MBWT_SET_BW | - | + */ +struct mrq_sochub_mbwt_response { + union { + struct cmd_sochub_mbwt_get_bw_resp get_bw; + } BPMP_UNION_ANON; +} BPMP_ABI_PACKED; + +/** @} SOCHUB_MBWT */ +/** @endcond */ + /** * @addtogroup Error_Codes * Negative values for mrq_response::err generally indicate some diff --git a/include/soc/tegra/bpmp.h b/include/soc/tegra/bpmp.h index a33582590a3b..f55db918ccb1 100644 --- a/include/soc/tegra/bpmp.h +++ b/include/soc/tegra/bpmp.h @@ -16,6 +16,7 @@ #include <soc/tegra/bpmp-abi.h> struct tegra_bpmp_clk; +struct tegra_bpmp_mbwt_soc; struct tegra_bpmp_ops; struct tegra_bpmp_soc { @@ -28,6 +29,7 @@ struct tegra_bpmp_soc { } channels; const struct tegra_bpmp_ops *ops; + const struct tegra_bpmp_mbwt_soc *mbwt; unsigned int num_resets; }; |
