8.2. How To Enable SMMU For The DEVNP CPSW2G Driver

Note

This feature is currently tested and support on the QNX SDP 7.0 only.

8.2.1. Prerequisite

  • J7ES QNX SDP 7.0 BSP version - JBN45 or later, SMMU libraries and SMMU configuration files. Please refer to the Software Depencies section of the Release Notes, for a list of those packages, and ensure they are installed on the host build machine.

  • In case SPL-UBOOT is used for the boot flow, please make sure the board RM configuration file used for sysfw.itb has the required the virt-id reservation for A72_2 core. The RM configuration file can be checked in the k3-image-gen repo and the sysfw.itb file can be build using this repo.

  • In case SBL is used for the boot flow, please make sure the board RM configuration file used for for tifs.bin has the required the virt-id reservation for A72_2 core. The RM configuration file can be checked in the the PSDK RTOS’s pdk repo path:

pdk/packages/ti/drv/sciclient/soc/V1/sciclient_defaultBoardcfg_rm.c

8.2.2. Steps

  • To make use of the typed memory for the cpsw2g driver, we need to specify it a a parameter to the QNX startup with the “-R” option.

– In the file psdkqa/qnx/scripts/bsp/700_SVN928771_JBN45/images/j721e-evm-ti-static.build, see the below entry added as part of startup parameter

[+keeplinked] startup-j721e-evm -v -R16M,4K,sdhci -R8M,4K,xhci -R128K,4K,ospi -R64M,4K,cpsw2g -r0xA0000000,0x5C000000,1 -d

Note

Please note that for cpsw2g, the typed memory region is specified as “-R64M,4K,cpsw2g”

  • The SMMUMAN must be started with the smmu configuration file specifying the settings for the cpsw2g driver.

– In the file psdkqa/qnx/scripts/bsp/700_SVN928771_JBN45/images/target-extra/smmuman-config/j721e-ti.smmu, see the below entry added:

#CPSW2G
device mem:0x30B03100 use tcu 0xf002   # ch49

– In the file psdkqa/qnx/scripts/bsp/700_SVN928771_JBN45/images/target-extra/smmuman-config/j721e-static-ti.smmu, see the below entry added:

## CPSW2G
allow cpsw2g $asinfo_start{cpsw2g},$asinfo_length{cpsw2g},st
device mem:0x30B03100 cpsw2g  # ch49

Note

For cpsw2g, the virt-id is set to 2 and the udma channel is set to 49. The smmu configuration files are provided and supported by QNX.

  • Start the cpsw2g driver with the below settings.

io-pkt-v6-hc -d cpsw2g ptp=1,mac-to-mac=1,speed=1000,typed_mem=cpsw2g,udma_chnum=49,smmu=1,virt_id=2 -ptcpip pkt_typed_mem=cpsw2g
  • Reset of the steps are same in normal mode.