Fail to reset on Odroid-C4
Neil Armstrong
narmstrong at baylibre.com
Mon Nov 9 14:38:01 CET 2020
On 09/11/2020 09:37, Jaehoon Chung wrote:
> On 11/6/20 7:01 PM, Neil Armstrong wrote:
>> On 06/11/2020 10:59, Jaehoon Chung wrote:
>>> Hi,
>>>
>>> On 11/6/20 6:28 PM, Neil Armstrong wrote:
>>>> Hi,
>>>>
>>>> On 06/11/2020 03:10, Jaehoon Chung wrote:
>>>>> Hi,
>>>>>
>>>>> I have checked U-boot on Odroid-C4 with v2020.10.
>>>>> I found a problem about reset behavior.
>>>>>
>>>>> In my environment,
>>>>> - Boot to SD-card,
>>>>> - built u-boot v2020.10 with ordoid-c4_defconfig
>>>>> - Referred to doc/board/amlogic/odroid-c4.rst
>>>>>
>>>>>
>>>>> If do "reset" command after run command "mmcinfo", it didn't work anymore.
>>>>> - After something to do operation relevant to MMC. (read/write or ls mmc, etc..)
>>>>>
>>>>>
>>>>> U-Boot 2020.10-00383-g2f27fb20151b-dirty (Nov 06 2020 - 10:37:09 +0900) odroid-c4
>>>>>
>>>>> Model: Hardkernel ODROID-C4
>>>>> SoC: Amlogic Meson SM1 (Unknown) Revision 2b:c (10:2)
>>>>> DRAM: 3.8 GiB
>>>>> MMC: sd at ffe05000: 0, mmc at ffe07000: 1
>>>>> In: serial
>>>>> Out: serial
>>>>> Err: serial
>>>>> Net: eth0: ethernet at ff3f0000
>>>>> Hit any key to stop autoboot: 0
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2> mmcinfo
>>>>> Device: sd at ffe05000
>>>>> Manufacturer ID: 3
>>>>> OEM: 5344
>>>>> Name: SB16G
>>>>> Bus Speed: 50000000
>>>>> Mode: SD High Speed (50MHz)
>>>>> Rd Block Len: 512
>>>>> SD version 3.0
>>>>> High Capacity: Yes
>>>>> Capacity: 14.8 GiB
>>>>> Bus Width: 4-bit
>>>>> Erase Group Size: 512 Bytes
>>>>> Odroid N2> reset
>>>>> resetting ...
>>>>> bl31 reboot reason: 0xd
>>>>> bl31 reboot reason: 0x0
>>>>> system cmd 1.
>>>>> SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.0;CHK:0;
>>>>> bl2_stage_init 0x01
>>>>> bl2_stage_init 0x81
>>>>> hw id:?M1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;
>>>>
>>>> It's a new one !
>>>>
>>>>>
>>>>>
>>>>> I didn't analyze it in more detail. I will do. But it seems that relevant to BL2 binary.
>>>>> If nothing to do before reset, it's working fine.
>>>>
>>>> Is this the same with SDCard ?
>>>
>>> Yes. I had tested with same SD-card. (I can't test with eMMC, because eMMC doesn't initialize.)
>>>
>>> 1) After boot, reset -> fine
>>> 2) After boot, run some mmc operation -> reset -> fail.
>>>
>>>
>>>>
>>>> The SDCard & eMMC regulators doesn't reset to default when resetting, causing issues
>>>> with the boot ROM... maybe you'll need to reset the regulators in a reset for the
>>>> Odroid C4 board.
>>>
>>> Actually, i hope that it works fine after building mainline u-boot with odroid-c4_defconfig.
>>> Because it seems that supports Odroid-c4. But it doesn't work well. :(
>>>
>>> For checking, i'm using with u-boot-amlogic with 2021.01-rc1
>>>
>>> But eMMC doesn't work..
>>> I'm analyzing this problem..it doesn't work higher mode than 26MHz speed mode.
>>> How did you check for eMMC card? I will fix it but i don't have any information about meson_gx_mmc.
>>
>> I did my test on the Khadas VIM3L, but we have the exact same issues on the SEI610, VIM3L and now C4 boards.
>>
>>>
>>> If i find how to fix it, i will send patch.
>>>
>>>
>>>>
>>>>>
>>>>> If someone already fixed this or I missed something to do, let me know, plz.
>>>>
>>>> AFAIK no, I just pushed a fix for the eMMC/SDCard clock causing read issues at 50MHz.
>>>
>>> Is it relevant to IO error (-5)?
>>
>> Yes, over 26MHz the eMMC fails, the clock management is in cause and needs to be
>> reworked, but this fix should be fine.
>
> This issue is fixed after applied my patch. Also "reset" is working fine.
>
> https://patchwork.ozlabs.org/project/uboot/patch/20201109031233.25320-1-jh80.chung@samsung.com/
I don't understand why a different clock phase would make reset work here.
Neil
>
> Best Regards,
> Jaehoon Chung
>
>>
>> Neil
>>
>>>
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>>>
>>>> Thanks for the patches & reports !
>>>>
>>>> Neil
>>>>
>>>>>
>>>>> Best Regards,
>>>>> Jaehoon Chung
>>>>>
>>>>
>>>>
>>>
>>
>>
>
More information about the U-Boot
mailing list