U-boot Archive mirror
 help / color / mirror / Atom feed
From: "Abbarapu, Venkatesh" <venkatesh.abbarapu@amd.com>
To: "Abbarapu, Venkatesh" <venkatesh.abbarapu@amd.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: "peng.fan@nxp.com" <peng.fan@nxp.com>,
	"jh80.chung@samsung.com" <jh80.chung@samsung.com>,
	"git (AMD-Xilinx)" <git@amd.com>
Subject: RE: [PATCH] mmc: Change the frequency to MMC_HS_52 when selecting hs400
Date: Tue, 7 May 2024 04:16:21 +0000	[thread overview]
Message-ID: <SA1PR12MB8697A5B31B35116E6DF70B2B98E42@SA1PR12MB8697.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240423053057.15863-1-venkatesh.abbarapu@amd.com>

Do you have any comments for this patch?

Thanks
Venkatesh

> -----Original Message-----
> From: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
> Sent: Tuesday, April 23, 2024 11:01 AM
> To: u-boot@lists.denx.de
> Cc: peng.fan@nxp.com; jh80.chung@samsung.com; git (AMD-Xilinx)
> <git@amd.com>
> Subject: [PATCH] mmc: Change the frequency to MMC_HS_52 when selecting
> hs400
> 
> Per JESD84-B51 P47, host need to change frequency to <=52MHz after setting
> HS_TIMING to 0x1, and host need to set the 8-bit DDR buswidth. Currently
> setting the frequency to 26MHz and trying to switch 8-bit DDR buswidth
> resulting timeouts.
> 
> mmc dev 1 0
> Select HS400 failed -110
> switch to partitions #0, OK
> mmc1(part 0) is current device
> 
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
> ---
>  drivers/mmc/mmc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index
> 7b068c71ff..a2ed99aefe 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -962,8 +962,8 @@ static int mmc_set_card_speed(struct mmc *mmc,
> enum bus_mode mode,
>  	 * Extended CSD. Reconfigure the controller to run at HS mode.
>  	 */
>  	if (hsdowngrade) {
> -		mmc_select_mode(mmc, MMC_HS);
> -		mmc_set_clock(mmc, mmc_mode2freq(mmc, MMC_HS),
> false);
> +		mmc_select_mode(mmc, MMC_HS_52);
> +		mmc_set_clock(mmc, mmc_mode2freq(mmc, MMC_HS_52),
> false);
>  	}
>  #endif
> 
> @@ -2043,7 +2043,7 @@ static int mmc_select_hs400(struct mmc *mmc)
>  	}
> 
>  	/* Set back to HS */
> -	mmc_set_card_speed(mmc, MMC_HS, true);
> +	mmc_set_card_speed(mmc, MMC_HS_52, true);
> 
>  	err = mmc_hs400_prepare_ddr(mmc);
>  	if (err)
> --
> 2.17.1


      reply	other threads:[~2024-05-07  4:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  5:30 [PATCH] mmc: Change the frequency to MMC_HS_52 when selecting hs400 Venkatesh Yadav Abbarapu
2024-05-07  4:16 ` Abbarapu, Venkatesh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SA1PR12MB8697A5B31B35116E6DF70B2B98E42@SA1PR12MB8697.namprd12.prod.outlook.com \
    --to=venkatesh.abbarapu@amd.com \
    --cc=git@amd.com \
    --cc=jh80.chung@samsung.com \
    --cc=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).