Detect boot MMC device within u-boot

Is there a way to determine the mmc device (internal or external microSD card) that the beaglebone black is booting from within u-boot?

I know u-boot will always identify that mmc 0 is exernal and mmc 1 is internal. But that doesn’t tell me which mmc device u-boot.img is currently booting. I need to know so I can use a common u-boot config that always loads kernel and device tree blob from the same mmc device u-boot.img was loaded from.

I tried different ways for setting the mmcdev env variable based on whether or not the uSD card is installed but that only confirms I am booting from the internal mmc device if the uSD is NOT present.

Perhaps there is a gpio input that can be used to sense this?