public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Jaehoon Chung" <jh80.chung@samsung.com>
To: "'Neil Armstrong'" <neil.armstrong@linaro.org>,
	"'Caleb Connolly'" <caleb.connolly@linaro.org>,
	"'Sumit Garg'" <sumit.garg@linaro.org>,
	"'Peng Fan'" <peng.fan@nxp.com>,
	"'Tom Rini'" <trini@konsulko.com>
Cc: <u-boot-qcom@groups.io>, <u-boot@lists.denx.de>
Subject: RE: [PATCH] mmc: msm_sdhci: enable vqmmc at probe if available
Date: Wed, 23 Oct 2024 07:49:46 +0900	[thread overview]
Message-ID: <0a4a01db24d4$b1aea100$150be300$@samsung.com> (raw)
In-Reply-To: <20241016-topic-sm8x50-mmc-vqmmc-v1-1-767af5351d37@linaro.org>

Hi

> -----Original Message-----
> From: Neil Armstrong <neil.armstrong@linaro.org>
> Sent: Wednesday, October 16, 2024 6:17 PM
> To: Caleb Connolly <caleb.connolly@linaro.org>; Sumit Garg <sumit.garg@linaro.org>; Peng Fan
> <peng.fan@nxp.com>; Jaehoon Chung <jh80.chung@samsung.com>; Tom Rini <trini@konsulko.com>
> Cc: u-boot-qcom@groups.io; u-boot@lists.denx.de; Neil Armstrong <neil.armstrong@linaro.org>
> Subject: [PATCH] mmc: msm_sdhci: enable vqmmc at probe if available
>
> On earlier platforms, the vqmmc regulator was enabled by the
> previous bootloader, but on the newest (SM8650) it's not
> and we need vqmmc to be enabled in order to have the card
> to respond.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>

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

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/msm_sdhci.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
> index 4e5c932c071..27bb7052fca 100644
> --- a/drivers/mmc/msm_sdhci.c
> +++ b/drivers/mmc/msm_sdhci.c
> @@ -15,6 +15,7 @@
>  #include <asm/global_data.h>
>  #include <asm/io.h>
>  #include <linux/bitops.h>
> +#include <power/regulator.h>
>
>  /* Non-standard registers needed for SDHCI startup */
>  #define SDCC_MCI_POWER   0x0
> @@ -43,6 +44,7 @@ struct msm_sdhc {
>  	struct sdhci_host host;
>  	void *base;
>  	struct clk_bulk clks;
> +	struct udevice *vqmmc;
>  };
>
>  struct msm_sdhc_variant_info {
> @@ -163,6 +165,16 @@ static int msm_sdc_probe(struct udevice *dev)
>  	if (ret)
>  		return ret;
>
> +	/* Get the vqmmc regulator and enable it if available */
> +	device_get_supply_regulator(dev, "vqmmc-supply", &prv->vqmmc);
> +	if (prv->vqmmc) {
> +		ret = regulator_set_enable_if_allowed(prv->vqmmc, true);
> +		if (ret) {
> +			printf("Failed to enable the VQMMC regulator\n");
> +			return ret;
> +		}
> +	}
> +
>  	var_info = (void *)dev_get_driver_data(dev);
>  	if (!var_info->mci_removed) {
>  		ret = msm_sdc_mci_init(prv);
>
> ---
> base-commit: d5cab0d6adc26ec1bbd45c2fed101184d04454ae
> change-id: 20241016-topic-sm8x50-mmc-vqmmc-b7cf8176ec51
>
> Best regards,
> --
> Neil Armstrong <neil.armstrong@linaro.org>




  reply	other threads:[~2024-10-22 22:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20241016091723epcas1p39976665cca3306904fe4f3727c3360e1@epcas1p3.samsung.com>
2024-10-16  9:17 ` [PATCH] mmc: msm_sdhci: enable vqmmc at probe if available Neil Armstrong
2024-10-22 22:49   ` Jaehoon Chung [this message]
2024-10-24 13:11   ` Caleb Connolly
2024-10-24 14:16     ` Neil Armstrong
2024-10-26 22:48       ` Caleb Connolly
2024-11-14 18:13   ` Caleb Connolly

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='0a4a01db24d4$b1aea100$150be300$@samsung.com' \
    --to=jh80.chung@samsung.com \
    --cc=caleb.connolly@linaro.org \
    --cc=neil.armstrong@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=sumit.garg@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --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