linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Beleswar Prasad Padhi <b-padhi@ti.com>
To: <nm@ti.com>, <vigneshr@ti.com>, <kristo@kernel.org>,
	<robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>
Cc: <afd@ti.com>, <u-kumar1@ti.com>, <hnagalla@ti.com>, <jm@ti.com>,
	<hiago.franco@toradex.com>, <francesco.dolcini@toradex.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: dts: ti: k3-{j7/am6}*-ti-ipc-firmware: Limit FIFOs to Linux use
Date: Thu, 30 Oct 2025 23:31:06 +0530	[thread overview]
Message-ID: <9bc6f796-6ac4-44ff-a23e-d23d30f431b6@ti.com> (raw)
In-Reply-To: <20251030160635.1388401-1-b-padhi@ti.com>

Hi All,

On 10/30/2025 9:36 PM, Beleswar Padhi wrote:
> Each mailbox cluster has 16 hardware FIFOs shared among 4 users (CPUs).
> Each FIFO supports one-way communication between two users and is
> configured by the firmware.
>
> For TI IPC firmware, the FIFOs starting from 0 are assigned for
> communication between the Cortex A-core (running Linux) and remote
> processors (running RTOS). The remaining FIFOs are used for
> RTOS-to-RTOS communication.
>
> In some cases, pending messages may remain in the RTOS-to-RTOS FIFOs if
> a remote processor is powered off or in a bad state. To avoid issues
> such as suspend failures, restrict the 'ti,mbox-num-fifos' property in
> the device tree to only include the FIFOs used for Linux-to-RTOS
> communication. This ensures the Linux mailbox driver checks only its
> own FIFOs and does not interfere with those used by other remote
> processors.
>
> Fixes: a49f991e740f ("arm64: dts: ti: k3-am62-verdin: Add missing cfg for TI IPC Firmware")
> Closes: https://lore.kernel.org/all/sid7gtg5vay5qgicsl6smnzwg5mnneoa35cempt5ddwjvedaio@hzsgcx6oo74l/
> Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
> ---
> Cc: Francesco Dolcini <francesco.dolcini@toradex.com>
> Cc: Hiago De Franco <hiago.franco@toradex.com>
> Please help in testing the patch on Toradex platforms.


Please ignore the below patch. We had a discussion internally
and want to take a different route for this problem. I will post
the new patch tomorrow.

Thanks,
Beleswar

>
> Testing Done:
> 1. Tested Boot across all TI K3 EVM/SK boards.
> 2. Tested IPC on all TI K3 J7* EVM/SK boards (& AM62x SK).
> 3. Tested that the patch generates no new warnings/errors.
>
>   arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi         | 1 +
>   arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi        | 3 +++
>   arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi        | 2 ++
>   arch/arm64/boot/dts/ti/k3-am64-ti-ipc-firmware.dtsi         | 3 +++
>   arch/arm64/boot/dts/ti/k3-am65-ti-ipc-firmware.dtsi         | 2 ++
>   arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi        | 2 ++
>   arch/arm64/boot/dts/ti/k3-j721e-ti-ipc-firmware.dtsi        | 5 +++++
>   arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi       | 4 ++++
>   arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi        | 4 ++++
>   .../dts/ti/k3-j784s4-j742s2-ti-ipc-firmware-common.dtsi     | 6 ++++++
>   arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi       | 1 +
>   11 files changed, 33 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi
> index ea69fab9b52b..913bd5ff49f7 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi
> @@ -21,6 +21,7 @@ mcu_m4fss_memory_region: memory@9cc00000 {
>   
>   &mailbox0_cluster0 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_m4_0: mbox-m4-0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi
> index 950f4f37d477..b377edb52bc9 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi
> @@ -33,6 +33,7 @@ mcu_r5fss0_core0_memory_region: memory@9b900000 {
>   
>   &mailbox0_cluster0 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_r5_0: mbox-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -42,6 +43,7 @@ mbox_r5_0: mbox-r5-0 {
>   
>   &mailbox0_cluster1 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_c7x_0: mbox-c7x-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -51,6 +53,7 @@ mbox_c7x_0: mbox-c7x-0 {
>   
>   &mailbox0_cluster2 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_mcu_r5_0: mbox-mcu-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi
> index d29a5dbe13ef..82512e7a44ea 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi
> @@ -21,6 +21,7 @@ mcu_r5fss0_core0_memory_region: memory@9b900000 {
>   
>   &mailbox0_cluster0 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_r5_0: mbox-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -30,6 +31,7 @@ mbox_r5_0: mbox-r5-0 {
>   
>   &mailbox0_cluster1 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_mcu_r5_0: mbox-mcu-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-am64-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am64-ti-ipc-firmware.dtsi
> index 6b10646ae64a..793e965c5a4b 100644
> --- a/arch/arm64/boot/dts/ti/k3-am64-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am64-ti-ipc-firmware.dtsi
> @@ -63,6 +63,7 @@ rtos_ipc_memory_region: memory@a5000000 {
>   
>   &mailbox0_cluster2 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 2>;
> @@ -77,6 +78,7 @@ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
>   
>   &mailbox0_cluster4 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
>   		ti,mbox-rx = <0 0 2>;
> @@ -91,6 +93,7 @@ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
>   
>   &mailbox0_cluster6 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_m4_0: mbox-m4-0 {
>   		ti,mbox-rx = <0 0 2>;
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am65-ti-ipc-firmware.dtsi
> index 61ab0357fc0d..579533df6bd4 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-ti-ipc-firmware.dtsi
> @@ -28,6 +28,7 @@ rtos_ipc_memory_region: memory@a2000000 {
>   &mailbox0_cluster0 {
>   	status = "okay";
>   	interrupts = <436>;
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
>   		ti,mbox-tx = <1 0 0>;
> @@ -38,6 +39,7 @@ mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
>   &mailbox0_cluster1 {
>   	status = "okay";
>   	interrupts = <432>;
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
>   		ti,mbox-tx = <1 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
> index 9477f1efbbc6..4245a5319085 100644
> --- a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
> @@ -52,6 +52,7 @@ rtos_ipc_memory_region: memory@a4000000 {
>   &mailbox0_cluster0 {
>   	status = "okay";
>   	interrupts = <436>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -67,6 +68,7 @@ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
>   &mailbox0_cluster1 {
>   	status = "okay";
>   	interrupts = <432>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-ti-ipc-firmware.dtsi
> index 40c6cc99c405..4003f125dbe7 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-ti-ipc-firmware.dtsi
> @@ -114,6 +114,7 @@ rtos_ipc_memory_region: memory@aa000000 {
>   &mailbox0_cluster0 {
>   	status = "okay";
>   	interrupts = <436>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -129,6 +130,7 @@ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
>   &mailbox0_cluster1 {
>   	status = "okay";
>   	interrupts = <432>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -144,6 +146,7 @@ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
>   &mailbox0_cluster2 {
>   	status = "okay";
>   	interrupts = <428>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -159,6 +162,7 @@ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
>   &mailbox0_cluster3 {
>   	status = "okay";
>   	interrupts = <424>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_c66_0: mbox-c66-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -174,6 +178,7 @@ mbox_c66_1: mbox-c66-1 {
>   &mailbox0_cluster4 {
>   	status = "okay";
>   	interrupts = <420>;
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_c71_0: mbox-c71-0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi
> index ebab0cc580bb..2ef5c95f6e93 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi
> @@ -100,6 +100,7 @@ rtos_ipc_memory_region: memory@a8000000 {
>   &mailbox0_cluster0 {
>   	status = "okay";
>   	interrupts = <436>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -115,6 +116,7 @@ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
>   &mailbox0_cluster1 {
>   	status = "okay";
>   	interrupts = <432>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -130,6 +132,7 @@ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
>   &mailbox0_cluster2 {
>   	status = "okay";
>   	interrupts = <428>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -145,6 +148,7 @@ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
>   &mailbox0_cluster4 {
>   	status = "okay";
>   	interrupts = <420>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_c71_0: mbox-c71-0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi
> index cb7cd385a165..c25dec00cc2a 100644
> --- a/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi
> @@ -63,6 +63,7 @@ rtos_ipc_memory_region: memory@a5000000 {
>   
>   &mailbox0_cluster0 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_wkup_r5_0: mbox-wkup-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -72,6 +73,7 @@ mbox_wkup_r5_0: mbox-wkup-r5-0 {
>   
>   &mailbox0_cluster1 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_mcu_r5_0: mbox-mcu-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -81,6 +83,7 @@ mbox_mcu_r5_0: mbox-mcu-r5-0 {
>   
>   &mailbox0_cluster2 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_c7x_0: mbox-c7x-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -90,6 +93,7 @@ mbox_c7x_0: mbox-c7x-0 {
>   
>   &mailbox0_cluster3 {
>   	status = "okay";
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5_0: mbox-main-r5-0 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-ti-ipc-firmware-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-ti-ipc-firmware-common.dtsi
> index 455397227d4a..809ecf26ddd1 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-ti-ipc-firmware-common.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-ti-ipc-firmware-common.dtsi
> @@ -130,6 +130,7 @@ c71_2_memory_region: memory@aa100000 {
>   &mailbox0_cluster0 {
>   	status = "okay";
>   	interrupts = <436>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -145,6 +146,7 @@ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
>   &mailbox0_cluster1 {
>   	status = "okay";
>   	interrupts = <432>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -160,6 +162,7 @@ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
>   &mailbox0_cluster2 {
>   	status = "okay";
>   	interrupts = <428>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -175,6 +178,7 @@ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
>   &mailbox0_cluster3 {
>   	status = "okay";
>   	interrupts = <424>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_main_r5fss2_core0: mbox-main-r5fss2-core0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -190,6 +194,7 @@ mbox_main_r5fss2_core1: mbox-main-r5fss2-core1 {
>   &mailbox0_cluster4 {
>   	status = "okay";
>   	interrupts = <420>;
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_c71_0: mbox-c71-0 {
>   		ti,mbox-rx = <0 0 0>;
> @@ -205,6 +210,7 @@ mbox_c71_1: mbox-c71-1 {
>   &mailbox0_cluster5 {
>   	status = "okay";
>   	interrupts = <416>;
> +	ti,mbox-num-fifos = <2>;
>   
>   	mbox_c71_2: mbox-c71-2 {
>   		ti,mbox-rx = <0 0 0>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi
> index 81b508b9b05e..67af04b25fd0 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi
> @@ -20,6 +20,7 @@ c71_3_memory_region: memory@ab100000 {
>   };
>   
>   &mailbox0_cluster5 {
> +	ti,mbox-num-fifos = <4>;
>   
>   	mbox_c71_3: mbox-c71-3 {
>   		ti,mbox-rx = <2 0 0>;


      reply	other threads:[~2025-10-30 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 16:06 [PATCH] arm64: dts: ti: k3-{j7/am6}*-ti-ipc-firmware: Limit FIFOs to Linux use Beleswar Padhi
2025-10-30 18:01 ` Beleswar Prasad Padhi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bc6f796-6ac4-44ff-a23e-d23d30f431b6@ti.com \
    --to=b-padhi@ti.com \
    --cc=afd@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=francesco.dolcini@toradex.com \
    --cc=hiago.franco@toradex.com \
    --cc=hnagalla@ti.com \
    --cc=jm@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).