Part Number: AM5728
Our custom AM5728 device has an external SD card slot on mmc1 and an eMMC part on mmc2 (the normal boot device when in field use). Internally we also expose the jumper that allows to boot from the SD card for development. The goal is to always have mmc1 be mmcblk1 and mmc2 be mmcblk0, wherein lies the issue.
If the system boots from the eMMC and there is no SD card installed, the eMMC becomes mmcblk0, but if an SD is installed, it ends up as mmcblk1 and the SD card is then mmcblk0. To make booting always work regardless of this and the jumper selection, we need to fix the eMMC to address 0 and the SD card to address 1 - but are having problems doing this in PSDK 06.01.00.08/kernel 4.19.59.
On PSDK 02.01.00.07/kernel 4.1.13, we were able to modify the hsmmc driver to recognize a DT alias for each mmcblk device and set the fixed addresses that way. Similar patches to the new SDK kernel do not work even if we force the older hsmmc driver instead of the sdhci driver that is selected by default; the correct block device is initially allocated but downstream this seems to be superseded and then the boot fails.
Further, there seems to be no way to fix the mmcblk unit assignments in the sdhci driver.
I've seen the threads
https://e2e.ti.com/support/processors/f/791/t/777266
https://e2e.ti.com/support/processors/f/791/t/771076
but they also do not provide a solution here.
If we don't lose function, moving from hsmmc to sdhci is not a problem, but the unit numbers cannot jump around based on SD card presence.
How can this best be addressed? It is a blocking issue for us.