I am doing the bring-up of a custom carrier board for the VERDIN-IMX8MM-v1.0B (BSP 5.1.0).
In our design we use the pins of the SD 1 interface as GPIO.
With the simple overlay attached below we are able to control the SD_1_[D0,D1,D2,D3,CMD,CD#] pins with gpioinfo, gpioset, gpioget etc. (tested with a multimeter)
However our design expects this pins to be working at 1.8V, by default the interface is working at 3.3V.
Reading the Verdin iMX8M Mini Datasheet:
The IO voltage of the SDIO power block can be changed independently from the other IO blocks, but all signals of the SDIO block change their voltages together. The IO voltage of the Verdin “Always Compatible” interface (i.MX 8MM USDHC2) is provided by the MUXSW_VOUT output of the power management IC (PMIC). The voltage level is controlled by the dedicated VSELECT output of the USDHC2 interface which is located on the GPIO1_IO04 ball of the SoC.
As seen in the DTS below we configure the iomux so that GPIO1_IO04 is VSELECT.
However, toggling GPIO1_IO04 high/low has no effect on the voltage measured on the SD_1_[D0,D1,D2,D3,CMD,CLK,CD#] SODIMM pins
Could you please offer some gidance as to what we are missing to switch the voltage to 1.8V?
You muxed the pin GPIO1_IO04 to the function USDHC2_VSELECT. So using the function GPIO1_IO04 will not have any effect on the pin state.
Changing the pinmuxing to MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO04 might solve the riddle.
However, I would solve your use case by directly controlling LDO5 [1] by setting regulator-max-microvolt also to 1.8V plus adding the property regulator-always-on;.
I was thinking about it and realized that I am using
‘imx8mm-verdin-wifi-dahlia.dts’ and not ‘imx8mm-verdin-wifi-v1.1-dahlia.dts’.
Please let me know if I should use the v1.1, from the name it felt I should’t use it since I am currently using a v1.0B verdin-imx8mm.
Comparing the dts I can see there is a major difference in the regulators:
linux-toradex/arch/arm64/boot/dts/freescale/imx8mm-verdin-v1.1.dtsi:
On the V1.0 hardware another PMIC is used, there is no dedicated regulator for the SD card communication voltage. GPIO1_IO04 controls a switch between 1.8V and 3.3V.
For me an overlay which sets the pin GPIO1_IO04 to the function GPIO1_IO04 allows me to later control the voltage. (with gpioset 0 4=1 I do get 1.8V).
Are you sure you recompiled and deployed the device tree overlay?
What is the output of devmem2 0x30330038
Max
P.S. I recommend to move to V1.1 hardware as soon as possible. There have been a lot of incompatible changes, among others also additional pullups on the SD interface.
Thanks, that did it !
I mistakenly jumped to the conclusion that MX8MM_IOMUXC_GPIO1_IO04_VSELECT should be used to select the voltage level.
In my defence I will say that the v1.0 documentation was not very clear on the topic .
We plan to switch v1.1 ASAP, we have a pending order with you guys, but in the meantime the only thing I can work with is an old v1.0 board we had lying around.