Hi Neil, On 18.12.2020 10:24, Neil Armstrong wrote: > On 18/12/2020 10:11, Marek Szyprowski wrote: >> On 18.12.2020 09:36, Neil Armstrong wrote: >>> On 17/12/2020 10:06, Marek Szyprowski wrote: >>>> For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_EN >>>> pin to the input (high impedance?) mode, otherwise the board is stuck >>>> in the middle of loading early stages of the bootloader from SD card. >>> Did you try taking the regulator-tflash_vdd and doing a disable/enable >>> sequence >>> to reset the card ? >>> >>> The GPIOAO_3 has a default pull-up, so I don't see why moving it to input >>> could change >>> anything. >>> >>> So maybe simply doing a 0->1 transition could do the same, using the >>> regulator >>> would be much better. >>> >>> Can't we add "shutdown" or equivalent method to the mmc driver that could >>> do this >>> directly with the vdd regulator ? >> Yes, I've tried all combinations of playing this that GPIO and regulator >> that came to my mind. Switching pin to the input is the only one I've >> found working. > Thanks for the dumps ! > > Could you try switching the tflash_vdd to opendrain like : > > --->8--- > > --- a/arch/arm/dts/meson-sm1-odroid-c4.dts > +++ b/arch/arm/dts/meson-sm1-odroid-c4.dts > @@ -52,7 +52,7 @@ > regulator-min-microvolt = <3300000>; > regulator-max-microvolt = <3300000>; > > - gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; > + gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; > enable-active-high; > regulator-always-on; > }; > > --->8--- > > This should leave the pin in input to achieve high state, and solve the issue. > Right, this fixed the issue! Thanks!
Do you want me to submit it as a patch to uboot and mainline Linux kernel or do you want to handle it by yourself? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland