Add R5F and C7x DSP nodes for AM62a SoC
Subsystems (2)
v4 cover Add R5F and C7x DSP nodes for AM62a SoC
This patch series adds R5F and C7x dsp processor nodes and shared memory based Virtio/IPC configuration for AM62A SoC.
changes in v4:
*) Fixed typos in patch4 commit message.
*) With the updated binding doc for AM62A C7xv in the kernel tree
earlier reported DTB warnings have vanished.
v3: https://lore.kernel.org/all/[email protected]/
Devarsh Thakkar (2):
arm64: dts: k3-am62a-wakeup: Add R5F device node
arm64: dts: ti: k3-am62a7-sk: Enable ipc with remote proc nodes
Hari Nagalla (1):
arm64: dts: k3-am62a-mcu: Add R5F remote proc node
Jai Luthra (1):
arm64: dts: k3-am62a-main: Add C7xv device node
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 11 ++++ arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 35 +++++++++++ arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 23 +++++++ arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 68 +++++++++++++++++++++ 4 files changed, 137 insertions(+)
Signature · 1 line
2.34.1
PATCH v4 1/4 arm64: dts: k3-am62a-main: Add C7xv device node
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.
--- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +11 -0
@@ -1088,4 +1088,15 @@ vpu: video-codec@30210000 { clocks = <&k3_clks 204 2>; 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"; + }; };
Signature · 1 line
2.34.1
Re: [PATCH v4 1/4] arm64: dts: k3-am62a-main: Add C7xv device node
Quoted 9 lines · Hari Nagalla
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]>---
Quoted 23 lines
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +11
-0@@ -1088,4 +1088,15 @@ vpu: video-codec@30210000 { clocks = <&k3_clks 204 2>; 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"; + }; };
PATCH v4 2/4 arm64: dts: k3-am62a-mcu: Add R5F remote proc node
In reply to Hari NagallaAM62A SoCs have a single R5F core in the MCU voltage domain. The MCU domain also has a 512KB sram memory, the R5F core can use for applications needing fast memory access.
--- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +35 -0
@@ -6,6 +6,17 @@ */ &cbass_mcu { + mcu_ram: sram@79100000 { + compatible = "mmio-sram"; + reg = <0x00 0x79100000 0x00 0x80000>; + ranges = <0x00 0x00 0x79100000 0x80000>; + #address-cells = <1>; + #size-cells = <1>; + + mcu1-sram@0 { + reg = <0x0 0x80000>; + }; + }; mcu_pmx0: pinctrl@4084000 { compatible = "pinctrl-single"; reg = <0x00 0x04084000 0x00 0x88>;
@@ -167,4 +178,28 @@ 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>; + 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>; + sram = <&mcu_ram>; + }; + }; };
Signature · 1 line
2.34.1
Re: [PATCH v4 2/4] arm64: dts: k3-am62a-mcu: Add R5F remote proc node
Quoted 14 lines · Hari Nagalla
AM62A SoCs have a single R5F core in the MCU voltage domain. The MCU domain also has a 512KB sram memory, the R5F core can use for applications needing fast memory access.
Signed-off-by Hari Nagalla <[email protected]>--- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +0
-0
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi line 9
Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +1
-0@@ -6,6 +6,17 @@ */ &cbass_mcu { + mcu_ram: sram@79100000 {
This change doesn't belong to this patch, this memory can be used by other components in the system and is not exclusive to the R5F firmware.
Let's add this node later so it can be discussed on its own and not block this otherwise correct series.
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi line 19
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +10
-0+ compatible = "mmio-sram"; + reg = <0x00 0x79100000 0x00 0x80000>; + ranges = <0x00 0x00 0x79100000 0x80000>; + #address-cells = <1>; + #size-cells = <1>; + + mcu1-sram@0 { + reg = <0x0 0x80000>; + }; + };
Need newline here if you were going to keep this node..
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +0
-0mcu_pmx0: pinctrl@4084000 { compatible = "pinctrl-single"; reg = <0x00 0x04084000 0x00 0x88>;@@ -167,4 +178,28 @@ mcu_mcan1: can@4e18000 { bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi mcu_mcan1: can@4e18000 { · line 188
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +8
-0status = "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>;
Newline here.
Andrew
Quoted 17 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +16
-0+ 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>; + sram = <&mcu_ram>; + }; + }; };
PATCH v4 3/4 arm64: dts: k3-am62a-wakeup: Add R5F device node
In reply to Hari NagallaFrom: Devarsh Thakkar <[email protected]>
AM62A SoCs have a single R5F core in waekup domain. This core is also used as a device manager for the SoC.
--- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +23 -0
@@ -76,6 +76,29 @@ 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>; + 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.34.1
Re: [PATCH v4 3/4] arm64: dts: k3-am62a-wakeup: Add R5F device node
Quoted 16 lines · Hari Nagalla
From: Devarsh Thakkar <[email protected]>
AM62A SoCs have a single R5F core in waekup 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]>--- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +0
-0
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi wkup_rti0: watchdog@2b000000 { · line 85
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +7
-0@@ -76,6 +76,29 @@ 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>;
Need newline here.
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi wkup_rti0: watchdog@2b000000 { · line 95
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-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";
resets and firmware-name should go before vendor specific properties.
Andrew
Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am62a-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>,
Nishanth Menon
maintainerRe: [PATCH v4 3/4] arm64: dts: k3-am62a-wakeup: Add R5F device node
Quoted 29 lines · Andrew Davis
Quoted 16 lines · Hari Nagalla
From: Devarsh Thakkar <[email protected]>
AM62A SoCs have a single R5F core in waekup 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]>--- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +0
-0arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi wkup_rti0: watchdog@2b000000 { · line 84
Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +7
-0@@ -76,6 +76,29 @@ 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>;Need newline here.
Quoted 12 lines
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi wkup_rti0: watchdog@2b000000 { · line 95
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-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";resets and firmware-name should go before vendor specific properties.
Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +3
-0+ ti,atcm-enable = <1>; + ti,btcm-enable = <1>; + ti,loczrama = <1>;
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
PATCH v4 4/4 arm64: dts: ti: k3-am62a7-sk: Enable ipc with remote proc nodes
In reply to Hari NagallaFrom: Devarsh Thakkar <[email protected]>
Reserve memory for remote rpoc IPC and bind the mailbox assignments for each remote proc. 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, resource table and as tracebuffer.
--- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +68 -0
@@ -61,11 +61,40 @@ secure_ddr: optee@9e800000 { 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 0x01e00000>; 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 0x0f00000>; + no-map; + }; + + 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 0x01f00000>; + no-map; + }; }; vmain_pd: regulator-0 {
@@ -728,3 +757,42 @@ dpi1_out: endpoint { }; }; }; + +&mailbox0_cluster0 { + mbox_r5_0: mbox-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster1 { + mbox_c7x_0: mbox-c7x-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster2 { + mbox_mcu_r5_0: mbox-mcu-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&c7x_0 { + mboxes = <&mailbox0_cluster1>, <&mbox_c7x_0>; + memory-region = <&c7x_0_dma_memory_region>, + <&c7x_0_memory_region>; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0>, <&mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster2>, <&mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +};
Signature · 1 line
2.34.1
Re: [PATCH v4 4/4] arm64: dts: ti: k3-am62a7-sk: Enable ipc with remote proc nodes
Quoted 3 lines · Hari Nagalla
From: Devarsh Thakkar <[email protected]>
Reserve memory for remote rpoc IPC and bind the mailbox assignments
s/remote rpoc/Remoteproc
Quoted 20 lines
for each remote proc. 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, resource table and as tracebuffer.
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Hari Nagalla <[email protected]>--- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+)arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +1
-0@@ -61,11 +61,40 @@ secure_ddr: optee@9e800000 { no-map; }; + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts secure_ddr: optee@9e800000 { · line 74
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +5
-0+ 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 0x01e00000>; no-map; };
newline
Quoted 43 lines
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +36
-0+ 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 0x0f00000>; + no-map; + }; + + 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 0x01f00000>; + no-map; + }; }; vmain_pd: regulator-0 {@@ -728,3 +757,42 @@ dpi1_out: endpoint { }; }; }; + +&mailbox0_cluster0 { + mbox_r5_0: mbox-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&mailbox0_cluster1 { + mbox_c7x_0: mbox-c7x-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + };
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts dpi1_out: endpoint { · line 782
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +10
-0+}; + +&mailbox0_cluster2 { + mbox_mcu_r5_0: mbox-mcu-r5-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&c7x_0 {
These nodes are incomplete before this point and should have been disabled when you added them in the dtsi, set their status to "okay" here.
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts dpi1_out: endpoint { · line 783
Quoted 1 line
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +1
-0+ mboxes = <&mailbox0_cluster1>, <&mbox_c7x_0>;
Should be one item:
mboxes = <&mailbox0_cluster1 &mbox_c7x_0>;
Andrew
Quoted 15 lines
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +15
-0+ memory-region = <&c7x_0_dma_memory_region>, + <&c7x_0_memory_region>; +}; + +&wkup_r5fss0_core0 { + mboxes = <&mailbox0_cluster0>, <&mbox_r5_0>; + memory-region = <&wkup_r5fss0_core0_dma_memory_region>, + <&wkup_r5fss0_core0_memory_region>; +}; + +&mcu_r5fss0_core0 { + mboxes = <&mailbox0_cluster2>, <&mbox_mcu_r5_0>; + memory-region = <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>; +};