Add R5F and C7xv device nodes
Subsystems (2)
v5 cover Add R5F and C7xv device nodes
For am62x and am62ax devices, this patch series adds device nodes for the R5F subsystem and C7xv DSP subsystem found in their respective voltage domain, based on the device TRMs [0][1].
This patch series also includes patches for enabling IPC for am62x SK, am62ax SK, and am62px SK by reserving memory and binding the mailbox assignments for each remote core.
Also reserve timers used by C7x DSP for am62ax SK board and timers used by MCU FW for AM642 SK and EVM boards as per firmware requirements.
Changes since v4:
- Drop SRAM node for am62px/am62ax MCU R5fSS0 core0
- Reserve timers for am64 MCU FW, patch 10/10
- Add "status = okay" for mailbox nodes at the board level, disabling of mailbox nodes in voltage domain .dtsi files will come in a separate series
Links
v4: https://lore.kernel.org/linux-devicetree/[email protected]/
v3: https://lore.kernel.org/linux-devicetree/[email protected]/
v2: https://lore.kernel.org/linux-devicetree/[email protected]/
v1: https://lore.kernel.org/linux-devicetree/[email protected]/
[0] https://www.ti.com/lit/pdf/spruj16
[1] https://www.ti.com/lit/pdf/spruiv7
Devarsh Thakkar (3):
arm64: dts: ti: k3-am62a-wakeup: Add R5F device node
arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors
arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
Hari Nagalla (6):
arm64: dts: ti: k3-am62-wakeup: Add wakeup R5F node
arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node
arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors
arm64: dts: ti: k3-am62a7-sk: Reserve main_timer2 for C7x DSP
arm64: dts: ti: k3-am62a7-sk: Reserve main_rti4 for C7x DSP
arm64: dts: ti: k3-am64: Reserve timers used by MCU FW
Jai Luthra (1):
arm64: dts: ti: k3-am62a-main: Add C7xv device node
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 25 +++++ arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 12 ++ arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 25 +++++ arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 25 +++++ arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 106 +++++++++++++++++- arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 50 ++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 34 +++++- arch/arm64/boot/dts/ti/k3-am642-evm.dts | 17 +++ arch/arm64/boot/dts/ti/k3-am642-sk.dts | 17 +++ 9 files changed, 294 insertions(+), 17 deletions(-)
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
Signature · 1 line
2.48.0
PATCH v5 1/10 arm64: dts: ti: k3-am62-wakeup: Add wakeup R5F node
From: Hari Nagalla <[email protected]>
AM62 SoC devices have a single core R5F processor in wakeup domain. The R5F processor in wakeup domain is used as a device manager for the SoC.
---
Changes since v4:
- No change
--- arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +25 -0
@@ -106,6 +106,31 @@ wkup_rti0: watchdog@2b000000 { status = "reserved"; }; + wkup_r5fss0: r5fss@78000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x78000000 0x00 0x78000000 0x8000>, + <0x78100000 0x00 0x78100000 0x8000>; + power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + wkup_r5fss0_core0: r5f@78000000 { + compatible = "ti,am62-r5f"; + reg = <0x78000000 0x00008000>, + <0x78100000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <121>; + ti,sci-proc-ids = <0x01 0xff>; + resets = <&k3_reset 121 1>; + firmware-name = "am62-wkup-r5f0_0-fw"; + ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>; + }; + }; + wkup_vtm0: temperature-sensor@b00000 { compatible = "ti,j7200-vtm"; reg = <0x00 0xb00000 0x00 0x400>,
Signature · 1 line
2.48.0
Re: [PATCH v5 01/10] arm64: dts: ti: k3-am62-wakeup: Add wakeup R5F node
Quoted 10 lines · Judith Mendez
From: Hari Nagalla <[email protected]>
AM62 SoC devices have a single core R5F processor in wakeup domain. The R5F processor in wakeup domain is used as a device manager for the SoC.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Quoted 42 lines
Changes since v4:
- No change--- arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +25
-0@@ -106,6 +106,31 @@ wkup_rti0: watchdog@2b000000 { status = "reserved"; }; + wkup_r5fss0: r5fss@78000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x78000000 0x00 0x78000000 0x8000>, + <0x78100000 0x00 0x78100000 0x8000>; + power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + wkup_r5fss0_core0: r5f@78000000 { + compatible = "ti,am62-r5f"; + reg = <0x78000000 0x00008000>, + <0x78100000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <121>; + ti,sci-proc-ids = <0x01 0xff>; + resets = <&k3_reset 121 1>; + firmware-name = "am62-wkup-r5f0_0-fw"; + ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>; + }; + }; + wkup_vtm0: temperature-sensor@b00000 { compatible = "ti,j7200-vtm"; reg = <0x00 0xb00000 0x00 0x400>,
Re: [PATCH v5 01/10] arm64: dts: ti: k3-am62-wakeup: Add wakeup R5F node
In reply to Judith MendezHi Judith,
Quoted 33 lines · Judith Mendez
From: Hari Nagalla <[email protected]>
AM62 SoC devices have a single core R5F processor in wakeup domain. The R5F processor in wakeup domain is used as a device manager for the SoC.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Changes since v4:
- No change--- arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +9
-0@@ -106,6 +106,31 @@ wkup_rti0: watchdog@2b000000 { status = "reserved"; }; + wkup_r5fss0: r5fss@78000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x78000000 0x00 0x78000000 0x8000>, + <0x78100000 0x00 0x78100000 0x8000>; + power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; +
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi wkup_rti0: watchdog@2b000000 { · line 127
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +10
-0+ wkup_r5fss0_core0: r5f@78000000 { + compatible = "ti,am62-r5f"; + reg = <0x78000000 0x00008000>, + <0x78100000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <121>; + ti,sci-proc-ids = <0x01 0xff>; + resets = <&k3_reset 121 1>; + firmware-name = "am62-wkup-r5f0_0-fw";
Here and everywhere else, 'resets' and 'firmware-name' are standard DT properties and should come before vendor specific properties.
https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-properties-in-device-node
Thanks,
Beleswar
Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +6
-0+ ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>; + }; + }; + wkup_vtm0: temperature-sensor@b00000 { compatible = "ti,j7200-vtm"; reg = <0x00 0xb00000 0x00 0x400>,
Re: [PATCH v5 01/10] arm64: dts: ti: k3-am62-wakeup: Add wakeup R5F node
Hi Beleswar,
Quoted 40 lines · Beleswar Prasad Padhi
Hi Judith,
Quoted 37 lines · Judith Mendez
From: Hari Nagalla <[email protected]>
AM62 SoC devices have a single core R5F processor in wakeup domain. The R5F processor in wakeup domain is used as a device manager for the SoC.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Changes since v4:
- No change
---
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi| 25 ++++++++++++++++++++++1 file changed, 25 insertions(+)arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +14
-0@@ -106,6 +106,31 @@ wkup_rti0: watchdog@2b000000 { status = "reserved"; }; + wkup_r5fss0: r5fss@78000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x78000000 0x00 0x78000000 0x8000>, + <0x78100000 0x00 0x78100000 0x8000>; + power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + wkup_r5fss0_core0: r5f@78000000 { + compatible = "ti,am62-r5f"; + reg = <0x78000000 0x00008000>, + <0x78100000 0x00008000>; + reg-names = "atcm", "btcm";
Quoted 8 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi wkup_rti0: watchdog@2b000000 { · line 127
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +5
-0+ ti,sci = <&dmsc>; + ti,sci-dev-id = <121>; + ti,sci-proc-ids = <0x01 0xff>; + resets = <&k3_reset 121 1>; + firmware-name = "am62-wkup-r5f0_0-fw";Here and everywhere else, 'resets' and 'firmware-name' are standard DT properties and should come before vendor specific properties.
Right, let me fix that, thanks.
~ Judith
Quoted 15 lines
https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-properties-in-device-node
Thanks,
BeleswarQuoted 9 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +6
-0+ ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>; + }; + }; + wkup_vtm0: temperature-sensor@b00000 { compatible = "ti,j7200-vtm"; reg = <0x00 0xb00000 0x00 0x400>,
PATCH v5 2/10 arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node
In reply to Judith MendezFrom: Hari Nagalla <[email protected]>
AM62A SoCs have a single R5F core in the MCU voltage domain. Add the R5FSS node with the child node for core0 in MCU voltage domain .dtsi file.
---
Changes since v4:
- Drop SRAM node for am62ax MCU R5fSS0 core0
--- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +25 -0
@@ -175,4 +175,29 @@ mcu_mcan1: can@4e18000 { bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; status = "disabled"; }; + + mcu_r5fss0: r5fss@79000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x79000000 0x00 0x79000000 0x8000>, + <0x79020000 0x00 0x79020000 0x8000>; + power-domains = <&k3_pds 7 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + mcu_r5fss0_core0: r5f@79000000 { + compatible = "ti,am62-r5f"; + reg = <0x79000000 0x00008000>, + <0x79020000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <9>; + ti,sci-proc-ids = <0x03 0xff>; + resets = <&k3_reset 9 1>; + firmware-name = "am62a-mcu-r5f0_0-fw"; + ti,atcm-enable = <0>; + ti,btcm-enable = <1>; + ti,loczrama = <0>; + }; + }; };
Signature · 1 line
2.48.0
Re: [PATCH v5 02/10] arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node
Quoted 9 lines · Judith Mendez
From: Hari Nagalla <[email protected]>
AM62A SoCs have a single R5F core in the MCU voltage domain. Add the R5FSS node with the child node for core0 in MCU voltage domain .dtsi file.
Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Quoted 40 lines
Changes since v4:
- Drop SRAM node for am62ax MCU R5fSS0 core0--- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +25
-0@@ -175,4 +175,29 @@ mcu_mcan1: can@4e18000 { bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; status = "disabled"; }; + + mcu_r5fss0: r5fss@79000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x79000000 0x00 0x79000000 0x8000>, + <0x79020000 0x00 0x79020000 0x8000>; + power-domains = <&k3_pds 7 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + mcu_r5fss0_core0: r5f@79000000 { + compatible = "ti,am62-r5f"; + reg = <0x79000000 0x00008000>, + <0x79020000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <9>; + ti,sci-proc-ids = <0x03 0xff>; + resets = <&k3_reset 9 1>; + firmware-name = "am62a-mcu-r5f0_0-fw"; + ti,atcm-enable = <0>; + ti,btcm-enable = <1>; + ti,loczrama = <0>; + }; + }; };
PATCH v5 3/10 arm64: dts: ti: k3-am62a-wakeup: Add R5F device node
In reply to Judith MendezFrom: Devarsh Thakkar <[email protected]>
AM62A SoCs have a single R5F core in wakeup domain. This core is also used as a device manager for the SoC.
---
Changes since v4:
- No change
--- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +25 -0
@@ -103,6 +103,31 @@ wkup_rti0: watchdog@2b000000 { status = "reserved"; }; + wkup_r5fss0: r5fss@78000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x78000000 0x00 0x78000000 0x8000>, + <0x78100000 0x00 0x78100000 0x8000>; + power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + wkup_r5fss0_core0: r5f@78000000 { + compatible = "ti,am62-r5f"; + reg = <0x78000000 0x00008000>, + <0x78100000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <121>; + ti,sci-proc-ids = <0x01 0xff>; + resets = <&k3_reset 121 1>; + firmware-name = "am62a-wkup-r5f0_0-fw"; + ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>; + }; + }; + wkup_vtm0: temperature-sensor@b00000 { compatible = "ti,j7200-vtm"; reg = <0x00 0xb00000 0x00 0x400>,
Signature · 1 line
2.48.0
Re: [PATCH v5 03/10] arm64: dts: ti: k3-am62a-wakeup: Add R5F device node
Quoted 9 lines · Judith Mendez
From: Devarsh Thakkar <[email protected]>
AM62A SoCs have a single R5F core in wakeup domain. This core is also used as a device manager for the SoC.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Quoted 42 lines
Changes since v4:
- No change--- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +25
-0@@ -103,6 +103,31 @@ wkup_rti0: watchdog@2b000000 { status = "reserved"; }; + wkup_r5fss0: r5fss@78000000 { + compatible = "ti,am62-r5fss"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x78000000 0x00 0x78000000 0x8000>, + <0x78100000 0x00 0x78100000 0x8000>; + power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + + wkup_r5fss0_core0: r5f@78000000 { + compatible = "ti,am62-r5f"; + reg = <0x78000000 0x00008000>, + <0x78100000 0x00008000>; + reg-names = "atcm", "btcm"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <121>; + ti,sci-proc-ids = <0x01 0xff>; + resets = <&k3_reset 121 1>; + firmware-name = "am62a-wkup-r5f0_0-fw"; + ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>; + }; + }; + wkup_vtm0: temperature-sensor@b00000 { compatible = "ti,j7200-vtm"; reg = <0x00 0xb00000 0x00 0x400>,
PATCH v5 4/10 arm64: dts: ti: k3-am62a-main: Add C7xv device node
In reply to Judith MendezFrom: Jai Luthra <[email protected]>
AM62A SoCs have a C7xv DSP subsystem with Analytics engine capability. This subsystem is intended for deep learning purposes. Define the device node for C7xv DSP.
---
Changes since v4:
- No change
--- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +12 -0
@@ -1123,6 +1123,18 @@ vpu: video-codec@30210000 { power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>; }; + c7x_0: dsp@7e000000 { + compatible = "ti,am62a-c7xv-dsp"; + reg = <0x00 0x7e000000 0x00 0x00100000>; + reg-names = "l2sram"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <208>; + ti,sci-proc-ids = <0x04 0xff>; + resets = <&k3_reset 208 1>; + firmware-name = "am62a-c71_0-fw"; + status = "disabled"; + }; + e5010: jpeg-encoder@fd20000 { compatible = "ti,am62a-jpeg-enc", "img,e5010-jpeg-enc"; reg = <0x00 0xfd20000 0x00 0x100>,
Signature · 1 line
2.48.0
Re: [PATCH v5 04/10] arm64: dts: ti: k3-am62a-main: Add C7xv device node
Quoted 10 lines · Judith Mendez
From: Jai Luthra <[email protected]>
AM62A SoCs have a C7xv DSP subsystem with Analytics engine capability. This subsystem is intended for deep learning purposes. Define the device node for C7xv DSP.
Signed-off-by Jai Luthra <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Quoted 29 lines
Changes since v4:
- No change--- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +12
-0@@ -1123,6 +1123,18 @@ vpu: video-codec@30210000 { power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>; }; + c7x_0: dsp@7e000000 { + compatible = "ti,am62a-c7xv-dsp"; + reg = <0x00 0x7e000000 0x00 0x00100000>; + reg-names = "l2sram"; + ti,sci = <&dmsc>; + ti,sci-dev-id = <208>; + ti,sci-proc-ids = <0x04 0xff>; + resets = <&k3_reset 208 1>; + firmware-name = "am62a-c71_0-fw"; + status = "disabled"; + }; + e5010: jpeg-encoder@fd20000 { compatible = "ti,am62a-jpeg-enc", "img,e5010-jpeg-enc"; reg = <0x00 0xfd20000 0x00 0x100>,
PATCH v5 5/10 arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors
In reply to Judith MendezFrom: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
---
Changes since v4:
- Add "status = okay" for mailbox nodes at the board level, disabling of mailbox nodes in voltage domain .dtsi files will come in a separate series
--- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 96 +++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +90 -6
@@ -49,6 +49,42 @@ linux,cma { linux,cma-default; }; + c7x_0_dma_memory_region: c7x-dma-memory@99800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x99800000 0x00 0x100000>; + no-map; + }; + + c7x_0_memory_region: c7x-memory@99900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x99900000 0x00 0xf00000>; + no-map; + }; + + mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map; + }; + + mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + }; + + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>; + no-map; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; alignment = <0x1000>;
@@ -60,12 +96,6 @@ secure_ddr: optee@9e800000 { alignment = <0x1000>; no-map; }; - - wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x9c900000 0x00 0x01e00000>; - no-map; - }; }; opp-table {
@@ -737,3 +767,57 @@ dpi1_out: endpoint { }; }; }; + +&mailbox0_cluster0 { + status = "okay"; + + mbox_r5_0: mbox-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster1 { + status = "okay"; + + mbox_c7x_0: mbox-c7x-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster2 { + status = "okay"; + + mbox_mcu_r5_0: mbox-mcu-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&wkup_r5fss0 { + status = "okay"; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0>, <&mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0 { + status = "okay"; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster2>, <&mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +}; + +&c7x_0 { + mboxes = <&mailbox0_cluster1>, <&mbox_c7x_0>; + memory-region = <&c7x_0_dma_memory_region>, + <&c7x_0_memory_region>; + status = "okay"; +};
Signature · 1 line
2.48.0
Re: [PATCH v5 05/10] arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors
Quoted 8 lines · Judith Mendez
From: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
Quoted 4 lines
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Quoted 126 lines
Changes since v4:
- Add "status = okay" for mailbox nodes at the board level, disabling of mailbox nodes in voltage domain .dtsi files will come in a separate series--- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 96 +++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 6 deletions(-)arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +90
-6@@ -49,6 +49,42 @@ linux,cma { linux,cma-default; }; + c7x_0_dma_memory_region: c7x-dma-memory@99800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x99800000 0x00 0x100000>; + no-map; + }; + + c7x_0_memory_region: c7x-memory@99900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x99900000 0x00 0xf00000>; + no-map; + }; + + mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map; + }; + + mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + }; + + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>; + no-map; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; alignment = <0x1000>;@@ -60,12 +96,6 @@ secure_ddr: optee@9e800000 { alignment = <0x1000>; no-map; }; - - wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x9c900000 0x00 0x01e00000>; - no-map; - }; }; opp-table {@@ -737,3 +767,57 @@ dpi1_out: endpoint { }; }; }; + +&mailbox0_cluster0 { + status = "okay"; + + mbox_r5_0: mbox-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster1 { + status = "okay"; + + mbox_c7x_0: mbox-c7x-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster2 { + status = "okay"; + + mbox_mcu_r5_0: mbox-mcu-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&wkup_r5fss0 { + status = "okay"; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0>, <&mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0 { + status = "okay"; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster2>, <&mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +}; + +&c7x_0 { + mboxes = <&mailbox0_cluster1>, <&mbox_c7x_0>; + memory-region = <&c7x_0_dma_memory_region>, + <&c7x_0_memory_region>; + status = "okay"; +};
PATCH v5 6/10 arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
In reply to Judith MendezFrom: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
---
Changes since v4:
- Drop SRAM node for am62px MCU R5fSS0 core0
--- arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 50 ++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +44 -6
@@ -48,6 +48,30 @@ reserved-memory { #size-cells = <2>; ranges; + mcu_r5fss0_core0_dma_memory_region: mcu-r5fss-dma-memory-region@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map; + }; + + mcu_r5fss0_core0_memory_region: mcu-r5fss-memory-region@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + }; + + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>; + no-map; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; no-map;
@@ -57,12 +81,6 @@ secure_ddr: optee@9e800000 { reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */ no-map; }; - - wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x9c900000 0x00 0x01e00000>; - no-map; - }; }; vmain_pd: regulator-0 {
@@ -638,6 +656,26 @@ mbox_mcu_r5_0: mbox-mcu-r5-0 { }; }; +&wkup_r5fss0 { + status = "okay"; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0 &mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0 { + status = "okay"; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster1 &mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +}; + &main_uart0 { pinctrl-names = "default"; pinctrl-0 = <&main_uart0_pins_default>;
Signature · 1 line
2.48.0
Re: [PATCH v5 06/10] arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
Quoted 37 lines · Judith Mendez
From: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Changes since v4:
- Drop SRAM node for am62px MCU R5fSS0 core0--- arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 50 ++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-)arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +11
-0@@ -48,6 +48,30 @@ reserved-memory { #size-cells = <2>; ranges; + mcu_r5fss0_core0_dma_memory_region: mcu-r5fss-dma-memory-region@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map; + }; + + mcu_r5fss0_core0_memory_region: mcu-r5fss-memory-region@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + };
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts reserved-memory { · line 71
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +10
-0+ + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>;
0x1e00000?
Yes I know you didn't add this and are just coping it from below, but it is still an issue. I see the same problem for the next patch, the R5F memory size is 0xc00000??
Every remote core gets 15MB (0xf00000), this has been true for all K3, and all cores, DSP, R5F, M4, etc.. You even do it correct for the MCU R5F above, but the WKUP R5F on AM62P and AM62 are just randomly given 30M and 12MB?
Andrew
Quoted 46 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +23
-6+ no-map; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; no-map;@@ -57,12 +81,6 @@ secure_ddr: optee@9e800000 { reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */ no-map; }; - - wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x9c900000 0x00 0x01e00000>; - no-map; - }; }; vmain_pd: regulator-0 {@@ -638,6 +656,26 @@ mbox_mcu_r5_0: mbox-mcu-r5-0 { }; }; +&wkup_r5fss0 { + status = "okay"; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0 &mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0 { + status = "okay"; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster1 &mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +}; + &main_uart0 { pinctrl-names = "default"; pinctrl-0 = <&main_uart0_pins_default>;
Re: [PATCH v5 06/10] arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
Hi Andrew,
Quoted 52 lines · Andrew Davis
Quoted 38 lines · Judith Mendez
From: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Changes since v4:
- Drop SRAM node for am62px MCU R5fSS0 core0
---
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts| 50 ++++++++++++++++++++++---1 file changed, 44 insertions(+), 6 deletions(-)arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +11
-0@@ -48,6 +48,30 @@ reserved-memory { #size-cells = <2>; ranges; + mcu_r5fss0_core0_dma_memory_region: mcu-r5fss-dma-memory-region@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map; + }; + + mcu_r5fss0_core0_memory_region: mcu-r5fss-memory-region@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + };arch/arm64/boot/dts/ti/k3-am62p5-sk.dts reserved-memory { · line 72
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +10
-0+ + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>;
0x1e00000?
Quoted 7 lines
Yes I know you didn't add this and are just coping it from below, but it is still an issue. I see the same problem for the next patch, the R5F memory size is
0xc00000??Every remote core gets 15MB (
0xf00000), this has been true for all K3, and all cores, DSP, R5F, M4, etc.. You even do it correct for the MCU R5F above, but the WKUP R5F on AM62P and AM62 are just randomly given 30M and 12MB?
Not sure why FW requires 30MB here, I have reached out to FW team to investigate this, will respond back here soon.
~ Judith
Quoted 47 lines
Andrew
Quoted 44 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +3
-0+ no-map; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>;no-map;
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +0
-0@@ -57,12 +81,6 @@ secure_ddr: optee@9e800000 {reg = <
0x000x9e8000000x000x01800000>; /* for OP-TEE */ no-map;
};
-
-wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 { - compatible = "shared-dma-pool";
- reg = <0x000x9c9000000x000x01e00000>;
- no-map;
- };
};
vmain_pd: regulator-0 {arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +20
-0@@ -638,6 +656,26 @@ mbox_mcu_r5_0: mbox-mcu-r5-0 { }; }; +&wkup_r5fss0 { + status = "okay"; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0 &mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0 { + status = "okay"; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster1 &mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +}; + &main_uart0 { pinctrl-names = "default"; pinctrl-0 = <&main_uart0_pins_default>;
Re: [PATCH v5 06/10] arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
Hi Judith,
Thanks for the patch.
Quoted 23 lines · Judith Mendez
Hi Andrew,
Quoted 19 lines · Andrew Davis
Quoted 18 lines · Judith Mendez
From: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Changes since v4:
- Drop SRAM node for am62px MCU R5fSS0 core0
---
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts| 50 ++++++++++++++++++++++---1 file changed, 44 insertions(+), 6 deletions(-)
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +0
-0@@ -48,6 +48,30 @@ reserved-memory { #size-cells = <2>;Quoted 8 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts reserved-memory { · line 56
Quoted 8 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +6
-0ranges; + mcu_r5fss0_core0_dma_memory_region: mcu-r5fss-dma-memory-region@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map; + }; +
I believe you are testing these carveouts against the default firmwares shipped with AM62P SDK (compiled from meta-arago), With the same firmwares, each remote core also does inter-processor communication with each other (RTOS<->RTOS) on bootup, so you need to reserve the regions for the same too as done here [1].
Quoted 22 lines
Quoted 22 lines
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +5
-0+ mcu_r5fss0_core0_memory_region: mcu-r5fss-memory-region@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + };arch/arm64/boot/dts/ti/k3-am62p5-sk.dts reserved-memory { · line 71
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +10
-0+ + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>;
0x1e00000?Yes I know you didn't add this and are just coping it from below, but it is still an issue. I see the same problem for the next patch, the R5F memory size is
0xc00000??
Quoted 7 lines
Quoted 3 lines
Every remote core gets 15MB (
0xf00000), this has been true for all K3, and all cores, DSP, R5F, M4, etc.. You even do it correct for the MCU R5F above, but the WKUP R5F on AM62P and AM62 are just randomly given 30M and 12MB?Not sure why FW requires 30MB here, I have reached out to FW team to investigate this, will respond back here soon.
You will need an alignment with the firmware team to make sure that it doesn't break with the default firmwares shipped with the AM62Px SDK. Also just FYI, this will leave a gap of 14 MiB between the wakeup R5 and the next component i.e. ATF, ideally we should have avoided this gap but seems like ATF nodes are already upstream [2], so probably can't do much, nevertheless I hope that 14 MiB will be claimed/used by Linux in some manner.
Soumya,
Please provide an ACK for this, if the DM R5 firmware is exceeding 15 MiB, then you will need to update your linker scripts and regenerate the ipc echo test firmwares to make sure the wakeup R5 code/data does not exceed to what is being proposed here (15 MiB).
Regards
Devarsh
Re: [PATCH v5 06/10] arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
Hi Devarsh,
Quoted 41 lines · Devarsh Thakkar
Hi Judith,
Thanks for the patch.
Quoted 36 lines · Judith Mendez
Hi Andrew,
Quoted 32 lines · Andrew Davis
Quoted 31 lines · Judith Mendez
From: Devarsh Thakkar <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>Signed-off-by Judith Mendez <[email protected]>---
Changes since v4:
- Drop SRAM node for am62px MCU R5fSS0 core0--- arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 50 ++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-)arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +4
-0@@ -48,6 +48,30 @@ reserved-memory { #size-cells = <2>; ranges; + mcu_r5fss0_core0_dma_memory_region: mcu-r5fss-dma-memory-region@9b800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b800000 0x00 0x100000>; + no-map;
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts reserved-memory { · line 56
Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +2
-0+ }; +I believe you are testing these carveouts against the default firmwares shipped with AM62P SDK (compiled from meta-arago), With the same firmwares, each remote core also does inter-processor communication with each other (RTOS<->RTOS) on bootup, so you need to reserve the regions for the same too as done here [1].
This is how I originally had the patch Devarsh, if you see earlier review, we removed the SRAM nodes and the rtos-to-rtos memory carveouts.
Quoted 31 lines
Quoted 23 lines
Quoted 23 lines
Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +5
-0+ mcu_r5fss0_core0_memory_region: mcu-r5fss-memory-region@9b900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9b900000 0x00 0xf00000>; + no-map; + };arch/arm64/boot/dts/ti/k3-am62p5-sk.dts reserved-memory { · line 71
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +10
-0+ + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c800000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-memory@9c900000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c900000 0x00 0x1e00000>;
0x1e00000?Yes I know you didn't add this and are just coping it from below, but it is still an issue. I see the same problem for the next patch, the R5F memory size is
0xc00000??Quoted 7 lines
Quoted 3 lines
Every remote core gets 15MB (
0xf00000), this has been true for all K3, and all cores, DSP, R5F, M4, etc.. You even do it correct for the MCU R5F above, but the WKUP R5F on AM62P and AM62 are just randomly given 30M and 12MB?Not sure why FW requires 30MB here, I have reached out to FW team to investigate this, will respond back here soon.
Quoted 6 lines
You will need an alignment with the firmware team to make sure that it doesn't break with the default firmwares shipped with the AM62Px SDK. Also just FYI, this will leave a gap of 14 MiB between the wakeup R5 and the next component i.e. ATF, ideally we should have avoided this gap but seems like ATF nodes are already upstream [2], so probably can't do much, nevertheless I hope that 14 MiB will be claimed/used by Linux in some manner.
I did a sanity boot test with the default firmwares shipped for am62px
SDK, no error with am62px boot so far. Changes are: removed SRAM node, reduced wkup r5 memory carveout, no rtos-to-rtos memory carveout).
But I realize this is not a complete test. I believe there may be potentially memory corruption with these changes if all implemented.
Andrew, I am not sure we are going in a good direction here, unless we have a different reduced/fixed FW in the am62px SDK, we may have memory corruption issues on our hands.
~ Judith
Quoted 15 lines
Soumya,
Please provide an ACK for this, if the DM R5 firmware is exceeding 15 MiB, then you will need to update your linker scripts and regenerate the ipc echo test firmwares to make sure the wakeup R5 code/data does not exceed to what is being proposed here (15 MiB).Regards
Devarsh
PATCH v5 7/10 arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors
In reply to Judith MendezFrom: Hari Nagalla <[email protected]>
For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations.
---
Changes since v4:
- Add "status = okay" for mailbox nodes at the board level, disabling of mailbox nodes in voltage domain .dtsi files will come in a separate series
--- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +29 -5
@@ -68,6 +68,18 @@ mcu_m4fss_memory_region: m4f-memory@9cc00000 { no-map; }; + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9da00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9da00000 0x00 0x100000>; + no-map; + }; + + wkup_r5fss0_core0_memory_region: r5f-memory@9db00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9db00000 0x00 0xc00000>; + no-map; + }; + secure_tfa_ddr: tfa@9e780000 { reg = <0x00 0x9e780000 0x00 0x80000>; alignment = <0x1000>;
@@ -80,11 +92,6 @@ secure_ddr: optee@9e800000 { no-map; }; - wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x9db00000 0x00 0xc00000>; - no-map; - }; }; leds {
@@ -474,10 +481,17 @@ cpsw3g_phy0: ethernet-phy@0 { }; &mailbox0_cluster0 { + status = "okay"; + mbox_m4_0: mbox-m4-0 { ti,mbox-rx = <0 0 0>; ti,mbox-tx = <1 0 0>; }; + + mbox_r5_0: mbox-r5-0 { + ti,mbox-rx = <2 0 0>; + ti,mbox-tx = <3 0 0>; + }; }; &mcu_m4fss {
@@ -487,6 +501,16 @@ &mcu_m4fss { status = "okay"; }; +&wkup_r5fss0 { + status = "okay"; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0 &mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + &usbss0 { bootph-all; status = "okay";
Signature · 1 line
2.48.0
PATCH v5 8/10 arm64: dts: ti: k3-am62a7-sk: Reserve main_timer2 for C7x DSP
In reply to Judith MendezFrom: Hari Nagalla <[email protected]>
C7x DSP uses main_timer2, so mark it as reserved in linux DT.
---
Changes since v4:
- No change
--- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +5 -0
@@ -679,6 +679,11 @@ &main_uart1 { status = "reserved"; }; +/* main_timer2 is used by C7x DSP */ +&main_timer2 { + status = "reserved"; +}; + &usbss0 { status = "okay"; ti,vbus-divider;
Signature · 1 line
2.48.0
PATCH v5 9/10 arm64: dts: ti: k3-am62a7-sk: Reserve main_rti4 for C7x DSP
In reply to Judith MendezFrom: Hari Nagalla <[email protected]>
The main rti4 watchdog timer is used by the C7x DSP, so reserve the timer in the linux device tree.
---
Changes since v4:
- No change
--- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +5 -0
@@ -826,3 +826,8 @@ &c7x_0 { <&c7x_0_memory_region>; status = "okay"; }; + +/* main_rti4 is used by C7x DSP */ +&main_rti4 { + status = "reserved"; +};
Signature · 1 line
2.48.0
PATCH v5 10/10 arm64: dts: ti: k3-am64: Reserve timers used by MCU FW
In reply to Judith MendezFrom: Hari Nagalla <[email protected]>
AM64x device has 4 R5F cores in the main domain. TI MCU firmware uses main domain timers as tick timers in these firmwares. Hence keep them as reserved in the Linux device tree.
---
Changes since v4:
- Reserve timers for AM64 MCU FW, patch 10/10
--- arch/arm64/boot/dts/ti/k3-am642-evm.dts | 17 +++++++++++++++++ arch/arm64/boot/dts/ti/k3-am642-sk.dts | 17 +++++++++++++++++ 2 files changed, 34 insertions(+)
arch/arm64/boot/dts/ti/k3-am642-evm.dts +17 -0
@@ -796,6 +796,23 @@ &mcu_m4fss { status = "okay"; }; +/* main_timers 8-11 are used by TI MCU FW */ +&main_timer8 { + status = "reserved"; +}; + +&main_timer9 { + status = "reserved"; +}; + +&main_timer10 { + status = "reserved"; +}; + +&main_timer11 { + status = "reserved"; +}; + &serdes_ln_ctrl { idle-states = <AM64_SERDES0_LANE0_PCIE0>; };
arch/arm64/boot/dts/ti/k3-am642-sk.dts +17 -0
@@ -710,6 +710,23 @@ &mcu_m4fss { status = "okay"; }; +/* main_timers 8-11 are used by TI MCU FW */ +&main_timer8 { + status = "reserved"; +}; + +&main_timer9 { + status = "reserved"; +}; + +&main_timer10 { + status = "reserved"; +}; + +&main_timer11 { + status = "reserved"; +}; + &ecap0 { status = "okay"; /* PWM is available on Pin 1 of header J3 */
Signature · 1 line
2.48.0
Hi Vignesh, all,
Quoted 11 lines · Judith Mendez
For am62x and am62ax devices, this patch series adds device nodes for the R5F subsystem and C7xv DSP subsystem found in their respective voltage domain, based on the device TRMs [0][1].
This patch series also includes patches for enabling IPC for am62x SK, am62ax SK, and am62px SK by reserving memory and binding the mailbox assignments for each remote core.
Also reserve timers used by C7x DSP for am62ax SK board and timers used by MCU FW for AM642 SK and EVM boards as per firmware requirements.
Is it at all possible to only pick the first 4 patches of this series that only enable the core nodes?
I will respin the rest of the series in a different patch series.
~ Judith