Skip to contentSkip to conversation

PCI: tegra: Add Tegra264 support

PATCH Superseded Thierry Reding 4 participants 13 messages Mar 20 – Apr 2

Subsystems (5)

v2 of 10 Superseded Latest is v10 →

lore
Share & tools
lore

Thierry Reding

author maintainer
#0 lore raw

v2 cover PCI: tegra: Add Tegra264 support

From: Thierry Reding <[email protected]>

Hi,

this series adds support for the PCIe controllers found on the Tegra264 SoC. There are six instances, one of which is for internal purposes only and the other five are general purpose.

The first two patches in the series add the BPMP support needed to power up/down the PCI link. Patch 3 contains the device tree bindings for the PCIe controller and patch 4 adds the driver. Finally, patch 5 adds DT nodes for the controllers found on the Tegra264 SoC.

Regarding merging these patches, I think ideally I'd pick up the PCI driver patch into the Tegra tree because there is a build dependency on patches 1 and 2. Furthermore, patch 1 depends on another patch that's already in the Tegra tree, and there will be conflicts if it is merged in another tree. Alternatively I can provide a stable branch with patches 1 and 2 for the PCI maintainers to pull in.

Let me know how you'd like to handle this.

Changes in v2:
- fix an issue with sanity-checking disabled BARs
- address review comments

Thanks,
Thierry

Thierry Reding (5):
soc/tegra: Update BPMP ABI header
firmware: tegra: bpmp: Add tegra_bpmp_get_with_id() function
dt-bindings: pci: Document the NVIDIA Tegra264 PCIe controller
PCI: tegra: Add Tegra264 support
arm64: tegra: Add PCI controllers on Tegra264

 .../bindings/pci/nvidia,tegra264-pcie.yaml    |  149 +
 arch/arm64/boot/dts/nvidia/tegra264.dtsi      |  248 +-
 drivers/firmware/tegra/bpmp.c                 |   34 +
 drivers/pci/controller/Kconfig                |   10 +-
 drivers/pci/controller/Makefile               |    1 +
 drivers/pci/controller/pcie-tegra264.c        |  527 ++
 include/soc/tegra/bpmp-abi.h                  | 4565 +++++++++++++----
 include/soc/tegra/bpmp.h                      |    1 +
 8 files changed, 4613 insertions(+), 922 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml
 create mode 100644 drivers/pci/controller/pcie-tegra264.c
Signature · 1 line
2.52.0
author maintainer
#1 lore raw

PATCH v2 1/5 soc/tegra: Update BPMP ABI header

From: Thierry Reding <[email protected]>

This update primarily adds various new commands and MRQs for Tegra264, but also contains a few new annotations and fixes.

---
Changes in v2:
- remove SPDX-FileCopyrightText tag

 include/soc/tegra/bpmp-abi.h | 4565 +++++++++++++++++++++++++++-------
 1 file changed, 3671 insertions(+), 894 deletions(-)
include/soc/tegra/bpmp-abi.h +3671 -894
index 39bb3f87e28d..5c64b3e02211 100644
@@ -1,6 +1,6 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /*
- * Copyright (c) 2014-2022, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2014-2025, NVIDIA CORPORATION.  All rights reserved.
  */
 
 #ifndef ABI_BPMP_ABI_H
@@ -74,6 +74,7 @@
 
 /**
  * @ingroup MRQ_Format
+ *
  * Request an answer from the peer.
  * This should be set in mrq_request::flags for all requests targetted
  * at BPMP. For requests originating in BPMP, this flag is optional except
@@ -85,6 +86,7 @@
 
 /**
  * @ingroup MRQ_Format
+ *
  * Ring the sender's doorbell when responding. This should be set unless
  * the sender wants to poll the underlying communications layer directly.
  *
@@ -94,7 +96,9 @@
 
 /**
  * @ingroup MRQ_Format
- * CRC present
+ *
+ * This is set in mrq_request::flags for requests that have CRC present and
+ * correspondingly in mrq_response::flags for responses that have CRC present.
  */
 #define BPMP_MAIL_CRC_PRESENT	(1U << 2U)
 
@@ -127,91 +131,319 @@ struct mrq_request {
 	 * crc16, xid and length fields are present when set.
 	 * Some platform configurations, especially when targeted to applications requiring
 	 * functional safety, mandate this option being set or otherwise will respond with
-	 * -BPMP_EBADMSG and ignore the request.
+	 * -#BPMP_EBADMSG and ignore the request.
 	 *
 	 * **xid** is a transaction ID.
 	 *
 	 * Only used when #BPMP_MAIL_CRC_PRESENT is set.
 	 *
 	 * **payload_length** of the message expressed in bytes without the size of this header.
-	 * See table below for minimum accepted payload lengths for each MRQ.
-	 * Note: For DMCE communication, this field expresses the length as a multiple of 4 bytes
-	 * rather than bytes.
+	 * See tables below for minimum accepted payload lengths for each MRQ.
 	 *
 	 * Only used when #BPMP_MAIL_CRC_PRESENT is set.
 	 *
-	 * | MRQ                  | CMD                                  | minimum payload length
-	 * | -------------------- | ------------------------------------ | ------------------------------------------ |
-	 * | MRQ_PING             |                                      | 4                                          |
-	 * | MRQ_THREADED_PING    |                                      | 4                                          |
-	 * | MRQ_RESET            | any                                  | 8                                          |
-	 * | MRQ_I2C              |                                      | 12 + cmd_i2c_xfer_request.data_size        |
-	 * | MRQ_CLK              | CMD_CLK_GET_RATE                     | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_SET_RATE                     | 16                                         |
-	 * | MRQ_CLK              | CMD_CLK_ROUND_RATE                   | 16                                         |
-	 * | MRQ_CLK              | CMD_CLK_GET_PARENT                   | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_SET_PARENT                   | 8                                          |
-	 * | MRQ_CLK              | CMD_CLK_ENABLE                       | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_DISABLE                      | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_IS_ENABLED                   | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_GET_ALL_INFO                 | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_GET_MAX_CLK_ID               | 4                                          |
-	 * | MRQ_CLK              | CMD_CLK_GET_FMAX_AT_VMIN             | 4                                          |
-	 * | MRQ_QUERY_ABI        |                                      | 4                                          |
-	 * | MRQ_PG               | CMD_PG_QUERY_ABI                     | 12                                         |
-	 * | MRQ_PG               | CMD_PG_SET_STATE                     | 12                                         |
-	 * | MRQ_PG               | CMD_PG_GET_STATE                     | 8                                          |
-	 * | MRQ_PG               | CMD_PG_GET_NAME                      | 8                                          |
-	 * | MRQ_PG               | CMD_PG_GET_MAX_ID                    | 8                                          |
-	 * | MRQ_THERMAL          | CMD_THERMAL_QUERY_ABI                | 8                                          |
-	 * | MRQ_THERMAL          | CMD_THERMAL_GET_TEMP                 | 8                                          |
-	 * | MRQ_THERMAL          | CMD_THERMAL_SET_TRIP                 | 20                                         |
-	 * | MRQ_THERMAL          | CMD_THERMAL_GET_NUM_ZONES            | 4                                          |
-	 * | MRQ_THERMAL          | CMD_THERMAL_GET_THERMTRIP            | 8                                          |
-	 * | MRQ_CPU_VHINT        |                                      | 8                                          |
-	 * | MRQ_ABI_RATCHET      |                                      | 2                                          |
-	 * | MRQ_EMC_DVFS_LATENCY |                                      | 8                                          |
-	 * | MRQ_EMC_DVFS_EMCHUB  |                                      | 8                                          |
-	 * | MRQ_EMC_DISP_RFL     |                                      | 4                                          |
-	 * | MRQ_BWMGR            | CMD_BWMGR_QUERY_ABI                  | 8                                          |
-	 * | MRQ_BWMGR            | CMD_BWMGR_CALC_RATE                  | 8 + 8 * bwmgr_rate_req.num_iso_clients     |
-	 * | MRQ_ISO_CLIENT       | CMD_ISO_CLIENT_QUERY_ABI             | 8                                          |
-	 * | MRQ_ISO_CLIENT       | CMD_ISO_CLIENT_CALCULATE_LA          | 16                                         |
-	 * | MRQ_ISO_CLIENT       | CMD_ISO_CLIENT_SET_LA                | 16                                         |
-	 * | MRQ_ISO_CLIENT       | CMD_ISO_CLIENT_GET_MAX_BW            | 8                                          |
-	 * | MRQ_CPU_NDIV_LIMITS  |                                      | 4                                          |
-	 * | MRQ_CPU_AUTO_CC3     |                                      | 4                                          |
-	 * | MRQ_RINGBUF_CONSOLE  | CMD_RINGBUF_CONSOLE_QUERY_ABI        | 8                                          |
-	 * | MRQ_RINGBUF_CONSOLE  | CMD_RINGBUF_CONSOLE_READ             | 5                                          |
-	 * | MRQ_RINGBUF_CONSOLE  | CMD_RINGBUF_CONSOLE_WRITE            | 5 + cmd_ringbuf_console_write_req.len      |
-	 * | MRQ_RINGBUF_CONSOLE  | CMD_RINGBUF_CONSOLE_GET_FIFO         | 4                                          |
-	 * | MRQ_STRAP            | STRAP_SET                            | 12                                         |
-	 * | MRQ_UPHY             | CMD_UPHY_PCIE_LANE_MARGIN_CONTROL    | 24                                         |
-	 * | MRQ_UPHY             | CMD_UPHY_PCIE_LANE_MARGIN_STATUS     | 4                                          |
-	 * | MRQ_UPHY             | CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT | 5                                          |
-	 * | MRQ_UPHY             | CMD_UPHY_PCIE_CONTROLLER_STATE       | 6                                          |
-	 * | MRQ_UPHY             | CMD_UPHY_PCIE_EP_CONTROLLER_PLL_OFF  | 5                                          |
-	 * | MRQ_FMON             | CMD_FMON_GEAR_CLAMP                  | 16                                         |
-	 * | MRQ_FMON             | CMD_FMON_GEAR_FREE                   | 4                                          |
-	 * | MRQ_FMON             | CMD_FMON_GEAR_GET                    | 4                                          |
-	 * | MRQ_FMON             | CMD_FMON_FAULT_STS_GET               | 8                                          |
-	 * | MRQ_EC               | CMD_EC_STATUS_EX_GET                 | 12                                         |
-	 * | MRQ_QUERY_FW_TAG     |                                      | 0                                          |
-	 * | MRQ_DEBUG            | CMD_DEBUG_OPEN_RO                    | 4 + length of cmd_debug_fopen_request.name |
-	 * | MRQ_DEBUG            | CMD_DEBUG_OPEN_WO                    | 4 + length of cmd_debug_fopen_request.name |
-	 * | MRQ_DEBUG            | CMD_DEBUG_READ                       | 8                                          |
-	 * | MRQ_DEBUG            | CMD_DEBUG_WRITE                      | 12 + cmd_debug_fwrite_request.datalen      |
-	 * | MRQ_DEBUG            | CMD_DEBUG_CLOSE                      | 8                                          |
-	 * | MRQ_TELEMETRY        |                                      | 8                                          |
-	 * | MRQ_PWR_LIMIT        | CMD_PWR_LIMIT_QUERY_ABI              | 8                                          |
-	 * | MRQ_PWR_LIMIT        | CMD_PWR_LIMIT_SET                    | 20                                         |
-	 * | MRQ_PWR_LIMIT        | CMD_PWR_LIMIT_GET                    | 16                                         |
-	 * | MRQ_PWR_LIMIT        | CMD_PWR_LIMIT_CURR_CAP               | 8                                          |
-	 * | MRQ_GEARS            |                                      | 0                                          |
-	 * | MRQ_BWMGR_INT        | CMD_BWMGR_INT_QUERY_ABI              | 8                                          |
-	 * | MRQ_BWMGR_INT        | CMD_BWMGR_INT_CALC_AND_SET           | 16                                         |
-	 * | MRQ_BWMGR_INT        | CMD_BWMGR_INT_CAP_SET                | 8                                          |
-	 * | MRQ_OC_STATUS        |                                      | 0                                          |
+	 * | MRQ                   | Sub-command                           | Minimum payload length
+	 * | --------------------- | ------------------------------------  | ------------------------------------------------------- |
+	 * | #MRQ_PING             | -                                     | 4                                                       |
+	 * | #MRQ_THREADED_PING    | -                                     | 4                                                       |
+	 * | #MRQ_RESET            | any                                   | 8                                                       |
+	 * | #MRQ_I2C              | -                                     | 12 + cmd_i2c_xfer_request.data_size                     |
+	 * | #MRQ_CLK              | #CMD_CLK_GET_RATE                     | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_SET_RATE                     | 16                                                      |
+	 * | #MRQ_CLK              | #CMD_CLK_ROUND_RATE                   | 16                                                      |
+	 * | #MRQ_CLK              | #CMD_CLK_GET_PARENT                   | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_SET_PARENT                   | 8                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_ENABLE                       | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_DISABLE                      | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_IS_ENABLED                   | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_GET_ALL_INFO                 | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_GET_MAX_CLK_ID               | 4                                                       |
+	 * | #MRQ_CLK              | #CMD_CLK_GET_FMAX_AT_VMIN             | 4                                                       |
+	 * | #MRQ_QUERY_ABI        | -                                     | 4                                                       |
+	 * | #MRQ_PG               | #CMD_PG_QUERY_ABI                     | 12                                                      |
+	 * | #MRQ_PG               | #CMD_PG_SET_STATE                     | 12                                                      |
+	 * | #MRQ_PG               | #CMD_PG_GET_STATE                     | 8                                                       |
+	 * | #MRQ_PG               | #CMD_PG_GET_NAME                      | 8                                                       |
+	 * | #MRQ_PG               | #CMD_PG_GET_MAX_ID                    | 8                                                       |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_QUERY_ABI                | 8                                                       |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_GET_TEMP                 | 8                                                       |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_GET_NUM_ZONES            | 4                                                       |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_GET_THERMTRIP            | 8                                                       |
+	 * | #MRQ_ABI_RATCHET      | -                                     | 2                                                       |
+	 * | #MRQ_EMC_DVFS_LATENCY | -                                     | 8                                                       |
+	 * | #MRQ_QUERY_FW_TAG     | -                                     | 0                                                       |
+	 * | #MRQ_DEBUG            | #CMD_DEBUG_OPEN_RO                    | 4 + length of cmd_debug_fopen_request.name              |
+	 * | #MRQ_DEBUG            | #CMD_DEBUG_OPEN_WO                    | 4 + length of cmd_debug_fopen_request.name              |
+	 * | #MRQ_DEBUG            | #CMD_DEBUG_READ                       | 8                                                       |
+	 * | #MRQ_DEBUG            | #CMD_DEBUG_WRITE                      | 12 + cmd_debug_fwrite_request.datalen                   |
+	 * | #MRQ_DEBUG            | #CMD_DEBUG_CLOSE                      | 8                                                       |
+	 *
+	 * @cond (bpmp_t186)
+	 * The following additional MRQ is supported on T186 -platform:
+	 *
+	 * | MRQ                   | Sub-command                           | Minimum payload length                |
+	 * | --------------------- | ------------------------------------- | ------------------------------------- |
+	 * | #MRQ_CPU_VHINT        | -                                     | 8                                     |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_SET_TRIP                 | 20                                    |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_QUERY_ABI        | 8                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_READ             | 5                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_WRITE            | 5 + cmd_ringbuf_console_write_req.len |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_GET_FIFO         | 4                                     |
+	 * @endcond
+	 *
+	 * @cond (bpmp_t194)
+	 * The following additional MRQs are supported on T194 -platform:
+	 *
+	 * | MRQ                   | Sub-command                           | Minimum payload length                |
+	 * | --------------------- | ------------------------------------- | ------------------------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS  | -                                     | 4                                     |
+	 * | #MRQ_STRAP            | #STRAP_SET                            | 12                                    |
+	 * | #MRQ_CPU_AUTO_CC3     | -                                     | 4                                     |
+	 * | #MRQ_EC               | #CMD_EC_STATUS_EX_GET                 | 12                                    |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_CLAMP                  | 16                                    |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_FREE                   | 4                                     |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_GET                    | 4                                     |
+	 * | #MRQ_FMON             | #CMD_FMON_FAULT_STS_GET               | 8                                     |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_SET_TRIP                 | 20                                    |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_QUERY_ABI        | 8                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_READ             | 5                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_WRITE            | 5 + cmd_ringbuf_console_write_req.len |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_GET_FIFO         | 4                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_CONTROL    | 24                                    |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_STATUS     | 4                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT | 5                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_CONTROLLER_STATE       | 6                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_OFF  | 5                                     |
+	 * @endcond
+	 *
+	 * @cond (bpmp_safe && bpmp_t234)
+	 * The following additional MRQ is supported on functional-safety
+	 * builds for the T234 platform:
+	 *
+	 * | MRQ                   | Sub-command                           | Minimum payload length                |
+	 * | --------------------- | ------------------------------------- | ------------------------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS  | -                                     | 4                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_QUERY_ABI        | 8                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_READ             | 5                                     |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_WRITE            | 5 + cmd_ringbuf_console_write_req.len |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_GET_FIFO         | 4                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_CONTROL    | 24                                    |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_STATUS     | 4                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT | 5                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_CONTROLLER_STATE       | 6                                     |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_OFF  | 5                                     |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_CLAMP                  | 16                                    |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_FREE                   | 4                                     |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_GET                    | 4                                     |
+	 * | #MRQ_FMON             | #CMD_FMON_FAULT_STS_GET               | 8                                     |
+	 * | #MRQ_EMC_DVFS_EMCHUB  | -                                     | 8                                     |
+	 * | #MRQ_EMC_DISP_RFL     | -                                     | 4                                     |
+	 *
+	 * @endcond
+	 *
+	 * @cond (!bpmp_safe && bpmp_t234)
+	 *
+	 * The following additional MRQs are supported on non-functional-safety
+	 * builds for the T234 and T238 -platforms:
+	 *
+	 * | MRQ                   | Sub-command                           | Minimum payload length                              |
+	 * | --------------------- | ------------------------------------- | --------------------------------------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS  | -                                     | 4                                                   |
+	 * | #MRQ_STRAP            | #STRAP_SET                            | 12                                                  |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_SET_TRIP                 | 20                                                  |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_QUERY_ABI        | 8                                                   |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_READ             | 5                                                   |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_WRITE            | 5 + cmd_ringbuf_console_write_req.len               |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_GET_FIFO         | 4                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_CONTROL    | 24                                                  |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_STATUS     | 4                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT | 5                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_CONTROLLER_STATE       | 6                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_OFF  | 5                                                   |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_CLAMP                  | 16                                                  |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_FREE                   | 4                                                   |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_GET                    | 4                                                   |
+	 * | #MRQ_FMON             | #CMD_FMON_FAULT_STS_GET               | 8                                                   |
+	 * | #MRQ_EMC_DVFS_EMCHUB  | -                                     | 8                                                   |
+	 * | #MRQ_EMC_DISP_RFL     | -                                     | 4                                                   |
+	 * | #MRQ_BWMGR            | #CMD_BWMGR_QUERY_ABI                  | 8                                                   |
+	 * | #MRQ_BWMGR            | #CMD_BWMGR_CALC_RATE                  | 8 + 8 * cmd_bwmgr_calc_rate_request.num_iso_clients |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_QUERY_ABI             | 8                                                   |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_CALCULATE_LA          | 16                                                  |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_SET_LA                | 16                                                  |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_GET_MAX_BW            | 8                                                   |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_QUERY_ABI              | 8                                                   |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_CALC_AND_SET           | 16                                                  |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_CAP_SET                | 8                                                   |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_GET_LAST_REQUEST       | 9                                                   |
+	 * | #MRQ_OC_STATUS        | -                                     | 0                                                   |
+	 * @endcond
+	 *
+	 * @cond bpmp_t238
+	 * The following additional MRQs are supported on T238 platform:
+	 *
+	 * | MRQ                   | Sub-command                           | Minimum payload length                              |
+	 * | --------------------- | ------------------------------------- | --------------------------------------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS  | -                                     | 4                                                   |
+	 * | #MRQ_STRAP            | #STRAP_SET                            | 12                                                  |
+	 * | #MRQ_THERMAL          | #CMD_THERMAL_SET_TRIP                 | 20                                                  |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_QUERY_ABI        | 8                                                   |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_READ             | 5                                                   |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_WRITE            | 5 + cmd_ringbuf_console_write_req.len               |
+	 * | #MRQ_RINGBUF_CONSOLE  | #CMD_RINGBUF_CONSOLE_GET_FIFO         | 4                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_CONTROL    | 24                                                  |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_LANE_MARGIN_STATUS     | 4                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT | 5                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_CONTROLLER_STATE       | 6                                                   |
+	 * | #MRQ_UPHY             | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_OFF  | 5                                                   |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_CLAMP                  | 16                                                  |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_FREE                   | 4                                                   |
+	 * | #MRQ_FMON             | #CMD_FMON_GEAR_GET                    | 4                                                   |
+	 * | #MRQ_FMON             | #CMD_FMON_FAULT_STS_GET               | 8                                                   |
+	 * | #MRQ_EMC_DVFS_EMCHUB  | -                                     | 8                                                   |
+	 * | #MRQ_EMC_DISP_RFL     | -                                     | 4                                                   |
+	 * | #MRQ_BWMGR            | #CMD_BWMGR_QUERY_ABI                  | 8                                                   |
+	 * | #MRQ_BWMGR            | #CMD_BWMGR_CALC_RATE                  | 8 + 8 * cmd_bwmgr_calc_rate_request.num_iso_clients |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_QUERY_ABI             | 8                                                   |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_CALCULATE_LA          | 16                                                  |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_SET_LA                | 16                                                  |
+	 * | #MRQ_ISO_CLIENT       | #CMD_ISO_CLIENT_GET_MAX_BW            | 8                                                   |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_QUERY_ABI              | 8                                                   |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_CALC_AND_SET           | 16                                                  |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_CAP_SET                | 8                                                   |
+	 * | #MRQ_BWMGR_INT        | #CMD_BWMGR_INT_GET_LAST_REQUEST       | 9                                                   |
+	 * | #MRQ_OC_STATUS        | -                                     | 0                                                   |
+	 * | #MRQ_THROTTLE         | #CMD_THROTTLE_SET_OC_CONFIG           | 5                                                   |
+	 * @endcond
+	 *
+	 * @cond (bpmp_th500)
+	 * The following additional MRQs are supported on TH500 -platform:
+	 *
+	 * | MRQ                  | Sub-command                           | Minimum payload length |
+	 * | -------------------- | ------------------------------------- | ---------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS | -                                     | 4                      |
+	 * | #MRQ_THERMAL         | #CMD_THERMAL_SET_TRIP                 | 20                     |
+	 * | #MRQ_STRAP           | #STRAP_SET                            | 12                     |
+	 * | #MRQ_SHUTDOWN        | -                                     | 4                      |
+	 * | #MRQ_UPHY            | #CMD_UPHY_PCIE_LANE_MARGIN_CONTROL    | 24                     |
+	 * | #MRQ_UPHY            | #CMD_UPHY_PCIE_LANE_MARGIN_STATUS     | 4                      |
+	 * | #MRQ_UPHY            | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT | 5                      |
+	 * | #MRQ_UPHY            | #CMD_UPHY_PCIE_CONTROLLER_STATE       | 6                      |
+	 * | #MRQ_UPHY            | #CMD_UPHY_PCIE_EP_CONTROLLER_PLL_OFF  | 5                      |
+	 * | #MRQ_UPHY            | #CMD_UPHY_PCIE_CONFIG_VDM             | 3                      |
+	 * | #MRQ_TELEMETRY       | -                                     | 8                      |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_QUERY_ABI              | 8                      |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_SET                    | 20                     |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_GET                    | 16                     |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_CURR_CAP               | 8                      |
+	 * | #MRQ_GEARS           | -                                     | 0                      |
+	 * | #MRQ_C2C             | #CMD_C2C_QUERY_ABI                    | 8                      |
+	 * | #MRQ_C2C             | #CMD_C2C_START_INITIALIZATION         | 5                      |
+	 * | #MRQ_C2C             | #CMD_C2C_GET_STATUS                   | 4                      |
+	 * | #MRQ_C2C             | #CMD_C2C_HOTRESET_PREP                | 5                      |
+	 * | #MRQ_C2C             | #CMD_C2C_START_HOTRESET               | 5                      |
+	 * | #MRQ_THROTTLE        | #CMD_THROTTLE_QUERY_ABI               | 4                      |
+	 * | #MRQ_THROTTLE        | #CMD_THROTTLE_GET_CHIPTHROT_STATUS    | 4                      |
+	 * | #MRQ_PWRMODEL        | #CMD_PWRMODEL_QUERY_ABI               | 8                      |
+	 * | #MRQ_PWRMODEL        | #CMD_PWRMODEL_PWR_GET                 | 16                     |
+	 * | #MRQ_PWR_CNTRL       | #CMD_PWR_CNTRL_QUERY_ABI              | 8                      |
+	 * | #MRQ_PWR_CNTRL       | #CMD_PWR_CNTRL_BYPASS_SET             | 12                     |
+	 * | #MRQ_PWR_CNTRL       | #CMD_PWR_CNTRL_BYPASS_GET             | 8                      |
+	 * @endcond
+	 *
+	 * @cond (bpmp_tb500)
+	 * The following additional MRQs are supported on TB500 -platform:
+	 *
+	 * | MRQ                  | Sub-command                              | Minimum payload length |
+	 * | -------------------- | ---------------------------------------- | ---------------------- |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_QUERY_ABI                 | 8                      |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_SET                       | 20                     |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_GET                       | 16                     |
+	 * | #MRQ_PWR_LIMIT       | #CMD_PWR_LIMIT_CURR_CAP                  | 8                      |
+	 * | #MRQ_TELEMETRY_EX    | #CMD_TELEMETRY_EX_QUERY_ABI              | 8                      |
+	 * | #MRQ_TELEMETRY_EX    | #CMD_TELEMETRY_EX_BASE_SZ_GET            | 12                     |
+	 * | #MRQ_THROTTLE        | #CMD_THROTTLE_GET_CHIPTHROT_STATUS       | 4                      |
+	 * | #MRQ_C2C             | #CMD_C2C_QUERY_ABI                       | 8                      |
+	 * | #MRQ_C2C             | #CMD_C2C_START_INITIALIZATION            | 5                      |
+	 * | #MRQ_C2C             | #CMD_C2C_GET_STATUS                      | 4                      |
+	 * | #MRQ_C2C             | #CMD_C2C_HOTRESET_PREP                   | 5                      |
+	 * | #MRQ_C2C             | #CMD_C2C_START_HOTRESET                  | 5                      |
+	 * | MRQ_HWPM             | CMD_HWPM_QUERY_ABI                       | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_IPMU_SET_TRIGGERS               | 120                    |
+	 * | MRQ_HWPM             | CMD_HWPM_IPMU_SET_PAYLOADS_SHIFTS        | 120                    |
+	 * | MRQ_HWPM             | CMD_HWPM_IPMU_GET_MAX_PAYLOADS           | 0                      |
+	 * | MRQ_HWPM             | CMD_HWPM_NVTHERM_SET_SAMPLE_RATE         | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_NVTHERM_SET_BUBBLE_INTERVAL     | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_NVTHERM_SET_FLEX_CHANNELS       | 120                    |
+	 * | MRQ_HWPM             | CMD_HWPM_ISENSE_GET_SENSOR_NAME          | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_ISENSE_GET_SENSOR_CHANNEL       | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_ISENSE_GET_SENSOR_SCALE_FACTOR  | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_ISENSE_GET_SENSOR_OFFSET        | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_ISENSE_GET_SUM_BLOCK_NAME       | 4                      |
+	 * | MRQ_HWPM             | CMD_HWPM_ISENSE_GET_SUM_BLOCK_INPUTS     | 4                      |
+	 * | MRQ_DVFS             | CMD_DVFS_QUERY_ABI                       | 4                      |
+	 * | MRQ_DVFS             | CMD_DVFS_SET_CTRL_STATE                  | 8                      |
+	 * | MRQ_DVFS             | CMD_DVFS_SET_MGR_STATE                   | 8                      |
+	 * | MRQ_PPP_PROFILE      | CMD_PPP_PROFILE_QUERY_ABI                | 8                      |
+	 * | MRQ_PPP_PROFILE      | CMD_PPP_PROFILE_QUERY_MASKS              | 8                      |
+	 * | MRQ_PPP_PROFILE      | CMD_PPP_CORE_QUERY_CPU_MASK              | 8                      |
+	 * | MRQ_PPP_PROFILE      | CMD_PPP_AVAILABLE_QUERY                  | 4                      |
+	 * @endcond
+	 *
+	 * @cond (bpmp_safe && bpmp_t264)
+	 * The following additional MRQ is supported on functional-safety
+	 * builds for the T264 platform:
+	 *
+	 * | MRQ                  | Sub-command                       | Minimum payload length |
+	 * | -------------------- | --------------------------------- | ---------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS | -                                 | 4                      |
+	 * | #MRQ_STRAP           | #STRAP_SET                        | 12                     |
+	 * | #MRQ_SHUTDOWN        | -                                 | 4                      |
+	 * | #MRQ_FMON            | #CMD_FMON_GEAR_CLAMP              | 16                     |
+	 * | #MRQ_FMON            | #CMD_FMON_GEAR_FREE               | 4                      |
+	 * | #MRQ_FMON            | #CMD_FMON_GEAR_GET                | 4                      |
+	 * | #MRQ_FMON            | #CMD_FMON_FAULT_STS_GET           | 8                      |
+	 * | #MRQ_PCIE            | #CMD_PCIE_EP_CONTROLLER_INIT      | 5                      |
+	 * | #MRQ_PCIE            | #CMD_PCIE_EP_CONTROLLER_OFF       | 5                      |
+	 * | #MRQ_CR7             | #CMD_CR7_ENTRY                    | 12                     |
+	 * | #MRQ_CR7             | #CMD_CR7_EXIT                     | 12                     |
+	 * | #MRQ_SLC             | #CMD_SLC_QUERY_ABI                | 8                      |
+	 * | #MRQ_SLC             | #CMD_SLC_BYPASS_SET               | 8                      |
+	 * | #MRQ_SLC             | #CMD_SLC_BYPASS_GET               | 4                      |
+	 * @endcond
+	 *
+	 * @cond (!bpmp_safe && bpmp_t264)
+	 * The following additional MRQs are supported on non-functional-safety
+	 * builds for the T264 -platform:
+	 *
+	 * | MRQ                  | Sub-command                       | Minimum payload length |
+	 * | -------------------- | --------------------------------- | ---------------------- |
+	 * | #MRQ_CPU_NDIV_LIMITS | -                                 | 4                      |
+	 * | #MRQ_STRAP           | #STRAP_SET                        | 12                     |
+	 * | #MRQ_SHUTDOWN        | -                                 | 4                      |
+	 * | #MRQ_FMON            | #CMD_FMON_GEAR_CLAMP              | 16                     |
+	 * | #MRQ_FMON            | #CMD_FMON_GEAR_FREE               | 4                      |
+	 * | #MRQ_FMON            | #CMD_FMON_GEAR_GET                | 4                      |
+	 * | #MRQ_FMON            | #CMD_FMON_FAULT_STS_GET           | 8                      |
+	 * | #MRQ_OC_STATUS       | -                                 | 0                      |
+	 * | #MRQ_PCIE            | #CMD_PCIE_EP_CONTROLLER_INIT      | 5                      |
+	 * | #MRQ_PCIE            | #CMD_PCIE_EP_CONTROLLER_OFF       | 5                      |
+	 * | #MRQ_PCIE            | #CMD_PCIE_RP_CONTROLLER_OFF       | 5                      |
+	 * | #MRQ_CR7             | #CMD_CR7_ENTRY                    | 12                     |
+	 * | #MRQ_CR7             | #CMD_CR7_EXIT                     | 12                     |
+	 * | #MRQ_SLC             | #CMD_SLC_QUERY_ABI                | 8                      |
+	 * | #MRQ_SLC             | #CMD_SLC_BYPASS_SET               | 8                      |
+	 * | #MRQ_SLC             | #CMD_SLC_BYPASS_GET               | 4                      |
+	 * | #MRQ_ISO_CLIENT      | #CMD_ISO_CLIENT_QUERY_ABI         | 8                      |
+	 * | #MRQ_ISO_CLIENT      | #CMD_ISO_CLIENT_CALCULATE_LA      | 16                     |
+	 * | #MRQ_ISO_CLIENT      | #CMD_ISO_CLIENT_SET_LA            | 16                     |
+	 * | #MRQ_ISO_CLIENT      | #CMD_ISO_CLIENT_GET_MAX_BW        | 8                      |
+	 * | #MRQ_BWMGR_INT       | #CMD_BWMGR_INT_QUERY_ABI          | 8                      |
+	 * | #MRQ_BWMGR_INT       | #CMD_BWMGR_INT_CALC_AND_SET       | 16                     |
+	 * | #MRQ_BWMGR_INT       | #CMD_BWMGR_INT_CAP_SET            | 8                      |
+	 * | #MRQ_BWMGR_INT       | #CMD_BWMGR_INT_CURR_AVAILABLE_BW  | 8                      |
+	 * | #MRQ_BWMGR_INT       | #CMD_BWMGR_INT_GET_LAST_REQUEST   | 9                      |
+	 * @endcond
 	 *
 	 * **crc16**
 	 *
@@ -220,7 +452,7 @@ struct mrq_request {
 	 * including this header. However the crc16 field is considered to be set to 0 when
 	 * calculating the CRC. Only used when #BPMP_MAIL_CRC_PRESENT is set. If
 	 * #BPMP_MAIL_CRC_PRESENT is set and this field does not match the CRC as
-	 * calculated by BPMP, -BPMP_EBADMSG will be returned and the request will
+	 * calculated by BPMP, -#BPMP_EBADMSG will be returned and the request will
 	 * be ignored. See code snippet below on how to calculate the CRC.
 	 *
 	 * @code
@@ -322,6 +554,9 @@ struct mrq_response {
 #define MRQ_CPU_VHINT		28U
 #define MRQ_ABI_RATCHET		29U
 #define MRQ_EMC_DVFS_LATENCY	31U
+//adoc: tag::bpmp_dmce_mrq_shutdown[]
+#define MRQ_SHUTDOWN		49U
+//adoc: end::bpmp_dmce_mrq_shutdown[]
 #define MRQ_RINGBUF_CONSOLE	65U
 #define MRQ_PG			66U
 #define MRQ_CPU_NDIV_LIMITS	67U
@@ -341,48 +576,31 @@ struct mrq_response {
 #define MRQ_GEARS		82U
 #define MRQ_BWMGR_INT		83U
 #define MRQ_OC_STATUS		84U
-
-/** @cond DEPRECATED */
-#define MRQ_RESERVED_2		2U
-#define MRQ_RESERVED_3		3U
-#define MRQ_RESERVED_4		4U
-#define MRQ_RESERVED_5   	5U
-#define MRQ_RESERVED_6		6U
-#define MRQ_RESERVED_7		7U
-#define MRQ_RESERVED_8		8U
-#define MRQ_RESERVED_10		10U
-#define MRQ_RESERVED_11		11U
-#define MRQ_RESERVED_12		12U
-#define MRQ_RESERVED_13		13U
-#define MRQ_RESERVED_14		14U
-#define MRQ_RESERVED_15		15U
-#define MRQ_RESERVED_16		16U
-#define MRQ_RESERVED_17		17U
-#define MRQ_RESERVED_18		18U
-#define MRQ_RESERVED_24		24U
-#define MRQ_RESERVED_25		25U
-#define MRQ_RESERVED_26		26U
-#define MRQ_RESERVED_30		30U
-#define MRQ_RESERVED_64		64U
-#define MRQ_RESERVED_74		74U
-/** @endcond DEPRECATED */
-
-/** @} */
+#define MRQ_C2C			85U
+#define MRQ_THROTTLE		86U
+#define MRQ_PWRMODEL		87U
+#define MRQ_PCIE		88U
+#define MRQ_PWR_CNTRL		89U
+#define MRQ_CR7			90U
+#define MRQ_SLC			91U
+#define MRQ_TELEMETRY_EX	92U
+#define MRQ_HWPM		93U
+#define MRQ_DVFS		94U
+#define MRQ_PPP_PROFILE		95U
 
 /**
- * @ingroup MRQ_Codes
  * @brief Maximum MRQ code to be sent by CPU software to
  * BPMP. Subject to change in future
  */
-#define MAX_CPU_MRQ_ID		84U
+#define MAX_CPU_MRQ_ID		95U
+
+/** @} */
 
 /**
  * @addtogroup MRQ_Payloads
  * @{
  *   @defgroup Ping Ping
  *   @defgroup Query_Tag Query Tag
- *   @defgroup Module Loadable Modules
- *   @defgroup Trace Trace
  *   @defgroup Debugfs Debug File System
  *   @defgroup Reset Reset
  *   @defgroup I2C I2C
@@ -390,6 +608,7 @@ struct mrq_response {
  *   @defgroup ABI_info ABI Info
  *   @defgroup Powergating Power Gating
  *   @defgroup Thermal Thermal
+ *   @defgroup Throttle Throttle
  *   @defgroup OC_status OC status
  *   @defgroup Vhint CPU Voltage hint
  *   @defgroup EMC EMC
@@ -405,7 +624,22 @@ struct mrq_response {
  *   @defgroup Telemetry Telemetry
  *   @defgroup Pwrlimit PWR_LIMIT
  *   @defgroup Gears Gears
+ *   @defgroup Shutdown Shutdown
  *   @defgroup BWMGR_INT Bandwidth Manager Integrated
+ *   @defgroup C2C C2C
+ *   @defgroup Pwrmodel Power Model
+ *   @defgroup Pwrcntrl Power Controllers
+ * @cond bpmp_t264
+ * *  @defgroup PCIE PCIE
+ * *  @defgroup CR7 CR7
+ * *  @defgroup Slc Slc
+ * @endcond
+ * @cond bpmp_tb500
+ * *  @defgroup Telemetry_ex Telemetry Expanded
+ * *  @defgroup HWPM Hardware Performance Monitoring
+ * *  @defgroup DVFS Dynamic Voltage and Frequency Scaling
+ * *  @defgroup PPP power/performance profiles
+ * @endcond
  * @} MRQ_Payloads
  */
 
@@ -414,7 +648,6 @@ struct mrq_response {
  * @def MRQ_PING
  * @brief A simple ping
  *
- * * Platforms: All
  * * Initiators: Any
  * * Targets: Any
  * * Request Payload: @ref mrq_ping_request
@@ -424,7 +657,6 @@ struct mrq_response {
  * @def MRQ_THREADED_PING
  * @brief A deeper ping
  *
- * * Platforms: All
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_ping_request
@@ -441,8 +673,8 @@ struct mrq_response {
  * @brief Request with #MRQ_PING
  *
  * Used by the sender of an #MRQ_PING message to request a pong from
- * recipient. The response from the recipient is computed based on
- * #challenge.
+ * recipient. The response from the recipient is computed based on the
+ * mrq_ping_request::challenge -value.
  */
 struct mrq_ping_request {
 /** @brief Arbitrarily chosen value */
@@ -470,7 +702,7 @@ struct mrq_ping_response {
  *
  * @deprecated Use #MRQ_QUERY_FW_TAG instead.
  *
- * * Platforms: All
+ * @details
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: @ref mrq_query_tag_request
@@ -483,7 +715,7 @@ struct mrq_ping_response {
  * @brief Request with #MRQ_QUERY_TAG
  *
  * @deprecated This structure will be removed in future version.
- * Use MRQ_QUERY_FW_TAG instead.
+ * Use #MRQ_QUERY_FW_TAG instead.
  */
 struct mrq_query_tag_request {
   /** @brief Base address to store the firmware tag */
@@ -496,7 +728,6 @@ struct mrq_query_tag_request {
  * @def MRQ_QUERY_FW_TAG
  * @brief Query BPMP firmware's tag (i.e. unique identifier)
  *
- * * Platforms: All
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: N/A
@@ -510,10 +741,9 @@ struct mrq_query_tag_request {
  *
  * Sent in response to #MRQ_QUERY_FW_TAG message. #tag contains the unique
  * identifier for the version of firmware issuing the reply.
- *
  */
 struct mrq_query_fw_tag_response {
-  /** @brief Array to store tag information */
+	/** @brief Array to store tag information */
 	uint8_t tag[32];
 } BPMP_ABI_PACKED;
 
@@ -532,9 +762,8 @@ struct mrq_threaded_ping_response {
  * @def MRQ_DEBUGFS
  * @brief Interact with BPMP's debugfs file nodes
  *
- * @deprecated use MRQ_DEBUG instead.
+ * @deprecated Use #MRQ_DEBUG instead.
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_debugfs_request
@@ -626,9 +855,9 @@ struct cmd_debugfs_dumpdir_response {
 
 /**
  * @ingroup Debugfs
- * @brief Request with #MRQ_DEBUGFS.
+ * @brief Request with #MRQ_DEBUG.
  *
- * The sender of an MRQ_DEBUGFS message uses #cmd to specify a debugfs
+ * The sender of an MRQ_DEBUG message uses #cmd to specify a debugfs
  * command to execute. Legal commands are the values of @ref
  * mrq_debugfs_commands. Each command requires a specific additional
  * payload of data.
@@ -676,16 +905,15 @@ struct mrq_debugfs_response {
 /**
  * @ingroup MRQ_Codes
  * @def MRQ_DEBUG
- * @brief Interact with BPMP's debugfs file nodes. Use message payload
+ * @brief Interact with BPMP-FW debugfs file nodes. Use message payload
  * for exchanging data. This is functionally equivalent to
- * @ref MRQ_DEBUGFS. But the way in which data is exchanged is different.
- * When software running on CPU tries to read a debugfs file,
+ * the deprecated MRQ_DEBUGFS but the way in which data is exchanged is
+ * different. When software running on CPU tries to read a debugfs file,
  * the file path and read data will be stored in message payload.
  * Since the message payload size is limited, a debugfs file
  * transaction might require multiple frames of data exchanged
  * between BPMP and CPU until the transaction completes.
  *
- * * Platforms: T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_debug_request
@@ -694,17 +922,34 @@ struct mrq_debugfs_response {
 
 /** @ingroup Debugfs */
 enum mrq_debug_commands {
-	/** @brief Open required file for read operation */
+	/**
+	 * @brief Open file represented by the path in
+	 * cmd_debug_fopen_request::name for read operation
+	 */
 	CMD_DEBUG_OPEN_RO = 0,
-	/** @brief Open required file for write operation */
+	/**
+	 * @brief Open file represented by the path in
+	 * cmd_debug_fopen_request::name for write operation
+	 */
 	CMD_DEBUG_OPEN_WO = 1,
-	/** @brief Perform read */
+	/**
+	 * @brief Perform read on a previously opened file handle represented
+	 *        by the cmd_debug_fread_request::fd -value.
+	 */
 	CMD_DEBUG_READ = 2,
-	/** @brief Perform write */
+	/**
+	 * @brief Perform write on a previously opened file handle represented
+	 *        by the cmd_debug_fwrite_request::fd -value.
+	 */
 	CMD_DEBUG_WRITE = 3,
-	/** @brief Close file */
+	/**
+	 * @brief Close previously opened file handle.
+	 */
 	CMD_DEBUG_CLOSE = 4,
-	/** @brief Not a command */
+	/**
+	 * @brief Not a command, represents maximum number of supported
+	 *        sub-commands
+	 */
 	CMD_DEBUG_MAX
 };
 
@@ -727,35 +972,38 @@ enum mrq_debug_commands {
 
 /**
  * @ingroup Debugfs
- * @brief Parameters for CMD_DEBUG_OPEN command
+ * @brief Parameters for #CMD_DEBUG_OPEN_RO and #CMD_DEBUG_OPEN_WO -commands
  */
 struct cmd_debug_fopen_request {
-	/** @brief File name - Null-terminated string with maximum
-	 * length @ref DEBUG_FNAME_MAX_SZ
+	/**
+	 * @brief File name - Null-terminated string with maximum
+	 *        length including the terminator defined by the
+	 *        #DEBUG_FNAME_MAX_SZ -preprocessor constant.
 	 */
 	char name[DEBUG_FNAME_MAX_SZ];
 } BPMP_ABI_PACKED;
 
 /**
  * @ingroup Debugfs
- * @brief Response data for CMD_DEBUG_OPEN_RO/WO command
+ * @brief Response data for #CMD_DEBUG_OPEN_RO and #CMD_DEBUG_OPEN_WO commands
  */
 struct cmd_debug_fopen_response {
 	/** @brief Identifier for file access */
 	uint32_t fd;
 	/** @brief Data length. File data size for READ command.
-	 * Maximum allowed length for WRITE command
+	 *         Maximum allowed length for WRITE command
 	 */
 	uint32_t datalen;
 } BPMP_ABI_PACKED;
 
 /**
  * @ingroup Debugfs
- * @brief Parameters for CMD_DEBUG_READ command
+ * @brief Parameters for #CMD_DEBUG_READ command
  */
 struct cmd_debug_fread_request {
-	/** @brief File access identifier received in response
-	 * to CMD_DEBUG_OPEN_RO request
+	/**
+	 * @brief File access identifier received in response
+	 *        to #CMD_DEBUG_OPEN_RO request
 	 */
 	uint32_t fd;
 } BPMP_ABI_PACKED;
@@ -770,7 +1018,7 @@ struct cmd_debug_fread_request {
 
 /**
  * @ingroup Debugfs
- * @brief Response data for CMD_DEBUG_READ command
+ * @brief Response data for #CMD_DEBUG_READ command
  */
 struct cmd_debug_fread_response {
 	/** @brief Size of data provided in this response in bytes */
@@ -789,11 +1037,11 @@ struct cmd_debug_fread_response {
 
 /**
  * @ingroup Debugfs
- * @brief Parameters for CMD_DEBUG_WRITE command
+ * @brief Parameters for #CMD_DEBUG_WRITE command
  */
 struct cmd_debug_fwrite_request {
 	/** @brief File access identifier received in response
-	 * to CMD_DEBUG_OPEN_RO request
+	 *         to prior #CMD_DEBUG_OPEN_RO -request
 	 */
 	uint32_t fd;
 	/** @brief Size of write data in bytes */
@@ -804,11 +1052,12 @@ struct cmd_debug_fwrite_request {
 
 /**
  * @ingroup Debugfs
- * @brief Parameters for CMD_DEBUG_CLOSE command
+ * @brief Parameters for #CMD_DEBUG_CLOSE command
  */
 struct cmd_debug_fclose_request {
-	/** @brief File access identifier received in response
-	 * to CMD_DEBUG_OPEN_RO request
+	/**
+	 * @brief File access identifier received in prior response
+	 *        to #CMD_DEBUG_OPEN_RO or #CMD_DEBUG_OPEN_WO -request.
 	 */
 	uint32_t fd;
 } BPMP_ABI_PACKED;
@@ -817,30 +1066,34 @@ struct cmd_debug_fclose_request {
  * @ingroup Debugfs
  * @brief Request with #MRQ_DEBUG.
  *
- * The sender of an MRQ_DEBUG message uses #cmd to specify a debugfs
- * command to execute. Legal commands are the values of @ref
- * mrq_debug_commands. Each command requires a specific additional
- * payload of data.
+ * The sender of an #MRQ_DEBUG message uses mrq_debug_request::cmd to specify
+ * which debugfs sub-command to execute. Legal sub-commands are the values
+ * specified in the @ref mrq_debug_commands -enumeration. Each sub-command
+ * requires a specific additional payload of data according to the following
+ * table:
  *
- * |command            |payload|
- * |-------------------|-------|
- * |CMD_DEBUG_OPEN_RO  |fop    |
- * |CMD_DEBUG_OPEN_WO  |fop    |
- * |CMD_DEBUG_READ     |frd    |
- * |CMD_DEBUG_WRITE    |fwr    |
- * |CMD_DEBUG_CLOSE    |fcl    |
+ * |Sub-command         |Payload structure          |
+ * |--------------------|---------------------------|
+ * |#CMD_DEBUG_OPEN_RO  |cmd_debug_fopen_request    |
+ * |#CMD_DEBUG_OPEN_WO  |cmd_debug_fopen_request    |
+ * |#CMD_DEBUG_READ     |cmd_debug_fread_request    |
+ * |#CMD_DEBUG_WRITE    |cmd_debug_fwrite_request   |
+ * |#CMD_DEBUG_CLOSE    |cmd_debug_fclose_request   |
  */
 struct mrq_debug_request {
-	/** @brief Sub-command (@ref mrq_debug_commands) */
+	/** @brief Sub-command identifier from @ref mrq_debug_commands */
 	uint32_t cmd;
 	union {
-		/** @brief Request payload for CMD_DEBUG_OPEN_RO/WO command */
+		/**
+		 * @brief Request payload for #CMD_DEBUG_OPEN_RO and
+		 *        #CMD_DEBUG_OPEN_WO sub-commands
+		 */
 		struct cmd_debug_fopen_request fop;
-		/** @brief Request payload for CMD_DEBUG_READ command */
+		/** @brief Request payload for #CMD_DEBUG_READ sub-command */
 		struct cmd_debug_fread_request frd;
-		/** @brief Request payload for CMD_DEBUG_WRITE command */
+		/** @brief Request payload for #CMD_DEBUG_WRITE sub-command */
 		struct cmd_debug_fwrite_request fwr;
-		/** @brief Request payload for CMD_DEBUG_CLOSE command */
+		/** @brief Request payload for #CMD_DEBUG_CLOSE sub-command */
 		struct cmd_debug_fclose_request fcl;
 	} BPMP_UNION_ANON;
 } BPMP_ABI_PACKED;
@@ -850,9 +1103,12 @@ struct mrq_debug_request {
  */
 struct mrq_debug_response {
 	union {
-		/** @brief Response data for CMD_DEBUG_OPEN_RO/WO command */
+		/**
+		 * @brief Response data for the #CMD_DEBUG_OPEN_RO and
+		 *        #CMD_DEBUG_OPEN_WO sub-commands
+		 */
 		struct cmd_debug_fopen_response fop;
-		/** @brief Response data for CMD_DEBUG_READ command */
+		/** @brief Response data for the #CMD_DEBUG_READ sub-command */
 		struct cmd_debug_fread_response frd;
 	} BPMP_UNION_ANON;
 } BPMP_ABI_PACKED;
@@ -862,7 +1118,6 @@ struct mrq_debug_response {
  * @def MRQ_RESET
  * @brief Reset an IP block
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_reset_request
@@ -872,39 +1127,46 @@ struct mrq_debug_response {
  * @{
  */
 
+/**
+ * @brief Sub-command identifiers for #MRQ_RESET
+ */
 enum mrq_reset_commands {
 	/**
 	 * @brief Assert module reset
 	 *
-	 * mrq_response::err is 0 if the operation was successful, or @n
-	 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
-	 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
-	 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
+	 * mrq_response::err is
+	 * * 0 if the operation was successful
+	 * * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid
+	 * * -#BPMP_EACCES if mrq master is not an owner of target domain reset
+	 * * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
 	 */
 	CMD_RESET_ASSERT = 1,
 	/**
 	 * @brief Deassert module reset
 	 *
-	 * mrq_response::err is 0 if the operation was successful, or @n
-	 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
-	 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
-	 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
+	 * mrq_response::err is
+	 * * 0 if the operation was successful
+	 * * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid
+	 * * -#BPMP_EACCES if mrq master is not an owner of target domain reset
+	 * * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
 	 */
 	CMD_RESET_DEASSERT = 2,
 	/**
 	 * @brief Assert and deassert the module reset
 	 *
-	 * mrq_response::err is 0 if the operation was successful, or @n
-	 * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid @n
-	 * -#BPMP_EACCES if mrq master is not an owner of target domain reset @n
-	 * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
+	 * mrq_response::err is
+	 * * 0 if the operation was successful
+	 * * -#BPMP_EINVAL if mrq_reset_request::reset_id is invalid
+	 * * -#BPMP_EACCES if mrq master is not an owner of target domain reset
+	 * * -#BPMP_ENOTSUP if target domain h/w state does not allow reset
 	 */
 	CMD_RESET_MODULE = 3,
 	/**
 	 * @brief Get the highest reset ID
 	 *
-	 * mrq_response::err is 0 if the operation was successful, or @n
-	 * -#BPMP_ENODEV if no reset domains are supported (number of IDs is 0)
+	 * mrq_response::err is
+	 * * 0 if the operation was successful
+	 * * -#BPMP_ENODEV if no reset domains are supported (number of IDs is 0)
 	 */
 	CMD_RESET_GET_MAX_ID = 4,
 
@@ -913,15 +1175,15 @@ enum mrq_reset_commands {
 };
 
 /**
- * @brief Request with MRQ_RESET
+ * @brief Request with #MRQ_RESET
  *
  * Used by the sender of an #MRQ_RESET message to request BPMP to
- * assert or or deassert a given reset line.
+ * assert or deassert a given reset line.
  */
 struct mrq_reset_request {
-	/** @brief Reset action to perform (@ref mrq_reset_commands) */
+	/** @brief Reset action to perform, from @ref mrq_reset_commands */
 	uint32_t cmd;
-	/** @brief Id of the reset to affected */
+	/** @brief ID of the reset to affected, from @ref bpmp_reset_ids */
 	uint32_t reset_id;
 } BPMP_ABI_PACKED;
 
@@ -940,7 +1202,7 @@ struct cmd_reset_get_max_id_response {
  *
  * Each sub-command supported by @ref mrq_reset_request may return
  * sub-command-specific data. Some do and some do not as indicated
- * in the following table
+ * in the following table:
  *
  * | sub-command          | payload          |
  * |----------------------|------------------|
@@ -962,7 +1224,6 @@ struct mrq_reset_response {
  * @def MRQ_I2C
  * @brief Issue an i2c transaction
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_i2c_request
@@ -971,19 +1232,60 @@ struct mrq_reset_response {
  * @addtogroup I2C
  * @{
  */
+
+/**
+ * @brief Size of the cmd_i2c_xfer_request::data_buf -member array in bytes.
+ */
 #define TEGRA_I2C_IPC_MAX_IN_BUF_SIZE	(MSG_DATA_MIN_SZ - 12U)
+
+/**
+ * @brief Size of the cmd_i2c_xfer_response::data_buf -member array in bytes.
+ */
 #define TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE	(MSG_DATA_MIN_SZ - 4U)
 
+/**
+ * @defgroup seriali2c_flags I2C flags
+ *
+ * @brief I2C transaction modifier flags for each transaction segment
+ * in #MRQ_I2C subcommand CMD_I2C_XFER
+ */
+
+/**
+ * @addtogroup seriali2c_flags
+ * @{
+ */
+
+/** @brief when set, use 10-bit I2C slave address */
 #define SERIALI2C_TEN           0x0010U
+/** @brief when set, perform a Read transaction */
 #define SERIALI2C_RD            0x0001U
-#define SERIALI2C_STOP          0x8000U
+/**
+ * @brief when set, no repeated START is issued between the segments
+ * of transaction. This flag is ignored for the first segment as any
+ * transaction always starts with a START condition
+ */
 #define SERIALI2C_NOSTART       0x4000U
-#define SERIALI2C_REV_DIR_ADDR  0x2000U
+/**
+ * @brief when set, a no-ACK from slave device is ignored and treated
+ * always as success
+ */
 #define SERIALI2C_IGNORE_NAK    0x1000U
+/** @} seriali2c_flags */
+
+/** brief Unused flag. Retained for backwards compatibility. */
+#define SERIALI2C_STOP          0x8000U
+/** brief Unused flag. Retained for backwards compatibility. */
+#define SERIALI2C_REV_DIR_ADDR  0x2000U
+/** brief Unused flag. Retained for backwards compatibility. */
 #define SERIALI2C_NO_RD_ACK     0x0800U
+/** brief Unused flag. Retained for backwards compatibility. */
 #define SERIALI2C_RECV_LEN      0x0400U
 
-enum {
+/**
+ * @brief Supported I2C sub-command identifiers
+ */
+enum mrq_i2c_commands {
+	/** @brief Perform an I2C transaction */
 	CMD_I2C_XFER = 1
 };
 
@@ -1005,7 +1307,7 @@ enum {
 struct serial_i2c_request {
 	/** @brief I2C slave address */
 	uint16_t addr;
-	/** @brief Bitmask of SERIALI2C_ flags */
+	/** @brief Bitmask of @ref seriali2c_flags */
 	uint16_t flags;
 	/** @brief Length of I2C transaction in bytes */
 	uint16_t len;
@@ -1020,13 +1322,13 @@ struct cmd_i2c_xfer_request {
 	/**
 	 * @brief Tegra PWR_I2C bus identifier
 	 *
-	 * @cond (bpmp_t234 || bpmp_t238 || bpmp_t194)
+	 * @cond (bpmp_t186 || bpmp_t194 || bpmp_t234 || bpmp_t238 || bpmp_t264)
 	 * Must be set to 5.
-	 * @endcond (bpmp_t234 || bpmp_t238 || bpmp_t194)
-	 * @cond bpmp_th500
-	 * Must be set to 1.
-	 * @endcond bpmp_th500
+	 * @endcond
 	 *
+	 * @cond (bpmp_th500)
+	 * Must be set to 1.
+	 * @endcond
 	 */
 	uint32_t bus_id;
 
@@ -1047,7 +1349,7 @@ struct cmd_i2c_xfer_request {
 struct cmd_i2c_xfer_response {
 	/** @brief Count of valid bytes in #data_buf*/
 	uint32_t data_size;
-	/** @brief I2c read data */
+	/** @brief I2C read data */
 	uint8_t data_buf[TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE];
 } BPMP_ABI_PACKED;
 
@@ -1064,16 +1366,19 @@ struct mrq_i2c_request {
 /**
  * @brief Response to #MRQ_I2C
  *
- * mrq_response:err is
- *  0: Success
- *  -#BPMP_EBADCMD: if mrq_i2c_request::cmd is other than 1
- *  -#BPMP_EINVAL: if cmd_i2c_xfer_request does not contain correctly formatted request
- *  -#BPMP_ENODEV: if cmd_i2c_xfer_request::bus_id is not supported by BPMP
- *  -#BPMP_EACCES: if i2c transaction is not allowed due to firewall rules
- *  -#BPMP_ETIMEDOUT: if i2c transaction times out
- *  -#BPMP_ENXIO: if i2c slave device does not reply with ACK to the transaction
- *  -#BPMP_EAGAIN: if ARB_LOST condition is detected by the i2c controller
- *  -#BPMP_EIO: any other i2c controller error code than NO_ACK or ARB_LOST
+ * mrq_response::err value for this response is defined as:
+ *
+ * | Value              | Description                                                         |
+ * |--------------------|---------------------------------------------------------------------|
+ * | 0                  | Success                                                             |
+ * | -#BPMP_EBADCMD     | mrq_i2c_request::cmd is other than 1                                |
+ * | -#BPMP_EINVAL      | cmd_i2c_xfer_request does not contain correctly formatted request   |
+ * | -#BPMP_ENODEV      | cmd_i2c_xfer_request::bus_id is not supported by BPMP               |
+ * | -#BPMP_EACCES      | I2C transaction is not allowed due to firewall rules                |
+ * | -#BPMP_ETIMEDOUT   | I2C transaction times out                                           |
+ * | -#BPMP_ENXIO       | I2C slave device does not reply with ACK to the transaction         |
+ * | -#BPMP_EAGAIN      | ARB_LOST condition is detected by the I2C controller                |
+ * | -#BPMP_EIO         | Any other I2C controller error code than NO_ACK or ARB_LOST         |
  */
 struct mrq_i2c_response {
 	struct cmd_i2c_xfer_response xfer;
@@ -1086,7 +1391,6 @@ struct mrq_i2c_response {
  * @def MRQ_CLK
  * @brief Perform a clock operation
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_clk_request
@@ -1095,205 +1399,354 @@ struct mrq_i2c_response {
  * @addtogroup Clocks
  * @{
  */
-enum {
+
+/**
+ * @brief Sub-command identifiers for #MRQ_CLK
+ */
+enum mrq_clk_commands {
+	/** Get clock rate */
 	CMD_CLK_GET_RATE = 1,
+
+	/** Set clock rate */
 	CMD_CLK_SET_RATE = 2,
+
+	/** Get attainable clock rate closer to a given rate */
 	CMD_CLK_ROUND_RATE = 3,
+
+	/** Get parent clock identifier for a given clock */
 	CMD_CLK_GET_PARENT = 4,
+
+	/** Change clock parent */
 	CMD_CLK_SET_PARENT = 5,
+
+	/** Get clock enable status */
 	CMD_CLK_IS_ENABLED = 6,
+
+	/** Enable a clock */
 	CMD_CLK_ENABLE = 7,
+
+	/** Disable a clock */
 	CMD_CLK_DISABLE = 8,
-/** @cond DEPRECATED */
-	CMD_CLK_PROPERTIES = 9,
-	CMD_CLK_POSSIBLE_PARENTS = 10,
-	CMD_CLK_NUM_POSSIBLE_PARENTS = 11,
-	CMD_CLK_GET_POSSIBLE_PARENT = 12,
-	CMD_CLK_RESET_REFCOUNTS = 13,
-/** @endcond DEPRECATED */
+
+	/** Get all information about a clock */
 	CMD_CLK_GET_ALL_INFO = 14,
+
+	/** Get largest supported clock identifier */
 	CMD_CLK_GET_MAX_CLK_ID = 15,
+
+	/** Get clock maximum rate at VMIN */
 	CMD_CLK_GET_FMAX_AT_VMIN = 16,
+
+	/** Largest supported #MRQ_CLK sub-command identifier + 1 */
 	CMD_CLK_MAX,
 };
 
+/**
+ * Flag bit set in cmd_clk_get_all_info_response::flags -field when clock
+ * supports changing of the parent clock at runtime.
+ */
 #define BPMP_CLK_HAS_MUX	(1U << 0U)
+
+/**
+ * Flag bit set in cmd_clk_get_all_info_response::flags -field when clock
+ * supports changing the clock rate at runtime.
+ */
 #define BPMP_CLK_HAS_SET_RATE	(1U << 1U)
+
+/**
+ * Flag bit set in cmd_clk_get_all_info_response::flags -field when clock is a
+ * root clock without visible parents.
+ */
 #define BPMP_CLK_IS_ROOT	(1U << 2U)
+
 #define BPMP_CLK_IS_VAR_ROOT	(1U << 3U)
+
 /**
  * @brief Protection against rate and parent changes
  *
- * #MRQ_CLK command #CMD_CLK_SET_RATE or #MRQ_CLK command #CMD_CLK_SET_PARENT will return
- * -#BPMP_EACCES.
+ * #MRQ_CLK command #CMD_CLK_SET_RATE or #MRQ_CLK command #CMD_CLK_SET_PARENT
+ * will return -#BPMP_EACCES.
  */
 #define BPMP_CLK_RATE_PARENT_CHANGE_DENIED (1U << 30)
 
 /**
  * @brief Protection against state changes
  *
- * #MRQ_CLK command #CMD_CLK_ENABLE or #MRQ_CLK command #CMD_CLK_DISABLE will return
- * -#BPMP_EACCES.
+ * #MRQ_CLK command #CMD_CLK_ENABLE or #MRQ_CLK command #CMD_CLK_DISABLE
+ * will return -#BPMP_EACCES.
  */
 #define BPMP_CLK_STATE_CHANGE_DENIED (1U << 31)
 
+/**
+ * Size of the cmd_clk_get_all_info_response::name -array in number
+ * of elements.
+ */
 #define MRQ_CLK_NAME_MAXLEN	40U
+
+/**
+ * @brief Maximum number of elements in parent_id arrays of clock info responses.
+ */
 #define MRQ_CLK_MAX_PARENTS	16U
 
-/** @private */
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_GET_RATE
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_get_rate_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_GET_RATE
+ */
 struct cmd_clk_get_rate_response {
+	/**
+	 * Current rate of the given clock in Hz if mrq_response::err is 0 to
+	 * indicate successful #CMD_CLK_GET_RATE -request.
+	 */
 	int64_t rate;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_SET_RATE
+ */
 struct cmd_clk_set_rate_request {
+	/** Unused / reserved field. */
 	int32_t unused;
+
+	/** Requested rate of the clock in Hz. */
 	int64_t rate;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_SET_RATE
+ */
 struct cmd_clk_set_rate_response {
+	/**
+	 * If request was successful (mrq_response::err is 0), set to the new
+	 * rate of the given clock in Hz.
+	 */
 	int64_t rate;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_ROUND_RATE
+ */
 struct cmd_clk_round_rate_request {
+	/** Unused / reserved field. */
 	int32_t unused;
+
+	/** Target rate for the clock */
 	int64_t rate;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_ROUND_RATE
+ */
 struct cmd_clk_round_rate_response {
+	/**
+	 * The attainable rate if request was successful
+	 * (mrq_response::err is 0).
+	 */
 	int64_t rate;
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_GET_PARENT
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_get_parent_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_GET_PARENT
+ */
 struct cmd_clk_get_parent_response {
+	/**
+	 * The clock identifier of the parent clock if request was successful
+	 * (mrq_response::err is 0).
+	 */
 	uint32_t parent_id;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_SET_PARENT
+ */
 struct cmd_clk_set_parent_request {
+	/**
+	 * The clock identifier of the new parent clock.
+	 */
 	uint32_t parent_id;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_SET_PARENT
+ */
 struct cmd_clk_set_parent_response {
+	/**
+	 * The clock identifier of the new parent clock if request was
+	 * successful (mrq_response::err is 0).
+	 */
 	uint32_t parent_id;
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Request payload for #CMD_CLK_IS_ENABLED -sub-command
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_is_enabled_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
 /**
- * @brief Response data to #MRQ_CLK sub-command CMD_CLK_IS_ENABLED
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_IS_ENABLED
  */
 struct cmd_clk_is_enabled_response {
 	/**
 	 * @brief The state of the clock that has been successfully
-	 * requested with CMD_CLK_ENABLE or CMD_CLK_DISABLE by the
+	 * requested with #CMD_CLK_ENABLE or #CMD_CLK_DISABLE by the
 	 * master invoking the command earlier.
 	 *
 	 * The state may not reflect the physical state of the clock
 	 * if there are some other masters requesting it to be
-	 * enabled.
+	 * enabled. Valid values:
 	 *
-	 * Value 0 is disabled, all other values indicate enabled.
+	 * * Value 0: The clock is disabled,
+	 * * Value 1: The clock is enabled.
 	 */
 	int32_t state;
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_ENABLE
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_enable_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_ENABLE
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_enable_response {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_DISABLE
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_disable_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_DISABLE
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_disable_response {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
-/** @cond DEPRECATED */
-/** @private */
-struct cmd_clk_properties_request {
-	BPMP_ABI_EMPTY
-} BPMP_ABI_PACKED;
-
-/** @todo flags need to be spelled out here */
-struct cmd_clk_properties_response {
-	uint32_t flags;
-} BPMP_ABI_PACKED;
-
-/** @private */
-struct cmd_clk_possible_parents_request {
-	BPMP_ABI_EMPTY
-} BPMP_ABI_PACKED;
-
-struct cmd_clk_possible_parents_response {
-	uint8_t num_parents;
-	uint8_t reserved[3];
-	uint32_t parent_id[MRQ_CLK_MAX_PARENTS];
-} BPMP_ABI_PACKED;
-
-/** @private */
-struct cmd_clk_num_possible_parents_request {
-	BPMP_ABI_EMPTY
-} BPMP_ABI_PACKED;
-
-struct cmd_clk_num_possible_parents_response {
-	uint8_t num_parents;
-} BPMP_ABI_PACKED;
-
-struct cmd_clk_get_possible_parent_request {
-	uint8_t parent_idx;
-} BPMP_ABI_PACKED;
-
-struct cmd_clk_get_possible_parent_response {
-	uint32_t parent_id;
-} BPMP_ABI_PACKED;
-/** @endcond DEPRECATED */
-
-/** @private */
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_GET_ALL_INFO
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_get_all_info_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
+
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_GET_ALL_INFO
+ *
+ * The values in the response are only set and valid if request status in
+ * mrq_response::err is 0.
+ */
 struct cmd_clk_get_all_info_response {
+	/**
+	 * State / informational flags for the clock:
+	 *
+	 * | Flag bit               | Description                              |
+	 * |------------------------|------------------------------------------|
+	 * | #BPMP_CLK_IS_ROOT      | Clock is a root clock.                   |
+	 * | #BPMP_CLK_HAS_MUX      | Clock supports changing of parent clock. |
+	 * | #BPMP_CLK_HAS_SET_RATE | Clock supports changing clock rate.      |
+	 */
 	uint32_t flags;
+
+	/**
+	 * Current parent clock identifier.
+	 */
 	uint32_t parent;
+
+	/**
+	 * Array of possible parent clock identifiers.
+	 */
 	uint32_t parents[MRQ_CLK_MAX_PARENTS];
+
+	/**
+	 * Number of identifiers in the #parents -array.
+	 */
 	uint8_t num_parents;
+
+	/**
+	 * Friendly name of the clock, truncated to fit the array
+	 * and null-terminated.
+	 */
 	uint8_t name[MRQ_CLK_NAME_MAXLEN];
 } BPMP_ABI_PACKED;
 
-/** @private */
+
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_GET_MAX_CLK_ID
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_get_max_clk_id_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_GET_MAX_CLK_ID
+ */
 struct cmd_clk_get_max_clk_id_response {
+	/** @brief Largest supported clock identifier. */
 	uint32_t max_id;
 } BPMP_ABI_PACKED;
 
-/** @private */
+/**
+ * @brief Request payload for #MRQ_CLK sub-command #CMD_CLK_GET_FMAX_AT_VMIN
+ *
+ * This structure is an empty placeholder for future expansion of this
+ * sub-command.
+ */
 struct cmd_clk_get_fmax_at_vmin_request {
 	BPMP_ABI_EMPTY
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for #MRQ_CLK sub-command #CMD_CLK_GET_FMAX_AT_VMIN
+ */
 struct cmd_clk_get_fmax_at_vmin_response {
 	int64_t rate;
 } BPMP_ABI_PACKED;
@@ -1308,38 +1761,26 @@ struct cmd_clk_get_fmax_at_vmin_response {
  * require no additional data. Others have a sub-command specific
  * payload
  *
- * |sub-command                 |payload                |
- * |----------------------------|-----------------------|
- * |CMD_CLK_GET_RATE            |-                      |
- * |CMD_CLK_SET_RATE            |clk_set_rate           |
- * |CMD_CLK_ROUND_RATE          |clk_round_rate         |
- * |CMD_CLK_GET_PARENT          |-                      |
- * |CMD_CLK_SET_PARENT          |clk_set_parent         |
- * |CMD_CLK_IS_ENABLED          |-                      |
- * |CMD_CLK_ENABLE              |-                      |
- * |CMD_CLK_DISABLE             |-                      |
- * |CMD_CLK_GET_ALL_INFO        |-                      |
- * |CMD_CLK_GET_MAX_CLK_ID      |-                      |
- * |CMD_CLK_GET_FMAX_AT_VMIN    |-
- * |
- *
+ * |Sub-command                 |Payload                      |
+ * |----------------------------|-----------------------------|
+ * |#CMD_CLK_GET_RATE           |-                            |
+ * |#CMD_CLK_SET_RATE           |#cmd_clk_set_rate_request    |
+ * |#CMD_CLK_ROUND_RATE         |#cmd_clk_round_rate_request  |
+ * |#CMD_CLK_GET_PARENT         |-                            |
+ * |#CMD_CLK_SET_PARENT         |#cmd_clk_set_parent_request  |
+ * |#CMD_CLK_IS_ENABLED         |-                            |
+ * |#CMD_CLK_ENABLE             |-                            |
+ * |#CMD_CLK_DISABLE            |-                            |
+ * |#CMD_CLK_GET_ALL_INFO       |-                            |
+ * |#CMD_CLK_GET_MAX_CLK_ID     |-                            |
+ * |#CMD_CLK_GET_FMAX_AT_VMIN   |-                            |
  */
 
-/** @cond DEPRECATED
- *
- * Older versions of firmware also supported following sub-commands:
- * |CMD_CLK_PROPERTIES          |-                      |
- * |CMD_CLK_POSSIBLE_PARENTS    |-                      |
- * |CMD_CLK_NUM_POSSIBLE_PARENTS|-                      |
- * |CMD_CLK_GET_POSSIBLE_PARENT |clk_get_possible_parent|
- * |CMD_CLK_RESET_REFCOUNTS     |-                      |
- *
- * @endcond DEPRECATED */
-
 struct mrq_clk_request {
 	/** @brief Sub-command and clock id concatenated to 32-bit word.
-	 * - bits[31..24] is the sub-cmd.
-	 * - bits[23..0] is the clock id
+	 *
+	 * - bits[31..24] is the sub-command ID from @ref mrq_clk_commands.
+	 * - bits[23..0] is the clock identifier from @ref bpmp_clock_ids.
 	 */
 	uint32_t cmd_and_id;
 
@@ -1357,15 +1798,6 @@ struct mrq_clk_request {
 		struct cmd_clk_disable_request clk_disable;
 		/** @private */
 		struct cmd_clk_is_enabled_request clk_is_enabled;
-		/** @cond DEPRECATED */
-		/** @private */
-		struct cmd_clk_properties_request clk_properties;
-		/** @private */
-		struct cmd_clk_possible_parents_request clk_possible_parents;
-		/** @private */
-		struct cmd_clk_num_possible_parents_request clk_num_possible_parents;
-		struct cmd_clk_get_possible_parent_request clk_get_possible_parent;
-		/** @endcond DEPRECATED */
 		/** @private */
 		struct cmd_clk_get_all_info_request clk_get_all_info;
 		/** @private */
@@ -1381,35 +1813,24 @@ struct mrq_clk_request {
  *
  * Each sub-command supported by @ref mrq_clk_request may return
  * sub-command-specific data. Some do and some do not as indicated in
- * the following table
+ * the following table:
  *
- * |sub-command                 |payload                 |
- * |----------------------------|------------------------|
- * |CMD_CLK_GET_RATE            |clk_get_rate            |
- * |CMD_CLK_SET_RATE            |clk_set_rate            |
- * |CMD_CLK_ROUND_RATE          |clk_round_rate          |
- * |CMD_CLK_GET_PARENT          |clk_get_parent          |
- * |CMD_CLK_SET_PARENT          |clk_set_parent          |
- * |CMD_CLK_IS_ENABLED          |clk_is_enabled          |
- * |CMD_CLK_ENABLE              |-                       |
- * |CMD_CLK_DISABLE             |-                       |
- * |CMD_CLK_GET_ALL_INFO        |clk_get_all_info        |
- * |CMD_CLK_GET_MAX_CLK_ID      |clk_get_max_id          |
- * |CMD_CLK_GET_FMAX_AT_VMIN    |clk_get_fmax_at_vmin    |
+ * |Sub-command                 |Payload                            |
+ * |----------------------------|-----------------------------------|
+ * |#CMD_CLK_GET_RATE           |#cmd_clk_get_rate_response         |
+ * |#CMD_CLK_SET_RATE           |#cmd_clk_set_rate_response         |
+ * |#CMD_CLK_ROUND_RATE         |#cmd_clk_round_rate_response       |
+ * |#CMD_CLK_GET_PARENT         |#cmd_clk_get_parent_response       |
+ * |#CMD_CLK_SET_PARENT         |#cmd_clk_set_parent_response       |
+ * |#CMD_CLK_IS_ENABLED         |#cmd_clk_is_enabled_response       |
+ * |#CMD_CLK_ENABLE             |-                                  |
+ * |#CMD_CLK_DISABLE            |-                                  |
+ * |#CMD_CLK_GET_ALL_INFO       |#cmd_clk_get_all_info_response     |
+ * |#CMD_CLK_GET_MAX_CLK_ID     |#cmd_clk_get_max_clk_id_response   |
+ * |#CMD_CLK_GET_FMAX_AT_VMIN   |#cmd_clk_get_fmax_at_vmin_response |
  *
  */
 
-/** @cond DEPRECATED
- *
- * Older versions of firmware also supported following sub-commands:
- * |CMD_CLK_PROPERTIES          |clk_properties          |
- * |CMD_CLK_POSSIBLE_PARENTS    |clk_possible_parents    |
- * |CMD_CLK_NUM_POSSIBLE_PARENTS|clk_num_possible_parents|
- * |CMD_CLK_GET_POSSIBLE_PARENT |clk_get_possible_parents|
- * |CMD_CLK_RESET_REFCOUNTS     |-                       |
- *
- * @endcond DEPRECATED */
-
 struct mrq_clk_response {
 	union {
 		struct cmd_clk_get_rate_response clk_get_rate;
@@ -1422,12 +1843,6 @@ struct mrq_clk_response {
 		/** @private */
 		struct cmd_clk_disable_response clk_disable;
 		struct cmd_clk_is_enabled_response clk_is_enabled;
-		/** @cond DEPRECATED */
-		struct cmd_clk_properties_response clk_properties;
-		struct cmd_clk_possible_parents_response clk_possible_parents;
-		struct cmd_clk_num_possible_parents_response clk_num_possible_parents;
-		struct cmd_clk_get_possible_parent_response clk_get_possible_parent;
-		/** @endcond DEPRECATED */
 		struct cmd_clk_get_all_info_response clk_get_all_info;
 		struct cmd_clk_get_max_clk_id_response clk_get_max_clk_id;
 		struct cmd_clk_get_fmax_at_vmin_response clk_get_fmax_at_vmin;
@@ -1441,7 +1856,6 @@ struct mrq_clk_response {
  * @def MRQ_QUERY_ABI
  * @brief Check if an MRQ is implemented
  *
- * * Platforms: All
  * * Initiators: Any
  * * Targets: Any except DMCE
  * * Request Payload: @ref mrq_query_abi_request
@@ -1450,7 +1864,7 @@ struct mrq_clk_response {
 
 /**
  * @ingroup ABI_info
- * @brief Request with MRQ_QUERY_ABI
+ * @brief Request with #MRQ_QUERY_ABI
  *
  * Used by #MRQ_QUERY_ABI call to check if MRQ code #mrq is supported
  * by the recipient.
@@ -1468,7 +1882,11 @@ struct mrq_query_abi_request {
  * successful, not that the MRQ itself is supported!
  */
 struct mrq_query_abi_response {
-	/** @brief 0 if queried MRQ is supported. Else, -#BPMP_ENODEV */
+	/**
+	 * This response field is set to:
+	 * - 0 if queried MRQ is supported, or
+	 * - -#BPMP_ENODEV if queried MRQ is not supported
+	 */
 	int32_t status;
 } BPMP_ABI_PACKED;
 
@@ -1476,9 +1894,7 @@ struct mrq_query_abi_response {
  *
  * @ingroup MRQ_Codes
  * @def MRQ_PG
- * @brief Control power-gating state of a partition. In contrast to
- * MRQ_PG_UPDATE_STATE, operations that change the power partition
- * state are NOT reference counted
+ * @brief Control power-gating state of a partition.
  *
  * @cond (bpmp_t194 || bpmp_t186)
  * @note On T194 and earlier BPMP-FW forcefully turns off some partitions as
@@ -1486,9 +1902,8 @@ struct mrq_query_abi_response {
  * Therefore, it is recommended to power off all domains via MRQ_PG prior to SC7
  * entry.
  * See @ref bpmp_pdomain_ids for further detail.
- * @endcond (bpmp_t194 || bpmp_t186)
+ * @endcond
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_pg_request
@@ -1497,6 +1912,10 @@ struct mrq_query_abi_response {
  * @addtogroup Powergating
  * @{
  */
+
+/**
+ * @brief Sub-command identifiers for #MRQ_PG -command.
+ */
 enum mrq_pg_cmd {
 	/**
 	 * @brief Check whether the BPMP driver supports the specified
@@ -1512,9 +1931,14 @@ enum mrq_pg_cmd {
 	 * possible values for power domains are defined in enum
 	 * pg_states
 	 *
-	 * mrq_response:err is
-	 * 0: Success
-	 * -#BPMP_EINVAL: Invalid request parameters
+	 * mrq_response:err for this sub-command is defined as:
+	 *
+	 * | Value          | Description                                                              |
+	 * | -------------- | ------------------------------------------------------------------------ |
+	 * | 0              | Request was successful.                                                  |
+	 * | -#BPMP_EINVAL  | Invalid request parameters were provided.                                |
+	 * | -#BPMP_EACCES  | Permission denied or always-off partition was attempted to be turned on. |
+	 * | Any other <0   | Internal error while performing the operation.                           |
 	 */
 	CMD_PG_SET_STATE = 1,
 
@@ -1523,18 +1947,26 @@ enum mrq_pg_cmd {
 	 * possible values for power domains are defined in enum
 	 * pg_states
 	 *
-	 * mrq_response:err is
-	 * 0: Success
-	 * -#BPMP_EINVAL: Invalid request parameters
+	 * mrq_response:err for this sub-command is defined as:
+	 *
+	 * | Value          | Description                                    |
+	 * | -------------- | ---------------------------------------------- |
+	 * | 0              | Request was successful.                        |
+	 * | -#BPMP_EINVAL  | Invalid request parameters were provided.      |
+	 * | Any other <0   | Internal error while performing the operation. |
 	 */
 	CMD_PG_GET_STATE = 2,
 
 	/**
 	 * @brief Get the name string of specified power domain id.
 	 *
-	 * mrq_response:err is
-	 * 0: Success
-	 * -#BPMP_EINVAL: Invalid request parameters
+	 * mrq_response:err for this sub-command is defined as:
+	 *
+	 * | Value          | Description                                    |
+	 * | -------------- | ---------------------------------------------- |
+	 * | 0              | Request was successful.                        |
+	 * | -#BPMP_EINVAL  | Invalid request parameters were provided.      |
+	 * | Any other <0   | Internal error while performing the operation. |
 	 */
 	CMD_PG_GET_NAME = 3,
 
@@ -1543,20 +1975,29 @@ enum mrq_pg_cmd {
 	 * @brief Get the highest power domain id in the system. Not
 	 * all IDs between 0 and max_id are valid IDs.
 	 *
-	 * mrq_response:err is
-	 * 0: Success
-	 * -#BPMP_EINVAL: Invalid request parameters
+	 * mrq_response:err for this sub-command is defined as:
+	 *
+	 * | Value          | Description                                    |
+	 * | -------------- | ---------------------------------------------- |
+	 * | 0              | Request was successful.                        |
+	 * | -#BPMP_EINVAL  | Invalid request parameters were provided.      |
+	 * | Any other <0   | Internal error while performing the operation. |
 	 */
 	CMD_PG_GET_MAX_ID = 4,
 };
 
 #define MRQ_PG_NAME_MAXLEN	40
 
+/**
+ * @brief State value for the cmd_pg_set_state_request::state -field.
+ */
 enum pg_states {
 	/** @brief Power domain is OFF */
 	PG_STATE_OFF = 0,
 	/** @brief Power domain is ON */
 	PG_STATE_ON = 1,
+
+	/** @cond bpmp_t186 */
 	/**
 	 * @brief a legacy state where power domain and the clock
 	 * associated to the domain are ON.
@@ -1564,40 +2005,51 @@ enum pg_states {
 	 * deprecated.
 	 */
 	PG_STATE_RUNNING = 2,
+	/** @endcond */
 };
 
 struct cmd_pg_query_abi_request {
-	/** @ref mrq_pg_cmd */
+	/** #MRQ_PG sub-command identifier from @ref mrq_pg_cmd */
 	uint32_t type;
 } BPMP_ABI_PACKED;
 
 struct cmd_pg_set_state_request {
-	/** @ref pg_states */
+	/** One of the state values from @ref pg_states */
 	uint32_t state;
 } BPMP_ABI_PACKED;
 
 /**
- * @brief Response data to #MRQ_PG sub command #CMD_PG_GET_STATE
+ * @brief Response payload for the #MRQ_PG sub-command #CMD_PG_GET_STATE
  */
 struct cmd_pg_get_state_response {
 	/**
 	 * @brief The state of the power partition that has been
-	 * succesfuly requested by the master earlier using #MRQ_PG
+	 * successfully requested by the master earlier using #MRQ_PG
 	 * command #CMD_PG_SET_STATE.
 	 *
 	 * The state may not reflect the physical state of the power
 	 * partition if there are some other masters requesting it to
 	 * be enabled.
 	 *
-	 * See @ref pg_states for possible values
+	 * See @ref pg_states for possible values.
 	 */
 	uint32_t state;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for the #MRQ_PG sub-command #CMD_PG_GET_NAME
+ */
 struct cmd_pg_get_name_response {
+	/**
+	 * @brief On successful response contains the null-terminated
+	 *        friendly name of the requested power-domain.
+	 */
 	uint8_t name[MRQ_PG_NAME_MAXLEN];
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Response payload for the #MRQ_PG sub-command #CMD_PG_GET_MAX_ID
+ */
 struct cmd_pg_get_max_id_response {
 	uint32_t max_id;
 } BPMP_ABI_PACKED;
@@ -1606,22 +2058,28 @@ struct cmd_pg_get_max_id_response {
  * @brief Request with #MRQ_PG
  *
  * Used by the sender of an #MRQ_PG message to control power
- * partitions. The pg_request is split into several sub-commands. Some
- * sub-commands require no additional data. Others have a sub-command
- * specific payload
+ * partitions. The expected payload depends on the sub-command identifier.
+ * Some sub-commands require no additional data while others have a sub-command
+ * specific payload:
  *
- * |sub-command                 |payload                |
- * |----------------------------|-----------------------|
- * |CMD_PG_QUERY_ABI            | query_abi             |
- * |CMD_PG_SET_STATE            | set_state             |
- * |CMD_PG_GET_STATE            | -                     |
- * |CMD_PG_GET_NAME             | -                     |
- * |CMD_PG_GET_MAX_ID           | -                     |
+ * |Sub-command                 |Payload                    |
+ * |----------------------------|---------------------------|
+ * |#CMD_PG_QUERY_ABI           | #cmd_pg_query_abi_request |
+ * |#CMD_PG_SET_STATE           | #cmd_pg_set_state_request |
+ * |#CMD_PG_GET_STATE           | -                         |
+ * |#CMD_PG_GET_NAME            | -                         |
+ * |#CMD_PG_GET_MAX_ID          | -                         |
  *
  */
 struct mrq_pg_request {
+	/** @brief Sub-command identifier from @ref mrq_pg_cmd. */
 	uint32_t cmd;
+
+	/**
+	 * @brief Power-domain identifier
+	 */
 	uint32_t id;
+
 	union {
 		struct cmd_pg_query_abi_request query_abi;
 		struct cmd_pg_set_state_request set_state;
@@ -1629,19 +2087,18 @@ struct mrq_pg_request {
 } BPMP_ABI_PACKED;
 
 /**
- * @brief Response to MRQ_PG
+ * @brief Response to #MRQ_PG
  *
- * Each sub-command supported by @ref mrq_pg_request may return
- * sub-command-specific data. Some do and some do not as indicated in
- * the following table
+ * Some of the #MRQ_PG sub-commands return a sub-command -specific payload
+ * as specified in the following table:
  *
- * |sub-command                 |payload                |
- * |----------------------------|-----------------------|
- * |CMD_PG_QUERY_ABI            | -                     |
- * |CMD_PG_SET_STATE            | -                     |
- * |CMD_PG_GET_STATE            | get_state             |
- * |CMD_PG_GET_NAME             | get_name              |
- * |CMD_PG_GET_MAX_ID           | get_max_id            |
+ * |Sub-command         |Payload                       |
+ * |--------------------|------------------------------|
+ * |#CMD_PG_QUERY_ABI   | -                            |
+ * |#CMD_PG_SET_STATE   | -                            |
+ * |#CMD_PG_GET_STATE   | #cmd_pg_get_state_response   |
+ * |#CMD_PG_GET_NAME    | #cmd_pg_get_name_response    |
+ * |#CMD_PG_GET_MAX_ID  | #cmd_pg_get_max_id_response  |
  */
 struct mrq_pg_response {
 	union {
@@ -1658,11 +2115,10 @@ struct mrq_pg_response {
  * @def MRQ_THERMAL
  * @brief Interact with BPMP thermal framework
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: Any
- * * Request Payload: TODO
- * * Response Payload: TODO
+ * * Request Payload: #mrq_thermal_host_to_bpmp_request
+ * * Response Payload: #mrq_thermal_bpmp_to_host_response
  *
  * @addtogroup Thermal
  *
@@ -1686,10 +2142,14 @@ struct mrq_pg_response {
  * payload of @ref mrq_thermal_bpmp_to_host_request.
  * @{
  */
+
+/**
+ * @brief Sub-command identifiers for Host->BPMP #MRQ_THERMAL -command.
+ */
 enum mrq_thermal_host_to_bpmp_cmd {
 	/**
-	 * @brief Check whether the BPMP driver supports the specified
-	 * request type.
+	 * @brief Check whether BPMP-FW supports the specified
+	 *        #MRQ_THERMAL sub-command.
 	 *
 	 * Host needs to supply request parameters.
 	 *
@@ -1703,31 +2163,44 @@ enum mrq_thermal_host_to_bpmp_cmd {
 	 *
 	 * Host needs to supply request parameters.
 	 *
-	 * mrq_response::err is
-	 * *  0: Temperature query succeeded.
-	 * *  -#BPMP_EINVAL: Invalid request parameters.
-	 * *  -#BPMP_ENOENT: No driver registered for thermal zone..
-	 * *  -#BPMP_EFAULT: Problem reading temperature measurement.
+	 * mrq_response::err value for this sub-command is:
+	 *
+	 * | Value          | Description                               |
+	 * | -------------- | ----------------------------------------- |
+	 * | 0              | Temperature query succeeded.              |
+	 * | -#BPMP_EINVAL  | Invalid request parameters.               |
+	 * | -#BPMP_ENOENT  | No driver registered for thermal zone.    |
+	 * | -#BPMP_EFAULT  | Problem reading temperature measurement.  |
 	 */
 	CMD_THERMAL_GET_TEMP = 1,
 
 	/**
+	 * @cond (!bpmp_safe && !bpmp_t264)
 	 * @brief Enable or disable and set the lower and upper
 	 *   thermal limits for a thermal trip point. Each zone has
 	 *   one trip point.
 	 *
 	 * Host needs to supply request parameters. Once the
 	 * temperature hits a trip point, the BPMP will send a message
-	 * to the CPU having MRQ=MRQ_THERMAL and
-	 * type=CMD_THERMAL_HOST_TRIP_REACHED
+	 * to the CPU having MRQ command identifier equal to #MRQ_THERMAL and
+	 * sub-command identifier equal to #CMD_THERMAL_HOST_TRIP_REACHED.
 	 *
-	 * mrq_response::err is
-	 * *  0: Trip successfully set.
-	 * *  -#BPMP_EINVAL: Invalid request parameters.
-	 * *  -#BPMP_ENOENT: No driver registered for thermal zone.
-	 * *  -#BPMP_EFAULT: Problem setting trip point.
+	 * If #CMD_THERMAL_SET_TRIP -sub-command is issued for a
+	 * thermal zone that is currently power gated and unable to
+	 * report temperature, a temperature of -256C is used as
+	 * temperature for evaluation of the trip.
+	 *
+	 * mrq_response::err for this sub-command is defined as:
+	 *
+	 * | Value           | Description                            |
+	 * | --------------- | -------------------------------------- |
+	 * | 0               | Trip successfully set.                 |
+	 * | -#BPMP_EINVAL   | Invalid request parameters.            |
+	 * | -#BPMP_ENOENT   | No driver registered for thermal zone. |
+	 * | -#BPMP_EFAULT   | Problem setting trip point.            |
 	 */
 	CMD_THERMAL_SET_TRIP = 2,
+	 /** @endcond */
 
 	/**
 	 * @brief Get the number of supported thermal zones.
@@ -1739,135 +2212,153 @@ enum mrq_thermal_host_to_bpmp_cmd {
 	CMD_THERMAL_GET_NUM_ZONES = 3,
 
 	/**
-	 * @brief Get the thermtrip of the specified zone.
+	 * @brief Get the thermal trip value of the specified zone.
 	 *
 	 * Host needs to supply request parameters.
 	 *
-	 * mrq_response::err is
-	 * *  0: Valid zone information returned.
-	 * *  -#BPMP_EINVAL: Invalid request parameters.
-	 * *  -#BPMP_ENOENT: No driver registered for thermal zone.
-	 * *  -#BPMP_ERANGE if thermtrip is invalid or disabled.
-	 * *  -#BPMP_EFAULT: Problem reading zone information.
+	 * mrq_response::err for this sub-command is defined as:
+	 *
+	 * | Value           | Description                            |
+	 * | --------------- | -------------------------------------- |
+	 * | 0               | Valid zone information returned.       |
+	 * | -#BPMP_EINVAL   | Invalid request parameters.            |
+	 * | -#BPMP_ENOENT   | No driver registered for thermal zone. |
+	 * | -#BPMP_ERANGE   | Thermal trip is invalid or disabled.   |
+	 * | -#BPMP_EFAULT   | Problem reading zone information.      |
 	 */
 	CMD_THERMAL_GET_THERMTRIP = 4,
 
-	/** @brief: number of supported host-to-bpmp commands. May
-	 * increase in future
+	/**
+	 * @brief Number of supported host-to-bpmp commands.
 	 */
 	CMD_THERMAL_HOST_TO_BPMP_NUM
 };
 
+/**
+ * @brief Sub-command identifiers for BPMP->host #MRQ_THERMAL -command
+ */
 enum mrq_thermal_bpmp_to_host_cmd {
 	/**
 	 * @brief Indication that the temperature for a zone has
-	 *   exceeded the range indicated in the thermal trip point
-	 *   for the zone.
+	 *        exceeded the range indicated in the thermal trip point
+	 *        for the zone.
 	 *
-	 * BPMP needs to supply request parameters. Host only needs to
+	 * BPMP-FW needs to supply request parameters. Host only needs to
 	 * acknowledge.
 	 */
 	CMD_THERMAL_HOST_TRIP_REACHED = 100,
 
-	/** @brief: number of supported bpmp-to-host commands. May
-	 * increase in future
+	/**
+	 * @brief: Number of supported bpmp-to-host commands. May
+	 * increase in future.
 	 */
 	CMD_THERMAL_BPMP_TO_HOST_NUM
 };
 
-/*
- * Host->BPMP request data for request type CMD_THERMAL_QUERY_ABI
- *
- * zone: Request type for which to check existence.
+/**
+ * Host->BPMP request payload for the #CMD_THERMAL_QUERY_ABI sub-command
  */
 struct cmd_thermal_query_abi_request {
+	/**
+	 * Request type for which to check whether supported by BPMP-FW.
+	 *
+	 * Valid identifiers are available at #mrq_thermal_host_to_bpmp_cmd
+	 */
 	uint32_t type;
 } BPMP_ABI_PACKED;
 
-/*
- * Host->BPMP request data for request type CMD_THERMAL_GET_TEMP
- *
- * zone: Number of thermal zone.
+/**
+ * Host->BPMP request payload for the #CMD_THERMAL_GET_TEMP sub-command
  */
 struct cmd_thermal_get_temp_request {
+	/** Thermal zone identifier from @ref bpmp_thermal_ids. */
 	uint32_t zone;
 } BPMP_ABI_PACKED;
 
-/*
- * BPMP->Host reply data for request CMD_THERMAL_GET_TEMP
+/**
+ * BPMP->Host response payload for the #CMD_THERMAL_GET_TEMP sub-command.
  *
- * error: 0 if request succeeded.
- *	-BPMP_EINVAL if request parameters were invalid.
- *      -BPMP_ENOENT if no driver was registered for the specified thermal zone.
- *      -BPMP_EFAULT for other thermal zone driver errors.
- * temp: Current temperature in millicelsius.
+ * mrq_response::err is defined as:
+ *
+ * | Value         | Description                                              |
+ * | ------------- | -------------------------------------------------------- |
+ * | 0             | Request succeeded.                                       |
+ * | -#BPMP_EINVAL | Request parameters were invalid.                         |
+ * | -#BPMP_ENOENT | No driver was registered for the specified thermal zone. |
+ * | -#BPMP_EFAULT | For other BPMP-FW internal thermal zone driver errors.   |
  */
 struct cmd_thermal_get_temp_response {
+	/** @brief Current temperature in millicelsius. */
 	int32_t temp;
 } BPMP_ABI_PACKED;
 
-/*
- * Host->BPMP request data for request type CMD_THERMAL_SET_TRIP
+/**
+ * @cond (!bpmp_safe && !bpmp_t264)
  *
- * zone: Number of thermal zone.
- * low: Temperature of lower trip point in millicelsius
- * high: Temperature of upper trip point in millicelsius
- * enabled: 1 to enable trip point, 0 to disable trip point
+ * Host->BPMP request payload for the #CMD_THERMAL_SET_TRIP sub-command.
  */
 struct cmd_thermal_set_trip_request {
+	/** @brief Thermal zone identifier from @ref bpmp_thermal_ids. */
 	uint32_t zone;
+	/** @brief Temperature of lower trip point in millicelsius */
 	int32_t low;
+	/** @brief Temperature of upper trip point in millicelsius */
 	int32_t high;
+	/** 1 to enable trip point, 0 to disable trip point */
 	uint32_t enabled;
 } BPMP_ABI_PACKED;
 
-/*
- * BPMP->Host request data for request type CMD_THERMAL_HOST_TRIP_REACHED
- *
- * zone: Number of thermal zone where trip point was reached.
+/**
+ * BPMP->Host request payload for the #CMD_THERMAL_HOST_TRIP_REACHED sub-command.
  */
 struct cmd_thermal_host_trip_reached_request {
+	/**
+	 * @brief ID of the thermal zone where trip point was reached,
+	 *        from @ref bpmp_thermal_ids.
+	 */
 	uint32_t zone;
 } BPMP_ABI_PACKED;
+/** @endcond */
 
-/*
- * BPMP->Host reply data for request type CMD_THERMAL_GET_NUM_ZONES
- *
- * num: Number of supported thermal zones. The thermal zones are indexed
- *      starting from zero.
+/**
+ * BPMP->Host response payload for the #CMD_THERMAL_GET_NUM_ZONES sub-command.
  */
 struct cmd_thermal_get_num_zones_response {
+	/**
+	 * @brief Number of supported thermal zones.
+	 *
+	 * The thermal zones are indexed starting from zero.
+	 */
 	uint32_t num;
 } BPMP_ABI_PACKED;
 
-/*
- * Host->BPMP request data for request type CMD_THERMAL_GET_THERMTRIP
- *
- * zone: Number of thermal zone.
+/**
+ * Host->BPMP request payload for the #CMD_THERMAL_GET_THERMTRIP sub-command.
  */
 struct cmd_thermal_get_thermtrip_request {
+	/** @brief Thermal zone identifier from @ref bpmp_thermal_ids. */
 	uint32_t zone;
 } BPMP_ABI_PACKED;
 
-/*
- * BPMP->Host reply data for request CMD_THERMAL_GET_THERMTRIP
- *
- * thermtrip: HW shutdown temperature in millicelsius.
+/**
+ * BPMP->Host response payload for the #CMD_THERMAL_GET_THERMTRIP sub-command.
  */
 struct cmd_thermal_get_thermtrip_response {
+	/** @brief HW shutdown temperature in millicelsius. */
 	int32_t thermtrip;
 } BPMP_ABI_PACKED;
 
-/*
- * Host->BPMP request data.
- *
- * Reply type is union mrq_thermal_bpmp_to_host_response.
+/**
+ * Host->BPMP #MRQ_THERMAL request payload.
  *
- * type: Type of request. Values listed in enum mrq_thermal_type.
- * data: Request type specific parameters.
+ * Response payload type is #mrq_thermal_bpmp_to_host_response.
  */
 struct mrq_thermal_host_to_bpmp_request {
+	/**
+	 * Request sub-command identifier from @ref mrq_thermal_host_to_bpmp_cmd.
+	 */
 	uint32_t type;
+
 	union {
 		struct cmd_thermal_query_abi_request query_abi;
 		struct cmd_thermal_get_temp_request get_temp;
@@ -1876,21 +2367,22 @@ struct mrq_thermal_host_to_bpmp_request {
 	} BPMP_UNION_ANON;
 } BPMP_ABI_PACKED;
 
-/*
- * BPMP->Host request data.
- *
- * type: Type of request. Values listed in enum mrq_thermal_type.
- * data: Request type specific parameters.
+/**
+ * @brief Request payload for the BPMP->Host #MRQ_THERMAL command.
  */
 struct mrq_thermal_bpmp_to_host_request {
+	/**
+	 * Request sub-command identifier from @ref mrq_thermal_bpmp_to_host_cmd.
+	 */
 	uint32_t type;
+
 	union {
 		struct cmd_thermal_host_trip_reached_request host_trip_reached;
 	} BPMP_UNION_ANON;
 } BPMP_ABI_PACKED;
 
-/*
- * Data in reply to a Host->BPMP request.
+/**
+ * @brief Response payload for the Host->BPMP #MRQ_THERMAL command.
  */
 union mrq_thermal_bpmp_to_host_response {
 	struct cmd_thermal_get_temp_response get_temp;
@@ -1900,13 +2392,11 @@ union mrq_thermal_bpmp_to_host_response {
 
 /** @} Thermal */
 
-/**
+/** @cond (!bpmp_safe && (bpmp_t234 || bpmp_t238 || bpmp_t264))
  * @ingroup MRQ_Codes
  * @def MRQ_OC_STATUS
- * @brief Query over current status
+ * @brief Query overcurrent status
  *
- * * Platforms: T234
- * @cond bpmp_t234
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: N/A
@@ -1916,33 +2406,224 @@ union mrq_thermal_bpmp_to_host_response {
  * @{
  */
 
+/**
+ * @brief Size of the mrq_oc_status_response::throt_en and
+ *        mrq_oc_status_response::event_cnt -arrays.
+ */
 #define OC_STATUS_MAX_SIZE	24U
 
-/*
- * @brief Response to #MRQ_OC_STATUS
- *
- * throt_en: Value for each OC alarm where zero signifies throttle is
- *           disabled, and non-zero throttle is enabled.
- * event_cnt: Total number of OC events for each OC alarm.
+/**
+ * @brief Response payload for the #MRQ_OC_STATUS -command.
  *
  * mrq_response::err is 0 if the operation was successful and
  * -#BPMP_ENODEV otherwise.
  */
 struct mrq_oc_status_response {
+	/**
+	 * @brief Value for each overcurrent alarm where zero signifies
+	 * throttle is disabled, and non-zero throttle is enabled.
+	 */
 	uint8_t throt_en[OC_STATUS_MAX_SIZE];
+
+	/**
+	 * @brief Total number of overcurrent events for each overcurrent alarm.
+	 */
 	uint32_t event_cnt[OC_STATUS_MAX_SIZE];
 } BPMP_ABI_PACKED;
 
 /** @} OC_status */
-/** @endcond bpmp_t234 */
+/** @endcond */
+
+/** @cond (bpmp_th500 || bpmp_tb500 || bpmp_t238)
+ * @ingroup MRQ_Codes
+ * @def MRQ_THROTTLE
+ * @brief Overcurrent throttling
+ *
+ * * Initiators: CCPLEX
+ * * Targets: BPMP
+ * * Request Payload: @ref mrq_throttle_request
+ * * Response Payload: @ref mrq_throttle_response
+ * @addtogroup Throttle
+ * @{
+ */
+enum mrq_throttle_cmd {
+	/**
+	 * @brief Check whether the BPMP-FW supports the specified
+	 * #MRQ_THROTTLE sub-command.
+	 *
+	 * mrq_response::err is 0 if the specified request is
+	 * supported and -#BPMP_ENODEV otherwise.
+	 */
+	CMD_THROTTLE_QUERY_ABI = 0,
+
+	/**
+	 * @cond (bpmp_th500 || bpmp_tb500)
+	 * @brief query chipthrot status
+	 *
+	 * mrq_response:err is defined as:
+	 *
+	 * | Value          | Description                                                  |
+	 * |----------------|--------------------------------------------------------------|
+	 * | 0              | Success                                                      |
+	 * | -#BPMP_ENODEV  | CMD_THROTTLE_GET_CHIPTHROT_STATUS is not supported by BPMP-FW|
+	 */
+	CMD_THROTTLE_GET_CHIPTHROT_STATUS = 1,
+	/** @endcond */
+
+	/**
+	 * @cond bpmp_t238
+	 * @brief program OC throttle configuration
+	 *
+	 * mrq_response:err is defined as:
+	 *
+	 * | Value          | Description                                                  |
+	 * |----------------|--------------------------------------------------------------|
+	 * | 0              | Success                                                      |
+	 * | -#BPMP_EINVAL  | ID out of range or alarm for this ID not enabled at boot     |
+	 * | -#BPMP_ENODEV  | CMD_THROTTLE_SET_OC_CONFIG is not supported by BPMP-FW       |
+	 */
+	CMD_THROTTLE_SET_OC_CONFIG = 2,
+	/** @endcond */
+};
 
 /**
+ * @brief Request payload for #MRQ_THROTTLE sub-command #CMD_THROTTLE_QUERY_ABI
+ */
+struct cmd_throttle_query_abi_request {
+	uint32_t cmd; /**< @ref mrq_throttle_cmd */
+} BPMP_ABI_PACKED;
+
+/**
+ * @cond bpmp_th500
+ * @brief Response payload for #MRQ_THROTTLE sub-command
+ * #CMD_THROTTLE_GET_CHIPTHROT_STATUS
+ *
+ * Bit-mask of all h/w throttling actions that have been engaged since
+ * last invocation of this command
+ * Bit 0...11  : HW throttling status of the thermal zones.
+ * Bit 12...23 : Reserved for future thermal zone events.
+ * Bit 24...25 : HW throttling status of the Over current Alarms OC1 & OC2.
+ * Bit 26...31 : Reserved for future Over current alarm events.
+ * Bit 32...63 : Reserved for future use.
+ * @endcond
+ * @cond bpmp_tb500
+ * @brief Response payload for #MRQ_THROTTLE sub-command
+ * #CMD_THROTTLE_GET_CHIPTHROT_STATUS
+ *
+ * Bit-mask of all h/w throttling actions that have been engaged since
+ * last invocation of this command
+ * Bit 0       : HW throttling status of the TB500C_TJ_MAX thermal zone.
+ * Bit 1...63  : Reserved for future use.
+ * @endcond
+ * @cond (bpmp_th500 || bpmp_tb500)
+ */
+struct cmd_throttle_get_chipthrot_status_response {
+	uint64_t status;
+} BPMP_ABI_PACKED;
+/** @endcond */
+
+/**
+ * @cond bpmp_t238
+ * @brief Request payload for #MRQ_THROTTLE sub-command
+ * #CMD_THROTTLE_SET_OC_CONFIG
+ *
+ * Only alarms that have been configured as enabled in BPMP-DTB at boot can
+ * be reconfigured with this MRQ.
+ */
+struct cmd_throttle_set_oc_config_request {
+	/** @brief valid OC alarm ID from @ref bpmp_soctherm_edp_oc_ids */
+	uint32_t id;
+	/** @brief Throttling enable/disable
+	 *
+	 * Set to 1 to enable throttling, or 0 to disable. Other values are
+	 * disallowed.
+	 */
+	uint8_t en_throttle;
+} BPMP_ABI_PACKED;
+/** @endcond */
+
+/**
+ * @brief Request payload for the #MRQ_THROTTLE -command
+ *
+ * | Sub-command                        | Request payload                  |
+ * |------------------------------------|----------------------------------|
+ * | #CMD_THROTTLE_QUERY_ABI            | #cmd_throttle_query_abi_request  |
+ *
+ * @cond bpmp_th500
+ * The following additional sub-commands are supported on TH500 platforms:
+ * | Sub-command                        | Request payload                  |
+ * |------------------------------------|----------------------------------|
+ * | #CMD_THROTTLE_GET_CHIPTHROT_STATUS | -                                |
+ * @endcond
+ *
+ * @cond bpmp_tb500
+ * The following additional sub-commands are supported on TB500 platforms:
+ * | Sub-command                        | Request payload                  |
+ * |------------------------------------|----------------------------------|
+ * | #CMD_THROTTLE_GET_CHIPTHROT_STATUS | -                                |
+ * @endcond
+ *
+ * @cond bpmp_t238
+ * The following additional sub-commands are supported on T238 platforms:
+ * | Sub-command                        | Request payload                     |
+ * |------------------------------------|-------------------------------------|
+ * | #CMD_THROTTLE_SET_OC_CONFIG        | #cmd_throttle_set_oc_config_request |
+ * @endcond
+ */
+struct mrq_throttle_request {
+	uint32_t cmd;
+	union {
+		struct cmd_throttle_query_abi_request throttle_query_abi_req;
+		/** @cond bpmp_t238 */
+		struct cmd_throttle_set_oc_config_request throttle_set_oc_config_req;
+		/** @endcond */
+	} BPMP_UNION_ANON;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Response payload for the #MRQ_THROTTLE -command.
+ *
+ * | Sub-command                        | Response payload                           |
+ * |------------------------------------|--------------------------------------------|
+ * | #CMD_THROTTLE_QUERY_ABI            | -                                          |
+ *
+ * @cond bpmp_th500
+ * The following additional sub-commands are supported on TH500 platforms:
+ * | Sub-command                        | Response payload                           |
+ * |------------------------------------|--------------------------------------------|
+ * | #CMD_THROTTLE_GET_CHIPTHROT_STATUS | #cmd_throttle_get_chipthrot_status_response|
+ * @endcond
+ *
+ * @cond bpmp_tb500
+ * The following additional sub-commands are supported on TB500 platforms:
+ * | Sub-command                        | Response payload                           |
+ * |------------------------------------|--------------------------------------------|
+ * | #CMD_THROTTLE_GET_CHIPTHROT_STATUS | #cmd_throttle_get_chipthrot_status_response|
+ * @endcond
+ *
+ * @cond bpmp_t238
+ * The following additional sub-commands are supported on T238 platforms:
+ * | Sub-command                        | Response payload                           |
+ * |------------------------------------|--------------------------------------------|
+ * | #CMD_THROTTLE_SET_OC_CONFIG        | -                                          |
+ * @endcond
+ */
+struct mrq_throttle_response {
+	union {
+		/** @cond (bpmp_th500 || bpmp_tb500) */
+		struct cmd_throttle_get_chipthrot_status_response throttle_get_chipthrot_status_resp;
+		/** @endcond */
+	} BPMP_UNION_ANON;
+} BPMP_ABI_PACKED;
+/** @} Throttle */
+/** @endcond */
+
+
+/** @cond bpmp_t186
  * @ingroup MRQ_Codes
  * @def MRQ_CPU_VHINT
  * @brief Query CPU voltage hint data
  *
- * * Platforms: T186
- * @cond bpmp_t186
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: @ref mrq_cpu_vhint_request
@@ -1995,14 +2676,13 @@ struct cpu_vhint_data {
 } BPMP_ABI_PACKED;
 
 /** @} Vhint */
-/** @endcond bpmp_t186 */
+/** @endcond */
 
 /**
  * @ingroup MRQ_Codes
  * @def MRQ_ABI_RATCHET
  * @brief ABI ratchet value query
  *
- * * Platforms: T186, T194
  * * Initiators: Any
  * * Targets: BPMP
  * * Request Payload: @ref mrq_abi_ratchet_request
@@ -2014,7 +2694,7 @@ struct cpu_vhint_data {
 /**
  * @brief An ABI compatibility mechanism
  *
- * BPMP_ABI_RATCHET_VALUE may increase for various reasons in a future
+ * #BPMP_ABI_RATCHET_VALUE may increase for various reasons in a future
  * revision of this header file.
  * 1. That future revision deprecates some MRQ
  * 2. That future revision introduces a breaking change to an existing
@@ -2051,11 +2731,11 @@ struct mrq_abi_ratchet_request {
  *
  * If #ratchet is less than the requester's #BPMP_ABI_RATCHET_VALUE,
  * the requster must either interoperate with BPMP according to an ABI
- * header version with BPMP_ABI_RATCHET_VALUE = ratchet or cease
+ * header version with #BPMP_ABI_RATCHET_VALUE = ratchet or cease
  * communication with BPMP.
  *
  * If mrq_response::err is 0 and ratchet is greater than or equal to the
- * requester's BPMP_ABI_RATCHET_VALUE, the requester should continue
+ * requester's #BPMP_ABI_RATCHET_VALUE, the requester should continue
  * normal operation.
  */
 struct mrq_abi_ratchet_response {
@@ -2070,7 +2750,9 @@ struct mrq_abi_ratchet_response {
  * @def MRQ_EMC_DVFS_LATENCY
  * @brief Query frequency dependent EMC DVFS latency
  *
- * * Platforms: T186, T194, T234
+ * On T264 and onwards, this MRQ service is available only when
+ * BPMP-FW has valid DRAM timing table passed by earlier boot stages.
+ *
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: N/A
@@ -2094,7 +2776,11 @@ struct emc_dvfs_latency {
  * @brief Response to #MRQ_EMC_DVFS_LATENCY
  */
 struct mrq_emc_dvfs_latency_response {
-	/** @brief The number valid entries in #pairs */
+	/**
+	 * @brief The number valid entries in #pairs
+	 *
+	 * Valid range is [0, #EMC_DVFS_LATENCY_MAX_SIZE]
+	 */
 	uint32_t num_pairs;
 	/** @brief EMC DVFS node <frequency, latency> information */
 	struct emc_dvfs_latency pairs[EMC_DVFS_LATENCY_MAX_SIZE];
@@ -2102,13 +2788,11 @@ struct mrq_emc_dvfs_latency_response {
 
 /** @} EMC */
 
-/**
+/** @cond (bpmp_t234)
  * @ingroup MRQ_Codes
  * @def MRQ_EMC_DVFS_EMCHUB
  * @brief Query EMC HUB frequencies
  *
- * * Platforms: T234 onwards
- * @cond (bpmp_t234 || bpmp_t238 || bpmp_th500)
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: N/A
@@ -2139,15 +2823,13 @@ struct mrq_emc_dvfs_emchub_response {
 } BPMP_ABI_PACKED;
 
 /** @} EMC */
-/** @endcond (bpmp_t234 || bpmp_t238 || bpmp_th500) */
+/** @endcond */
 
-/**
+/** @cond (bpmp_t234)
  * @ingroup MRQ_Codes
  * @def MRQ_EMC_DISP_RFL
  * @brief Set EMC display RFL handshake mode of operations
  *
- * * Platforms: T234 onwards
- * @cond (bpmp_t234 || bpmp_t238 || bpmp_th500)
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: @ref mrq_emc_disp_rfl_request
@@ -2157,6 +2839,9 @@ struct mrq_emc_dvfs_emchub_response {
  * @{
  */
 
+/**
+ * @brief Allowed mode values for the mrq_emc_disp_rfl_request::mode -field.
+ */
 enum mrq_emc_disp_rfl_mode {
 	/** @brief EMC display RFL handshake disabled  */
 	EMC_DISP_RFL_MODE_DISABLED = 0,
@@ -2171,65 +2856,75 @@ enum mrq_emc_disp_rfl_mode {
  * Used by the sender of an #MRQ_EMC_DISP_RFL message to
  * request the mode of EMC display RFL handshake.
  *
- * mrq_response::err is
- * * 0: RFL mode is set successfully
- * * -#BPMP_EINVAL: invalid mode requested
- * * -#BPMP_ENOSYS: RFL handshake is not supported
- * * -#BPMP_EACCES: Permission denied
- * * -#BPMP_ENODEV: if disp rfl mrq is not supported by BPMP-FW
+ * mrq_response::err for this request is defined as:
+ *
+ * | Value          | Description                                   |
+ * | -------------- | --------------------------------------------- |
+ * | 0              | RFL mode is set successfully.                 |
+ * | -#BPMP_EINVAL  | Invalid mode requested.                       |
+ * | -#BPMP_ENOSYS  | RFL handshake is not supported.               |
+ * | -#BPMP_EACCES  | Permission denied.                            |
+ * | -#BPMP_ENODEV  | if disp rfl mrq is not supported by BPMP-FW.  |
  */
 struct mrq_emc_disp_rfl_request {
-	/** @brief EMC display RFL mode (@ref mrq_emc_disp_rfl_mode) */
+	/** @brief EMC display RFL mode from @ref mrq_emc_disp_rfl_mode */
 	uint32_t mode;
 } BPMP_ABI_PACKED;
 
 /** @} EMC */
-/** @endcond (bpmp_t234 || bpmp_t238 || bpmp_th500) */
+/** @endcond */
 
-/**
+/** @cond (!bpmp_safe && (bpmp_t234 || bpmp_t238))
  * @ingroup MRQ_Codes
  * @def MRQ_BWMGR
- * @brief bwmgr requests
+ * @brief Bandwidth manager (BWMGR) commands
  *
- * * Platforms: T234 onwards
- * @cond (bpmp_t234 || bpmp_t238 || bpmp_th500)
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: @ref mrq_bwmgr_request
  * * Response Payload: @ref mrq_bwmgr_response
  *
  * @addtogroup BWMGR
- *
  * @{
  */
 
+/**
+ * @brief Sub-command identifiers for #MRQ_BWMGR
+ */
 enum mrq_bwmgr_cmd {
 	/**
-	 * @brief Check whether the BPMP driver supports the specified
-	 * request type
+	 * @brief Check whether BPMP-FW supports the specified
+	 * #MRQ_BWMGR sub-command.
 	 *
-	 * mrq_response::err is 0 if the specified request is
-	 * supported and -#BPMP_ENODEV otherwise.
+	 * mrq_response::err is defined to be:
+	 *
+	 * | Value          | Description
+	 * |----------------|----------------------------
+	 * | 0              | Specified sub-command is supported.
+	 * | -#BPMP_ENODEV  | Specified sub-command is not supported.
 	 */
 	CMD_BWMGR_QUERY_ABI = 0,
 
 	/**
-	 * @brief Determine dram rate to satisfy iso/niso bw requests
+	 * @brief Determine DRAM rate to satisfy ISO/NISO bandwidth requests
 	 *
-	 * mrq_response::err is
-	 * *  0: calc_rate succeeded.
-	 * *  -#BPMP_EINVAL: Invalid request parameters.
-	 * *  -#BPMP_ENOTSUP: Requested bw is not available.
+	 * mrq_response::err is defined to be:
+	 *
+	 * | Value          | Description
+	 * |----------------|----------------------------
+	 * | 0              | Rate calculation succeeded.
+	 * | -#BPMP_EINVAL  | Invalid request parameters.
+	 * | -#BPMP_ENOTSUP | Requested bandwidth is not available.
+	 * | <0             | Any other internal error.
 	 */
 	CMD_BWMGR_CALC_RATE = 1
 };
 
-/*
- * request data for request type CMD_BWMGR_QUERY_ABI
- *
- * type: Request type for which to check existence.
+/**
+ * @brief Request payload for #MRQ_BWMGR sub-command #CMD_BWMGR_QUERY_ABI
  */
 struct cmd_bwmgr_query_abi_request {
+	/** @brief Sub-command identifier from @ref mrq_bwmgr_cmd. */
 	uint32_t type;
 } BPMP_ABI_PACKED;
 
@@ -2237,47 +2932,56 @@ struct cmd_bwmgr_query_abi_request {
  * @brief Used by @ref cmd_bwmgr_calc_rate_request
  */
 struct iso_req {
-	/* @brief bwmgr client ID @ref bpmp_bwmgr_ids */
+	/** @brief BWMGR client ID from @ref bpmp_bwmgr_ids */
 	uint32_t id;
-	/* @brief bw in kBps requested by client */
+	/** @brief Bandwidth in kBps requested by client */
 	uint32_t iso_bw;
 } BPMP_ABI_PACKED;
 
+/**
+ * @brief Size of the cmd_bwmgr_calc_rate_request::isobw_reqs -array.
+ */
 #define MAX_ISO_CLIENTS		13U
-/*
- * request data for request type CMD_BWMGR_CALC_RATE
+
+/**
+ * @brief Request payload for #MRQ_BWMGR sub-command #CMD_BWMGR_CALC_RATE
  */
 struct cmd_bwmgr_calc_rate_request {
-	/* @brief total bw in kBps requested by all niso clients */
+	/** @brief Total bandwidth in kBps requested by all NISO clients. */
 	uint32_t sum_niso_bw;
-	/* @brief The number of iso clients */
+	/** @brief The number of ISO client requests in #isobw_reqs -array */
 	uint32_t num_iso_clients;
-	/* @brief iso_req <id, iso_bw> information */
+	/** @brief iso_req <id, iso_bw> information */
 	struct iso_req isobw_reqs[MAX_ISO_CLIENTS];
 } BPMP_ABI_PACKED;
 
-/*
- * response data for request type CMD_BWMGR_CALC_RATE
- *
- * iso_rate_min: min dram data clk rate in kHz to satisfy all iso bw reqs
- * total_rate_min: min dram data clk rate in kHz to satisfy all bw reqs
+/**
+ * @brief Response payload for #MRQ_BWMGR sub-command #CMD_BWMGR_CALC_RATE
  */
 struct cmd_bwmgr_calc_rate_response {
+	/**
+	 * @brief Minimum DRAM data clock rate in kHz to satisfy all ISO client
+	 *        bandwidth requests.
+	 */
 	uint32_t iso_rate_min;
+
+	/**
+	 * @brief Minimum DRAM data clock rate in kHz to satisfy all
+	 *        bandwidth requests.
+	 */
 	uint32_t total_rate_min;
 } BPMP_ABI_PACKED;
 
-/*
- * @brief Request with #MRQ_BWMGR
- *
- *
- * |sub-command                 |payload                       |
- * |----------------------------|------------------------------|
- * |CMD_BWMGR_QUERY_ABI         | cmd_bwmgr_query_abi_request  |
- * |CMD_BWMGR_CALC_RATE         | cmd_bwmgr_calc_rate_request  |
+/**
+ * @brief Request payload for the #MRQ_BWMGR -command.
  *
+ * |Sub-command           |Payload                      |
+ * |----------------------|-----------------------------|
+ * |#CMD_BWMGR_QUERY_ABI  |#cmd_bwmgr_query_abi_request |
+ * |#CMD_BWMGR_CALC_RATE  |#cmd_bwmgr_calc_rate_request |
  */
 struct mrq_bwmgr_request {
+	/** @brief Sub-command identifier from @ref mrq_bwmgr_cmd. */
 	uint32_t cmd;
 	union {
 		struct cmd_bwmgr_query_abi_request query_abi;
@@ -2285,12 +2989,12 @@ struct mrq_bwmgr_request {
 	} BPMP_UNION_ANON;
 } BPMP_ABI_PACKED;
 
-/*
- * @brief Response to MRQ_BWMGR
+/**
+ * @brief Response payload for the #MRQ_BWMGR -command.
  *
- * |sub-command                 |payload                       |
- * |----------------------------|------------------------------|
- * |CMD_BWMGR_CALC_RATE         | cmd_bwmgr_calc_rate_response |
+ * |Sub-command           |Payload                       |
+ * |----------------------|------------------------------|
+ * |#CMD_BWMGR_CALC_RATE  |#cmd_bwmgr_calc_rate_response |
  */
 struct mrq_bwmgr_response {
 	union {
@@ -2299,15 +3003,13 @@ struct mrq_bwmgr_response {
 } BPMP_ABI_PACKED;
 
 /** @} BWMGR */
-/** @endcond (bpmp_t234 || bpmp_t238 || bpmp_th500) */
+/** @endcond */
 
-/**
+/** @cond (!bpmp_safe && (bpmp_t234 || bpmp_t238 || bpmp_t264))
  * @ingroup MRQ_Codes
  * @def MRQ_BWMGR_INT
- * @brief bpmp-integrated bwmgr requests
+ * @brief BPMP-FW integrated BWMGR requests
  *
- * * Platforms: T234 onwards
- * @cond (bpmp_t234 || bpmp_t238 || bpmp_th500)
  * * Initiators: CCPLEX
  * * Targets: BPMP
  * * Request Payload: @ref mrq_bwmgr_int_request
@@ -2317,10 +3019,13 @@ struct mrq_bwmgr_response {
  * @{
  */
 
+/**
+ * @brief Sub-command identifiers for #MRQ_BWMGR_INT
+ */
 enum mrq_bwmgr_int_cmd {
 	/**
 	 * @brief Check whether the BPMP-FW supports the specified
-	 * request type
+	 * sub-command.
 	 *
 	 * mrq_response::err is 0 if the specified request is
 	 * supported and -#BPMP_ENODEV otherwise.
@@ -2328,36 +3033,64 @@ enum mrq_bwmgr_int_cmd {
 	CMD_BWMGR_INT_QUERY_ABI = 1,
 
 	/**
-	 * @brief Determine and set dram rate to satisfy iso/niso bw request
+	 * @brief Determine and set DRAM rate to satisfy ISO/NISO bandwidth requests.
 	 *
-	 * mrq_response::err is
-	 * *  0: request succeeded.
-	 * *  -#BPMP_EINVAL: Invalid request parameters.
-	 *          set_frequency in @ref cmd_bwmgr_int_calc_and_set_response
-	 *          will not be set.
-	 * *  -#BPMP_ENOTSUP: Requested bw is not available.
-	 *          set_frequency in @ref cmd_bwmgr_int_calc_and_set_response
-	 *          will be current dram-clk rate.
+	 * mrq_response::err is defined as:
+	 *
+	 * |Value            |Description                                                                                                     |
+	 * |-----------------|----------------------------------------------------------------------------------------------------------------|
+	 * |0                |Request succeeded.                                                                                              |
+	 * |-#BPMP_EINVAL    |Invalid request parameters, cmd_bwmgr_int_calc_and_set_response::rate is not set.                               |
+	 * |-#BPMP_ENOTSUP   |Requested bandwidth is not available, cmd_bwmgr_int_calc_and_set_response::rate is the current DRAM clock rate. |
+	 * |<0               |Any other internal error.                                                                                       |
 	 */
 	CMD_BWMGR_INT_CALC_AND_SET = 2,
 
 	/**
-	 * @brief Set a max DRAM frequency for the bandwidth-manager
+	 * @brief Set a max DRAM frequency for the bandwidth manager.
 	 *
-	 * mrq_response::err is
-	 * *  0: request succeeded.
-	 * *  -#BPMP_ENOTSUP: Requested cap frequency is not possible.
+	 * mrq_response::err is defined as:
+	 *
+	 * |Value            |Description                               |
+	 * |-----------------|------------------------------------------|
+	 * |0                |Request succeeded.                        |
+	 * |-#BPMP_ENOTSUP   |Requested cap frequency is not possible.  |
+	 * |<0               |Any other internal error.                 |
+	 */
+	CMD_BWMGR_INT_CAP_SET = 3,
+
+	/**
+	 * @brief Obtain the maximum amount of bandwidth currently allocatable
+	 * to the requesting client.
+	 *
+	 * mrq_response::err is defined as:
+	 *
+	 * |Value            |Description                               |
+	 * |-----------------|------------------------------------------|
+	 * |0                |Request succeeded.                        |
+	 * |-#BPMP_EINVAL    |Invalid request parameters.               |
+	 * |<0               |Any other internal error.                 |
+	 */
+	CMD_BWMGR_INT_CURR_AVAILABLE_BW = 4,
+	/**
+	 * @brief Get the last request made by the client.
+	 *
+	 * mrq_response::err is defined as:
+	 *
+	 * |Value            |Description                               |
+	 * |-----------------|------------------------------------------|
+	 * |0                |Request succeeded.                        |
+	 * |-#BPMP_EINVAL    |Invalid request parameters.               |
+	 * |<0               |Any other internal error.                 |
 	 */
-	CMD_BWMGR_INT_CAP_SET = 3
+	CMD_BWMGR_INT_GET_LAST_REQUEST = 5,
 };
 
-/*
- * request structure for request type CMD_BWMGR_QUERY_ABI
- *
- * type: Request type for which to check existence.
+/**
+ * @brief Request payload for #MRQ_BWMGR_INT sub-command #CMD_BWMGR_INT_QUERY_ABI
  */
 struct cmd_bwmgr_int_query_abi_request {
-	/* @brief request type determined by @ref mrq_bwmgr_int_cmd */
+	/** @brief Sub-command identifier from @ref mrq_bwmgr_int_cmd. */
 	uint32_t type;
 } BPMP_ABI_PACKED;
 
@@ -2373,87 +3106,168 @@ struct cmd_bwmgr_int_query_abi_request {
 
 /** @} bwmgr_int_unit_type */
 
-/*
- * request data for request type CMD_BWMGR_INT_CALC_AND_SET
+/**
+ * @brief Request payload for #MRQ_BWMGR_INT sub-command #CMD_BWMGR_INT_CALC_AND_SET
  */
 struct cmd_bwmgr_int_calc_and_set_request {
-	/* @brief bwmgr client ID @ref bpmp_bwmgr_ids */
+	/** @brief BWGMR client ID from @ref bpmp_bwmgr_ids */
 	uint32_t client_id;
-	/* @brief average niso bw usage in kBps requested by client. */
+	/** @brief Average NISO bandwidth usage in kBps requested by client. */
 	uint32_t niso_bw;
-	/*
-	 * @brief average iso bw usage in kBps requested by client.
-	 *  Value is ignored if client is niso. Determined by client_id.
+	/**
+	 * @brief Average ISO bandwidth usage in kBps requested by client.
+	 *
+	 * Value is ignored if client is NISO as determined by #client_id.
 	 */
 	uint32_t iso_bw;
-	/*
-	 * @brief memory clock floor requested by client.
-	 *  Unit determined by floor_unit.
+	/**
+	 * @brief Memory clock floor requested by client, unit of the value
+	 *        is determined by #floor_unit -field.
 	 */
 	uint32_t mc_floor;
-	/*
-	 * @brief toggle to determine the unit-type of floor value.
-	 *  See @ref bwmgr_int_unit_type definitions for unit-type mappings.
+	/**
+	 * @brief Value set to determine the unit of the #mc_floor value:
+	 *
+	 * | Value                 | Unit                 |
+	 * |-----------------------|----------------------|
+	 * | #BWMGR_INT_UNIT_KBPS  | Kilobytes per second |
+	 * | #BWMGR_INT_UNIT_KHZ   | Kilohertz            |
 	 */
 	uint8_t floor_unit;
 } BPMP_ABI_PACKED;
 
-struct cmd_bwmgr_int_cap_set_request {
-	/* @brief requested cap frequency in Hz. */
+/**
+ * @brief Response payload for #MRQ_BWMGR_INT sub-command #CMD_BWMGR_INT_CALC_AND_SET
+ */
+struct cmd_bwmgr_int_calc_and_set_response {
+	/** @brief Currently set memory clock frequency in Hz */
 	uint64_t rate;
 } BPMP_ABI_PACKED;
 
-/*
- * response data for request type CMD_BWMGR_CALC_AND_SET
+/**
+ * @brief Request payload for #MRQ_BWMGR_INT sub-command #CMD_BWMGR_INT_CAP_SET
  */
-struct cmd_bwmgr_int_calc_and_set_response {
-	/* @brief current set memory clock frequency in Hz */
+struct cmd_bwmgr_int_cap_set_request {
+	/** @brief Requested cap frequency in Hz. */
 	uint64_t rate;
 } BPMP_ABI_PACKED;
 
-/*
- * @brief Request with #MRQ_BWMGR_INT
+/**
+ * @brief Request payload for #MRQ_BWMGR_INT sub-command #CMD_BWMGR_INT_CURR_AVAILABLE_BW
+ */
+struct cmd_bwmgr_int_curr_available_bw_request {
+	/** @brief BWMGR client ID from @ref bpmp_bwmgr_ids */
+	uint32_t id;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Response payload for #MRQ_BWMGR_INT sub-command #CMD_BWMGR_INT_CURR_AVAILABLE_BW
+ */
+struct cmd_bwmgr_int_curr_available_bw_response {
+	/** @brief Current cap frequency in KHz. */
+	uint64_t cap_rate;
+	/** @brief Currently available bandwidth for the requesting client
+	 * to allocate in KBps.
+	 */
+	uint64_t available_bw;
+} BPMP_ABI_PACKED;
+
+struct cmd_bwmgr_int_get_last_request_request {
+	/** @brief BWMGR client ID from @ref bpmp_bwmgr_ids */
+	uint32_t id;
+	/**
+	 * @brief Value set to determine the unit of the returned mc_floor value:
+	 *
+	 * | Value                 | Unit                 |
+	 * |-----------------------|----------------------|
+	 * | #BWMGR_INT_UNIT_KBPS  | Kilobytes per second |
+	 * | #BWMGR_INT_UNIT_KHZ   | Kilohertz            |
+	 */
+	uint8_t floor_unit;
+} BPMP_ABI_PACKED;
+
+struct cmd_bwmgr_int_get_last_request_response {
+	/** @brief BWGMR client ID from @ref bpmp_bwmgr_ids */
+	uint32_t client_id;
+	/** @brief Average NISO bandwidth usage in kBps requested by client. */
+	uint32_t niso_bw;
+	/**
+	 * @brief Average ISO bandwidth usage in kBps requested by client.
+	 */
+	uint32_t iso_bw;
+	/**
+	 * @brief Memory clock floor requested by client, unit of the value
+	 *        is determined by #floor_unit -field.
+	 */
+	uint32_t mc_floor;
+	/**
+	 * @brief Value set to determine the unit of the #mc_floor value:
+	 *
+	 * | Value                 | Unit                 |
+	 * |-----------------------|----------------------|
+	 * | #BWMGR_INT_UNIT_KBPS  | Kilobytes per second |
+	 * | #BWMGR_INT_UNIT_KHZ   | Kilohertz            |
+	 */
+	uint8_t floor_unit;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Request payload for the #MRQ_BWMGR_INT -command.
  *
+ * |Sub-command                      |Payload                                  |
+ * |---------------------------------|-----------------------------------------|
+ * |#CMD_BWMGR_INT_QUERY_ABI         |#cmd_bwmgr_int_query_abi_request         |
+ * |#CMD_BWMGR_INT_CALC_AND_SET      |#cmd_bwmgr_int_calc_and_set_request      |
+ * |#CMD_BWMGR_INT_CAP_SET           |#cmd_bwmgr_int_cap_set_request           |
+ * |#CMD_BWMGR_INT_GET_LAST_REQUEST  |#cmd_bwmgr_int_get_last_request_request  |
  *
- * |sub-command                 |payload                            |
- * |----------------------------|-----------------------------------|
- * |CMD_BWMGR_INT_QUERY_ABI     | cmd_bwmgr_int_query_abi_request   |
- * |CMD_BWMGR_INT_CALC_AND_SET  | cmd_bwmgr_int_calc_and_set_request|
- * |CMD_BWMGR_INT_CAP_SET       | cmd_bwmgr_int_cap_set_request     |
+ * The following additional sub-commands are supported on T264 platforms:
  *
+ * |Sub-command                      |Payload                                  |
+ * |---------------------------------|-----------------------------------------|
+ * |#CMD_BWMGR_INT_CURR_AVAILABLE_BW |#cmd_bwmgr_int_curr_available_bw_request |
  */
 struct mrq_bwmgr_int_request {
+	/** @brief Sub-command identifier from @ref mrq_bwmgr_int_cmd. */
 	uint32_t cmd;
 	union {
 		struct cmd_bwmgr_int_query_abi_request query_abi;
 		struct cmd_bwmgr_int_calc_and_set_request bwmgr_calc_set_req;
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.52.0

Part of the diff is not shown here. View the raw message.

author maintainer
#2 lore raw

PATCH v2 2/5 firmware: tegra: bpmp: Add tegra_bpmp_get_with_id() function

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

Some device tree bindings need to specify a parameter along with a BPMP phandle reference to designate the ID associated with a given controller that needs to interoperate with BPMP. Typically this is specified as an extra cell in the nvidia,bpmp property, so add a helper to parse this ID while resolving the phandle reference.

---
 drivers/firmware/tegra/bpmp.c | 34 ++++++++++++++++++++++++++++++++++
 include/soc/tegra/bpmp.h      |  1 +
 2 files changed, 35 insertions(+)
drivers/firmware/tegra/bpmp.c +34 -0
index e74bba7ccc44..753472b53bd8 100644
@@ -32,6 +32,40 @@ channel_to_ops(struct tegra_bpmp_channel *channel)
 	return bpmp->soc->ops;
 }
 
+struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int *id)
+{
+	struct platform_device *pdev;
+	struct of_phandle_args args;
+	struct tegra_bpmp *bpmp;
+	int err;
+
+	err = __of_parse_phandle_with_args(dev->of_node, "nvidia,bpmp", NULL,
+					   1, 0, &args);
+	if (err < 0)
+		return ERR_PTR(err);
+
+	pdev = of_find_device_by_node(args.np);
+	if (!pdev) {
+		bpmp = ERR_PTR(-ENODEV);
+		goto put;
+	}
+
+	bpmp = platform_get_drvdata(pdev);
+	if (!bpmp) {
+		bpmp = ERR_PTR(-EPROBE_DEFER);
+		put_device(&pdev->dev);
+		goto put;
+	}
+
+	if (id)
+		*id = args.args[0];
+
+put:
+	of_node_put(args.np);
+	return bpmp;
+}
+EXPORT_SYMBOL_GPL(tegra_bpmp_get_with_id);
+
 struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
 {
 	struct platform_device *pdev;
include/soc/tegra/bpmp.h +1 -0
index f5e4ac5b8cce..424188c100d9 100644
@@ -127,6 +127,7 @@ struct tegra_bpmp_message {
 
 #if IS_ENABLED(CONFIG_TEGRA_BPMP)
 struct tegra_bpmp *tegra_bpmp_get(struct device *dev);
+struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int *id);
 void tegra_bpmp_put(struct tegra_bpmp *bpmp);
 int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
 			       struct tegra_bpmp_message *msg);
Signature · 1 line
2.52.0
#3 lore raw

Re: [PATCH v2 2/5] firmware: tegra: bpmp: Add tegra_bpmp_get_with_id() function

Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Some device tree bindings need to specify a parameter along with a BPMP phandle reference to designate the ID associated with a given controller that needs to interoperate with BPMP. Typically this is specified as an extra cell in the nvidia,bpmp property, so add a helper to parse this ID while resolving the phandle reference.

---
 drivers/firmware/tegra/bpmp.c | 34 ++++++++++++++++++++++++++++++++++
 include/soc/tegra/bpmp.h      |  1 +
 2 files changed, 35 insertions(+)
drivers/firmware/tegra/bpmp.c +0 -0
index e74bba7ccc44..753472b53bd8 100644

drivers/firmware/tegra/bpmp.c channel_to_ops(struct tegra_bpmp_channel *channel) · line 35

Quoted 4 lines
drivers/firmware/tegra/bpmp.c +1 -0
@@ -32,6 +32,40 @@ channel_to_ops(struct tegra_bpmp_channel *channel)
 	return bpmp->soc->ops;
 }
 
+struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int 

*id)

Quoted 41 lines
drivers/firmware/tegra/bpmp.c +33 -0
+{
+	struct platform_device *pdev;
+	struct of_phandle_args args;
+	struct tegra_bpmp *bpmp;
+	int err;
+
+	err = __of_parse_phandle_with_args(dev->of_node, "nvidia,bpmp", NULL,
+					   1, 0, &args);
+	if (err < 0)
+		return ERR_PTR(err);
+
+	pdev = of_find_device_by_node(args.np);
+	if (!pdev) {
+		bpmp = ERR_PTR(-ENODEV);
+		goto put;
+	}
+
+	bpmp = platform_get_drvdata(pdev);
+	if (!bpmp) {
+		bpmp = ERR_PTR(-EPROBE_DEFER);
+		put_device(&pdev->dev);
+		goto put;
+	}
+
+	if (id)
+		*id = args.args[0];
+
+put:
+	of_node_put(args.np);
+	return bpmp;
+}
+EXPORT_SYMBOL_GPL(tegra_bpmp_get_with_id);
+
 struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
 {
 	struct platform_device *pdev;
include/soc/tegra/bpmp.h +0 -0
index f5e4ac5b8cce..424188c100d9 100644

include/soc/tegra/bpmp.h struct tegra_bpmp_message { · line 130

Quoted 4 lines
include/soc/tegra/bpmp.h +1 -0
@@ -127,6 +127,7 @@ struct tegra_bpmp_message {
 
 #if IS_ENABLED(CONFIG_TEGRA_BPMP)
 struct tegra_bpmp *tegra_bpmp_get(struct device *dev);
+struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int 

*id);

Should add a stub function in the #else branch, as well.

Quoted 7 lines
include/soc/tegra/bpmp.h +0 -0
 void tegra_bpmp_put(struct tegra_bpmp *bpmp);
 int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
 			       struct tegra_bpmp_message *msg);
Signature · 1 line
2.52.0
author maintainer
#4 lore raw

Re: [PATCH v2 2/5] firmware: tegra: bpmp: Add tegra_bpmp_get_with_id() function

Quoted 67 lines · Mikko Perttunen
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Some device tree bindings need to specify a parameter along with a BPMP phandle reference to designate the ID associated with a given controller that needs to interoperate with BPMP. Typically this is specified as an extra cell in the nvidia,bpmp property, so add a helper to parse this ID while resolving the phandle reference.

---
 drivers/firmware/tegra/bpmp.c | 34 ++++++++++++++++++++++++++++++++++
 include/soc/tegra/bpmp.h      |  1 +
 2 files changed, 35 insertions(+)
drivers/firmware/tegra/bpmp.c +0 -0
index e74bba7ccc44..753472b53bd8 100644

drivers/firmware/tegra/bpmp.c channel_to_ops(struct tegra_bpmp_channel *channel) · line 35

Quoted 4 lines
drivers/firmware/tegra/bpmp.c +1 -0
@@ -32,6 +32,40 @@ channel_to_ops(struct tegra_bpmp_channel *channel)
 	return bpmp->soc->ops;
 }
 
+struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int 

*id)

Quoted 42 lines
drivers/firmware/tegra/bpmp.c +33 -0
+{
+	struct platform_device *pdev;
+	struct of_phandle_args args;
+	struct tegra_bpmp *bpmp;
+	int err;
+
+	err = __of_parse_phandle_with_args(dev->of_node, "nvidia,bpmp", NULL,
+					   1, 0, &args);
+	if (err < 0)
+		return ERR_PTR(err);
+
+	pdev = of_find_device_by_node(args.np);
+	if (!pdev) {
+		bpmp = ERR_PTR(-ENODEV);
+		goto put;
+	}
+
+	bpmp = platform_get_drvdata(pdev);
+	if (!bpmp) {
+		bpmp = ERR_PTR(-EPROBE_DEFER);
+		put_device(&pdev->dev);
+		goto put;
+	}
+
+	if (id)
+		*id = args.args[0];
+
+put:
+	of_node_put(args.np);
+	return bpmp;
+}
+EXPORT_SYMBOL_GPL(tegra_bpmp_get_with_id);
+
 struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
 {
 	struct platform_device *pdev;
include/soc/tegra/bpmp.h +0 -0
index f5e4ac5b8cce..424188c100d9 100644
@@ -127,6 +127,7 @@ struct tegra_bpmp_message {
 
Quoted 6 lines

include/soc/tegra/bpmp.h struct tegra_bpmp_message {

Quoted 3 lines
include/soc/tegra/bpmp.h +1 -0
 #if IS_ENABLED(CONFIG_TEGRA_BPMP)
 struct tegra_bpmp *tegra_bpmp_get(struct device *dev);
+struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int 

*id);

Should add a stub function in the #else branch, as well.

Good point. Done.

Thierry

author maintainer
#5 lore raw

PATCH v2 3/5 dt-bindings: pci: Document the NVIDIA Tegra264 PCIe controller

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The six PCIe controllers found on Tegra264 are of two types: one is used for the internal GPU and therefore is not connected to a UPHY and the remaining five controllers are typically routed to a PCI slot and have additional controls for the physical link.

While these controllers can be switched into endpoint mode, this binding describes the root complex mode only.

---
Changes in v2:
- move ECAM region first and unify C0 vs. C1-C5
- move unevaluatedProperties to right before the examples
- add description to clarify the two types of controllers
- add examples for C0 and C1-C5

 .../bindings/pci/nvidia,tegra264-pcie.yaml    | 149 ++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml
Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml new file +149 -0
new file mode 100644
index 000000000000..dc4f8725c9f5
@@ -0,0 +1,149 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/nvidia,tegra264-pcie.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra264 PCIe controller
+
+maintainers:
+  - Thierry Reding <[email protected]>
+  - Jon Hunter <[email protected]>
+
+properties:
+  compatible:
+    const: nvidia,tegra264-pcie
+
+  reg:
+    description: |
+      Of the six PCIe controllers found on Tegra264, one (C0) is used for the
+      internal GPU and the other five (C1-C5) are routed to connectors such as
+      PCI or M.2 slots. Therefore the UPHY registers (XPL) exist only for C1
+      through C5, but not for C0.
+    minItems: 4
+    items:
+      - description: ECAM-compatible configuration space
+      - description: application layer registers
+      - description: transaction layer registers
+      - description: privileged transaction layer registers
+      - description: data link/physical layer registers (not available on C0)
+
+  reg-names:
+    minItems: 4
+    items:
+      - const: ecam
+      - const: xal
+      - const: xtl
+      - const: xtl-pri
+      - const: xpl
+
+  interrupts:
+    minItems: 1
+    maxItems: 4
+
+  dma-coherent: true
+
+  nvidia,bpmp:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: |
+      Must contain a pair of phandle (to the BPMP controller node) and
+      controller ID. The following are the controller IDs for each controller:
+
+      0: C0
+      1: C1
+      2: C2
+      3: C3
+      4: C4
+      5: C5
+    items:
+      - items:
+          - description: phandle to the BPMP controller node
+          - description: PCIe controller ID
+            maximum: 5
+
+required:
+  - interrupt-map
+  - interrupt-map-mask
+  - iommu-map
+  - msi-map
+  - nvidia,bpmp
+
+allOf:
+  - $ref: /schemas/pci/pci-host-bridge.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    bus {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      pci@c000000 {
+        compatible = "nvidia,tegra264-pcie";
+        reg = <0xd0 0xb0000000 0x0 0x10000000>,
+              <0x00 0x0c000000 0x0 0x00004000>,
+              <0x00 0x0c004000 0x0 0x00001000>,
+              <0x00 0x0c005000 0x0 0x00001000>;
+        reg-names = "ecam", "xal", "xtl", "xtl-pri";
+        #address-cells = <3>;
+        #size-cells = <2>;
+        device_type = "pci";
+        linux,pci-domain = <0x00>;
+        #interrupt-cells = <0x1>;
+
+        interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+        interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 155 4>,
+                        <0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 156 4>,
+                        <0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 157 4>,
+                        <0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 158 4>;
+
+        iommu-map = <0x0 &smmu2 0x10000 0x10000>;
+        msi-map = <0x0 &its 0x210000 0x10000>;
+        dma-coherent;
+
+        ranges = <0x81000000 0x00 0x84000000 0xd0 0x84000000 0x00 0x00200000>,
+                 <0x82000000 0x00 0x20000000 0x00 0x20000000 0x00 0x08000000>,
+                 <0xc3000000 0xd0 0xc0000000 0xd0 0xc0000000 0x07 0xc0000000>;
+        bus-range = <0x0 0xff>;
+
+        nvidia,bpmp = <&bpmp 0>;
+      };
+    };
+
+  - |
+    bus {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      pci@8400000 {
+        compatible = "nvidia,tegra264-pcie";
+        reg = <0xa8 0xb0000000 0x0 0x10000000>,
+              <0x00 0x08400000 0x0 0x00004000>,
+              <0x00 0x08404000 0x0 0x00001000>,
+              <0x00 0x08405000 0x0 0x00001000>,
+              <0x00 0x08410000 0x0 0x00010000>;
+        reg-names = "ecam", "xal", "xtl", "xtl-pri", "xpl";
+        #address-cells = <3>;
+        #size-cells = <2>;
+        device_type = "pci";
+        linux,pci-domain = <0x01>;
+        #interrupt-cells = <1>;
+        interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+        interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 908 4>,
+                        <0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 909 4>,
+                        <0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 910 4>,
+                        <0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 911 4>;
+
+        iommu-map = <0x0 &smmu1 0x10000 0x10000>;
+        msi-map = <0x0 &its 0x110000 0x10000>;
+        dma-coherent;
+
+        ranges = <0x81000000 0x00 0x84000000 0xa8 0x84000000 0x00 0x00200000>,
+                 <0x82000000 0x00 0x28000000 0x00 0x28000000 0x00 0x08000000>,
+                 <0xc3000000 0xa8 0xc0000000 0xa8 0xc0000000 0x07 0xc0000000>;
+        bus-range = <0x00 0xff>;
+
+        nvidia,bpmp = <&bpmp 1>;
+      };
+    };
Signature · 1 line
2.52.0
maintainer Reviewed-by on v2 3/5
#6 lore raw

Re: [PATCH v2 3/5] dt-bindings: pci: Document the NVIDIA Tegra264 PCIe controller

Quoted 18 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The six PCIe controllers found on Tegra264 are of two types: one is used for the internal GPU and therefore is not connected to a UPHY and the remaining five controllers are typically routed to a PCI slot and have additional controls for the physical link.

While these controllers can be switched into endpoint mode, this binding describes the root complex mode only.

---
Changes in v2:
- move ECAM region first and unify C0 vs. C1-C5
- move unevaluatedProperties to right before the examples
- add description to clarify the two types of controllers
- add examples for C0 and C1-C5

Quoted 4 lines
 .../bindings/pci/nvidia,tegra264-pcie.yaml    | 149 ++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml
author maintainer
#7 lore raw

Re: [PATCH v2 3/5] dt-bindings: pci: Document the NVIDIA Tegra264 PCIe controller

Quoted 20 lines · Rob Herring (Arm)
Quoted 18 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The six PCIe controllers found on Tegra264 are of two types: one is used for the internal GPU and therefore is not connected to a UPHY and the remaining five controllers are typically routed to a PCI slot and have additional controls for the physical link.

While these controllers can be switched into endpoint mode, this binding describes the root complex mode only.

---
Changes in v2:
- move ECAM region first and unify C0 vs. C1-C5
- move unevaluatedProperties to right before the examples
- add description to clarify the two types of controllers
- add examples for C0 and C1-C5

Quoted 6 lines
Quoted 4 lines
 .../bindings/pci/nvidia,tegra264-pcie.yaml    | 149 ++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml

Unfortunately making the ECAM region the first entry causes the DTC to emit a couple of simple_bus_reg warnings, as seen in some more pedantic build tests. I'll revert this back to the oneOf construct from v1.

Thierry

author maintainer
#8 lore raw

PATCH v2 4/5 PCI: tegra: Add Tegra264 support

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

Add a driver for the PCIe controller found on NVIDIA Tegra264 SoCs. The driver is very small, with its main purpose being to set up the address translation registers and then creating a standard PCI host using ECAM.

---
Changes in v2:
- specify generations applicable for PCI_TEGRA driver to avoid confusion
- drop SPDX-FileCopyrightText tag
- rename link_state to link_up to clarify meaning
- replace memset() by an empty initializer
- sanity-check only enable BAR regions
- bring PCI link out of reset in case firmware didn't
- use common wait times instead of defining our own
- use core helpers to parse and print PCI link speed
- fix multi-line comment
- use dev_err_probe() more ubiquitously
- fix probe sequence and error cleanup
- use DEFINE_NOIRQ_DEV_PM_OPS() to avoid warnings for !PM_SUSPEND
- reuse more standard registers and remove unused register definitions
- use %pe and ERR_PTR() to print symbolic errors
- add signed-off-by from Manikanta as the original author
- add myself as author after significantly modifying the driver

 drivers/pci/controller/Kconfig         |  10 +-
 drivers/pci/controller/Makefile        |   1 +
 drivers/pci/controller/pcie-tegra264.c | 527 +++++++++++++++++++++++++
 3 files changed, 537 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pci/controller/pcie-tegra264.c
drivers/pci/controller/Kconfig +9 -1
index e72ac6934379..b60c6768d422 100644
@@ -255,7 +255,15 @@ config PCI_TEGRA
 	select IRQ_MSI_LIB
 	help
 	  Say Y here if you want support for the PCIe host controller found
-	  on NVIDIA Tegra SoCs.
+	  on NVIDIA Tegra SoCs (Tegra20 through Tegra186).
+
+config PCIE_TEGRA264
+	bool "NVIDIA Tegra264 PCIe controller"
+	depends on ARCH_TEGRA || COMPILE_TEST
+	depends on PCI_MSI
+	help
+	  Say Y here if you want support for the PCIe host controller found
+	  on NVIDIA Tegra264 SoCs.
 
 config PCIE_RCAR_HOST
 	bool "Renesas R-Car PCIe controller (host mode)"
drivers/pci/controller/Makefile +1 -0
index ac8db283f0fe..d478743b5142 100644
@@ -7,6 +7,7 @@ obj-$(CONFIG_PCI_HYPERV_INTERFACE) += pci-hyperv-intf.o
 obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
 obj-$(CONFIG_PCI_AARDVARK) += pci-aardvark.o
 obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
+obj-$(CONFIG_PCIE_TEGRA264) += pcie-tegra264.o
 obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
 obj-$(CONFIG_PCIE_RCAR_HOST) += pcie-rcar.o pcie-rcar-host.o
 obj-$(CONFIG_PCIE_RCAR_EP) += pcie-rcar.o pcie-rcar-ep.o
drivers/pci/controller/pcie-tegra264.c new file +527 -0

527 lines not on this page · raw message

Signature · 1 line
2.52.0
#9 lore raw
kernel test robot noticed the following build errors:

Hi Thierry,

kernel test robot noticed the following build errors:

[auto build test ERROR on tegra/for-next]
[also build test ERROR on next-20260323]
[cannot apply to pci/next pci/for-linus drm-tegra/drm/tegra/for-next linus/master v7.0-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Thierry-Reding/soc-tegra-Update-BPMP-ABI-header/20260323-093336
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
patch link:    https://lore.kernel.org/r/20260320225443.2571920-5-thierry.reding%40kernel.org
patch subject: [PATCH v2 4/5] PCI: tegra: Add Tegra264 support
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260324/[email protected]/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260324/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/pci/controller/pcie-tegra264.c:302:16: error: use of undeclared identifier 'PCIE_LINK_WAIT_US_MIN'
                   usleep_range(PCIE_LINK_WAIT_US_MIN, PCIE_LINK_WAIT_US_MAX);
                                ^
>> drivers/pci/controller/pcie-tegra264.c:302:39: error: use of undeclared identifier 'PCIE_LINK_WAIT_US_MAX'
                   usleep_range(PCIE_LINK_WAIT_US_MIN, PCIE_LINK_WAIT_US_MAX);
                                                       ^
   drivers/pci/controller/pcie-tegra264.c:392:16: error: call to undeclared function 'tegra_bpmp_get_with_id'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   pcie->bpmp = tegra_bpmp_get_with_id(dev, &pcie->ctl_id);
                                ^
   drivers/pci/controller/pcie-tegra264.c:392:14: error: incompatible integer to pointer conversion assigning to 'struct tegra_bpmp *' from 'int' [-Wint-conversion]
                   pcie->bpmp = tegra_bpmp_get_with_id(dev, &pcie->ctl_id);
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4 errors generated.

vim +/PCIE_LINK_WAIT_US_MIN +302 drivers/pci/controller/pcie-tegra264.c

278
279 static void tegra264_pcie_init(struct tegra264_pcie *pcie)
280 {
281 enum pci_bus_speed speed;
282 unsigned int i;
283 u32 value;
284
285 /* bring the link out of reset */
286 value = readl(pcie->xtl + XTL_RC_MGMT_PERST_CONTROL);
287 value |= XTL_RC_MGMT_PERST_CONTROL_PERST_O_N;
288 writel(value, pcie->xtl + XTL_RC_MGMT_PERST_CONTROL);
289
290 if (!tegra_is_silicon()) {
291 dev_info(pcie->dev,
292 "skipping link state for PCIe #%u in simulation\n",
293 pcie->ctl_id);
294 pcie->link_up = true;
295 return;
296 }
297
298 for (i = 0; i < PCIE_LINK_WAIT_MAX_RETRIES; i++) {
299 if (tegra264_pcie_link_up(pcie, NULL))
300 break;
301

 > 302			usleep_range(PCIE_LINK_WAIT_US_MIN, PCIE_LINK_WAIT_US_MAX);

303 }
304
305 if (tegra264_pcie_link_up(pcie, &speed)) {
306 /* Per PCIe r5.0, 6.6.1 wait for 100ms after DLL up */
307 msleep(PCIE_RESET_CONFIG_WAIT_MS);
308
309 dev_info(pcie->dev, "PCIe #%u link is up (speed: %s)\n",
310 pcie->ctl_id, pci_speed_string(speed));
311 tegra264_pcie_icc_set(pcie);
312 pcie->link_up = true;
313 } else {
314 dev_info(pcie->dev, "PCIe #%u link is down\n", pcie->ctl_id);
315
316 value = readl(pcie->xtl + XTL_RC_MGMT_CLOCK_CONTROL);
317
318 /*
319 * Set link state only when link fails and no hot-plug feature
320 * is present.
321 */
322 if ((value & XTL_RC_MGMT_CLOCK_CONTROL_PEX_CLKREQ_I_N_PIN_USE_CONV_TO_PRSNT) == 0) {
323 dev_info(pcie->dev,
324 "PCIe #%u link is down and not hotplug-capable, turning off\n",
325 pcie->ctl_id);
326 tegra264_pcie_bpmp_set_rp_state(pcie);
327 pcie->link_up = false;
328 } else {
329 pcie->link_up = true;
330 }
331 }
332 }
333

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#10 lore raw
In reply to Thierry Reding
Quoted 7 lines · Thierry Reding
drivers/pci/controller/pcie-tegra264.c new file +0 -0
new file mode 100644
index 000000000000..3ce1ad971bdb
@@ -0,0 +1,527 @@

[ ... skip 123 lines ... ]

drivers/pci/controller/pcie-tegra264.c line 132

Quoted 9 lines
drivers/pci/controller/pcie-tegra264.c new file +9 -0
+	err = tegra_bpmp_transfer(pcie->bpmp, &msg);
+	if (err)
+		dev_info(pcie->dev, "failed to turn off PCIe #%u: %pe\n",
+			 pcie->ctl_id, ERR_PTR(err));
+
+	if (msg.rx.ret)
+		dev_info(pcie->dev, "failed to turn off PCIe #%u: %d\n",
+			 pcie->ctl_id, msg.rx.ret);
+}

Ideally we would distinguish by message in these two cases. I suppose the %pe vs. %d does that, but it's not quite obvious.

drivers/pci/controller/pcie-tegra264.c line 143

Quoted 11 lines
drivers/pci/controller/pcie-tegra264.c new file +11 -0
+
+static void tegra264_pcie_icc_set(struct tegra264_pcie *pcie)
+{
+	u32 value, speed, width, bw;
+	int err;
+
+	value = readw(pcie->ecam + XTL_RC_PCIE_CFG_LINK_STATUS);
+	speed = FIELD_GET(PCI_EXP_LNKSTA_CLS, value);
+	width = FIELD_GET(PCI_EXP_LNKSTA_NLW, value);
+
+	bw = width * (PCIE_SPEED2MBS_ENC(speed) / BITS_PER_BYTE);

PCIE_SPEED2MBS_ENC takes enum pci_bus_speed values rather than LNKSTA_CLS values. Perhaps it should be converted to a static inline function to catch such issues.

drivers/pci/controller/pcie-tegra264.c line 144

Quoted 1 line
drivers/pci/controller/pcie-tegra264.c new file +1 -0
+	value = MBps_to_icc(bw);

The result of this is unused.

drivers/pci/controller/pcie-tegra264.c line 421

Quoted 7 lines

[ ... skip 271 lines ... ]

drivers/pci/controller/pcie-tegra264.c new file +6 -0
+	pcie->ecam = pcie->cfg->win;
+
+	tegra264_pcie_init(pcie);
+
+	if (!pcie->link_up)
+		goto free;

This path causes things to be freed, but the driver still probes. The remove callback will then try to remove things again.

Thanks
Mikko

author maintainer
#11 lore raw
Quoted 12 lines · Mikko Perttunen
Quoted 11 lines · Thierry Reding
drivers/pci/controller/pcie-tegra264.c new file +0 -0
new file mode 100644
index 000000000000..3ce1ad971bdb
@@ -0,0 +1,527 @@

[ ... skip 123 lines ... ]

drivers/pci/controller/pcie-tegra264.c new file +4 -0
+	err = tegra_bpmp_transfer(pcie->bpmp, &msg);
+	if (err)
+		dev_info(pcie->dev, "failed to turn off PCIe #%u: %pe\n",
+			 pcie->ctl_id, ERR_PTR(err));
Quoted 8 lines

drivers/pci/controller/pcie-tegra264.c line 132

Quoted 5 lines
drivers/pci/controller/pcie-tegra264.c new file +5 -0
+
+	if (msg.rx.ret)
+		dev_info(pcie->dev, "failed to turn off PCIe #%u: %d\n",
+			 pcie->ctl_id, msg.rx.ret);
+}

Ideally we would distinguish by message in these two cases. I suppose the %pe vs. %d does that, but it's not quite obvious.

Agreed. I think something like:

"BPMP transfer failed for PCIe #%u: %pe"

would work better for the first message. That's roughly in line with other error messages for BPMP message transfer errors (as opposed to the errors returned from BPMP as a result of a successful transfer).

Quoted 16 lines

drivers/pci/controller/pcie-tegra264.c line 143

Quoted 12 lines
drivers/pci/controller/pcie-tegra264.c new file +11 -0
+
+static void tegra264_pcie_icc_set(struct tegra264_pcie *pcie)
+{
+	u32 value, speed, width, bw;
+	int err;
+
+	value = readw(pcie->ecam + XTL_RC_PCIE_CFG_LINK_STATUS);
+	speed = FIELD_GET(PCI_EXP_LNKSTA_CLS, value);
+	width = FIELD_GET(PCI_EXP_LNKSTA_NLW, value);
+
+	bw = width * (PCIE_SPEED2MBS_ENC(speed) / BITS_PER_BYTE);

PCIE_SPEED2MBS_ENC takes enum pci_bus_speed values rather than LNKSTA_CLS values. Perhaps it should be converted to a static inline function to catch such issues.

Nice catch. speed should be indexing pcie_link_speed to get the right enum value. I've fixed that up.

Quoted 4 lines

drivers/pci/controller/pcie-tegra264.c line 144

Quoted 2 lines
drivers/pci/controller/pcie-tegra264.c new file +1 -0
+	value = MBps_to_icc(bw);

The result of this is unused.

Ugh... this is supposed to be the value that's passed to icc_set_bw() but I forgot to plumb that through. Fixed now.

Quoted 11 lines

drivers/pci/controller/pcie-tegra264.c line 421

Quoted 8 lines

[ ... skip 271 lines ... ]

drivers/pci/controller/pcie-tegra264.c new file +6 -0
+	pcie->ecam = pcie->cfg->win;
+
+	tegra264_pcie_init(pcie);
+
+	if (!pcie->link_up)
+		goto free;

This path causes things to be freed, but the driver still probes. The remove callback will then try to remove things again.

I think the intent of the original code was to allow the driver to continue to probe, so that the root complex would show up, but with no devices enumerated. I don't know if we really need that, since we also have no hotplug support there's never going to be any devices added to the bus if the initial link up fails, as far as I can tell. I'll turn this into a failure for now, we can revisit this if we ever need hotplug support.

Thanks,
Thierry

author maintainer
#12 lore raw

PATCH v2 5/5 arm64: tegra: Add PCI controllers on Tegra264

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

A total of six PCIe controllers can be found on Tegra264. One of them is used internally for the integrated GPU while the other five can go to a variety of connectors like full PCIe slots or M.2.

---
Changes in v2:
- order ECAM "reg" entry before others

 arch/arm64/boot/dts/nvidia/tegra264.dtsi | 248 ++++++++++++++++++++---
 1 file changed, 221 insertions(+), 27 deletions(-)
arch/arm64/boot/dts/nvidia/tegra264.dtsi +221 -27
index 24cc2c51a272..5e76799e01e5 100644
@@ -32,7 +32,7 @@ bus@0 {
 		#address-cells = <2>;
 		#size-cells = <2>;
 
-		ranges = <0x00 0x00000000 0x00 0x00000000 0x01 0x00000000>;
+		ranges = <0x00 0x00000000 0x00 0x00000000 0x00 0x20000000>; /* MMIO (512 MiB) */
 
 		misc@100000 {
 			compatible = "nvidia,tegra234-misc";
@@ -3356,9 +3356,10 @@ bus@8100000000 {
 		#address-cells = <2>;
 		#size-cells = <2>;
 
-		ranges = <0x00 0x00000000 0x81 0x00000000 0x01 0x00000000>, /* MMIO */
-			 <0x01 0x00000000 0x00 0x20000000 0x00 0x40000000>, /* non-prefetchable memory (32-bit) */
-			 <0x02 0x00000000 0xd0 0x00000000 0x08 0x80000000>; /* ECAM, prefetchable memory, I/O */
+		ranges = <0x00 0x00000000 0x81 0x00000000 0x00 0x20000000>, /* MMIO (512 MiB) */
+			 <0x00 0x20000000 0x00 0x20000000 0x00 0x20000000>, /* non-prefetchable memory (32-bit, 512 MiB) */
+			 <0x00 0x40000000 0x81 0x40000000 0x00 0x20000000>, /* MMIO (512 MiB) */
+			 <0xa8 0x80000000 0xa8 0x80000000 0x57 0x80000000>; /* I/O, ECAM, prefetchable memory (64-bit) */
 
 		smmu1: iommu@5000000 {
 			compatible = "nvidia,tegra264-smmu", "arm,smmu-v3";
@@ -3402,23 +3403,23 @@ cmdqv2: cmdqv@6200000 {
 
 		mc: memory-controller@8020000 {
 			compatible = "nvidia,tegra264-mc";
-			reg = <0x00 0x8020000 0x0 0x20000>, /* MC broadcast */
-			      <0x00 0x8040000 0x0 0x20000>, /* MC  0 */
-			      <0x00 0x8060000 0x0 0x20000>, /* MC  1 */
-			      <0x00 0x8080000 0x0 0x20000>, /* MC  2 */
-			      <0x00 0x80a0000 0x0 0x20000>, /* MC  3 */
-			      <0x00 0x80c0000 0x0 0x20000>, /* MC  4 */
-			      <0x00 0x80e0000 0x0 0x20000>, /* MC  5 */
-			      <0x00 0x8100000 0x0 0x20000>, /* MC  6 */
-			      <0x00 0x8120000 0x0 0x20000>, /* MC  7 */
-			      <0x00 0x8140000 0x0 0x20000>, /* MC  8 */
-			      <0x00 0x8160000 0x0 0x20000>, /* MC  9 */
-			      <0x00 0x8180000 0x0 0x20000>, /* MC 10 */
-			      <0x00 0x81a0000 0x0 0x20000>, /* MC 11 */
-			      <0x00 0x81c0000 0x0 0x20000>, /* MC 12 */
-			      <0x00 0x81e0000 0x0 0x20000>, /* MC 13 */
-			      <0x00 0x8200000 0x0 0x20000>, /* MC 14 */
-			      <0x00 0x8220000 0x0 0x20000>; /* MC 15 */
+			reg = <0x000 0x8020000 0x0 0x20000>, /* MC broadcast */
+			      <0x000 0x8040000 0x0 0x20000>, /* MC  0 */
+			      <0x000 0x8060000 0x0 0x20000>, /* MC  1 */
+			      <0x000 0x8080000 0x0 0x20000>, /* MC  2 */
+			      <0x000 0x80a0000 0x0 0x20000>, /* MC  3 */
+			      <0x000 0x80c0000 0x0 0x20000>, /* MC  4 */
+			      <0x000 0x80e0000 0x0 0x20000>, /* MC  5 */
+			      <0x000 0x8100000 0x0 0x20000>, /* MC  6 */
+			      <0x000 0x8120000 0x0 0x20000>, /* MC  7 */
+			      <0x000 0x8140000 0x0 0x20000>, /* MC  8 */
+			      <0x000 0x8160000 0x0 0x20000>, /* MC  9 */
+			      <0x000 0x8180000 0x0 0x20000>, /* MC 10 */
+			      <0x000 0x81a0000 0x0 0x20000>, /* MC 11 */
+			      <0x000 0x81c0000 0x0 0x20000>, /* MC 12 */
+			      <0x000 0x81e0000 0x0 0x20000>, /* MC 13 */
+			      <0x000 0x8200000 0x0 0x20000>, /* MC 14 */
+			      <0x000 0x8220000 0x0 0x20000>; /* MC 15 */
 			reg-names = "broadcast", "ch0", "ch1", "ch2", "ch3",
 				    "ch4", "ch5", "ch6", "ch7", "ch8", "ch9",
 				    "ch10", "ch11", "ch12", "ch13", "ch14",
@@ -3437,12 +3438,12 @@ mc: memory-controller@8020000 {
 			#size-cells = <2>;
 
 			/* limit the DMA range for memory clients to [39:0] */
-			dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;
+			dma-ranges = <0x000 0x0 0x000 0x0 0x100 0x0>;
 
 			emc: external-memory-controller@8800000 {
 				compatible = "nvidia,tegra264-emc";
-				reg = <0x00 0x8800000 0x0 0x20000>,
-				      <0x00 0x8890000 0x0 0x20000>;
+				reg = <0x000 0x8800000 0x0 0x20000>,
+				      <0x000 0x8890000 0x0 0x20000>;
 				interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&bpmp TEGRA264_CLK_EMC>,
 					 <&bpmp TEGRA264_CLK_DBB_UPHY0>;
@@ -3493,6 +3494,38 @@ cmdqv4: cmdqv@b200000 {
 			status = "disabled";
 		};
 
+		pci@c000000 {
+			compatible = "nvidia,tegra264-pcie";
+			reg = <0xd0 0xb0000000 0x0 0x10000000>,
+			      <0x00 0x0c000000 0x0 0x00004000>,
+			      <0x00 0x0c004000 0x0 0x00001000>,
+			      <0x00 0x0c005000 0x0 0x00001000>;
+			reg-names = "ecam", "xal", "xtl", "xtl-pri";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			linux,pci-domain = <0x00>;
+			#interrupt-cells = <0x1>;
+
+			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 155 IRQ_TYPE_LEVEL_HIGH>,
+					<0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 156 IRQ_TYPE_LEVEL_HIGH>,
+					<0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 157 IRQ_TYPE_LEVEL_HIGH>,
+					<0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 158 IRQ_TYPE_LEVEL_HIGH>;
+
+			iommu-map = <0x0 &smmu2 0x10000 0x10000>;
+			msi-map = <0x0 &its 0x210000 0x10000>;
+			dma-coherent;
+
+			ranges = <0x81000000 0x00 0x84000000 0xd0 0x84000000 0x00 0x00200000>, /* I/O */
+				 <0x82000000 0x00 0x20000000 0x00 0x20000000 0x00 0x08000000>, /* non-prefetchable memory (128 MiB) */
+				 <0xc3000000 0xd0 0xc0000000 0xd0 0xc0000000 0x07 0xc0000000>; /* prefetchable memory */
+			bus-range = <0x0 0xff>;
+
+			nvidia,bpmp = <&bpmp 0>;
+			status = "disabled";
+		};
+
 		i2c14: i2c@c410000 {
 			compatible = "nvidia,tegra264-i2c";
 			reg = <0x00 0x0c410000 0x0 0x10000>;
@@ -3720,7 +3753,7 @@ bus@8800000000 {
 		#address-cells = <2>;
 		#size-cells = <2>;
 
-		ranges = <0x00 0x00000000 0x88 0x00000000 0x01 0x00000000>;
+		ranges = <0x00 0x00000000 0x88 0x00000000 0x00 0x20000000>; /* MMIO (512 MiB) */
 
 		smmu3: iommu@6000000 {
 			compatible = "nvidia,tegra264-smmu", "arm,smmu-v3";
@@ -3765,8 +3798,169 @@ bus@a800000000 {
 		#address-cells = <2>;
 		#size-cells = <2>;
 
-		ranges = <0x00 0x00000000 0xa8 0x00000000 0x40 0x00000000>, /* MMIO, ECAM, prefetchable memory, I/O */
-			 <0x80 0x00000000 0x00 0x20000000 0x00 0x40000000>; /* non-prefetchable memory (32-bit) */
+		ranges = <0x00 0x00000000 0xa8 0x00000000 0x00 0x20000000>, /* MMIO (512 MiB) */
+			 <0x00 0x20000000 0x00 0x20000000 0x00 0x60000000>, /* non-prefetchable memory (32-bit, 1536 GiB) */
+			 <0xa8 0x80000000 0xa8 0x80000000 0x57 0x80000000>; /* I/O, ECAM, prefetchable memory (64-bit) */
+
+		pci@8400000 {
+			compatible = "nvidia,tegra264-pcie";
+			reg = <0xa8 0xb0000000 0x0 0x10000000>,
+			      <0x00 0x08400000 0x0 0x00004000>,
+			      <0x00 0x08404000 0x0 0x00001000>,
+			      <0x00 0x08405000 0x0 0x00001000>,
+			      <0x00 0x08410000 0x0 0x00010000>;
+			reg-names = "ecam", "xal", "xtl", "xtl-pri", "xpl";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			linux,pci-domain = <0x01>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 908 IRQ_TYPE_LEVEL_HIGH>, /* INTA */
+					<0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 909 IRQ_TYPE_LEVEL_HIGH>, /* INTB */
+					<0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 910 IRQ_TYPE_LEVEL_HIGH>, /* INTC */
+					<0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 911 IRQ_TYPE_LEVEL_HIGH>; /* INTD */
+
+			iommu-map = <0x0 &smmu1 0x10000 0x10000>;
+			msi-map = <0x0 &its 0x110000 0x10000>;
+			dma-coherent;
+
+			ranges = <0x81000000 0x00 0x84000000 0xa8 0x84000000 0x00 0x00200000>, /* I/O */
+				 <0x82000000 0x00 0x28000000 0x00 0x28000000 0x00 0x08000000>, /* non-prefetchable memory */
+				 <0xc3000000 0xa8 0xc0000000 0xa8 0xc0000000 0x07 0xc0000000>; /* prefetchable memory */
+			bus-range = <0x00 0xff>;
+
+			nvidia,bpmp = <&bpmp 1>;
+			status = "disabled";
+		};
+
+		pci@8420000 {
+			compatible = "nvidia,tegra264-pcie";
+			reg = <0xb0 0xb0000000 0x0 0x10000000>,
+			      <0x00 0x08420000 0x0 0x00004000>,
+			      <0x00 0x08424000 0x0 0x00001000>,
+			      <0x00 0x08425000 0x0 0x00001000>,
+			      <0x00 0x08430000 0x0 0x00010000>;
+			reg-names = "ecam", "xal", "xtl", "xtl-pri", "xpl";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			linux,pci-domain = <0x02>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 917 IRQ_TYPE_LEVEL_HIGH>, /* INTA */
+					<0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 918 IRQ_TYPE_LEVEL_HIGH>, /* INTB */
+					<0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 919 IRQ_TYPE_LEVEL_HIGH>, /* INTC */
+					<0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 920 IRQ_TYPE_LEVEL_HIGH>; /* INTD */
+
+			iommu-map = <0x0 &smmu1 0x20000 0x10000>;
+			msi-map = <0x0 &its 0x120000 0x10000>;
+			dma-coherent;
+
+			ranges = <0x81000000 0x00 0x84000000 0xb0 0x84000000 0x00 0x00200000>, /* I/O */
+				 <0x82000000 0x00 0x30000000 0x00 0x30000000 0x00 0x08000000>, /* non-prefetchable memory */
+				 <0xc3000000 0xb0 0xc0000000 0xb0 0xc0000000 0x07 0xc0000000>; /* prefetchable memory */
+			bus-range = <0x00 0xff>;
+
+			nvidia,bpmp = <&bpmp 2>;
+			status = "disabled";
+		};
+
+		pci@8440000 {
+			compatible = "nvidia,tegra264-pcie";
+			reg = <0xb8 0xb0000000 0x0 0x10000000>,
+			      <0x00 0x08440000 0x0 0x00004000>,
+			      <0x00 0x08444000 0x0 0x00001000>,
+			      <0x00 0x08445000 0x0 0x00001000>,
+			      <0x00 0x08450000 0x0 0x00010000>;
+			reg-names = "ecam", "xal", "xtl", "xtl-pri", "xpl";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			linux,pci-domain = <0x03>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 926 IRQ_TYPE_LEVEL_HIGH>, /* INTA */
+					<0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 927 IRQ_TYPE_LEVEL_HIGH>, /* INTB */
+					<0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 928 IRQ_TYPE_LEVEL_HIGH>, /* INTC */
+					<0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 929 IRQ_TYPE_LEVEL_HIGH>; /* INTD */
+
+			iommu-map = <0x0 &smmu1 0x30000 0x10000>;
+			msi-map = <0x0 &its 0x130000 0x10000>;
+			dma-coherent;
+
+			ranges = <0x81000000 0x00 0x84000000 0xb8 0x84000000 0x00 0x00200000>, /* I/O */
+				 <0x82000000 0x00 0x38000000 0x00 0x38000000 0x00 0x08000000>, /* non-prefetchable memory */
+				 <0xc3000000 0xb8 0xc0000000 0xb8 0xc0000000 0x07 0xc0000000>; /* prefetchable memory */
+			bus-range = <0x00 0xff>;
+
+			nvidia,bpmp = <&bpmp 3>;
+			status = "disabled";
+		};
+
+		pci@8460000 {
+			compatible = "nvidia,tegra264-pcie";
+			reg = <0xc0 0xb0000000 0x0 0x10000000>,
+			      <0x00 0x08460000 0x0 0x00004000>,
+			      <0x00 0x08464000 0x0 0x00001000>,
+			      <0x00 0x08465000 0x0 0x00001000>,
+			      <0x00 0x08470000 0x0 0x00010000>;
+			reg-names = "ecam", "xal", "xtl", "xtl-pri", "xpl";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			linux,pci-domain = <0x04>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 935 IRQ_TYPE_LEVEL_HIGH>, /* INTA */
+					<0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 936 IRQ_TYPE_LEVEL_HIGH>, /* INTB */
+					<0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 937 IRQ_TYPE_LEVEL_HIGH>, /* INTC */
+					<0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 938 IRQ_TYPE_LEVEL_HIGH>; /* INTD */
+
+			iommu-map = <0x0 &smmu1 0x40000 0x10000>;
+			msi-map = <0x0 &its 0x140000 0x10000>;
+			dma-coherent;
+
+			ranges = <0x81000000 0x00 0x84000000 0xc0 0x84000000 0x00 0x00200000>, /* I/O */
+				 <0x82000000 0x00 0x40000000 0x00 0x40000000 0x00 0x08000000>, /* non-prefetchable memory */
+				 <0xc3000000 0xc0 0xc0000000 0xc0 0xc0000000 0x07 0xc0000000>; /* prefetchable memory */
+			bus-range = <0x00 0xff>;
+
+			nvidia,bpmp = <&bpmp 4>;
+			status = "disabled";
+		};
+
+		pci@8480000 {
+			compatible = "nvidia,tegra264-pcie";
+			reg = <0xc8 0xb0000000 0x0 0x10000000>,
+			      <0x00 0x08480000 0x0 0x00004000>,
+			      <0x00 0x08484000 0x0 0x00001000>,
+			      <0x00 0x08485000 0x0 0x00001000>,
+			      <0x00 0x08490000 0x0 0x00010000>;
+			reg-names = "ecam", "xal", "xtl", "xtl-pri", "xpl";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			linux,pci-domain = <0x05>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 944 IRQ_TYPE_LEVEL_HIGH>, /* INTA */
+					<0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 945 IRQ_TYPE_LEVEL_HIGH>, /* INTB */
+					<0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 946 IRQ_TYPE_LEVEL_HIGH>, /* INTC */
+					<0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 947 IRQ_TYPE_LEVEL_HIGH>; /* INTD */
+
+			iommu-map = <0x0 &smmu1 0x50000 0x10000>;
+			msi-map = <0x0 &its 0x150000 0x10000>;
+			dma-coherent;
+
+			ranges = <0x81000000 0x00 0x84000000 0xc8 0x84000000 0x00 0x00200000>, /* I/O */
+				 <0x82000000 0x00 0x48000000 0x00 0x48000000 0x00 0x08000000>, /* non-prefetchable memory */
+				 <0xc3000000 0xc8 0xc0000000 0xc8 0xc0000000 0x07 0xc0000000>; /* prefetchable memory */
+			bus-range = <0x00 0xff>;
+
+			nvidia,bpmp = <&bpmp 5>;
+			status = "disabled";
+		};
 	};
 
 	cpus {
Signature · 1 line
2.52.0