Skip to contentSkip to conversation

firmware: tegra: bpmp: Add ACPI and MBWT support

PATCH Applied Aniruddha Rao 3 participants 12 messages Sep 29 – Nov 6 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

v5 cover firmware: tegra: bpmp: Add ACPI and MBWT support

This series adds ACPI support to the Tegra BPMP driver and support for Memory Bandwidth Throttler (MBWT) controls exposed by BPMP firmware of some Tegra platforms.

The current BPMP driver depends on device tree bindings. This series keeps the existing DT path unchanged while adding an ACPI transport path for BPMP firmware requests.

MBWT controls are accessed through BPMP firmware requests. This series defines the MBWT BPMP ABI, adds MBWT helper functions, and exposes a narrow sysfs interface when firmware reports support for the required MBWT requests.

Aniruddha Rao (5):
firmware: tegra: bpmp: Move channel initialization to helper
firmware: tegra: bpmp: Add ACPI support
firmware: tegra: bpmp: Add the Memory Bandwidth Throttler ABI
definitions
firmware: tegra: bpmp: Add MBWT BPMP helpers
firmware: tegra: bpmp: Add MBWT sysfs interface

 .../ABI/testing/sysfs-platform-tegra-bpmp     |  48 ++
 drivers/firmware/tegra/Makefile               |   1 +
 drivers/firmware/tegra/bpmp-private.h         |  39 ++
 drivers/firmware/tegra/bpmp-sysfs.c           | 207 +++++++++
 drivers/firmware/tegra/bpmp-tegra186.c        |  14 +
 drivers/firmware/tegra/bpmp-tegra210.c        |  13 +-
 drivers/firmware/tegra/bpmp.c                 | 415 +++++++++++++++---
 include/soc/tegra/bpmp-abi.h                  | 161 ++++++-
 include/soc/tegra/bpmp.h                      |   2 +
 9 files changed, 849 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-tegra-bpmp
 create mode 100644 drivers/firmware/tegra/bpmp-sysfs.c

Changes since v4:
- Move BPMP channel allocation and ping setup/teardown into the SoC-specific init/deinit operations.
- Add an optional init_providers operation for DT child and provider registration after BPMP communication is established and the firmware tag is read.
- Add an ACPI BPMP init operation for the BMRQ ping path.
- Remove ACPI-specific setup and teardown conditionals from the common probe path.
- Drop the redundant NULL check after device_get_match_data().
- Explain the transport and provider initialization phases in the ACPI support commit message.
- Explain why DT registers an incoming MRQ_PING handler while ACPI only sends an outgoing ping request.
- Describe MBWT bandwidth groups and traffic types with platform data so firmware instance and VC type values can vary between platforms.
- Document the sysfs hierarchy using platform-defined bandwidth-group and traffic-type names.

Changes since v3:
- Update the sysfs ABI Documentation date to September 2026 and target release to 7.4.

Changes since v2:
- Rename the non-ACPI transfer helper to tegra_bpmp_transfer_channel().
- Keep the common BPMP message validation in tegra_bpmp_transfer().
- Remove duplicate message validation from the ACPI transfer helper.
- Move the MBWT helpers near probe and document why they are needed.
- Rename bpmp-tegra-sysfs.c to bpmp-sysfs.c.

Changes since v1:
- Dropped the SoC Kconfig patch.
- Kept the existing DT path unchanged while adding ACPI support.
- Reworked ACPI matching to avoid a dummy ops table.
- Added explicit error handling for short ACPI BMRQ responses.
- Folded MBWT helpers into bpmp.c.
- Reworked MBWT sysfs into per-traffic bandwidth attributes.
- Removed software bandwidth range checks.
- Use NVCLINK consistently in commit messages and documentation.
- Avoid platform-specific or transport-specific MBWT wording.

Signature · 1 line
2.43.0
#1 lore raw

PATCH v5 1/5 firmware: tegra: bpmp: Move channel initialization to helper

Move BPMP channel allocation and initialization into a helper.

This keeps the probe function focused on sequencing.

It also lets later patches decide whether mailbox/IVC setup is needed.

No functional change is intended.

---
Changes since v4:
- No change.

Changes since v3:
- No change.

Changes since v2:
- No change.

Changes since v1:
- Keep OF resource initialization in tegra_bpmp_probe().
- Move only BPMP channel allocation and initialization into a helper.

 drivers/firmware/tegra/bpmp.c | 44 +++++++++++++++++++++--------------
 1 file changed, 27 insertions(+), 17 deletions(-)
drivers/firmware/tegra/bpmp.c +27 -17
index 753472b53bd8..0eb99b1c5068 100644
@@ -733,19 +733,9 @@ void tegra_bpmp_handle_rx(struct tegra_bpmp *bpmp)
 	spin_unlock(&bpmp->lock);
 }
 
-static int tegra_bpmp_probe(struct platform_device *pdev)
+static int tegra_bpmp_init_channels(struct tegra_bpmp *bpmp)
 {
-	struct tegra_bpmp *bpmp;
-	char tag[TAG_SZ];
 	size_t size;
-	int err;
-
-	bpmp = devm_kzalloc(&pdev->dev, sizeof(*bpmp), GFP_KERNEL);
-	if (!bpmp)
-		return -ENOMEM;
-
-	bpmp->soc = of_device_get_match_data(&pdev->dev);
-	bpmp->dev = &pdev->dev;
 
 	INIT_LIST_HEAD(&bpmp->mrqs);
 	spin_lock_init(&bpmp->lock);
@@ -755,31 +745,51 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
 
 	size = BITS_TO_LONGS(bpmp->threaded.count) * sizeof(long);
 
-	bpmp->threaded.allocated = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
+	bpmp->threaded.allocated = devm_kzalloc(bpmp->dev, size, GFP_KERNEL);
 	if (!bpmp->threaded.allocated)
 		return -ENOMEM;
 
-	bpmp->threaded.busy = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
+	bpmp->threaded.busy = devm_kzalloc(bpmp->dev, size, GFP_KERNEL);
 	if (!bpmp->threaded.busy)
 		return -ENOMEM;
 
 	spin_lock_init(&bpmp->atomic_tx_lock);
-	bpmp->tx_channel = devm_kzalloc(&pdev->dev, sizeof(*bpmp->tx_channel),
+	bpmp->tx_channel = devm_kzalloc(bpmp->dev, sizeof(*bpmp->tx_channel),
 					GFP_KERNEL);
 	if (!bpmp->tx_channel)
 		return -ENOMEM;
 
-	bpmp->rx_channel = devm_kzalloc(&pdev->dev, sizeof(*bpmp->rx_channel),
-	                                GFP_KERNEL);
+	bpmp->rx_channel = devm_kzalloc(bpmp->dev, sizeof(*bpmp->rx_channel),
+					GFP_KERNEL);
 	if (!bpmp->rx_channel)
 		return -ENOMEM;
 
-	bpmp->threaded_channels = devm_kcalloc(&pdev->dev, bpmp->threaded.count,
+	bpmp->threaded_channels = devm_kcalloc(bpmp->dev, bpmp->threaded.count,
 					       sizeof(*bpmp->threaded_channels),
 					       GFP_KERNEL);
 	if (!bpmp->threaded_channels)
 		return -ENOMEM;
 
+	return 0;
+}
+
+static int tegra_bpmp_probe(struct platform_device *pdev)
+{
+	struct tegra_bpmp *bpmp;
+	char tag[TAG_SZ];
+	int err;
+
+	bpmp = devm_kzalloc(&pdev->dev, sizeof(*bpmp), GFP_KERNEL);
+	if (!bpmp)
+		return -ENOMEM;
+
+	bpmp->soc = of_device_get_match_data(&pdev->dev);
+	bpmp->dev = &pdev->dev;
+
+	err = tegra_bpmp_init_channels(bpmp);
+	if (err < 0)
+		return err;
+
 	platform_set_drvdata(pdev, bpmp);
 
 	err = bpmp->soc->ops->init(bpmp);
Signature · 1 line
2.43.0
#2 lore raw

PATCH v5 2/5 firmware: tegra: bpmp: Add ACPI support

In reply to Aniruddha Rao

Add required changes in the Tegra BPMP driver to make it compatible with ACPI-based platforms.

On ACPI systems, IPC is handled through an AML method instead of the kernel mailbox and IVC frameworks.

Clock, reset and power-domain providers are not controlled by the Linux BPMP driver on ACPI-based systems, so do not initialize them there.

Keep transport initialization in the SoC-specific init operation. Use an optional init_providers operation for DT child and provider registration after BPMP communication has been established and the firmware tag has been read. ACPI platforms leave this operation unset.

DT transports register an MRQ_PING handler for requests initiated by BPMP firmware. This request direction was used only by a diagnostic command in older firmware and is not provided by firmware on ACPI-based systems. The ACPI transport therefore does not register an incoming handler; its init operation only sends the outgoing MRQ_PING request used to verify communication with firmware.

---
Changes since v4:
- Move BPMP channel allocation and ping setup/teardown into the SoC-specific init/deinit operations.
- Add an optional init_providers operation for DT child and provider registration after BPMP communication is established and the firmware tag is read.
- Add an ACPI BPMP init operation for the BMRQ ping path.
- Remove ACPI-specific setup and teardown conditionals from the common probe path.
- Drop the redundant NULL check after device_get_match_data().
- Explain the transport and provider initialization phases in the commit message.
- Explain why DT registers an incoming MRQ_PING handler while ACPI only sends an outgoing ping request.

Changes since v3:
- No change.

Changes since v2:
- Rename the non-ACPI transfer helper to tegra_bpmp_transfer_channel().
- Keep the common BPMP message validation in tegra_bpmp_transfer().
- Remove duplicate message validation from the ACPI transfer helper.

Changes since v1:
- Use acpi_extract_package() and a common cleanup path for BMRQ replies.
- Treat short BMRQ responses as errors.
- Rename the mailbox transport helper.
- Avoid a dummy ACPI ops table and call SoC ops only when present.
- Keep OF resource setup guarded by the OF node in probe.

 drivers/firmware/tegra/bpmp-private.h  |   6 +
 drivers/firmware/tegra/bpmp-tegra186.c |  14 ++
 drivers/firmware/tegra/bpmp-tegra210.c |  13 +-
 drivers/firmware/tegra/bpmp.c          | 265 ++++++++++++++++++++-----
 4 files changed, 246 insertions(+), 52 deletions(-)
drivers/firmware/tegra/bpmp-private.h +6 -0
index 07c3d46abb87..163b1c82d445 100644
@@ -10,6 +10,7 @@
 
 struct tegra_bpmp_ops {
 	int (*init)(struct tegra_bpmp *bpmp);
+	int (*init_providers)(struct tegra_bpmp *bpmp);
 	void (*deinit)(struct tegra_bpmp *bpmp);
 	bool (*is_response_ready)(struct tegra_bpmp_channel *channel);
 	bool (*is_request_ready)(struct tegra_bpmp_channel *channel);
@@ -26,4 +27,9 @@ struct tegra_bpmp_ops {
 extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
 extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
 
+int tegra_bpmp_init_channels(struct tegra_bpmp *bpmp);
+int tegra_bpmp_init_ping(struct tegra_bpmp *bpmp);
+void tegra_bpmp_deinit_ping(struct tegra_bpmp *bpmp);
+int tegra_bpmp_init_dt_providers(struct tegra_bpmp *bpmp);
+
 #endif
drivers/firmware/tegra/bpmp-tegra186.c +14 -0
index 64863db7a715..c34f6d2d275c 100644
@@ -325,6 +325,10 @@ static int tegra186_bpmp_init(struct tegra_bpmp *bpmp)
 	struct tegra186_bpmp *priv;
 	int err;
 
+	err = tegra_bpmp_init_channels(bpmp);
+	if (err < 0)
+		return err;
+
 	priv = devm_kzalloc(bpmp->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
@@ -352,6 +356,13 @@ static int tegra186_bpmp_init(struct tegra_bpmp *bpmp)
 
 	tegra186_bpmp_reset_channels(bpmp);
 
+	err = tegra_bpmp_init_ping(bpmp);
+	if (err < 0) {
+		mbox_free_channel(priv->mbox.channel);
+		tegra186_bpmp_teardown_channels(bpmp);
+		return err;
+	}
+
 	return 0;
 }
 
@@ -359,6 +370,8 @@ static void tegra186_bpmp_deinit(struct tegra_bpmp *bpmp)
 {
 	struct tegra186_bpmp *priv = bpmp->priv;
 
+	tegra_bpmp_deinit_ping(bpmp);
+
 	mbox_free_channel(priv->mbox.channel);
 
 	tegra186_bpmp_teardown_channels(bpmp);
@@ -373,6 +386,7 @@ static int tegra186_bpmp_resume(struct tegra_bpmp *bpmp)
 
 const struct tegra_bpmp_ops tegra186_bpmp_ops = {
 	.init = tegra186_bpmp_init,
+	.init_providers = tegra_bpmp_init_dt_providers,
 	.deinit = tegra186_bpmp_deinit,
 	.is_response_ready = tegra186_bpmp_is_message_ready,
 	.is_request_ready = tegra186_bpmp_is_message_ready,
drivers/firmware/tegra/bpmp-tegra210.c +12 -1
index 6295f5640c15..dbd02f750c2a 100644
@@ -166,6 +166,10 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp)
 	unsigned int i;
 	int err;
 
+	err = tegra_bpmp_init_channels(bpmp);
+	if (err < 0)
+		return err;
+
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
@@ -220,11 +224,18 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp)
 		return err;
 	}
 
-	return 0;
+	return tegra_bpmp_init_ping(bpmp);
+}
+
+static void tegra210_bpmp_deinit(struct tegra_bpmp *bpmp)
+{
+	tegra_bpmp_deinit_ping(bpmp);
 }
 
 const struct tegra_bpmp_ops tegra210_bpmp_ops = {
 	.init = tegra210_bpmp_init,
+	.init_providers = tegra_bpmp_init_dt_providers,
+	.deinit = tegra210_bpmp_deinit,
 	.is_response_ready = tegra210_bpmp_is_response_ready,
 	.is_request_ready = tegra210_bpmp_is_request_ready,
 	.ack_response = tegra210_bpmp_ack_response,
drivers/firmware/tegra/bpmp.c +214 -51

388 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH v5 2/5] firmware: tegra: bpmp: Add ACPI support

Quoted 9 lines · Aniruddha Rao

Add required changes in the Tegra BPMP driver to make it compatible with ACPI-based platforms.

On ACPI systems, IPC is handled through an AML method instead of the kernel mailbox and IVC frameworks.

Clock, reset and power-domain providers are not controlled by the Linux BPMP driver on ACPI-based systems, so do not initialize them there.

The above 2 statements are very clear and says this driver is not much useful on ACPI systems which is good and aligns with the general expectations.

Quoted 5 lines

Keep transport initialization in the SoC-specific init operation. Use an optional init_providers operation for DT child and provider registration after BPMP communication has been established and the firmware tag has been read. ACPI platforms leave this operation unset.

"ACPI platforms leave this operation unset" - I don't fully understand what this means ? If it means we need to do something on ACPI systems, why can't it be done by some boot firmware instead ?

Quoted 7 lines

DT transports register an MRQ_PING handler for requests initiated by BPMP firmware. This request direction was used only by a diagnostic command in older firmware and is not provided by firmware on ACPI-based systems. The ACPI transport therefore does not register an incoming handler; its init operation only sends the outgoing MRQ_PING request used to verify communication with firmware.

OK, I am more confused as you state more things are not needed on ACPI systems. Why do we need to add any support for ACPI systems then? Can you make it clear as what is needed on ACPI systems and why it needs to be done by OSPM and not any boot firmware if it is just one time initialisation.

Signature · 2 lines
Regards,
Sudeep
maintainer
#4 lore raw

Re: [PATCH v5 2/5] firmware: tegra: bpmp: Add ACPI support

Quoted 21 lines · Sudeep Holla
Quoted 9 lines · Aniruddha Rao

Add required changes in the Tegra BPMP driver to make it compatible with ACPI-based platforms.

On ACPI systems, IPC is handled through an AML method instead of the kernel mailbox and IVC frameworks.

Clock, reset and power-domain providers are not controlled by the Linux BPMP driver on ACPI-based systems, so do not initialize them there.

The above 2 statements are very clear and says this driver is not much useful on ACPI systems which is good and aligns with the general expectations.

Quoted 5 lines

Keep transport initialization in the SoC-specific init operation. Use an optional init_providers operation for DT child and provider registration after BPMP communication has been established and the firmware tag has been read. ACPI platforms leave this operation unset.

Quoted 3 lines

"ACPI platforms leave this operation unset" - I don't fully understand what this means ? If it means we need to do something on ACPI systems, why can't it be done by some boot firmware instead ?

I think it just means that the "init_providers" operation isn't needed on ACPI systems because we don't expose clocks, resets or power domains in ACPI (we do this only on DT so that we can have cross-references between device tree nodes). I don't think anything needs to be done in the ACPI case, so leaving this operation unset is exactly that.

Quoted 8 lines
Quoted 7 lines

DT transports register an MRQ_PING handler for requests initiated by BPMP firmware. This request direction was used only by a diagnostic command in older firmware and is not provided by firmware on ACPI-based systems. The ACPI transport therefore does not register an incoming handler; its init operation only sends the outgoing MRQ_PING request used to verify communication with firmware.

Quoted 4 lines

OK, I am more confused as you state more things are not needed on ACPI systems. Why do we need to add any support for ACPI systems then? Can you make it clear as what is needed on ACPI systems and why it needs to be done by OSPM and not any boot firmware if it is just one time initialisation.

My understanding of this is that the goal was to completely hide BPMP on ACPI systems and do all the clock, reset and power domain handling via standard ACPI operations. MBWT is a feature that's needed on ACPI systems and that can't be represented as a standard ACPI operation, as I understand it, hence the addition of ACPI support to BPMP.

So some of this patch is stripping out things that don't make sense on ACPI (the ACPI support for BPMP is very minimal) just to get enough support in place to expose the MBWT caps via sysfs.

The sysfs knobs exposed in patches 4 and 5 exist because the bandwidth caps may need to be adjusted dynamically at runtime. It is indeed a bit absurd to bootstrap a restricted version of BPMP like this for just this one feature, but I don't see any alternatives.

Thierry

#5 lore raw

Re: [PATCH v5 2/5] firmware: tegra: bpmp: Add ACPI support

Quoted 26 lines · Thierry Reding
Quoted 21 lines · Sudeep Holla
Quoted 9 lines · Aniruddha Rao

Add required changes in the Tegra BPMP driver to make it compatible with ACPI-based platforms.

On ACPI systems, IPC is handled through an AML method instead of the kernel mailbox and IVC frameworks.

Clock, reset and power-domain providers are not controlled by the Linux BPMP driver on ACPI-based systems, so do not initialize them there.

The above 2 statements are very clear and says this driver is not much useful on ACPI systems which is good and aligns with the general expectations.

Quoted 5 lines

Keep transport initialization in the SoC-specific init operation. Use an optional init_providers operation for DT child and provider registration after BPMP communication has been established and the firmware tag has been read. ACPI platforms leave this operation unset.

Quoted 3 lines

"ACPI platforms leave this operation unset" - I don't fully understand what this means ? If it means we need to do something on ACPI systems, why can't it be done by some boot firmware instead ?

Quoted 6 lines

I think it just means that the "init_providers" operation isn't needed on ACPI systems because we don't expose clocks, resets or power domains in ACPI (we do this only on DT so that we can have cross-references between device tree nodes). I don't think anything needs to be done in the ACPI case, so leaving this operation unset is exactly that.

Thanks for the confirmation.

Quoted 13 lines
Quoted 8 lines
Quoted 7 lines

DT transports register an MRQ_PING handler for requests initiated by BPMP firmware. This request direction was used only by a diagnostic command in older firmware and is not provided by firmware on ACPI-based systems. The ACPI transport therefore does not register an incoming handler; its init operation only sends the outgoing MRQ_PING request used to verify communication with firmware.

Quoted 4 lines

OK, I am more confused as you state more things are not needed on ACPI systems. Why do we need to add any support for ACPI systems then? Can you make it clear as what is needed on ACPI systems and why it needs to be done by OSPM and not any boot firmware if it is just one time initialisation.

Quoted 6 lines

My understanding of this is that the goal was to completely hide BPMP on ACPI systems and do all the clock, reset and power domain handling via standard ACPI operations. MBWT is a feature that's needed on ACPI systems and that can't be represented as a standard ACPI operation, as I understand it, hence the addition of ACPI support to BPMP.

OK.

Quoted 4 lines

So some of this patch is stripping out things that don't make sense on ACPI (the ACPI support for BPMP is very minimal) just to get enough support in place to expose the MBWT caps via sysfs.

I am bit concerned as MBWT is something to do with memory bandwidth throttling and resctrl provides user ABI for such things, this sysfs may be duplicating part of it.

Quoted 5 lines

The sysfs knobs exposed in patches 4 and 5 exist because the bandwidth caps may need to be adjusted dynamically at runtime. It is indeed a bit absurd to bootstrap a restricted version of BPMP like this for just this one feature, but I don't see any alternatives.

Is MPAM/resctrl path explored and you have valid reasons to not use that and create your own sysfs ?

Signature · 2 lines
Regards,
Sudeep
maintainer
#6 lore raw

Re: [PATCH v5 2/5] firmware: tegra: bpmp: Add ACPI support

Quoted 67 lines · Sudeep Holla
Quoted 26 lines · Thierry Reding
Quoted 21 lines · Sudeep Holla
Quoted 9 lines · Aniruddha Rao

Add required changes in the Tegra BPMP driver to make it compatible with ACPI-based platforms.

On ACPI systems, IPC is handled through an AML method instead of the kernel mailbox and IVC frameworks.

Clock, reset and power-domain providers are not controlled by the Linux BPMP driver on ACPI-based systems, so do not initialize them there.

The above 2 statements are very clear and says this driver is not much useful on ACPI systems which is good and aligns with the general expectations.

Quoted 5 lines

Keep transport initialization in the SoC-specific init operation. Use an optional init_providers operation for DT child and provider registration after BPMP communication has been established and the firmware tag has been read. ACPI platforms leave this operation unset.

Quoted 3 lines

"ACPI platforms leave this operation unset" - I don't fully understand what this means ? If it means we need to do something on ACPI systems, why can't it be done by some boot firmware instead ?

Quoted 6 lines

I think it just means that the "init_providers" operation isn't needed on ACPI systems because we don't expose clocks, resets or power domains in ACPI (we do this only on DT so that we can have cross-references between device tree nodes). I don't think anything needs to be done in the ACPI case, so leaving this operation unset is exactly that.

Thanks for the confirmation.

Quoted 13 lines
Quoted 8 lines
Quoted 7 lines

DT transports register an MRQ_PING handler for requests initiated by BPMP firmware. This request direction was used only by a diagnostic command in older firmware and is not provided by firmware on ACPI-based systems. The ACPI transport therefore does not register an incoming handler; its init operation only sends the outgoing MRQ_PING request used to verify communication with firmware.

Quoted 4 lines

OK, I am more confused as you state more things are not needed on ACPI systems. Why do we need to add any support for ACPI systems then? Can you make it clear as what is needed on ACPI systems and why it needs to be done by OSPM and not any boot firmware if it is just one time initialisation.

Quoted 6 lines

My understanding of this is that the goal was to completely hide BPMP on ACPI systems and do all the clock, reset and power domain handling via standard ACPI operations. MBWT is a feature that's needed on ACPI systems and that can't be represented as a standard ACPI operation, as I understand it, hence the addition of ACPI support to BPMP.

OK.

Quoted 4 lines

So some of this patch is stripping out things that don't make sense on ACPI (the ACPI support for BPMP is very minimal) just to get enough support in place to expose the MBWT caps via sysfs.

I am bit concerned as MBWT is something to do with memory bandwidth throttling and resctrl provides user ABI for such things, this sysfs may be duplicating part of it.

Quoted 8 lines
Quoted 5 lines

The sysfs knobs exposed in patches 4 and 5 exist because the bandwidth caps may need to be adjusted dynamically at runtime. It is indeed a bit absurd to bootstrap a restricted version of BPMP like this for just this one feature, but I don't see any alternatives.

Is MPAM/resctrl path explored and you have valid reasons to not use that and create your own sysfs ?

My understanding is that only monitoring is implemented for MPAM with no way of actually controlling bandwidth through it.

I've started an internal discussion to evaluate whether we can avoid custom sysfs attributes in favour of exposing them through resctrl.

Thierry

#7 lore raw

Re: [PATCH v5 2/5] firmware: tegra: bpmp: Add ACPI support

Quoted 1 line · Thierry Reding

On Fri, Nov 06, 2026 at 09:25:56AM +0000, Sudeep Holla wrote:

[...]

Quoted 11 lines
Quoted 11 lines

I am bit concerned as MBWT is something to do with memory bandwidth throttling and resctrl provides user ABI for such things, this sysfs may be duplicating part of it.

Quoted 5 lines

The sysfs knobs exposed in patches 4 and 5 exist because the bandwidth caps may need to be adjusted dynamically at runtime. It is indeed a bit absurd to bootstrap a restricted version of BPMP like this for just this one feature, but I don't see any alternatives.

Quoted 6 lines
Quoted 2 lines

Is MPAM/resctrl path explored and you have valid reasons to not use that and create your own sysfs ?

My understanding is that only monitoring is implemented for MPAM with no way of actually controlling bandwidth through it.

For once I did get that doubt as I don't have much knowledge on MPAM or resctrl in the kernel. So before replying to you, I had a look at Section "Memory bandwidth Allocation and monitoring" in Documentation/filesystems/resctrl.rst which made me understand it as supported. I may be wrong, but it sounds out to have controls and monitors in different places in general.

Quoted 3 lines

I've started an internal discussion to evaluate whether we can avoid custom sysfs attributes in favour of exposing them through resctrl.

Thanks.

Signature · 2 lines
Regards,
Sudeep
#8 lore raw

PATCH v5 3/5 firmware: tegra: bpmp: Add the Memory Bandwidth Throttler ABI definitions

In reply to Aniruddha Rao

Different workloads can place different memory-bandwidth demands on the system. BPMP firmware of some Tegra platforms provides Memory Bandwidth Throttler (MBWT) controls for PCIe and GPU connected over chip-to-chip link (NVCLINK) traffic on the path to DRAM so software can query and program those bandwidth caps.

The MBWT controls are not exposed through ordinary host MMIO and are accessible only through BPMP firmware requests.

Add the ABI definitions for the MBWT message request (MRQ), including the MRQ ID, sub-command IDs, and request/response payloads needed to issue the MBWT control requests defined by BPMP firmware.

---
Changes since v4:
- No change.

Changes since v3:
- No change.

Changes since v2:
- No change.

Changes since v1:
- Use NVCLINK spelling consistently.

 include/soc/tegra/bpmp-abi.h | 161 ++++++++++++++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 1 deletion(-)
include/soc/tegra/bpmp-abi.h +160 -1
index 5c64b3e02211..6f25126f5fb8 100644
@@ -587,12 +587,13 @@ struct mrq_response {
 #define MRQ_HWPM		93U
 #define MRQ_DVFS		94U
 #define MRQ_PPP_PROFILE		95U
+#define MRQ_SOCHUB_MBWT		96U
 
 /**
  * @brief Maximum MRQ code to be sent by CPU software to
  * BPMP. Subject to change in future
  */
-#define MAX_CPU_MRQ_ID		95U
+#define MAX_CPU_MRQ_ID		96U
 
 /** @} */
 
@@ -6686,6 +6687,164 @@ struct mrq_ppp_profile_response {
 /** @} PPP */
 /** @endcond */
 
+/** @cond (bpmp_tb500)
+ * @ingroup MRQ_Codes
+ * @def MRQ_SOCHUB_MBWT
+ * @brief Configure per-virtual-channel bandwidth caps for a bandwidth group using
+ *        Memory Bandwidth Throttler (MBWT).
+ *
+ * * Initiators: Any
+ * * Targets: BPMP
+ * * Request Payload: @ref mrq_sochub_mbwt_request
+ * * Response Payload: @ref mrq_sochub_mbwt_response
+ *
+ * @addtogroup SOCHUB_MBWT
+ * @{
+ */
+
+/**
+ * @brief Sub-command identifiers for #MRQ_SOCHUB_MBWT.
+ */
+enum mrq_sochub_mbwt_cmd {
+	/**
+	 * @brief Check whether the BPMP-FW supports the specified
+	 * #MRQ_SOCHUB_MBWT sub-command.
+	 *
+	 * mrq_response::err is 0 if the specified request is
+	 * supported and -#BPMP_ENODEV otherwise.
+	 */
+	CMD_SOCHUB_MBWT_QUERY_ABI = 0,
+	/**
+	 * @brief Get bandwidth cap for a virtual channel
+	 *
+	 * mrq_response::err is defined as:
+	 *
+	 * | Value          | Description                                    |
+	 * |----------------|------------------------------------------------|
+	 * | 0              | Success                                        |
+	 * | -#BPMP_ENOTSUP | #MRQ_SOCHUB_MBWT is not supported by BPMP-FW.  |
+	 * | -#BPMP_EINVAL  | Invalid request parameters.                    |
+	 * | -#BPMP_EIO     | Failed to retrieve the bandwidth.              |
+	 */
+	CMD_SOCHUB_MBWT_GET_BW = 1,
+	/**
+	 * @brief Set bandwidth cap for a virtual channel.
+	 *
+	 * mrq_response::err is defined as:
+	 *
+	 * | Value          | Description                                    |
+	 * |----------------|------------------------------------------------|
+	 * | 0              | Success                                        |
+	 * | -#BPMP_ENOTSUP | #MRQ_SOCHUB_MBWT is not supported by BPMP-FW.  |
+	 * | -#BPMP_EINVAL  | Invalid request parameters.                    |
+	 * | -#BPMP_EIO     | Failed to set the bandwidth.                   |
+	 */
+	CMD_SOCHUB_MBWT_SET_BW = 2,
+};
+
+/**
+ * @brief Request data for #MRQ_SOCHUB_MBWT sub-command
+ *        #CMD_SOCHUB_MBWT_QUERY_ABI
+ */
+struct cmd_sochub_mbwt_query_abi_req {
+	/** @brief Sub-command identifier from @ref mrq_sochub_mbwt_cmd */
+	uint32_t cmd_code;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Request data for #MRQ_SOCHUB_MBWT sub-command
+ *        #CMD_SOCHUB_MBWT_GET_BW
+ */
+struct cmd_sochub_mbwt_get_bw_req {
+	/**
+	 * @brief Instance ID for the bandwidth group
+	 *
+	 * Valid range is [0, 5]
+	 */
+	uint32_t instance;
+	/**
+	 * @brief Type of the virtual channel/traffic
+	 *
+	 * Valid values:
+	 *
+	 * * Value 0: PCIe read
+	 * * Value 1: PCIe write
+	 * * Value 2: GPU connected over the chip-to-chip link (NVCLINK)
+	 */
+	uint32_t vc_type;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Request data for #MRQ_SOCHUB_MBWT sub-command
+ *        #CMD_SOCHUB_MBWT_SET_BW
+ */
+struct cmd_sochub_mbwt_set_bw_req {
+	/**
+	 * @brief Instance ID for the bandwidth group
+	 *
+	 * Valid range is [0, 5]
+	 */
+	uint32_t instance;
+	/**
+	 * @brief Type of the virtual channel/traffic
+	 *
+	 * Valid values:
+	 *
+	 * * Value 0: PCIe read
+	 * * Value 1: PCIe write
+	 * * Value 2: GPU connected over the chip-to-chip link (NVCLINK)
+	 */
+	uint32_t vc_type;
+	/** @brief Bandwidth cap in GB/s */
+	uint32_t bw;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Response data for #MRQ_SOCHUB_MBWT sub-command
+ *        #CMD_SOCHUB_MBWT_GET_BW
+ */
+struct cmd_sochub_mbwt_get_bw_resp {
+	/** @brief Bandwidth cap in GB/s */
+	uint32_t bw;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Request payload for the #MRQ_SOCHUB_MBWT -command
+ *
+ * | Sub-command                   | Request payload                        |
+ * |-------------------------------|----------------------------------------|
+ * | #CMD_SOCHUB_MBWT_QUERY_ABI    | #cmd_sochub_mbwt_query_abi_req         |
+ * | #CMD_SOCHUB_MBWT_GET_BW       | #cmd_sochub_mbwt_get_bw_req            |
+ * | #CMD_SOCHUB_MBWT_SET_BW       | #cmd_sochub_mbwt_set_bw_req            |
+ */
+struct mrq_sochub_mbwt_request {
+	/** @brief Sub-command ID from @ref mrq_sochub_mbwt_cmd. */
+	uint32_t cmd;
+	union {
+		struct cmd_sochub_mbwt_query_abi_req query_abi;
+		struct cmd_sochub_mbwt_get_bw_req get_bw;
+		struct cmd_sochub_mbwt_set_bw_req set_bw;
+	} BPMP_UNION_ANON;
+} BPMP_ABI_PACKED;
+
+/**
+ * @brief Response payload for the #MRQ_SOCHUB_MBWT -command.
+ *
+ * | Sub-command                   | Response payload                       |
+ * |-------------------------------|----------------------------------------|
+ * | #CMD_SOCHUB_MBWT_QUERY_ABI    | -                                      |
+ * | #CMD_SOCHUB_MBWT_GET_BW       | #cmd_sochub_mbwt_get_bw_resp           |
+ * | #CMD_SOCHUB_MBWT_SET_BW       | -                                      |
+ */
+struct mrq_sochub_mbwt_response {
+	union {
+		struct cmd_sochub_mbwt_get_bw_resp get_bw;
+	} BPMP_UNION_ANON;
+} BPMP_ABI_PACKED;
+
+/** @} SOCHUB_MBWT */
+/** @endcond */
+
 /**
  * @addtogroup Error_Codes
  * Negative values for mrq_response::err generally indicate some
Signature · 1 line
2.43.0
#9 lore raw

PATCH v5 4/5 firmware: tegra: bpmp: Add MBWT BPMP helpers

In reply to Aniruddha Rao

Add helper functions that send MBWT requests to BPMP firmware.

The helpers implement the GET_BW and SET_BW operations.

They also provide a QUERY_ABI-based probe for command availability.

---
Changes since v4:
- No change.

Changes since v3:
- No change.

Changes since v2:
- Move the MBWT helpers near probe.
- Explain why the MBWT helpers are needed in the commit message.

Changes since v1:
- Use generic MBWT helper names.
- Fold the MBWT helpers into bpmp.c.
- Drop MBWT Kconfig dependencies.
- Add firmware error handling for MBWT requests.

 drivers/firmware/tegra/bpmp-private.h |   7 ++
 drivers/firmware/tegra/bpmp.c         | 111 +++++++++++++++++++++++++-
 2 files changed, 117 insertions(+), 1 deletion(-)
drivers/firmware/tegra/bpmp-private.h +7 -0
index 163b1c82d445..f0a7d6254bdc 100644
@@ -32,4 +32,11 @@ int tegra_bpmp_init_ping(struct tegra_bpmp *bpmp);
 void tegra_bpmp_deinit_ping(struct tegra_bpmp *bpmp);
 int tegra_bpmp_init_dt_providers(struct tegra_bpmp *bpmp);
 
+bool tegra_bpmp_mbwt_cmd_is_supported(struct tegra_bpmp *bpmp,
+				      unsigned int cmd_code);
+int tegra_bpmp_mbwt_get(struct tegra_bpmp *bpmp, unsigned int instance,
+			unsigned int vc_type, unsigned int *bandwidth);
+int tegra_bpmp_mbwt_set(struct tegra_bpmp *bpmp, unsigned int instance,
+			unsigned int vc_type, unsigned int bandwidth);
+
 #endif
drivers/firmware/tegra/bpmp.c +110 -1

118 lines not on this page · raw message

Signature · 1 line
2.43.0
#10 lore raw

PATCH v5 5/5 firmware: tegra: bpmp: Add MBWT sysfs interface

In reply to Aniruddha Rao

Different workloads can place different memory-bandwidth demands on the system. Selecting an appropriate bandwidth limit depends on the runtime workload mix and on the devices carrying that traffic, such as PCIe traffic or GPU traffic connected over the chip-to-chip link (NVCLINK). That information is not available to the kernel.

BPMP firmware of some Tegra platforms provides Memory Bandwidth Throttler (MBWT) controls for PCIe and GPU traffic connected over NVCLINK on the path to DRAM. Each PCIe bandwidth group has a single shared cap for all traffic in that group. Bandwidth for a group can be set per traffic type.

Describe the available bandwidth groups and traffic types in platform data. Each entry maps a sysfs name to the corresponding firmware instance and VC type so that these values can vary between platforms.

Add sysfs attributes on the tegra-bpmp platform device to expose a narrow userspace interface for MBWT control. The attributes are arranged as mbwt/<bandwidth-group>/<traffic-type>/bandwidth. The directory names come from platform data. The current platform description uses pcie0 through pcie5 for bandwidth groups and pcie_read, pcie_write and nvclink for traffic types.

Reading a bandwidth attribute queries firmware for the selected bandwidth group and traffic type. Writing an integer programs the target bandwidth cap in GB/s for that bandwidth group and traffic type.

Register the attributes only when BPMP firmware reports support for the MBWT GET_BW and SET_BW requests through its query ABI.

---
Changes since v4:
- Describe MBWT bandwidth groups and traffic types with platform data so firmware instance and VC type values can vary between platforms.
- Document the sysfs hierarchy using platform-defined bandwidth-group and traffic-type names.

Changes since v3:
- Update the sysfs ABI Documentation date to September 2026 and target release to 7.4.

Changes since v2:
- Rename bpmp-tegra-sysfs.c to bpmp-sysfs.c.

Changes since v1:
- Register the interface only when firmware supports GET_BW and SET_BW.
- Expose per-traffic bandwidth attributes.
- Remove software bandwidth range checks.
- Guard sysfs registration with CONFIG_SYSFS.
- Rename the sysfs initialization helper.
- Use generic MBWT wording.

 .../ABI/testing/sysfs-platform-tegra-bpmp     |  48 ++++
 drivers/firmware/tegra/Makefile               |   1 +
 drivers/firmware/tegra/bpmp-private.h         |  26 +++
 drivers/firmware/tegra/bpmp-sysfs.c           | 207 ++++++++++++++++++
 drivers/firmware/tegra/bpmp.c                 |  35 +++
 include/soc/tegra/bpmp.h                      |   2 +
 6 files changed, 319 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-tegra-bpmp
 create mode 100644 drivers/firmware/tegra/bpmp-sysfs.c
Documentation/ABI/testing/sysfs-platform-tegra-bpmp new file +48 -0
new file mode 100644
index 000000000000..5d0b525bd72a
@@ -0,0 +1,48 @@
+What:		/sys/bus/platform/devices/<bpmp-device>/mbwt/<bandwidth-group>/<traffic-type>/bandwidth
+Date:		September 2026
+KernelVersion:	7.4
+Contact:	Aniruddha TVS Rao <[email protected]>
+Description:
+		Provides access to Memory Bandwidth Throttler (MBWT)
+		controls exposed by BPMP firmware for PCIe traffic and GPU
+		traffic connected over the chip-to-chip link (NVCLINK) on
+		the path to DRAM.
+
+		The attributes are present only when BPMP firmware reports
+		support for the MBWT GET_BW and SET_BW requests through the
+		MBWT query ABI.
+
+		Each <bandwidth-group> directory identifies one PCIe bandwidth
+		group. The available groups and their directory names are
+		platform-specific. Current platforms use pcie0 through pcie5.
+		Each bandwidth group has a single shared cap for all traffic
+		in that group. A group may contain only PCIe devices, only a
+		GPU connected over NVCLINK, or both PCIe and GPU traffic in a
+		bifurcated topology.
+
+		The <traffic-type> directory selects the traffic type for the
+		selected group. The following traffic types may be available:
+
+		pcie_read
+			PCIe read traffic
+
+		pcie_write
+			PCIe write traffic
+
+		nvclink
+			GPU traffic connected over NVCLINK
+
+		Reading a bandwidth attribute returns the bandwidth cap in GB/s
+		reported by firmware for that bandwidth group and traffic
+		type.
+
+		Writing an integer to a bandwidth attribute programs the target
+		bandwidth cap in GB/s for that bandwidth group and traffic
+		type.
+
+		Examples:
+			cat .../mbwt/pcie0/pcie_write/bandwidth
+			echo 100 > .../mbwt/pcie0/pcie_write/bandwidth
+
+Users:		Platform integration and bandwidth tuning on systems with BPMP
+		firmware MBWT support.
drivers/firmware/tegra/Makefile +1 -0
index 41e2e4dc31d6..97f7a5db9d0a 100644
@@ -6,5 +6,6 @@ tegra-bpmp-$(CONFIG_ARCH_TEGRA_194_SOC)	+= bpmp-tegra186.o
 tegra-bpmp-$(CONFIG_ARCH_TEGRA_234_SOC)	+= bpmp-tegra186.o
 tegra-bpmp-$(CONFIG_ARCH_TEGRA_264_SOC)	+= bpmp-tegra186.o
 tegra-bpmp-$(CONFIG_DEBUG_FS)	+= bpmp-debugfs.o
+tegra-bpmp-$(CONFIG_SYSFS)	+= bpmp-sysfs.o
 obj-$(CONFIG_TEGRA_BPMP)	+= tegra-bpmp.o
 obj-$(CONFIG_TEGRA_IVC)		+= ivc.o
drivers/firmware/tegra/bpmp-private.h +26 -0
index f0a7d6254bdc..39cf31771836 100644
@@ -24,6 +24,23 @@ struct tegra_bpmp_ops {
 	int (*resume)(struct tegra_bpmp *bpmp);
 };
 
+struct tegra_bpmp_mbwt_vc {
+	const char *name;
+	unsigned int type;
+};
+
+struct tegra_bpmp_mbwt_group {
+	const char *name;
+	unsigned int id;
+	const struct tegra_bpmp_mbwt_vc *vcs;
+	unsigned int num_vcs;
+};
+
+struct tegra_bpmp_mbwt_soc {
+	const struct tegra_bpmp_mbwt_group *groups;
+	unsigned int num_groups;
+};
+
 extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
 extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
 
@@ -39,4 +56,13 @@ int tegra_bpmp_mbwt_get(struct tegra_bpmp *bpmp, unsigned int instance,
 int tegra_bpmp_mbwt_set(struct tegra_bpmp *bpmp, unsigned int instance,
 			unsigned int vc_type, unsigned int bandwidth);
 
+#ifdef CONFIG_SYSFS
+int tegra_bpmp_init_sysfs(struct tegra_bpmp *bpmp);
+#else
+static inline int tegra_bpmp_init_sysfs(struct tegra_bpmp *bpmp)
+{
+	return 0;
+}
+#endif
+
 #endif
drivers/firmware/tegra/bpmp-sysfs.c new file +207 -0

207 lines not on this page · raw message

drivers/firmware/tegra/bpmp.c +35 -0
index f2b739977f13..d91e833120b1 100644
@@ -1085,6 +1085,10 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
 			goto deinit;
 	}
 
+	err = tegra_bpmp_init_sysfs(bpmp);
+	if (err < 0)
+		dev_err(&pdev->dev, "failed to initialize sysfs: %d\n", err);
+
 	err = tegra_bpmp_init_debugfs(bpmp);
 	if (err < 0)
 		dev_err(&pdev->dev, "debugfs initialization failed: %d\n", err);
@@ -1186,6 +1190,36 @@ static const struct of_device_id tegra_bpmp_match[] = {
 };
 
 #ifdef CONFIG_ACPI
+#define TEGRA_BPMP_MBWT_VC_PCIE_READ	0
+#define TEGRA_BPMP_MBWT_VC_PCIE_WRITE	1
+#define TEGRA_BPMP_MBWT_VC_NVCLINK	2
+
+static const struct tegra_bpmp_mbwt_vc tegra_bpmp_acpi_mbwt_vcs[] = {
+	{ .name = "pcie_read", .type = TEGRA_BPMP_MBWT_VC_PCIE_READ },
+	{ .name = "pcie_write", .type = TEGRA_BPMP_MBWT_VC_PCIE_WRITE },
+	{ .name = "nvclink", .type = TEGRA_BPMP_MBWT_VC_NVCLINK },
+};
+
+static const struct tegra_bpmp_mbwt_group tegra_bpmp_acpi_mbwt_groups[] = {
+	{ .name = "pcie0", .id = 0, .vcs = tegra_bpmp_acpi_mbwt_vcs,
+	  .num_vcs = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_vcs) },
+	{ .name = "pcie1", .id = 1, .vcs = tegra_bpmp_acpi_mbwt_vcs,
+	  .num_vcs = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_vcs) },
+	{ .name = "pcie2", .id = 2, .vcs = tegra_bpmp_acpi_mbwt_vcs,
+	  .num_vcs = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_vcs) },
+	{ .name = "pcie3", .id = 3, .vcs = tegra_bpmp_acpi_mbwt_vcs,
+	  .num_vcs = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_vcs) },
+	{ .name = "pcie4", .id = 4, .vcs = tegra_bpmp_acpi_mbwt_vcs,
+	  .num_vcs = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_vcs) },
+	{ .name = "pcie5", .id = 5, .vcs = tegra_bpmp_acpi_mbwt_vcs,
+	  .num_vcs = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_vcs) },
+};
+
+static const struct tegra_bpmp_mbwt_soc tegra_bpmp_acpi_mbwt_soc = {
+	.groups = tegra_bpmp_acpi_mbwt_groups,
+	.num_groups = ARRAY_SIZE(tegra_bpmp_acpi_mbwt_groups),
+};
+
 static int tegra_bpmp_acpi_init(struct tegra_bpmp *bpmp)
 {
 	return tegra_bpmp_ping(bpmp);
@@ -1197,6 +1231,7 @@ static const struct tegra_bpmp_ops tegra_bpmp_acpi_ops = {
 
 static const struct tegra_bpmp_soc tegra_bpmp_acpi_soc = {
 	.ops = &tegra_bpmp_acpi_ops,
+	.mbwt = &tegra_bpmp_acpi_mbwt_soc,
 };
 
 static const struct acpi_device_id tegra_bpmp_acpi_match[] = {
include/soc/tegra/bpmp.h +2 -0
index a33582590a3b..f55db918ccb1 100644
@@ -16,6 +16,7 @@
 #include <soc/tegra/bpmp-abi.h>
 
 struct tegra_bpmp_clk;
+struct tegra_bpmp_mbwt_soc;
 struct tegra_bpmp_ops;
 
 struct tegra_bpmp_soc {
@@ -28,6 +29,7 @@ struct tegra_bpmp_soc {
 	} channels;
 
 	const struct tegra_bpmp_ops *ops;
+	const struct tegra_bpmp_mbwt_soc *mbwt;
 	unsigned int num_resets;
 };
 
Signature · 1 line
2.43.0
maintainer Applied
#11 lore raw
In reply to Aniruddha Rao
Quoted 64 lines · Aniruddha Rao

This series adds ACPI support to the Tegra BPMP driver and support for Memory Bandwidth Throttler (MBWT) controls exposed by BPMP firmware of some Tegra platforms.

The current BPMP driver depends on device tree bindings. This series keeps the existing DT path unchanged while adding an ACPI transport path for BPMP firmware requests.

MBWT controls are accessed through BPMP firmware requests. This series defines the MBWT BPMP ABI, adds MBWT helper functions, and exposes a narrow sysfs interface when firmware reports support for the required MBWT requests.

Aniruddha Rao (5):
firmware: tegra: bpmp: Move channel initialization to helper
firmware: tegra: bpmp: Add ACPI support
firmware: tegra: bpmp: Add the Memory Bandwidth Throttler ABI
definitions
firmware: tegra: bpmp: Add MBWT BPMP helpers
firmware: tegra: bpmp: Add MBWT sysfs interface

 .../ABI/testing/sysfs-platform-tegra-bpmp     |  48 ++
 drivers/firmware/tegra/Makefile               |   1 +
 drivers/firmware/tegra/bpmp-private.h         |  39 ++
 drivers/firmware/tegra/bpmp-sysfs.c           | 207 +++++++++
 drivers/firmware/tegra/bpmp-tegra186.c        |  14 +
 drivers/firmware/tegra/bpmp-tegra210.c        |  13 +-
 drivers/firmware/tegra/bpmp.c                 | 415 +++++++++++++++---
 include/soc/tegra/bpmp-abi.h                  | 161 ++++++-
 include/soc/tegra/bpmp.h                      |   2 +
 9 files changed, 849 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-tegra-bpmp
 create mode 100644 drivers/firmware/tegra/bpmp-sysfs.c

Changes since v4:
- Move BPMP channel allocation and ping setup/teardown into the SoC-specific init/deinit operations.
- Add an optional init_providers operation for DT child and provider registration after BPMP communication is established and the firmware tag is read.
- Add an ACPI BPMP init operation for the BMRQ ping path.
- Remove ACPI-specific setup and teardown conditionals from the common probe path.
- Drop the redundant NULL check after device_get_match_data().
- Explain the transport and provider initialization phases in the ACPI support commit message.
- Explain why DT registers an incoming MRQ_PING handler while ACPI only sends an outgoing ping request.
- Describe MBWT bandwidth groups and traffic types with platform data so firmware instance and VC type values can vary between platforms.
- Document the sysfs hierarchy using platform-defined bandwidth-group and traffic-type names.

Changes since v3:
- Update the sysfs ABI Documentation date to September 2026 and target release to 7.4.

Changes since v2:
- Rename the non-ACPI transfer helper to tegra_bpmp_transfer_channel().
- Keep the common BPMP message validation in tegra_bpmp_transfer().
- Remove duplicate message validation from the ACPI transfer helper.
- Move the MBWT helpers near probe and document why they are needed.
- Rename bpmp-tegra-sysfs.c to bpmp-sysfs.c.

Quoted 10 lines

Changes since v1:
- Dropped the SoC Kconfig patch.
- Kept the existing DT path unchanged while adding ACPI support.
- Reworked ACPI matching to avoid a dummy ops table.
- Added explicit error handling for short ACPI BMRQ responses.
- Folded MBWT helpers into bpmp.c.
- Reworked MBWT sysfs into per-traffic bandwidth attributes.
- Removed software bandwidth range checks.
- Use NVCLINK consistently in commit messages and documentation.
- Avoid platform-specific or transport-specific MBWT wording.

Applied, thanks.

Thierry