AnsweredAssumed Answered

MMC wp default setting is always high in imx6ul

Question asked by Anantha Ramachandran on Apr 12, 2019
Latest reply on Apr 26, 2019 by igorpadykov



This is in continuation with conversation we had in mmc wp - imx6ul 


I made changes as below in DTS for imx6ul:


&usdhc1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc1>;
    cd-gpios = <&gpio2 21 0>;
    wp-gpios = <&gpio4 25 1>;
    status = "okay";


        pinctrl_usdhc1: usdhc1grp {
            fsl,pins = <
                MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x17059  
                MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x17059
                MX6UL_PAD_CSI_DATA04__GPIO4_IO25   0x17059 //wp pin
                MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x17059
                MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x17059
                MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
                MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059


but the SD card gets write protected right from bootup, so boot up is failing always.

console output:

Starting kernel ...

[    0.001400] clocksource_of_init: no matching clocksources found
[    0.004518] /cpus/cpu@0 missing clock-frequency property
[    1.781728] cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
[    2.366058] EXT4-fs (mmcblk0p3): write access unavailable, cannot proceed
[    2.379833] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,3)


I need an option to set default direction of this pin "MX6UL_PAD_CSI_DATA04__GPIO4_IO25 " to input & set it to low by default so that the board boots up normally. while board is functioning, the pin will be set to make the SD card write protected. 


Am i missing any details in DTB? kindly suggest.



Anantha R