[PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

Neil Armstrong narmstrong at baylibre.com
Fri Dec 18 10:49:34 CET 2020


Hi,

On 18/12/2020 10:42, Marek Szyprowski wrote:
> 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?

Sure, if you can please submit them.

Concerning u-boot, please update arch/arm/dts/meson-sm1-odroid-c4-u-boot.dtsi instead
until the DT is sync'ed from Linux

> 
> Best regards
> 

Thanks for testing !

Neil



More information about the U-Boot mailing list