Add Mailbox nodes for TI K3 AM65x & J721E SoCs
Subsystems (2)
v2 cover Add Mailbox nodes for TI K3 AM65x & J721E SoCs
Hi Tero, Nishanth,
The following series is a revised version of the series [1] that adds the Mailbox DT nodes and the sub-mailboxes used to communicate between the main MPU processor running Linux and the various R5F and DSP remote processors present on the TI K3 AM65x and J721E SoC families. Patches are based on v5.3-rc1 + the HwSpinlock DT node series [2], and are intended for the 5.4 merge window. Functionality is verified using a out-of-tree unit-test module and some additional loopback test nodes available here [3] for reference.
Changes in v2:
- All clusters are enabled by default in base dtsi files
- The sub-mailboxes are moved to the actual board dts files
- Unused clusters disabled in the board dts files
regards
Suman
[1] https://patchwork.kernel.org/cover/11053401/
[2] https://patchwork.kernel.org/cover/11053311/
[3] https://github.com/sumananna/mailbox/commits/mbox/test/5.3-rc1-k3-v2
Suman Anna (4):
arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes
arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs
arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes
arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodes
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 108 ++++++++++++++++++ .../arm64/boot/dts/ti/k3-am654-base-board.dts | 58 ++++++++++ .../dts/ti/k3-j721e-common-proc-board.dts | 93 +++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 108 ++++++++++++++++++ 4 files changed, 367 insertions(+)
Signature · 1 line
2.22.0
PATCH v2 1/4 arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes
The AM65x Main NavSS block contains a Mailbox IP instance with multiple clusters. Each cluster is equivalent to an Mailbox IP instance on OMAP platforms.
Add all the Mailbox clusters as their own nodes under the MAIN NavSS cbass_main_navss interconnect node instead of creating an almost empty parent node for the new K3 mailbox IP and the clusters as its child nodes. All these nodes are enabled by default in the base dtsi file, but any cluster that does not define any child sub-mailbox nodes should be disabled in the corresponding board dts files.
NOTE:
The NavSS only has a limited number of interrupts, so none of the interrupts generated by a Mailbox IP are added by default. Only the needed interrupts that are targeted towards the A53 GIC will have to be added later on in the board dts files alongside the corresponding sub-mailbox child nodes.
---
v2:
- Add interrupt-parent property and enable all clusters by default
- Patch description revised accordingly
v1: https://patchwork.kernel.org/patch/11053403/
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 108 +++++++++++++++++++++++ 1 file changed, 108 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +108 -0
@@ -419,6 +419,114 @@ reg = <0x00 0x30e00000 0x00 0x1000>; #hwlock-cells = <1>; }; + + mailbox0_cluster0: mailbox@31f80000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f80000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster1: mailbox@31f81000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f81000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster2: mailbox@31f82000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f82000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster3: mailbox@31f83000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f83000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster4: mailbox@31f84000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f84000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster5: mailbox@31f85000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f85000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster6: mailbox@31f86000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f86000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster7: mailbox@31f87000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f87000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster8: mailbox@31f88000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f88000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster9: mailbox@31f89000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f89000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster10: mailbox@31f8a000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f8a000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; + + mailbox0_cluster11: mailbox@31f8b000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f8b000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&intr_main_navss>; + }; }; main_gpio0: main_gpio0@600000 {
Signature · 1 line
2.22.0
PATCH v2 2/4 arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs
In reply to Suman AnnaAdd the sub-mailbox nodes that are used to communicate between MPU and the two R5F remote processors present in the MCU domain to the AM654 EVM base board. These sub-mailbox nodes utilize the System Mailbox clusters 0 and 1. The interrupts associated with the Mailbox Cluster User interrupt used by the sub-mailbox nodes are also added. The GIC_SPI interrupt to be used is dynamically allocated and managed by the System Firmware through the ti-sci-intr irqchip driver. All the remaining mailbox clusters are currently not used on A53 core, and so are disabled.
The sub-mailbox nodes added match the hard-coded mailbox configuration used within the TI RTOS IPC software packages. The Cortex R5F processor sub-system is assumed to be running in Split mode, so a sub-mailbox node is used by each of the R5F cores. Only the sub-mailbox node from cluster 0 is used in case of Lockstep mode.
---
v2:
- Sub-mailboxes added in board dts file instead of base dtsi file
- Unused mailbox clusters 2 through 11 disabled
- Patch description and title updated
v1: https://patchwork.kernel.org/patch/11053405/
.../arm64/boot/dts/ti/k3-am654-base-board.dts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+)
arch/arm64/boot/dts/ti/k3-am654-base-board.dts +58 -0
@@ -279,3 +279,61 @@ &pcie1_ep { status = "disabled"; }; + +&mailbox0_cluster0 { + interrupts = <164 0>; + + mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 { + ti,mbox-tx = <1 0 0>; + ti,mbox-rx = <0 0 0>; + }; +}; + +&mailbox0_cluster1 { + interrupts = <165 0>; + + mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 { + ti,mbox-tx = <1 0 0>; + ti,mbox-rx = <0 0 0>; + }; +}; + +&mailbox0_cluster2 { + status = "disabled"; +}; + +&mailbox0_cluster3 { + status = "disabled"; +}; + +&mailbox0_cluster4 { + status = "disabled"; +}; + +&mailbox0_cluster5 { + status = "disabled"; +}; + +&mailbox0_cluster6 { + status = "disabled"; +}; + +&mailbox0_cluster7 { + status = "disabled"; +}; + +&mailbox0_cluster8 { + status = "disabled"; +}; + +&mailbox0_cluster9 { + status = "disabled"; +}; + +&mailbox0_cluster10 { + status = "disabled"; +}; + +&mailbox0_cluster11 { + status = "disabled"; +};
Signature · 1 line
2.22.0
PATCH v2 3/4 arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes
In reply to Suman AnnaThe J721E Main NavSS block contains a Mailbox IP instance with multiple clusters. Each cluster is equivalent to an Mailbox IP instance on OMAP platforms.
Add all the Mailbox clusters as their own nodes under the MAIN NavSS cbass_main_navss interconnect node instead of creating an almost empty parent node for the new K3 mailbox IP and the clusters as its child nodes. All these nodes are enabled by default in the base dtsi file, but any cluster that does not define any child sub-mailbox nodes should be disabled in the corresponding board dts files.
NOTE:
The NavSS only has a limited number of interrupts, so none of the interrupts generated by a Mailbox IP are added by default. Only the needed interrupts that are targeted towards the A72 GIC will have to be added later on in the board dts files alongside the corresponding sub-mailbox child nodes.
---
v2:
- Add interrupt-parent property and enable all clusters by default
- Patch description revised accordingly
v1: https://patchwork.kernel.org/patch/11053407/
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +108 -0
@@ -95,6 +95,114 @@ reg = <0x00 0x30e00000 0x00 0x1000>; #hwlock-cells = <1>; }; + + mailbox0_cluster0: mailbox@31f80000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f80000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster1: mailbox@31f81000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f81000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster2: mailbox@31f82000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f82000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster3: mailbox@31f83000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f83000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster4: mailbox@31f84000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f84000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster5: mailbox@31f85000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f85000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster6: mailbox@31f86000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f86000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster7: mailbox@31f87000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f87000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster8: mailbox@31f88000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f88000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster9: mailbox@31f89000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f89000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster10: mailbox@31f8a000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f8a000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; + + mailbox0_cluster11: mailbox@31f8b000 { + compatible = "ti,am654-mailbox"; + reg = <0x00 0x31f8b000 0x00 0x200>; + #mbox-cells = <1>; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <16>; + interrupt-parent = <&main_navss_intr>; + }; }; secure_proxy_main: mailbox@32c00000 {
Signature · 1 line
2.22.0
PATCH v2 4/4 arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodes
In reply to Suman AnnaAdd the sub-mailbox nodes that are used to communicate between MPU and various remote processors present in the J721E SoCs to the J721E common processor board. These include the R5F remote processors in the dual-R5F cluster (MCU_R5FSS0) in the MCU domain and the two dual-R5F clusters (MAIN_R5FSS0 & MAIN_R5FSS1) in the MAIN domain; the two C66x DSP remote processors and the single C71x DSP remote processor in the MAIN domain. These sub-mailbox nodes utilize the System Mailbox clusters 0 through 4. All the remaining mailbox clusters are currently not used on A72 core, and so are disabled.
The sub-mailbox nodes added match the hard-coded mailbox configuration used within the TI RTOS IPC software packages. The R5F processor sub-systems are assumed to be running in Split mode, so a sub-mailbox node is used by each of the R5F cores. Only the sub-mailbox node for the first R5F core in each cluster is used in case of a Lockstep mode for that R5F cluster.
NOTE:
The GIC_SPI interrupts to be used are dynamically allocated and managed by the System Firmware through the ti-sci-intr irqchip driver. So, only valid interrupts (each cluster's User 0 IRQ output) that are used by the sub-mailbox devices are enabled. This is done to minimize the number of NavSS Interrupt Router outputs utilized.
---
v2:
- Sub-mailboxes added in board dts file instead of base dtsi file
- Unused mailbox clusters 5 through 11 disabled
- Patch description and title updated
v1: https://patchwork.kernel.org/patch/11053409/
.../dts/ti/k3-j721e-common-proc-board.dts | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +93 -0
@@ -48,3 +48,96 @@ /* UART not brought out */ status = "disabled"; }; + +&mailbox0_cluster0 { + interrupts = <214 0>; + + mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; + + mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 { + ti,mbox-rx = <2 0 0>; + ti,mbox-tx = <3 0 0>; + }; +}; + +&mailbox0_cluster1 { + interrupts = <215 0>; + + mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; + + mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 { + ti,mbox-rx = <2 0 0>; + ti,mbox-tx = <3 0 0>; + }; +}; + +&mailbox0_cluster2 { + interrupts = <216 0>; + + mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; + + mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 { + ti,mbox-rx = <2 0 0>; + ti,mbox-tx = <3 0 0>; + }; +}; + +&mailbox0_cluster3 { + interrupts = <217 0>; + + mbox_c66_0: mbox-c66-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; + + mbox_c66_1: mbox-c66-1 { + ti,mbox-rx = <2 0 0>; + ti,mbox-tx = <3 0 0>; + }; +}; + +&mailbox0_cluster4 { + interrupts = <218 0>; + + mbox_c71_0: mbox-c71-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster5 { + status = "disabled"; +}; + +&mailbox0_cluster6 { + status = "disabled"; +}; + +&mailbox0_cluster7 { + status = "disabled"; +}; + +&mailbox0_cluster8 { + status = "disabled"; +}; + +&mailbox0_cluster9 { + status = "disabled"; +}; + +&mailbox0_cluster10 { + status = "disabled"; +}; + +&mailbox0_cluster11 { + status = "disabled"; +};
Signature · 1 line
2.22.0
Hi Tero,
Quoted 11 lines · Suman Anna
Hi Tero, Nishanth,
The following series is a revised version of the series [1] that adds the Mailbox DT nodes and the sub-mailboxes used to communicate between the main MPU processor running Linux and the various R5F and DSP remote processors present on the TI K3 AM65x and J721E SoC families. Patches are based on v5.3-rc1 + the HwSpinlock DT node series [2], and are intended for the 5.4 merge window. Functionality is verified using a out-of-tree unit-test module and some additional loopback test nodes available here [3] for reference.
Quoted 4 lines
Changes in v2:
- All clusters are enabled by default in base dtsi files
- The sub-mailboxes are moved to the actual board dts files
- Unused clusters disabled in the board dts files
Looks like you missed picking this series up for 5.4. Can you please pick this up for 5.5? Let me know if you want me to repost the series, the last patch has a conflict when applying on top of 5.4-rc1 due to some additional nodes in the board dts file.
regards
Suman
Quoted 20 lines
regards
Suman[1] https://patchwork.kernel.org/cover/11053401/
[2] https://patchwork.kernel.org/cover/11053311/
[3] https://github.com/sumananna/mailbox/commits/mbox/test/5.3-rc1-k3-v2Suman Anna (4):
arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes
arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs
arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes
arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodesarch/arm64/boot/dts/ti/k3-am65-main.dtsi | 108 ++++++++++++++++++ .../arm64/boot/dts/ti/k3-am654-base-board.dts | 58 ++++++++++ .../dts/ti/k3-j721e-common-proc-board.dts | 93 +++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 108 ++++++++++++++++++ 4 files changed, 367 insertions(+)
Quoted 19 lines · Suman Anna
Hi Tero,
Quoted 11 lines · Suman Anna
Hi Tero, Nishanth,
The following series is a revised version of the series [1] that adds the Mailbox DT nodes and the sub-mailboxes used to communicate between the main MPU processor running Linux and the various R5F and DSP remote processors present on the TI K3 AM65x and J721E SoC families. Patches are based on v5.3-rc1 + the HwSpinlock DT node series [2], and are intended for the 5.4 merge window. Functionality is verified using a out-of-tree unit-test module and some additional loopback test nodes available here [3] for reference.
Quoted 4 lines
Changes in v2:
- All clusters are enabled by default in base dtsi files
- The sub-mailboxes are moved to the actual board dts files
- Unused clusters disabled in the board dts files
Quoted 4 lines
Looks like you missed picking this series up for 5.4. Can you please pick this up for 5.5? Let me know if you want me to repost the series, the last patch has a conflict when applying on top of 5.4-rc1 due to some additional nodes in the board dts file.
Yep, I missed this.
Queuing up towards 5.5 now, thanks.
-Tero
Quoted 25 lines
regards
SumanQuoted 20 lines
regards
Suman[1] https://patchwork.kernel.org/cover/11053401/
[2] https://patchwork.kernel.org/cover/11053311/
[3] https://github.com/sumananna/mailbox/commits/mbox/test/5.3-rc1-k3-v2Suman Anna (4):
arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes
arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs
arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes
arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodesarch/arm64/boot/dts/ti/k3-am65-main.dtsi | 108 ++++++++++++++++++ .../arm64/boot/dts/ti/k3-am654-base-board.dts | 58 ++++++++++ .../dts/ti/k3-j721e-common-proc-board.dts | 93 +++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 108 ++++++++++++++++++ 4 files changed, 367 insertions(+)
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki