Other Parts Discussed in Thread: SYSBIOS, SYSCONFIG
We are working on a custom board with AM5728 SoC. From the mentioned post (e2e.ti.com/.../892681) we are working towards writing SDIO stack using the MMCx CSL routines with pdk_am57xx_1_0_10 package, as there is no support for SDIO on C66x/DSP side and only SD/MMC support is present.
On the custom board SDIO (I/O only) device is connected to MMC1 and once initialize/enumerated, only block transfer from host-to-device is the needed with both EDMA and Interrupt support from the CSL routines.
I have used the CSL routines for MMC1 (baseaddr @ 0x4809C000) to initialize the controller using MMCSD_v1_open(), but when the first SDIO command CMD52 is sent for I/O reset of the SDIO device using MMCSD_v1_transfer, I see that command fails with timeout error and HS_MMCSD_INTR_MASK_ERR.HS_MMCSD_INTR_MASK_CMDTIMEOUT register bit is set.
Below are a few more observations,
1. Tested sending CMD52 with interrupt enabled in one run and interrupt disabled in second run by properly setting 'enableInterrupt' in MMCSD_v1_HwAttrs structure. In both the cases, I see the command is timing out
2. I probed the MMC1_CMD and MMC1_CLK lines on the board and I see that neither of them is toggling when the command is submitted to the controller. This in a way explains why the command timed out, but now I am not sure why the lines are not toggling
3. I checked the Pinmux configuration of the MMC1 pins W6, Y6, AA6, Y4, AA5 & Y3. W7 and Y9 are not configured as our SDIO device is I/O only. I see that all six pins have pinmux configuration value of 0x00060000, ie, all are in MMC1 mode with MMC1_CLK_PULLTYPESELECT and MMC1_CLK_ACTIVE register bits set. Below are the references.
4. During Host controller initialization of MMC1, I saw that inputClk & outputClk were configured to 96MHz & 4MHz, but the inputClockControl routine (as defined in MMCSD_soc.c) picked 192MHz as system configured clock. I am assuming this part is fine as the MMC1 host controller initialization completed without any issues and it was ready to issue first SDIO CMD52 to the device. I see this print "Input clock[192000000] to MMC is different from what is set in hwAttrs" from MMCSD_v1.c file.
With Pinmux being right and Host controller getting initialized properly what more am I missing on C66x/DSP side to get the communication started. Please note, I have removed all references of MMC1 from the ARM side Device-tree to prevent any conflict between ARM and DSP.
Any inputs getting the Clk and Command line to toggle and getting the initial commands to start working will be helpful.
thanks--
Somesh