All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Iker Pedrosa <ikerpedrosam@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>, Yixun Lan <dlan@kernel.org>
Cc: Michael Opdenacker <michael.opdenacker@rootcommit.com>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	<linux-mmc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation
Date: Fri, 13 Mar 2026 15:04:34 +0200	[thread overview]
Message-ID: <a416dc43-58fd-4462-9ec5-b3dadbbacf8b@intel.com> (raw)
In-Reply-To: <20260309-orangepi-sd-card-uhs-v2-1-5bb2b574df5d@gmail.com>

On 09/03/2026 13:40, Iker Pedrosa wrote:
> Ensure SD card pins receive clock signals by enabling pad clock
> generation and overriding automatic clock gating. Required for all SD
> operation modes.

Need to say why update to "SPACEMIT_SDHC_LEGACY_CTRL_REG" is Ok for
non-SD

> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/mmc/host/sdhci-of-k1.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 0cc97e23a2f9c7b2f9376318a8a7ebb860571504..585c7eca6ebf253aac466dd37cef029deb63f692 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -20,6 +20,13 @@
>  #include "sdhci.h"
>  #include "sdhci-pltfm.h"
>  
> +#define SPACEMIT_SDHC_OP_EXT_REG	0x108
> +#define  SDHC_OVRRD_CLK_OEN		BIT(11)
> +#define  SDHC_FORCE_CLK_ON		BIT(12)
> +
> +#define SPACEMIT_SDHC_LEGACY_CTRL_REG	0x10C
> +#define  SDHC_GEN_PAD_CLK_ON		BIT(6)
> +
>  #define SPACEMIT_SDHC_MMC_CTRL_REG	0x114
>  #define  SDHC_MISC_INT_EN		BIT(1)
>  #define  SDHC_MISC_INT			BIT(2)
> @@ -100,6 +107,12 @@ static void spacemit_sdhci_reset(struct sdhci_host *host, u8 mask)
>  
>  	if (!(host->mmc->caps2 & MMC_CAP2_NO_MMC))
>  		spacemit_sdhci_setbits(host, SDHC_MMC_CARD_MODE, SPACEMIT_SDHC_MMC_CTRL_REG);
> +
> +	spacemit_sdhci_setbits(host, SDHC_GEN_PAD_CLK_ON, SPACEMIT_SDHC_LEGACY_CTRL_REG);
> +
> +	if (host->mmc->caps2 & MMC_CAP2_NO_MMC)
> +		spacemit_sdhci_setbits(host, SDHC_OVRRD_CLK_OEN | SDHC_FORCE_CLK_ON,
> +				       SPACEMIT_SDHC_OP_EXT_REG);
>  }
>  
>  static void spacemit_sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned int timing)
> 


WARNING: multiple messages have this Message-ID (diff)
From: Adrian Hunter <adrian.hunter@intel.com>
To: Iker Pedrosa <ikerpedrosam@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>, Yixun Lan <dlan@kernel.org>
Cc: Michael Opdenacker <michael.opdenacker@rootcommit.com>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	<linux-mmc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation
Date: Fri, 13 Mar 2026 15:04:34 +0200	[thread overview]
Message-ID: <a416dc43-58fd-4462-9ec5-b3dadbbacf8b@intel.com> (raw)
In-Reply-To: <20260309-orangepi-sd-card-uhs-v2-1-5bb2b574df5d@gmail.com>

On 09/03/2026 13:40, Iker Pedrosa wrote:
> Ensure SD card pins receive clock signals by enabling pad clock
> generation and overriding automatic clock gating. Required for all SD
> operation modes.

Need to say why update to "SPACEMIT_SDHC_LEGACY_CTRL_REG" is Ok for
non-SD

> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/mmc/host/sdhci-of-k1.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 0cc97e23a2f9c7b2f9376318a8a7ebb860571504..585c7eca6ebf253aac466dd37cef029deb63f692 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -20,6 +20,13 @@
>  #include "sdhci.h"
>  #include "sdhci-pltfm.h"
>  
> +#define SPACEMIT_SDHC_OP_EXT_REG	0x108
> +#define  SDHC_OVRRD_CLK_OEN		BIT(11)
> +#define  SDHC_FORCE_CLK_ON		BIT(12)
> +
> +#define SPACEMIT_SDHC_LEGACY_CTRL_REG	0x10C
> +#define  SDHC_GEN_PAD_CLK_ON		BIT(6)
> +
>  #define SPACEMIT_SDHC_MMC_CTRL_REG	0x114
>  #define  SDHC_MISC_INT_EN		BIT(1)
>  #define  SDHC_MISC_INT			BIT(2)
> @@ -100,6 +107,12 @@ static void spacemit_sdhci_reset(struct sdhci_host *host, u8 mask)
>  
>  	if (!(host->mmc->caps2 & MMC_CAP2_NO_MMC))
>  		spacemit_sdhci_setbits(host, SDHC_MMC_CARD_MODE, SPACEMIT_SDHC_MMC_CTRL_REG);
> +
> +	spacemit_sdhci_setbits(host, SDHC_GEN_PAD_CLK_ON, SPACEMIT_SDHC_LEGACY_CTRL_REG);
> +
> +	if (host->mmc->caps2 & MMC_CAP2_NO_MMC)
> +		spacemit_sdhci_setbits(host, SDHC_OVRRD_CLK_OEN | SDHC_FORCE_CLK_ON,
> +				       SPACEMIT_SDHC_OP_EXT_REG);
>  }
>  
>  static void spacemit_sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned int timing)
> 


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-03-13 13:04 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 11:40 [PATCH v2 0/7] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2 Iker Pedrosa
2026-03-09 11:40 ` Iker Pedrosa
2026-03-09 11:40 ` [PATCH v2 1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-13 13:04   ` Adrian Hunter [this message]
2026-03-13 13:04     ` Adrian Hunter
2026-03-16  9:04     ` Iker Pedrosa
2026-03-16  9:04       ` Iker Pedrosa
2026-03-16  9:34       ` Adrian Hunter
2026-03-16  9:34         ` Adrian Hunter
2026-03-09 11:40 ` [PATCH v2 2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-09 13:22   ` Yixun Lan
2026-03-09 13:22     ` Yixun Lan
2026-03-12  9:38     ` Iker Pedrosa
2026-03-12  9:38       ` Iker Pedrosa
2026-03-13 13:04   ` Adrian Hunter
2026-03-13 13:04     ` Adrian Hunter
2026-03-09 11:40 ` [PATCH v2 3/7] mmc: sdhci-of-k1: add SDR tuning infrastructure Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-13 13:04   ` Adrian Hunter
2026-03-13 13:04     ` Adrian Hunter
2026-03-09 11:40 ` [PATCH v2 4/7] mmc: sdhci-of-k1: add comprehensive SDR tuning support Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-13 13:04   ` Adrian Hunter
2026-03-13 13:04     ` Adrian Hunter
2026-03-13 14:15   ` Yao Zi
2026-03-13 14:15     ` Yao Zi
2026-03-09 11:40 ` [PATCH v2 5/7] riscv: dts: spacemit: k1: add SD card controller and pinctrl support Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-09 11:40 ` [PATCH v2 6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-11 18:27   ` Trevor Gamblin
2026-03-11 18:27     ` Trevor Gamblin
2026-03-13  0:19     ` Yixun Lan
2026-03-13  0:19       ` Yixun Lan
2026-03-13  9:42       ` Iker Pedrosa
2026-03-13  9:42         ` Iker Pedrosa
2026-03-13 11:11         ` Yixun Lan
2026-03-13 11:11           ` Yixun Lan
2026-03-13 15:06           ` Iker Pedrosa
2026-03-13 15:06             ` Iker Pedrosa
2026-03-09 11:40 ` [PATCH v2 7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes Iker Pedrosa
2026-03-09 11:40   ` Iker Pedrosa
2026-03-13 11:20   ` Anand Moon
2026-03-13 11:20     ` Anand Moon
2026-03-13 13:54   ` Trevor Gamblin
2026-03-13 13:54     ` Trevor Gamblin
2026-03-13 14:42     ` Anand Moon
2026-03-13 14:42       ` Anand Moon
2026-03-13 17:08       ` Trevor Gamblin
2026-03-13 17:08         ` Trevor Gamblin
2026-03-09 18:49 ` [PATCH v2 0/7] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2 Anand Moon
2026-03-09 18:49   ` Anand Moon

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=a416dc43-58fd-4462-9ec5-b3dadbbacf8b@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=ikerpedrosam@gmail.com \
    --cc=javierm@redhat.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=michael.opdenacker@rootcommit.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=ulf.hansson@linaro.org \
    /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 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.