All of lore.kernel.org
 help / color / mirror / Atom feed
* Fail to reset on Odroid-C4
       [not found] <CGME20201106020946epcas1p3ff6494f0122e9f4c41f81877090df195@epcas1p3.samsung.com>
@ 2020-11-06  2:10   ` Jaehoon Chung
  0 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-06  2:10 UTC (permalink / raw)
  To: u-boot

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;


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.

If someone already fixed this or I missed something to do, let me know, plz.

Best Regards,
Jaehoon Chung

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
@ 2020-11-06  2:10   ` Jaehoon Chung
  0 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-06  2:10 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Neil Armstrong, u-boot-amlogic

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@ffe05000: 0, mmc@ffe07000: 1
In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@ff3f0000
Hit any key to stop autoboot:  0
Odroid N2>
Odroid N2>
Odroid N2>
Odroid N2>
Odroid N2>
Odroid N2> mmcinfo
Device: sd@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;


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.

If someone already fixed this or I missed something to do, let me know, plz.

Best Regards,
Jaehoon Chung

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
  2020-11-06  2:10   ` Jaehoon Chung
@ 2020-11-06  9:28     ` Neil Armstrong
  -1 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2020-11-06  9:28 UTC (permalink / raw)
  To: u-boot

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 ?

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.

> 
> 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.

Thanks for the patches & reports !

Neil

> 
> Best Regards,
> Jaehoon Chung
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fail to reset on Odroid-C4
@ 2020-11-06  9:28     ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2020-11-06  9:28 UTC (permalink / raw)
  To: Jaehoon Chung, U-Boot Mailing List; +Cc: u-boot-amlogic

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@ffe05000: 0, mmc@ffe07000: 1
> In:    serial
> Out:   serial
> Err:   serial
> Net:   eth0: ethernet@ff3f0000
> Hit any key to stop autoboot:  0
> Odroid N2>
> Odroid N2>
> Odroid N2>
> Odroid N2>
> Odroid N2>
> Odroid N2> mmcinfo
> Device: sd@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 ?

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.

> 
> 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.

Thanks for the patches & reports !

Neil

> 
> Best Regards,
> Jaehoon Chung
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
  2020-11-06  9:28     ` Neil Armstrong
@ 2020-11-06  9:59       ` Jaehoon Chung
  -1 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-06  9:59 UTC (permalink / raw)
  To: u-boot

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.

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)?


Best Regards,
Jaehoon Chung

> 
> Thanks for the patches & reports !
> 
> Neil
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
> 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fail to reset on Odroid-C4
@ 2020-11-06  9:59       ` Jaehoon Chung
  0 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-06  9:59 UTC (permalink / raw)
  To: Neil Armstrong, U-Boot Mailing List; +Cc: u-boot-amlogic

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@ffe05000: 0, mmc@ffe07000: 1
>> In:    serial
>> Out:   serial
>> Err:   serial
>> Net:   eth0: ethernet@ff3f0000
>> Hit any key to stop autoboot:  0
>> Odroid N2>
>> Odroid N2>
>> Odroid N2>
>> Odroid N2>
>> Odroid N2>
>> Odroid N2> mmcinfo
>> Device: sd@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.

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)?


Best Regards,
Jaehoon Chung

> 
> Thanks for the patches & reports !
> 
> Neil
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
> 
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
  2020-11-06  9:59       ` Jaehoon Chung
@ 2020-11-06 10:01         ` Neil Armstrong
  -1 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2020-11-06 10:01 UTC (permalink / raw)
  To: u-boot

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.

Neil

> 
> 
> Best Regards,
> Jaehoon Chung
> 
>>
>> Thanks for the patches & reports !
>>
>> Neil
>>
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>
>>
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fail to reset on Odroid-C4
@ 2020-11-06 10:01         ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2020-11-06 10:01 UTC (permalink / raw)
  To: Jaehoon Chung, U-Boot Mailing List; +Cc: u-boot-amlogic

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@ffe05000: 0, mmc@ffe07000: 1
>>> In:    serial
>>> Out:   serial
>>> Err:   serial
>>> Net:   eth0: ethernet@ff3f0000
>>> Hit any key to stop autoboot:  0
>>> Odroid N2>
>>> Odroid N2>
>>> Odroid N2>
>>> Odroid N2>
>>> Odroid N2>
>>> Odroid N2> mmcinfo
>>> Device: sd@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.

Neil

> 
> 
> Best Regards,
> Jaehoon Chung
> 
>>
>> Thanks for the patches & reports !
>>
>> Neil
>>
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>
>>
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
  2020-11-06 10:01         ` Neil Armstrong
@ 2020-11-09  8:37           ` Jaehoon Chung
  -1 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-09  8:37 UTC (permalink / raw)
  To: u-boot

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 at samsung.com/

Best Regards,
Jaehoon Chung

> 
> Neil
> 
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>> Thanks for the patches & reports !
>>>
>>> Neil
>>>
>>>>
>>>> Best Regards,
>>>> Jaehoon Chung
>>>>
>>>
>>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fail to reset on Odroid-C4
@ 2020-11-09  8:37           ` Jaehoon Chung
  0 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-09  8:37 UTC (permalink / raw)
  To: Neil Armstrong, U-Boot Mailing List; +Cc: u-boot-amlogic

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@ffe05000: 0, mmc@ffe07000: 1
>>>> In:    serial
>>>> Out:   serial
>>>> Err:   serial
>>>> Net:   eth0: ethernet@ff3f0000
>>>> Hit any key to stop autoboot:  0
>>>> Odroid N2>
>>>> Odroid N2>
>>>> Odroid N2>
>>>> Odroid N2>
>>>> Odroid N2>
>>>> Odroid N2> mmcinfo
>>>> Device: sd@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/

Best Regards,
Jaehoon Chung

> 
> Neil
> 
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>> Thanks for the patches & reports !
>>>
>>> Neil
>>>
>>>>
>>>> Best Regards,
>>>> Jaehoon Chung
>>>>
>>>
>>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
  2020-11-09  8:37           ` Jaehoon Chung
@ 2020-11-09 13:38             ` Neil Armstrong
  -1 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2020-11-09 13:38 UTC (permalink / raw)
  To: u-boot

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 at 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
>>>>>
>>>>
>>>>
>>>
>>
>>
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fail to reset on Odroid-C4
@ 2020-11-09 13:38             ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2020-11-09 13:38 UTC (permalink / raw)
  To: Jaehoon Chung, U-Boot Mailing List; +Cc: u-boot-amlogic

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@ffe05000: 0, mmc@ffe07000: 1
>>>>> In:    serial
>>>>> Out:   serial
>>>>> Err:   serial
>>>>> Net:   eth0: ethernet@ff3f0000
>>>>> Hit any key to stop autoboot:  0
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2>
>>>>> Odroid N2> mmcinfo
>>>>> Device: sd@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
>>>>>
>>>>
>>>>
>>>
>>
>>
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Fail to reset on Odroid-C4
  2020-11-09 13:38             ` Neil Armstrong
@ 2020-11-09 22:25               ` Jaehoon Chung
  -1 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-09 22:25 UTC (permalink / raw)
  To: u-boot

On 11/9/20 10:38 PM, Neil Armstrong wrote:
> 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://protect2.fireeye.com/v1/url?k=e6aba439-b9309d23-e6aa2f76-000babff24ad-8b52d9e3f1eaaaba&q=1&e=cfbd62d7-66fc-460f-bb62-f49289448de5&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20201109031233.25320-1-jh80.chung%40samsung.com%2F
> 
> I don't understand why a different clock phase would make reset work here.

Sorry. It's my mistake. It's not fixed. 

Best Regards,
Jaehoon CHung

> 
> Neil
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>> Neil
>>>
>>>>
>>>>
>>>> Best Regards,
>>>> Jaehoon Chung
>>>>
>>>>>
>>>>> Thanks for the patches & reports !
>>>>>
>>>>> Neil
>>>>>
>>>>>>
>>>>>> Best Regards,
>>>>>> Jaehoon Chung
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fail to reset on Odroid-C4
@ 2020-11-09 22:25               ` Jaehoon Chung
  0 siblings, 0 replies; 14+ messages in thread
From: Jaehoon Chung @ 2020-11-09 22:25 UTC (permalink / raw)
  To: Neil Armstrong, U-Boot Mailing List; +Cc: u-boot-amlogic

On 11/9/20 10:38 PM, Neil Armstrong wrote:
> 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@ffe05000: 0, mmc@ffe07000: 1
>>>>>> In:    serial
>>>>>> Out:   serial
>>>>>> Err:   serial
>>>>>> Net:   eth0: ethernet@ff3f0000
>>>>>> Hit any key to stop autoboot:  0
>>>>>> Odroid N2>
>>>>>> Odroid N2>
>>>>>> Odroid N2>
>>>>>> Odroid N2>
>>>>>> Odroid N2>
>>>>>> Odroid N2> mmcinfo
>>>>>> Device: sd@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://protect2.fireeye.com/v1/url?k=e6aba439-b9309d23-e6aa2f76-000babff24ad-8b52d9e3f1eaaaba&q=1&e=cfbd62d7-66fc-460f-bb62-f49289448de5&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20201109031233.25320-1-jh80.chung%40samsung.com%2F
> 
> I don't understand why a different clock phase would make reset work here.

Sorry. It's my mistake. It's not fixed. 

Best Regards,
Jaehoon CHung

> 
> Neil
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>> Neil
>>>
>>>>
>>>>
>>>> Best Regards,
>>>> Jaehoon Chung
>>>>
>>>>>
>>>>> Thanks for the patches & reports !
>>>>>
>>>>> Neil
>>>>>
>>>>>>
>>>>>> Best Regards,
>>>>>> Jaehoon Chung
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-09 22:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201106020946epcas1p3ff6494f0122e9f4c41f81877090df195@epcas1p3.samsung.com>
2020-11-06  2:10 ` Fail to reset on Odroid-C4 Jaehoon Chung
2020-11-06  2:10   ` Jaehoon Chung
2020-11-06  9:28   ` Neil Armstrong
2020-11-06  9:28     ` Neil Armstrong
2020-11-06  9:59     ` Jaehoon Chung
2020-11-06  9:59       ` Jaehoon Chung
2020-11-06 10:01       ` Neil Armstrong
2020-11-06 10:01         ` Neil Armstrong
2020-11-09  8:37         ` Jaehoon Chung
2020-11-09  8:37           ` Jaehoon Chung
2020-11-09 13:38           ` Neil Armstrong
2020-11-09 13:38             ` Neil Armstrong
2020-11-09 22:25             ` Jaehoon Chung
2020-11-09 22:25               ` Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.