mbox series

[v4,00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes

Message ID 20200901085809.48660-1-yangbo.lu@nxp.com
Headers show
Series mmc: fsl_esdhc: support eMMC HS200/HS400 modes | expand

Message

Yangbo Lu Sept. 1, 2020, 8:57 a.m. UTC
This patch-set is to support eMMC HS200 and HS400 speed modes for
eSDHC, and enable them on LX2160ARDB board.

CI build link
https://travis-ci.org/github/yangbolu1991/u-boot-test/builds/720875619

Changes for v2:
	- Added two patches to fix stability issue.
Changes for v3:
	- Explained more in commit messages.
	- Added HS400 exit code for downgrade.
Changes for v4:
	- Checked returning of mmc_hs400_prepare_ddr().
	- Added Reviewed-by.
	- Rebased.

Yangbo Lu (11):
  mmc: add a reinit() API
  mmc: fsl_esdhc: add a reinit() callback
  mmc: fsl_esdhc: support tuning for eMMC HS200
  mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
  mmc: add a hs400_tuning flag
  mmc: add a mmc_hs400_prepare_ddr() interface
  mmc: fsl_esdhc: support eMMC HS400 mode
  mmc: fsl_esdhc: fix mmc->clock with actual clock
  mmc: fsl_esdhc: fix eMMC HS400 stability issue
  arm: dts: lx2160ardb: support eMMC HS400 mode
  configs: lx2160ardb: enable eMMC HS400 mode support

 arch/arm/dts/fsl-lx2160a-rdb.dts             |   2 +
 configs/lx2160ardb_tfa_SECURE_BOOT_defconfig |   1 +
 configs/lx2160ardb_tfa_defconfig             |   1 +
 configs/lx2160ardb_tfa_stmm_defconfig        |   1 +
 drivers/mmc/fsl_esdhc.c                      | 176 ++++++++++++++++++++++++++-
 drivers/mmc/mmc-uclass.c                     |  30 +++++
 drivers/mmc/mmc.c                            |  14 ++-
 include/fsl_esdhc.h                          |  29 ++++-
 include/mmc.h                                |  26 +++-
 9 files changed, 270 insertions(+), 10 deletions(-)

Comments

Yangbo Lu Sept. 7, 2020, 3:19 a.m. UTC | #1
Hi Jaehoon and Peng,

Any comments on the v4 patch-set?
Thank you.

Best regards,
Yangbo Lu

> -----Original Message-----
> From: Yangbo Lu <yangbo.lu@nxp.com>
> Sent: Tuesday, September 1, 2020 4:58 PM
> To: u-boot@lists.denx.de; Peng Fan <peng.fan@nxp.com>; Priyanka Jain
> <priyanka.jain@nxp.com>; 'Jaehoon Chung' <jh80.chung@samsung.com>
> Cc: Y.b. Lu <yangbo.lu@nxp.com>
> Subject: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes
> 
> This patch-set is to support eMMC HS200 and HS400 speed modes for
> eSDHC, and enable them on LX2160ARDB board.
> 
> CI build link
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-ci
> .org%2Fgithub%2Fyangbolu1991%2Fu-boot-test%2Fbuilds%2F720875619&a
> mp;data=02%7C01%7Cyangbo.lu%40nxp.com%7Caf6b8adab90444f93e1208d
> 84e563a07%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637345
> 479527036436&amp;sdata=L26QnuiL3ETvLbr4P1oJqxVJAoVlYY3ROg%2FWpb
> J%2B6cc%3D&amp;reserved=0
> 
> Changes for v2:
> 	- Added two patches to fix stability issue.
> Changes for v3:
> 	- Explained more in commit messages.
> 	- Added HS400 exit code for downgrade.
> Changes for v4:
> 	- Checked returning of mmc_hs400_prepare_ddr().
> 	- Added Reviewed-by.
> 	- Rebased.
> 
> Yangbo Lu (11):
>   mmc: add a reinit() API
>   mmc: fsl_esdhc: add a reinit() callback
>   mmc: fsl_esdhc: support tuning for eMMC HS200
>   mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
>   mmc: add a hs400_tuning flag
>   mmc: add a mmc_hs400_prepare_ddr() interface
>   mmc: fsl_esdhc: support eMMC HS400 mode
>   mmc: fsl_esdhc: fix mmc->clock with actual clock
>   mmc: fsl_esdhc: fix eMMC HS400 stability issue
>   arm: dts: lx2160ardb: support eMMC HS400 mode
>   configs: lx2160ardb: enable eMMC HS400 mode support
> 
>  arch/arm/dts/fsl-lx2160a-rdb.dts             |   2 +
>  configs/lx2160ardb_tfa_SECURE_BOOT_defconfig |   1 +
>  configs/lx2160ardb_tfa_defconfig             |   1 +
>  configs/lx2160ardb_tfa_stmm_defconfig        |   1 +
>  drivers/mmc/fsl_esdhc.c                      | 176
> ++++++++++++++++++++++++++-
>  drivers/mmc/mmc-uclass.c                     |  30 +++++
>  drivers/mmc/mmc.c                            |  14 ++-
>  include/fsl_esdhc.h                          |  29 ++++-
>  include/mmc.h                                |  26 +++-
>  9 files changed, 270 insertions(+), 10 deletions(-)
> 
> --
> 2.7.4
Jaehoon Chung Sept. 7, 2020, 7:21 a.m. UTC | #2
On 9/7/20 12:19 PM, Y.b. Lu wrote:
> Hi Jaehoon and Peng,
> 
> Any comments on the v4 patch-set?

Will check. Thanks!

Best Regards,
Jaehoon Chung

> Thank you.
> 
> Best regards,
> Yangbo Lu
> 
>> -----Original Message-----
>> From: Yangbo Lu <yangbo.lu@nxp.com>
>> Sent: Tuesday, September 1, 2020 4:58 PM
>> To: u-boot@lists.denx.de; Peng Fan <peng.fan@nxp.com>; Priyanka Jain
>> <priyanka.jain@nxp.com>; 'Jaehoon Chung' <jh80.chung@samsung.com>
>> Cc: Y.b. Lu <yangbo.lu@nxp.com>
>> Subject: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes
>>
>> This patch-set is to support eMMC HS200 and HS400 speed modes for
>> eSDHC, and enable them on LX2160ARDB board.
>>
>> CI build link
>> https://protect2.fireeye.com/v1/url?k=b4e11c14-e97d1d74-b4e0975b-0cc47a31307c-17ee447490c8297d&q=1&e=facc8ec9-f5b1-4cdf-bad5-baf7c2c5035b&u=https%3A%2F%2Feur01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftravis-ci
>> .org%2Fgithub%2Fyangbolu1991%2Fu-boot-test%2Fbuilds%2F720875619&a
>> mp;data=02%7C01%7Cyangbo.lu%40nxp.com%7Caf6b8adab90444f93e1208d
>> 84e563a07%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637345
>> 479527036436&amp;sdata=L26QnuiL3ETvLbr4P1oJqxVJAoVlYY3ROg%2FWpb
>> J%2B6cc%3D&amp;reserved=0
>>
>> Changes for v2:
>> 	- Added two patches to fix stability issue.
>> Changes for v3:
>> 	- Explained more in commit messages.
>> 	- Added HS400 exit code for downgrade.
>> Changes for v4:
>> 	- Checked returning of mmc_hs400_prepare_ddr().
>> 	- Added Reviewed-by.
>> 	- Rebased.
>>
>> Yangbo Lu (11):
>>   mmc: add a reinit() API
>>   mmc: fsl_esdhc: add a reinit() callback
>>   mmc: fsl_esdhc: support tuning for eMMC HS200
>>   mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
>>   mmc: add a hs400_tuning flag
>>   mmc: add a mmc_hs400_prepare_ddr() interface
>>   mmc: fsl_esdhc: support eMMC HS400 mode
>>   mmc: fsl_esdhc: fix mmc->clock with actual clock
>>   mmc: fsl_esdhc: fix eMMC HS400 stability issue
>>   arm: dts: lx2160ardb: support eMMC HS400 mode
>>   configs: lx2160ardb: enable eMMC HS400 mode support
>>
>>  arch/arm/dts/fsl-lx2160a-rdb.dts             |   2 +
>>  configs/lx2160ardb_tfa_SECURE_BOOT_defconfig |   1 +
>>  configs/lx2160ardb_tfa_defconfig             |   1 +
>>  configs/lx2160ardb_tfa_stmm_defconfig        |   1 +
>>  drivers/mmc/fsl_esdhc.c                      | 176
>> ++++++++++++++++++++++++++-
>>  drivers/mmc/mmc-uclass.c                     |  30 +++++
>>  drivers/mmc/mmc.c                            |  14 ++-
>>  include/fsl_esdhc.h                          |  29 ++++-
>>  include/mmc.h                                |  26 +++-
>>  9 files changed, 270 insertions(+), 10 deletions(-)
>>
>> --
>> 2.7.4
> 
>
Peng Fan Sept. 8, 2020, 1:08 a.m. UTC | #3
Hi Y.b

> Subject: RE: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes
> 
> Hi Jaehoon and Peng,
> 
> Any comments on the v4 patch-set?

Sorry for late. I need postpone the pick up this patchset until next.
I'll give a check, if no issues, I'll pick this into next branch.

Thanks,
Peng.

> Thank you.
> 
> Best regards,
> Yangbo Lu
> 
> > -----Original Message-----
> > From: Yangbo Lu <yangbo.lu@nxp.com>
> > Sent: Tuesday, September 1, 2020 4:58 PM
> > To: u-boot@lists.denx.de; Peng Fan <peng.fan@nxp.com>; Priyanka Jain
> > <priyanka.jain@nxp.com>; 'Jaehoon Chung' <jh80.chung@samsung.com>
> > Cc: Y.b. Lu <yangbo.lu@nxp.com>
> > Subject: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes
> >
> > This patch-set is to support eMMC HS200 and HS400 speed modes for
> > eSDHC, and enable them on LX2160ARDB board.
> >
> > CI build link
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrav
> > is-ci
> > .org%2Fgithub%2Fyangbolu1991%2Fu-boot-test%2Fbuilds%2F720875619&
> a
> >
> mp;data=02%7C01%7Cyangbo.lu%40nxp.com%7Caf6b8adab90444f93e1208
> d
> >
> 84e563a07%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637345
> >
> 479527036436&amp;sdata=L26QnuiL3ETvLbr4P1oJqxVJAoVlYY3ROg%2FWpb
> > J%2B6cc%3D&amp;reserved=0
> >
> > Changes for v2:
> > 	- Added two patches to fix stability issue.
> > Changes for v3:
> > 	- Explained more in commit messages.
> > 	- Added HS400 exit code for downgrade.
> > Changes for v4:
> > 	- Checked returning of mmc_hs400_prepare_ddr().
> > 	- Added Reviewed-by.
> > 	- Rebased.
> >
> > Yangbo Lu (11):
> >   mmc: add a reinit() API
> >   mmc: fsl_esdhc: add a reinit() callback
> >   mmc: fsl_esdhc: support tuning for eMMC HS200
> >   mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
> >   mmc: add a hs400_tuning flag
> >   mmc: add a mmc_hs400_prepare_ddr() interface
> >   mmc: fsl_esdhc: support eMMC HS400 mode
> >   mmc: fsl_esdhc: fix mmc->clock with actual clock
> >   mmc: fsl_esdhc: fix eMMC HS400 stability issue
> >   arm: dts: lx2160ardb: support eMMC HS400 mode
> >   configs: lx2160ardb: enable eMMC HS400 mode support
> >
> >  arch/arm/dts/fsl-lx2160a-rdb.dts             |   2 +
> >  configs/lx2160ardb_tfa_SECURE_BOOT_defconfig |   1 +
> >  configs/lx2160ardb_tfa_defconfig             |   1 +
> >  configs/lx2160ardb_tfa_stmm_defconfig        |   1 +
> >  drivers/mmc/fsl_esdhc.c                      | 176
> > ++++++++++++++++++++++++++-
> >  drivers/mmc/mmc-uclass.c                     |  30 +++++
> >  drivers/mmc/mmc.c                            |  14 ++-
> >  include/fsl_esdhc.h                          |  29 ++++-
> >  include/mmc.h                                |  26 +++-
> >  9 files changed, 270 insertions(+), 10 deletions(-)
> >
> > --
> > 2.7.4
Stefan Roese Sept. 8, 2020, 7:17 a.m. UTC | #4
Hi All,

On 08.09.20 03:08, Peng Fan wrote:
> Hi Y.b
> 
>> Subject: RE: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes
>>
>> Hi Jaehoon and Peng,
>>
>> Any comments on the v4 patch-set?
> 
> Sorry for late. I need postpone the pick up this patchset until next.
> I'll give a check, if no issues, I'll pick this into next branch.

I've tested it on the LX2160A-RDB and it the speed improvement is
quite impressive. Thanks for working on this.

Tested-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> Thanks,
> Peng.
> 
>> Thank you.
>>
>> Best regards,
>> Yangbo Lu
>>
>>> -----Original Message-----
>>> From: Yangbo Lu <yangbo.lu@nxp.com>
>>> Sent: Tuesday, September 1, 2020 4:58 PM
>>> To: u-boot@lists.denx.de; Peng Fan <peng.fan@nxp.com>; Priyanka Jain
>>> <priyanka.jain@nxp.com>; 'Jaehoon Chung' <jh80.chung@samsung.com>
>>> Cc: Y.b. Lu <yangbo.lu@nxp.com>
>>> Subject: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes
>>>
>>> This patch-set is to support eMMC HS200 and HS400 speed modes for
>>> eSDHC, and enable them on LX2160ARDB board.
>>>
>>> CI build link
>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrav
>>> is-ci
>>> .org%2Fgithub%2Fyangbolu1991%2Fu-boot-test%2Fbuilds%2F720875619&
>> a
>>>
>> mp;data=02%7C01%7Cyangbo.lu%40nxp.com%7Caf6b8adab90444f93e1208
>> d
>>>
>> 84e563a07%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637345
>>>
>> 479527036436&amp;sdata=L26QnuiL3ETvLbr4P1oJqxVJAoVlYY3ROg%2FWpb
>>> J%2B6cc%3D&amp;reserved=0
>>>
>>> Changes for v2:
>>> 	- Added two patches to fix stability issue.
>>> Changes for v3:
>>> 	- Explained more in commit messages.
>>> 	- Added HS400 exit code for downgrade.
>>> Changes for v4:
>>> 	- Checked returning of mmc_hs400_prepare_ddr().
>>> 	- Added Reviewed-by.
>>> 	- Rebased.
>>>
>>> Yangbo Lu (11):
>>>    mmc: add a reinit() API
>>>    mmc: fsl_esdhc: add a reinit() callback
>>>    mmc: fsl_esdhc: support tuning for eMMC HS200
>>>    mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
>>>    mmc: add a hs400_tuning flag
>>>    mmc: add a mmc_hs400_prepare_ddr() interface
>>>    mmc: fsl_esdhc: support eMMC HS400 mode
>>>    mmc: fsl_esdhc: fix mmc->clock with actual clock
>>>    mmc: fsl_esdhc: fix eMMC HS400 stability issue
>>>    arm: dts: lx2160ardb: support eMMC HS400 mode
>>>    configs: lx2160ardb: enable eMMC HS400 mode support
>>>
>>>   arch/arm/dts/fsl-lx2160a-rdb.dts             |   2 +
>>>   configs/lx2160ardb_tfa_SECURE_BOOT_defconfig |   1 +
>>>   configs/lx2160ardb_tfa_defconfig             |   1 +
>>>   configs/lx2160ardb_tfa_stmm_defconfig        |   1 +
>>>   drivers/mmc/fsl_esdhc.c                      | 176
>>> ++++++++++++++++++++++++++-
>>>   drivers/mmc/mmc-uclass.c                     |  30 +++++
>>>   drivers/mmc/mmc.c                            |  14 ++-
>>>   include/fsl_esdhc.h                          |  29 ++++-
>>>   include/mmc.h                                |  26 +++-
>>>   9 files changed, 270 insertions(+), 10 deletions(-)
>>>
>>> --
>>> 2.7.4
> 


Viele Grüße,
Stefan
Jaehoon Chung Sept. 10, 2020, 5:50 a.m. UTC | #5
Hi,

On 9/1/20 5:57 PM, Yangbo Lu wrote:
> This patch-set is to support eMMC HS200 and HS400 speed modes for
> eSDHC, and enable them on LX2160ARDB board.

looks good to me. 

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> 
> CI build link
> https://travis-ci.org/github/yangbolu1991/u-boot-test/builds/720875619
> 
> Changes for v2:
> 	- Added two patches to fix stability issue.
> Changes for v3:
> 	- Explained more in commit messages.
> 	- Added HS400 exit code for downgrade.
> Changes for v4:
> 	- Checked returning of mmc_hs400_prepare_ddr().
> 	- Added Reviewed-by.
> 	- Rebased.
> 
> Yangbo Lu (11):
>   mmc: add a reinit() API
>   mmc: fsl_esdhc: add a reinit() callback
>   mmc: fsl_esdhc: support tuning for eMMC HS200
>   mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
>   mmc: add a hs400_tuning flag
>   mmc: add a mmc_hs400_prepare_ddr() interface
>   mmc: fsl_esdhc: support eMMC HS400 mode
>   mmc: fsl_esdhc: fix mmc->clock with actual clock
>   mmc: fsl_esdhc: fix eMMC HS400 stability issue
>   arm: dts: lx2160ardb: support eMMC HS400 mode
>   configs: lx2160ardb: enable eMMC HS400 mode support
> 
>  arch/arm/dts/fsl-lx2160a-rdb.dts             |   2 +
>  configs/lx2160ardb_tfa_SECURE_BOOT_defconfig |   1 +
>  configs/lx2160ardb_tfa_defconfig             |   1 +
>  configs/lx2160ardb_tfa_stmm_defconfig        |   1 +
>  drivers/mmc/fsl_esdhc.c                      | 176 ++++++++++++++++++++++++++-
>  drivers/mmc/mmc-uclass.c                     |  30 +++++
>  drivers/mmc/mmc.c                            |  14 ++-
>  include/fsl_esdhc.h                          |  29 ++++-
>  include/mmc.h                                |  26 +++-
>  9 files changed, 270 insertions(+), 10 deletions(-)
>