From f5da5b1db7da36d36724d976d5842292e547e7b1 Mon Sep 17 00:00:00 2001 From: Vaishnav Achath Date: Wed, 18 Dec 2024 18:43:38 +0530 Subject: [PATCH 1/4] mailbox: k3-sec-proxy: Add DM to DMSC communication thread for J722S J722S R5 SPL uses sec-proxy threads 28 and 29 for communication with TIFS. Mark these as valid threads in the driver. https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/sec_proxy.html Signed-off-by: Vaishnav Achath Signed-off-by: Prasanth Babu Mantena Reviewed-by: Udit Kumar --- drivers/mailbox/k3-sec-proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index 5eafe46fd4d..6f5ad37919f 100644 --- a/drivers/mailbox/k3-sec-proxy.c +++ b/drivers/mailbox/k3-sec-proxy.c @@ -408,7 +408,7 @@ static int k3_sec_proxy_remove(struct udevice *dev) return 0; } -static const u32 am6x_valid_threads[] = { 0, 1, 4, 5, 6, 7, 8, 9, 11, 12, 13, 20, 21, 22, 23 }; +static const u32 am6x_valid_threads[] = { 0, 1, 4, 5, 6, 7, 8, 9, 11, 12, 13, 20, 21, 22, 23, 28, 29 }; static const struct k3_sec_proxy_desc am654_desc = { .thread_count = 90, From e25900438256a0134e877f679b3b8a1af57d776d Mon Sep 17 00:00:00 2001 From: Vaishnav Achath Date: Wed, 18 Dec 2024 18:43:39 +0530 Subject: [PATCH 2/4] arm: dts: k3-j722s-r5-evm: Fix DM2TIFS secproxy thread ID Fix the DM2TIFS secureproxy thread ID as per the latest TISCI documentation for J722S. https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/sec_proxy.html Fixes: fc2da3a3d0d3 ("arm: dts: Introduce J722S U-Boot dts files") Signed-off-by: Vaishnav Achath Signed-off-by: Prasanth Babu Mantena Reviewed-by: Udit Kumar --- arch/arm/dts/k3-j722s-r5-evm.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/k3-j722s-r5-evm.dts b/arch/arm/dts/k3-j722s-r5-evm.dts index 5e5c2e3111e..1bec997c93c 100644 --- a/arch/arm/dts/k3-j722s-r5-evm.dts +++ b/arch/arm/dts/k3-j722s-r5-evm.dts @@ -41,8 +41,8 @@ ti,host-id = <36>; ti,secure-host; mbox-names = "rx", "tx"; - mboxes= <&secure_proxy_main 22>, - <&secure_proxy_main 23>; + mboxes= <&secure_proxy_main 28>, + <&secure_proxy_main 29>; bootph-all; }; }; From ed89c75771d339fa4c0ddd463f675ea10faf1534 Mon Sep 17 00:00:00 2001 From: Vaishnav Achath Date: Wed, 18 Dec 2024 18:43:40 +0530 Subject: [PATCH 3/4] arm: mach-k3: j722_spl: Add FAST XSPI boot mode Fast XSPI boot mode is supported by J722S ROM, add that. Signed-off-by: Vaishnav Achath Signed-off-by: Prasanth Babu Mantena Reviewed-by: Udit Kumar --- arch/arm/mach-k3/include/mach/j722s_spl.h | 1 + arch/arm/mach-k3/j722s/j722s_init.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/arm/mach-k3/include/mach/j722s_spl.h b/arch/arm/mach-k3/include/mach/j722s_spl.h index eab8c511b7c..a91cc82448f 100644 --- a/arch/arm/mach-k3/include/mach/j722s_spl.h +++ b/arch/arm/mach-k3/include/mach/j722s_spl.h @@ -24,6 +24,7 @@ #define BOOT_DEVICE_DFU 0x0A #define BOOT_DEVICE_GPMC_NAND 0x0B #define BOOT_DEVICE_GPMC_NOR 0x0C +#define BOOT_DEVICE_FAST_XSPI 0x0D #define BOOT_DEVICE_XSPI 0x0E #define BOOT_DEVICE_NOBOOT 0x0F diff --git a/arch/arm/mach-k3/j722s/j722s_init.c b/arch/arm/mach-k3/j722s/j722s_init.c index 01b00681f68..c4d99142e48 100644 --- a/arch/arm/mach-k3/j722s/j722s_init.c +++ b/arch/arm/mach-k3/j722s/j722s_init.c @@ -219,6 +219,8 @@ static u32 __get_primary_bootmedia(u32 devstat) fallthrough; case BOOT_DEVICE_XSPI: fallthrough; + case BOOT_DEVICE_FAST_XSPI: + fallthrough; case BOOT_DEVICE_SPI: return BOOT_DEVICE_SPI; From 1c4eeff48c4c48606f304154c17a5f4be64821d2 Mon Sep 17 00:00:00 2001 From: Vaishnav Achath Date: Wed, 18 Dec 2024 18:43:41 +0530 Subject: [PATCH 4/4] arm: dts: k3-j722s*: Add overrides specific to OSPI OSPI Boot requires overrides specific to R5 and also to use DMA in R5 SPL stage the DM_TIFS needs to be used. Add the corresponding overrides for R5 SPL stage. Signed-off-by: Vaishnav Achath Signed-off-by: Prasanth Babu Mantena Reviewed-by: Udit Kumar --- arch/arm/dts/k3-j722s-evm-u-boot.dtsi | 4 ++++ arch/arm/dts/k3-j722s-r5-evm.dts | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arch/arm/dts/k3-j722s-evm-u-boot.dtsi b/arch/arm/dts/k3-j722s-evm-u-boot.dtsi index 88c4a72db61..6ae76beea3e 100644 --- a/arch/arm/dts/k3-j722s-evm-u-boot.dtsi +++ b/arch/arm/dts/k3-j722s-evm-u-boot.dtsi @@ -16,3 +16,7 @@ &dmsc { bootph-pre-ram; }; + +&main_bcdma { + bootph-pre-ram; +}; diff --git a/arch/arm/dts/k3-j722s-r5-evm.dts b/arch/arm/dts/k3-j722s-r5-evm.dts index 1bec997c93c..d797e954f97 100644 --- a/arch/arm/dts/k3-j722s-r5-evm.dts +++ b/arch/arm/dts/k3-j722s-r5-evm.dts @@ -81,3 +81,16 @@ &wkup_uart0 { status = "okay"; }; + +&ospi0 { + reg = <0x00 0x0fc40000 0x00 0x100>, + <0x00 0x60000000 0x00 0x08000000>; +}; + +&main_bcdma { + ti,sci = <&dm_tifs>; +}; + +&main_pktdma { + ti,sci = <&dm_tifs>; +};