This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi,
TDA4VM RTOS 0806
When I set loopbacken true [Set port2 to SGMII], in
Hi,
Part of team is on vacation.. Please expect response early next week.
Best regards,
Keerthy
I find out the dead loop.
static int32_t Cpsw_isPortLinkUp(Cpsw_Handle hCpsw, Enet_MacPort macPort, bool *linked) { int32_t status = ENET_SOK; #if ENET_CFG_IS_ON(CPSW_SGMII) EnetPer_Handle hPer = (EnetPer_Handle)hCpsw; CSL_Xge_cpsw_ss_sRegs *ssRegs = (CSL_Xge_cpsw_ss_sRegs *)hPer->virtAddr2; uint32_t portNum = ENET_MACPORT_NORM(macPort); uint32_t portId = ENET_MACPORT_ID(macPort); EnetMod_Handle hMacPort = hCpsw->hMacPort[portNum]; Enet_IoctlPrms prms; EnetMacPort_GenericInArgs macPortInArgs; EnetMacPort_Interface mii; EnetMac_LayerType enetLayer; EnetMac_SublayerType enetSublayer; bool sgmiiLink; uint32_t qsgmiiId; ENETTRACE_VAR(portId); status = EnetSoc_getMacPortMii(hPer->enetType, hPer->instId, macPort, &mii); ENETTRACE_ERR_IF(status != ENET_SOK, "Port %u: Failed to get ENET_CTRL: %d\n", portId, status); if (status == ENET_SOK) { enetLayer = mii.layerType; enetSublayer = mii.sublayerType; if (enetLayer == ENET_MAC_LAYER_GMII) { if (enetSublayer == ENET_MAC_SUBLAYER_SERIAL) { /* We have link status in CPSW subsystem regs as well as in SGMII regs, * check SGMII regs as link status in CPSW subsystem regs is only for * QSGMII link status */ macPortInArgs.macPort = macPort; ENET_IOCTL_SET_INOUT_ARGS(&prms, &macPortInArgs, &sgmiiLink); status = EnetMod_ioctl(hMacPort, CPSW_MACPORT_IOCTL_GET_SGMII_LINK_STATUS, &prms); ENETTRACE_ERR_IF(status != ENET_SOK, "Port %u: Failed to get SGMII link state: %d\n", portId, status); *linked = sgmiiLink; printf("ZD goto ... func %s macPort %d ...Cpsw_isPortLinkUp IOCTL done sgmiiLink %d\n",__func__,macPort,sgmiiLink); } else if ((enetSublayer == ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN) || (enetSublayer == ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB)) {
Output log:
[MCU2_0] 61.143056 s: ZD goto ... func Cpsw_isPortLinkUp macPort 1 ...Cpsw_isPortLinkUp IOCTL done sgmiiLink 0
[MCU2_0] 61.143127 s: ZD goto ... func Cpsw_isPortLinkUp macPort 1 ...Cpsw_isPortLinkUp IOCTL done sgmiiLink 0
[MCU2_0] 61.472563 s: ZD goto ... func Cpsw_isPortLinkUp macPort 1 ...Cpsw_isPortLinkUp IOCTL done sgmiiLink 0
[MCU2_0] 61.472635 s: ZD goto ... func Cpsw_isPortLinkUp macPort 1 ...Cpsw_isPortLinkUp IOCTL done sgmiiLink 0
............
dongzhang
Sorry for that,
1. I found that our board Del the 100Mhz clock. IC: CDCI6214RGET , Can it be deleted? What will be the impact?
2. And now, we need use 19.2Mhz clock, but we changed it to 20Mhz, What will be the impact? some other module...
3. And I found that csl_serdes3.c func: CSL_serdesRefclkSel no setting for 20Mhz, Is there have patch for 20Mhz ?
thanks alot.
dongzhang
Hi,
You need to change the boot mode pins for 20MHz.
Please refer to TRM for boot mode pins settings.
Best Regards,
Sudheer
Hi,
Hardware Assist I have changed the 20Mhz to 19.2 Mhz which is the same as the EVM
Then I changed:
Hi,
serdesLane0EnableParams.refClock = CSL_SERDES_REF_CLOCK_19p2M;//CSL_SERDES_REF_CLOCK_100M;
Ref clock to be 100M not 19.2
Also, make sure that Serdes0 not configured from u-boot & Linux.
Also, make sure that serdes clock configuration with CSL_SERDES_REF_CLOCK_INT with 100M.
Please refer to board_j721e_evm.c file from ethfw/utils/board/j721e/.
Best Regards,
Sudheer
thanks,
I changed it back
serdesLane0EnableParams.refClock = CSL_SERDES_REF_CLOCK_100M;
So, now I used TDA4VM EVM, and use 19.2 as SERDES base clock.
(Use WKUP_OSC0_XI WKUP_OSC0_XO 19.2Mhz)
and uboot and Linux used default 0806 image.
in board_j721e_evm.c I found this configuration:
static void EthFwBoard_configSierra0Clks(void) { uint32_t moduleId = TISCI_DEV_SERDES_16G0; uint32_t clkRateHz = 100000000U; uint32_t clkId[] = { TISCI_DEV_SERDES_16G0_CORE_REF1_CLK, TISCI_DEV_SERDES_16G0_CORE_REF_CLK}; uint32_t clkParId[] = { TISCI_DEV_SERDES_16G0_CORE_REF1_CLK_PARENT_HSDIV4_16FFT_MAIN_2_HSDIVOUT4_CLK, TISCI_DEV_SERDES_16G0_CORE_REF_CLK_PARENT_HSDIV4_16FFT_MAIN_2_HSDIVOUT4_CLK}; uint32_t i; int32_t status; for (i = 0U; i < ENET_ARRAYSIZE(clkId); i++) { status = Sciclient_pmSetModuleClkParent(moduleId, clkId[i], clkParId[i], SCICLIENT_SERVICE_WAIT_FOREVER); if (status != CSL_PASS) { appLogPrintf("Failed to reparent clk %u: %d\n", clkId[i], status); EnetAppUtils_assert(false); } EnetAppUtils_clkRateSet(moduleId, clkId[i], clkRateHz); } EnetAppUtils_setDeviceState(moduleId, TISCI_MSG_VALUE_DEVICE_SW_STATE_ON, 0U); }
then should I change the val "uint32_t clkParId[]={}" ? What value should it be set to?
I test val:
log.
[MCU2_0] 17.961974 s: APP: Syncing with 5 CPUs ... Done !!! [MCU2_0] 17.962169 s: REMOTE_SERVICE: Init ... !!! [MCU2_0] 17.963853 s: REMOTE_SERVICE: register service name [com.ti.remote_service_test] [MCU2_0] 17.963928 s: REMOTE_SERVICE: Init ... Done !!! [MCU2_0] 17.963969 s: REMOTE_SERVICE: register service name [rtos_test] [MCU2_0] 17.964007 s: REMOTE_SERVICE: register service name [com.ti.perf_stats] [MCU2_0] 17.964045 s: ETHFW: Init ... !!! [MCU2_0] 17.964090 s: ZD goto ... func EthFwBoard_init [MCU2_0] 18.001078 s: PMLIBClkRateSet failed for clock Id = 42 [MCU2_0] 18.001171 s: Assertion @ Line: 190 in enet_apputils_k3.c: false : failed !!!
thanks
dongzhang
Hi,
If you want to use SerDes with external clock of 19.2M then you need to configure SerDes clock as 19.2M and clock source should not be CSL_SERDES_REF_CLOCK_INT.
Then above clock configuration would be fine.
If you want use SerDes with internal clock you need use 100M and clock same as default one from ethfw/utils/board/j721e/board_j721e_evm.c.
Note:
We haven't tested SerDes with external clock source from TI SDK.
Also, by default U-boot & Linux configures SerDes0 for PCIe+ QSGMII.
Make sure that SerDes0 should not be configured from U-boot & Linux (disable nodes from device tree) when you want to configure and use from RTOS.
Best Regards,
Sudheer
Hello,
We want to use WKUP_OSC0 as the clock source of Serdes clock PLL. This WKUP_OSC0 is connected to a 19.2M crystal oscillator.
19.2M, through the path shown in the figure, generates 100MHz, reaches CMN_REFCLK1_INT, and is provided to Serdes.
Is this OK?
Hi,
We want to use WKUP_OSC0 as the clock source of Serdes clock PLL. This WKUP_OSC0 is connected to a 19.2M crystal oscillator.
19.2M, through the path shown in the figure, generates 100MHz, reaches CMN_REFCLK1_INT, and is provided to Serdes
From the above path, it seems SerDes is feed with internal clock.
So, you have to use 100MHz clock for SerDes. Use the SerDes configuration and SerDes clock as shared/suggested above.
Also, make sure sure that SerDes0 configuration disable from U-boot & Linux.
Best Regards,
Sudheer