diff --git a/configs/AM62DX/AM62DX_linux_config.txt b/configs/AM62DX/AM62DX_linux_config.txt index 39aea40d0..5d36d64d5 100644 --- a/configs/AM62DX/AM62DX_linux_config.txt +++ b/configs/AM62DX/AM62DX_linux_config.txt @@ -21,7 +21,7 @@ Replacement Variables '__SDK_SHORT_NAME__' : 'PSDK' '__SDK_INSTALL_FILE__' : 'ti-processor-sdk-linux-am62dxx-evm--Linux-x86-Install.bin' '__SDK_INSTALL_DIR__' : 'ti-processor-sdk-linux-am62dxx-evm-' -'__SDK_DOWNLOAD_URL__' : '`AM62D-SDK-Download-page `__' +'__SDK_DOWNLOAD_URL__' : '`AM62D-SDK-Download-page `__' '__LINUX_UBUNTU_VERSION_LONG__' : '22.04 (64-bit)' '__LINUX_UBUNTU_VERSION_SHORT__' : '22.04' '__OPTEE_PLATFORM_FLAVOR__' : 'k3-am62ax' @@ -39,4 +39,5 @@ Configuration Values 'CONFIG_image_type' : 'default' 'CONFIG_icss_support' : 'yes' 'CONFIG_rt_linux_support' : 'yes' -'CONFIG_crypto' : 'DTHEv2' +'CONFIG_crypto' : 'sa2ul' +'CONFIG_mcrc64' : 'mcrc64' diff --git a/configs/AM62DX/AM62DX_linux_toc.txt b/configs/AM62DX/AM62DX_linux_toc.txt index bb74d5058..1c2e0885a 100644 --- a/configs/AM62DX/AM62DX_linux_toc.txt +++ b/configs/AM62DX/AM62DX_linux_toc.txt @@ -1,4 +1,5 @@ devices/AM62DX/index +devices/AM62DX/index_RTOS devices/AM62DX/linux/Overview devices/AM62DX/linux/Overview_Getting_Started_Guide devices/AM62DX/linux/Overview/Download_and_Install_the_SDK @@ -33,8 +34,10 @@ linux/Foundational_Components/U-Boot/BG-Environment-K3 linux/Foundational_Components/U-Boot/BG-Ram-Device-Trees-K3 linux/Foundational_Components/U-Boot/UG-DFU linux/Foundational_Components/U-Boot/UG-Memory-K3 +linux/Foundational_Components/U-Boot/UG-UMS linux/Foundational_Components/U-Boot/UG-QSPI linux/Foundational_Components/U-Boot/UG-UART +linux/Foundational_Components/U-Boot/UG-RemoteProc linux/Foundational_Components/U-Boot/Applications linux/Foundational_Components/U-Boot/Apps-SPL-Debug-OpenOCD @@ -42,16 +45,19 @@ linux/Foundational_Components/U-Boot/Apps-SPL-Debug-OpenOCD linux/Foundational_Components_Kernel linux/Foundational_Components_Kernel_Drivers linux/Foundational_Components/Kernel/Kernel_Drivers/Audio +linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP linux/Foundational_Components/Kernel/Kernel_Drivers/GPIO linux/Foundational_Components/Kernel/Kernel_Drivers/I2C -linux/Foundational_Components/Kernel/Kernel_Drivers/MCAN +#linux/Foundational_Components/Kernel/Kernel_Drivers/MCAN +linux/Foundational_Components/Kernel/Kernel_Drivers/MCRC64 linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-Ethernet linux/Foundational_Components/Kernel/Kernel_Drivers/PWM linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD #linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND +linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer linux/Foundational_Components/Kernel/Kernel_Drivers/UART linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/VTM @@ -68,18 +74,25 @@ linux/Foundational_Components_Tools linux/Foundational_Components/Tools/Development_Tools linux/Foundational_Components/Tools/Pin_Mux_Tools linux/Foundational_Components/Tools/Flash_via_Fastboot +linux/Foundational_Components_IPC62dx linux/Foundational_Components_ATF linux/Foundational_Components_OPTEE linux/How_to_Guides linux/How_to_Guides_Developer_Notes +linux/How_to_Guides/Host/Moving_Files_to_the_Target_System +linux/How_to_Guides/Host/K3_Resource_Partitioning_Tool linux/How_to_Guides/Host/SYSFW_Trace_Parser +linux/How_to_Guides/Target/Processor_SDK_Linux_File_System_Optimization_Customization linux/How_to_Guides/Target/How_to_enable_DT_overlays_in_linux linux/How_to_Guides/Target/How_to_emmc_boot linux/How_to_Guides/Target/How_to_mmcsd_boot_emmc_uda +#linux/How_to_Guides/Target/How_to_test_MCAN_on_AM62x +linux/How_to_Guides/Target/How_to_Use_K3Conf_Tool linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device linux/How_to_Guides/FAQ/How_to_Check_Device_Tree_Info linux/How_to_Guides/FAQ/How_to_Integrate_Open_Source_Software +linux/How_to_Guides/Target/How_To_Carve_Out_CMA linux/How_to_Guides_Hardware_Setup_with_CCS linux/How_to_Guides/Hardware_Setup_with_CCS/AM62Dx_EVM_Hardware_Setup diff --git a/source/devices/AM62DX/index.rst b/source/devices/AM62DX/index.rst index a201b6e0f..7072e83c0 100644 --- a/source/devices/AM62DX/index.rst +++ b/source/devices/AM62DX/index.rst @@ -17,6 +17,7 @@ Linux SDK Software Developer's Guide /devices/AM62DX/linux/Release_Specific /linux/Foundational_Components /linux/How_to_Guides + /devices/AM62DX/index_RTOS /linux/Demo_User_Guides/index_Demos /linux/Documentation_Tarball diff --git a/source/devices/AM62DX/index_RTOS.rst b/source/devices/AM62DX/index_RTOS.rst new file mode 100644 index 000000000..b7daf83bf --- /dev/null +++ b/source/devices/AM62DX/index_RTOS.rst @@ -0,0 +1,7 @@ +####################### +RTOS/NO-RTOS [MCU+ SDK] +####################### + +**For MCU+ SDK RTOS/NO-RTOS documentation, refer below links** + +- `MCU+ SDK Documentation `__ diff --git a/source/devices/AM62DX/linux/Release_Specific_Build_Sheet.rst b/source/devices/AM62DX/linux/Release_Specific_Build_Sheet.rst index 7c32f2b25..9dc520758 100644 --- a/source/devices/AM62DX/linux/Release_Specific_Build_Sheet.rst +++ b/source/devices/AM62DX/linux/Release_Specific_Build_Sheet.rst @@ -6,7 +6,7 @@ Software Build Sheet Build Sheet of supported features and modules for this |__SDK_FULL_NAME__| Release. The following table lists the supported features and modules with the support status -for Linux on A53. Please refer to `RTOS Build Sheet `__ +for Linux on A53. Please refer to `RTOS Build Sheet `__ for the supported features and modules on RTOS. The support status is indicated by the following codes: diff --git a/source/devices/AM62DX/linux/Release_Specific_Release_Notes.rst b/source/devices/AM62DX/linux/Release_Specific_Release_Notes.rst index 22c92cdca..7521cc0d6 100644 --- a/source/devices/AM62DX/linux/Release_Specific_Release_Notes.rst +++ b/source/devices/AM62DX/linux/Release_Specific_Release_Notes.rst @@ -46,7 +46,7 @@ What's new **Processor SDK Linux AM62DX Release has following new features:** - Second 2025 LTS Reference Release Including RT combined branch model - - McASP async mode: independent transmit (playback) and receIve (capture) clocking. + - McASP async mode: independent transmit (playback) and receive (capture) clocking. - 4 channel recording support. - OSPI, EQEP, PWM, support. - Important Bug Fixes on top of Processor SDK 11.01.05.03 Release. diff --git a/source/linux/Foundational_Components.rst b/source/linux/Foundational_Components.rst index 4d89366bd..7111399ba 100644 --- a/source/linux/Foundational_Components.rst +++ b/source/linux/Foundational_Components.rst @@ -23,6 +23,7 @@ Foundational Components Foundational_Components_IPC_J722S Foundational_Components_IPC62x Foundational_Components_IPC62ax + Foundational_Components_IPC62dx Foundational_Components_IPC62px Foundational_Components_IPC64x Foundational_Components_IPCLLD diff --git a/source/linux/Foundational_Components/IPC/_RPMsg_char_driver.rst b/source/linux/Foundational_Components/IPC/_RPMsg_char_driver.rst index d5af64bef..06019f2e3 100644 --- a/source/linux/Foundational_Components/IPC/_RPMsg_char_driver.rst +++ b/source/linux/Foundational_Components/IPC/_RPMsg_char_driver.rst @@ -266,10 +266,10 @@ rpmsg_char_close() +------------------+--------------------+---------+-----------------------------------+ -.. ifconfig:: CONFIG_part_variant in ('AM62AX') +.. ifconfig:: CONFIG_part_variant in ('AM62AX','AM62DX') The below table lists the device enumerations as defined in the - rpmsg_char_library. The validity of the enumerations wrt AM62Ax is also + rpmsg_char_library. The validity of the enumerations wrt |__PART_FAMILY_NAME__| is also specified. .. code-block:: text @@ -979,6 +979,100 @@ SDK wic image filesystem: TEST STATUS: PASSED +.. ifconfig:: CONFIG_part_variant in ('AM62DX') + + .. code-block:: console + + # MCU R5F<->A53_0 IPC + root@am62dxx-evm:~# rpmsg_char_simple -r0 -n10 + Created endpt device rpmsg-char-0-990, fd = 3 port = 1025 + Exchanging 10 messages with rpmsg device rpmsg-char-0-990 on rproc id 0 ... + + Sending message #0: hello there 0! + Receiving message #0: hello there 0! + Sending message #1: hello there 1! + Receiving message #1: hello there 1! + Sending message #2: hello there 2! + Receiving message #2: hello there 2! + Sending message #3: hello there 3! + Receiving message #3: hello there 3! + Sending message #4: hello there 4! + Receiving message #4: hello there 4! + Sending message #5: hello there 5! + Receiving message #5: hello there 5! + Sending message #6: hello there 6! + Receiving message #6: hello there 6! + Sending message #7: hello there 7! + Receiving message #7: hello there 7! + Sending message #8: hello there 8! + Receiving message #8: hello there 8! + Sending message #9: hello there 9! + Receiving message #9: hello there 9! + + Communicated 10 messages successfully on rpmsg-char-0-990 + + TEST STATUS: PASSED + + # for DM R5F<->A53 IPC, use the below command. For remote proc ids, please refer to : 'https://git.ti.com/cgit/rpmsg/ti-rpmsg-char/tree/include/rproc_id.h' + root@am62dxx-evm:~# rpmsg_char_simple -r15 -n10 + Created endpt device rpmsg-char-15-995, fd = 3 port = 1025 + Exchanging 10 messages with rpmsg device rpmsg-char-15-995 on rproc id 15 ... + + Sending message #0: hello there 0! + Receiving message #0: hello there 0! + Sending message #1: hello there 1! + Receiving message #1: hello there 1! + Sending message #2: hello there 2! + Receiving message #2: hello there 2! + Sending message #3: hello there 3! + Receiving message #3: hello there 3! + Sending message #4: hello there 4! + Receiving message #4: hello there 4! + Sending message #5: hello there 5! + Receiving message #5: hello there 5! + Sending message #6: hello there 6! + Receiving message #6: hello there 6! + Sending message #7: hello there 7! + Receiving message #7: hello there 7! + Sending message #8: hello there 8! + Receiving message #8: hello there 8! + Sending message #9: hello there 9! + Receiving message #9: hello there 9! + + Communicated 10 messages successfully on rpmsg-char-15-995 + + TEST STATUS: PASSED + + # C7x<->A53_0 IPC + root@am62dxx-evm:~# rpmsg_char_simple -r8 -n10 + Created endpt device rpmsg-char-8-998, fd = 3 port = 1025 + Exchanging 10 messages with rpmsg device rpmsg-char-8-998 on rproc id 8 ... + + Sending message #0: hello there 0! + Receiving message #0: hello there 0! + Sending message #1: hello there 1! + Receiving message #1: hello there 1! + Sending message #2: hello there 2! + Receiving message #2: hello there 2! + Sending message #3: hello there 3! + Receiving message #3: hello there 3! + Sending message #4: hello there 4! + Receiving message #4: hello there 4! + Sending message #5: hello there 5! + Receiving message #5: hello there 5! + Sending message #6: hello there 6! + Receiving message #6: hello there 6! + Sending message #7: hello there 7! + Receiving message #7: hello there 7! + Sending message #8: hello there 8! + Receiving message #8: hello there 8! + Sending message #9: hello there 9! + Receiving message #9: hello there 9! + + Communicated 10 messages successfully on rpmsg-char-8-127180 + + TEST STATUS: PASSED + .. rubric:: RPMsg kernel space example The kernel space example is in the Linux Processor SDK under @@ -1449,3 +1543,44 @@ SDK wic image filesystem: [ 2081.878713] rpmsg_client_sample virtio2.ti.ipc4.ping-pong.-1.13: incoming msg 10 (src: 0xd) [ 2081.887258] rpmsg_client_sample virtio2.ti.ipc4.ping-pong.-1.13: goodbye! +.. ifconfig:: CONFIG_part_variant in ('AM62DX') + + .. code-block:: console + + root@am62dxx-evm:~# modprobe rpmsg_client_sample count=10 + [ 180.532155] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: new channel: 0x401 -> 0xd! + [ 180.532359] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 1 (src: 0xd) + [ 180.532457] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: new channel: 0x401 -> 0xd! + [ 180.532495] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 1 (src: 0xd) + [ 180.532571] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 2 (src: 0xd) + [ 180.532599] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 3 (src: 0xd) + [ 180.532626] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 4 (src: 0xd) + [ 180.532640] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: new channel: 0x401 -> 0xd! + [ 180.532654] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 5 (src: 0xd) + [ 180.532687] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 6 (src: 0xd) + [ 180.532711] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 7 (src: 0xd) + [ 180.532741] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 8 (src: 0xd) + [ 180.532780] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 2 (src: 0xd) + [ 180.532822] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 1 (src: 0xd) + [ 180.532853] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 2 (src: 0xd) + [ 180.532887] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 9 (src: 0xd) + [ 180.532915] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: incoming msg 10 (src: 0xd) + [ 180.532921] rpmsg_client_sample virtio1.rpmsg-client-sample.-1.13: goodbye! + [ 180.532940] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 3 (src: 0xd) + [ 180.533007] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 4 (src: 0xd) + [ 180.533047] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 3 (src: 0xd) + [ 180.533075] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 5 (src: 0xd) + [ 180.533109] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 6 (src: 0xd) + [ 180.533141] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 7 (src: 0xd) + [ 180.533171] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 8 (src: 0xd) + [ 180.533202] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 9 (src: 0xd) + [ 180.533238] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: incoming msg 10 (src: 0xd) + [ 180.533244] rpmsg_client_sample virtio2.rpmsg-client-sample.-1.13: goodbye! + [ 180.533264] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 4 (src: 0xd) + [ 180.533487] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 5 (src: 0xd) + [ 180.533766] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 6 (src: 0xd) + [ 180.534000] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 7 (src: 0xd) + [ 180.534216] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 8 (src: 0xd) + [ 180.534433] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 9 (src: 0xd) + [ 180.534654] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: incoming msg 10 (src: 0xd) + [ 180.534660] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.13: goodbye! diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst index a844a46e9..d3cb4eac4 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst @@ -66,7 +66,7 @@ The following is a list of supported hardware accelerated algorithms: - SHA256, SHA512 - CMAC(AES) - * - AM62X / AM62A / AM62P + * - AM62X / AM62A / AM62D / AM62P - AES (CBC, ECB) - AES-GCM, AUTHENC(HMAC-SHA256, CBC-AES) - SHA256, SHA512 diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP.rst index e7e423ec7..142196810 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP.rst @@ -7,7 +7,7 @@ EQEP Linux has support for EQEP (Enhanced Quadature Encoder Pulse). EQEP channels can be used to interface with rotary encoder hardware. -.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX') +.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62DX') - AM62x SK: EQEP0: k3-am62x-sk-eqep.dtso diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/PWM.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/PWM.rst index 0ba8fa327..914ca120d 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/PWM.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/PWM.rst @@ -188,5 +188,5 @@ The current PWM settings for ePWM and eCAP(APWM) can be monitored from the debug EHRPWM can be tested using the following overlays for each of the following devices: #. AM62X SK: k3-am625-sk-rpi-hdr-ehrpwm.dtso -#. AM62AX SK: k3-am62a7-sk-rpi-hdr-ehrpwm.dtso +#. AM62AX SK and AM62DX EVM: k3-am62a7-sk-rpi-hdr-ehrpwm.dtso #. AM62PX SK: k3-am62p5-sk-rpi-hdr-ehrpwm.dtso diff --git a/source/linux/Foundational_Components_IPC62dx.rst b/source/linux/Foundational_Components_IPC62dx.rst new file mode 100644 index 000000000..85cf74de1 --- /dev/null +++ b/source/linux/Foundational_Components_IPC62dx.rst @@ -0,0 +1,287 @@ +.. _foundational-components-ipc: + +############## +IPC for AM62Dx +############## + +The AM62Dx processors have Cortex-R5F and C7x DSP subsystems in addition to +a Quad core Cortex-A53 subsystem. Please refer to the `AM62Dx Technical +Reference Manual `__ for +details. + +This article is geared toward AM62Dx users that are running Linux on the Cortex +A53 cores. The goal is to help users understand how to establish IPC communication +with the C7x DSP and R5F cores. + +There are many facets to this task: building, loading, debugging, memory +sharing, etc. This article intends to take incremental steps toward +understanding all of those pieces. + +************************************ +Software Dependencies to Get Started +************************************ + +Prerequisites + +- Processor SDK Linux for AM62Dx |__SDK_DOWNLOAD_URL__|. +- Processor SDK MCU+ for AM62D refer `doc `__ + +.. note:: + + Please be sure that you have the same version number + for both Processor SDK RTOS and Linux. + +Please refer to the MCU+SDK documentation, section "Developer Guides" -> "Understanding +inter-processor communication (IPC)" for IPC architecture and builds. + +*********************************************** +Typical Boot Flow on AM62Dx for ARM Linux users +*********************************************** + +AM62Dx SOC's have multiple processor cores - Cortex-A53, Cortex-R5F and DSP cores. +The A53 typically runs a HLOS like Linux/Android. The C7x and R5F remote cores run No-OS +or RTOS (FreeRTOS etc). In normal operation, the boot loader (U-Boot/SPL) boots +and loads the A53 with the HLOS. The A53 then boots the C7x and R5F cores. + +The wakeup R5F firmware runs device manager software (SciServer) along +with vision apps application. + +The wakeup R5F firmware is integrated as part of :file:`tispl.bin` binary +and is started early in the boot process by u-boot R5 SPL right after DDR initialization. + +*************************************** +Getting Started with IPC Linux Examples +*************************************** + +The figure below illustrates how the Remoteproc/RPMsg driver from the ARM Linux +kernel communicates with the IPC driver on a remote processors (e.g. R5F) +running RTOS. + +.. Image:: /images/LinuxIPC_with_RTOS_Slave.png + +In order to setup IPC on remote cores, we provide some pre-built examples +in the SDK package that can be run from ARM Linux. + +The remoteproc driver is hard-coded to look for specific files when +loading the R5F and C7x cores. Here are the files it looks for on an AM62dx device: + ++------------------+-----------------+----------------------+----------------------+ +| Core Name | RemoteProc Name | Description | Firmware File Name | ++==================+=================+======================+======================+ +| C7x | 7e000000.c7x | C7x core | am62d-c71_0-fw | ++------------------+-----------------+----------------------+----------------------+ +| R5F | 79000000.r5f | R5F core(MCU domain) | am62d-mcu-r5f0_0-fw | ++------------------+-----------------+----------------------+----------------------+ + +Generally on a target file system the above files are soft linked to the +intended executable FW files: + +.. code-block:: console + + root@am62dxx-evm:~# ls -l /lib/firmware/ + lrwxrwxrwx 1 root root 71 Mar 9 2018 am62d-c71_0-fw -> /usr/lib/firmware/ti-ipc/am62dxx/ipc_echo_test_c7x_1_release_strip.xe71 + lrwxrwxrwx 1 root root 73 Mar 9 2018 am62d-mcu-r5f0_0-fw -> /usr/lib/firmware/ti-ipc/am62dxx/ipc_echo_test_mcu2_0_release_strip.xer5f + +For updating wakeup (DM) R5F firmware binary, :file:`tispl.bin` needs to be recompiled with the new firmware binary as mentioned below : + +#. Go to linux installer and replace the existing R5F wakeup (DM) firmware binary with the new one + +.. code-block:: console + + host# cp /ipc_echo_testb_freertos_mcu1_0_release.xer5f /board-support/prebuilt-images/am62dxx-evm/ti-dm/am62dxx/ipc_echo_testb_mcu1_0_release_strip.xer5f + +#. Recompile u-boot to regenerate :file:`tispl.bin` using the top level makefile. + +.. code-block:: console + + host# make u-boot + +Please refer to :ref:`Top-Level Makefile ` for more details on Top Level makefile. + +#. Replace the updated :file:`tispl.bin` containing new R5F firmware binary in the boot partition of sdcard and reboot + +.. code-block:: console + + host# sudo cp board-support/u-boot_build/a53/tispl.bin /media/$USER/boot + +.. _booting_remote_cores_from_Linux_console: + +************************************************** +Booting Remote Cores from Linux console/User space +************************************************** + +To reload a remote core with new executables, please follow the below steps. + +First, identify the remotproc node associated with the remote core: + +.. code-block:: console + + root@am62dxx-evm:~# head /sys/class/remoteproc/remoteproc*/name + ==> /sys/class/remoteproc/remoteproc0/name <== + 7e000000.dsp + + ==> /sys/class/remoteproc/remoteproc1/name <== + 79000000.r5f + + ==> /sys/class/remoteproc/remoteproc2/name <== + 78000000.r5f + +Then, use the sysfs interface to stop the remote core. For example, to stop the C7x + +.. code-block:: console + + root@am62dxx-evm:~# echo stop > /sys/class/remoteproc/remoteproc0/state + [ 61.497327] remoteproc remoteproc0: stopped remote processor 7e000000.dsp + +If needed, update the firmware symbolic link to point to a new firmware: + +.. code-block:: console + + root@am62dxx-evm:/lib/firmware# ln -sf /lib/firmware/ti-ipc/am62dxx/ipc_echo_test_c7x_1_release_strip.xe71 am62d-c71_0-fw + +Finally, use the sysfs interface to start the remote core: + +.. code-block:: console + + root@am62axx-evm:~# echo start > /sys/class/remoteproc/remoteproc0/state + [ 1917.868689] remoteproc remoteproc0: powering up 7e000000.dsp + [ 1917.879917] remoteproc remoteproc0: Booting fw image am62d-c71_0-fw, size 8392040 + [ 1917.887904] rproc-virtio rproc-virtio.5.auto: assigned reserved memory node c7x-dma-memory@99800000 + [ 1917.889728] virtio_rpmsg_bus virtio0: rpmsg host is online + [ 1917.889772] rproc-virtio rproc-virtio.5.auto: registered virtio0 (type 7) + [ 1917.889779] remoteproc remoteproc0: remote processor 7e000000.dsp is now up + [ 1917.902247] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0xd + [ 1917.902541] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe + +.. note:: + + The RemoteProc driver does not support a graceful shutdown of R5 and DSP cores + in the current Linux Processor SDK. For now, it is recommended to reboot the + board when loading new binaries into an R5F or DSP core. + +******************** +DMA memory Carveouts +******************** + +System memory is carved out for each remote processor core for IPC and for the +remote processor's code/data section needs. The default +memory carveouts (DMA pools) are shown below. + +See the devicetree bindings documentation for more details: `Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml `__ + ++------------------+--------------------+---------+----------------------------+ +| Memory Section | Physical Address | Size | Description | ++==================+====================+=========+============================+ +| C7x Pool | 0x99800000 | 1MB | IPC (Virtio/Vring buffers) | ++------------------+--------------------+---------+----------------------------+ +| C7x Pool | 0x99900000 | 15MB | C7x externel code/data mem | ++------------------+--------------------+---------+----------------------------+ +| R5F(MCU) Pool | 0x9b800000 | 1MB | IPC (Virtio/Vring buffers) | ++------------------+--------------------+---------+----------------------------+ +| R5F(MCU) Pool | 0x9b900000 | 15MB | R5F externel code/data mem | ++------------------+--------------------+---------+----------------------------+ +| R5F(WKUP) Pool | 0x9c800000 | 1MB | IPC (Virtio/Vring buffers) | ++------------------+--------------------+---------+----------------------------+ +| R5F(WKUP) Pool | 0x9c900000 | 15MB | R5F externel code/data mem | ++------------------+--------------------+---------+----------------------------+ + +.. code-block:: console + + root@am62dxx-evm:/lib/firmware# dmesg | grep Reserved + [ 0.000000] Reserved memory: created CMA memory pool at 0x00000000c0000000, size 32 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099800000, size 1 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099900000, size 15 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b800000, size 1 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b900000, size 15 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 1 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c900000, size 15 MiB + [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 16 MiB + +.. note:: + + The reserved memory sizes listed above are provided as a reference only + and subject to change between releases. For latest memory reservations, + please refer to the kernel `device tree repository + `__. + +By default the first 1MB of each pool is used for the Virtio and Vring buffers +used to communicate with the remote processor core. The remaining carveout is +used for the remote core external memory (program code, data, etc). + +.. note:: + + The resource table entity (which describes the system resources needed by + the remote processor) needs to be at the beginning of the remote processor + external memory section. + +For details on how to adjust the sizes and locations of the remote core pool +carveouts, please see section :ref:`changing_the_memory_map`. + +.. _changing_the_memory_map: + +*********************** +Changing the Memory Map +*********************** + +The address and size of the DMA memory carveouts needs to match with the MCU +M4F and R5F external memory section sizes in their respective linker mapfiles. + +:file:`arch/arm64/boot/dts/ti/k3-am62d2-evm.dts` + +.. code-block:: text + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + 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 0xf00000>; + no-map; + bootph-pre-ram; + }; + }; + +.. warning:: + + Be careful not to overlap carveouts! + +.. note:: + + The reserved memory sizes listed above are provided as a reference only + and subject to change between releases. For latest memory reservations, + please refer to the kernel `device tree repository + `__. + +.. include:: Foundational_Components/IPC/_RPMsg_char_driver.rst