[BPI-R4] flash pinmux does not get set at linux boot

I’m trying to get the R4 to switch from sd to emmc runtime. Eventually using dynamic devictree overlays, but first without that and just boot linux with emmc in the devicetree, the supposedly easy part:

So first atf is booted from sdcard. The mux is set to the sdcard pins by the bootloader. Then I have atf start linux directly. Instead of using the sdcard overlay, I use the emmc overlay. Because the pinmux is defined, and the pinctrl has the pingroup set to emmc, theoretically it should work that linux sets the mux to the emmc pins. But it doesn’t.

The card is not recognized.

When removing:

  no-sd;
  no-sdio;

From the emmc overlay, the card get’s recognised, but it is still the sdcard?!?

Even when in the devicetree:

  pinctrl-names = "default", "state_uhs";
  pinctrl-0 = <&mmc0_pins_emmc_51>;
  pinctrl-1 = <&mmc0_pins_emmc_51>;

To check, yes we should have the pinmux set to emmc:

cat /sys/kernel/debug/pinctrl/pinctrl-maps 
...
device 11230000.mmc
state state_uhs
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group emmc_51
function flash
...

But I’m still seeing the sdcard:

lsblk -io name,partlabel
NAME        PARTLABEL
mtdblock0   
mtdblock1   
mmcblk0     
|-mmcblk0p1 bpir4-sdmmc-atf
|-mmcblk0p2 bpir4-sdmmc-boot
`-mmcblk0p3 bpir4-sdmmc-root

Why is the hardware of the pinmux still switched to the sdcard pins?

Am I missing a step or is something broken?

The linux here is from @dangowrt mt7988-for-next