SD1 Pins (USDHC2) voltage on Verdin iMX8MP

Hi,

We are working on a project with a Verdin iMX8MP V1.1.

We are configuring the SD_1* PINs as GPIO, as we don’t need to support SDCards. Currently, these GPIOs are working at 3.3V. In order to test the voltage, I just configure them as GPIO output high and measure the voltage with a multimeter.

From the datasheet of the Verdin:
“The voltage level is controlled by the dedicated VSELECT output of the USDHC2 interface, located on the GPIO1_IO04 ball of the SoC.”

Following a message on the community (Switch Voltage from 3.3V to 1.8V at SD1 Pins (USDHC2) - #6 by max.tx) I configured GPIO1_IO04 as GPIO (GPIO1_IO04 function → GPIO 4 on linux/sysfs), however when I export it as output 0 or 1, the voltage of the SD_1 PINs does not change: I always measure 3.3V with my multimeter.

Do I need to do something else, except configuring all the GPIOs as GPIOs and exporting GPIO1_IO04?

Thanks,
Roberto

Hello @roberto_s,

can you share your device tree file and the configuration you did?

Best Regards,

Matthias Gohlke

Hi Matthias,

This is the GPIO configuration on the device tree:

pinctrl_gpio_test: gpio_test {
    fsl,pins = <
        MX8MP_IOMUXC_SD2_DATA2__GPIO2_IO17      0x1c5   /* SODIMM 70 */
        MX8MP_IOMUXC_SD2_DATA3__GPIO2_IO18      0x1c5   /* SODIMM 72 */
        MX8MP_IOMUXC_SD2_CMD__GPIO2_IO14        0x1c5   /* SODIMM 74 */
        MX8MP_IOMUXC_SAI2_RXC__GPIO4_IO22       0x1c5   /* SODIMM 76 */
        MX8MP_IOMUXC_SD2_CLK__GPIO2_IO13        0x1c5   /* SODIMM 78 */
        MX8MP_IOMUXC_SD2_DATA0__GPIO2_IO15      0x1c5   /* SODIMM 80 */
        MX8MP_IOMUXC_SD2_DATA1__GPIO2_IO16      0x1c5   /* SODIMM 82 */
        MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12       0x1c5   /* SODIMM 84 */
        MX8MP_IOMUXC_GPIO1_IO04__GPIO1_IO04     0x4 	/* PMIC_USDHC_VSELECT */
    >;
};

&usdhc2 {
    status = "disabled";
};

I also removed nodes like pinctrl_usdhc2.

The GPIOs work fine (I can export them, and I can read the input or set them as output low/high). However, when set to output high, they always work at 3.3V independently from the status of GPIO1_IO04.

Can you confirm that I should see the voltage change by toggling GPIO1_IO04 from sysfs?

Thanks,

Roberto

Hi @matthias.tx ,

Just checking in, we just need the confirmation that toggling the GPIO1_IO04 from sysfs should change the value of the voltage on the SD PINs.

Thanks,
Roberto

Yes, the GPIO1_IO04 is PIMIC SD voltage selection input pin. SD voltage is 3.3 V
when it is driven low and 1.8 V when driven high.

Hi @alex.tx ,

Thank you for confirming this. At the moment, we found an hardware solution for this so we don’t need to look for a software change anymore.

Thank you for your help.

Regards,

Roberto