* [PATCH V2 0/3] Add level shifter support for qualcomm SOC's
@ 2025-05-23 10:57 Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card Sarthak Garg
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Sarthak Garg @ 2025-05-23 10:57 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Adrian Hunter, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv, Sarthak Garg
Add level shifter support for qualcomm SOC's.
- Changed from v1
- As suggested by Krzysztof Kozlowski redesigned logic to use
compatible property for adding this level shifter support.
- Addressed Adrian Hunter comments on V1 with resepect to
checkpatch.
- Cleared the bits first and then set bits in
sdhci_msm_execute_tuning as suggested by Adrian Hunter.
- Upated the if condition logic in msm_set_clock_rate_for_bus_mode
as suggested by Adrian Hunter.
Sarthak Garg (3):
mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card
mmc: sdhci-msm: Limit HS mode frequency to 37.5MHz
arm64: dts: qcom: sm8550: Remove SDR104/SDR50 broken caps
arch/arm64/boot/dts/qcom/sm8550.dtsi | 3 ---
drivers/mmc/host/sdhci-msm.c | 34 ++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 3 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card
2025-05-23 10:57 [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Sarthak Garg
@ 2025-05-23 10:57 ` Sarthak Garg
2025-05-28 11:32 ` Adrian Hunter
2025-05-23 10:57 ` [PATCH V2 2/3] mmc: sdhci-msm: Limit HS mode frequency to 37.5MHz Sarthak Garg
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Sarthak Garg @ 2025-05-23 10:57 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Adrian Hunter, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv, Sarthak Garg
For Qualcomm SoCs which needs level shifter for SD card, extra delay is
seen on receiver data path.
To compensate this delay enable tuning for SDR50 mode for targets which
has level shifter. SDHCI_SDR50_NEEDS_TUNING caps will be set for targets
with level shifter on Qualcomm SOC's.
Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
---
drivers/mmc/host/sdhci-msm.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 66c0d1ba2a33..bf91cb96a0ea 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -81,6 +81,7 @@
#define CORE_IO_PAD_PWR_SWITCH_EN BIT(15)
#define CORE_IO_PAD_PWR_SWITCH BIT(16)
#define CORE_HC_SELECT_IN_EN BIT(18)
+#define CORE_HC_SELECT_IN_SDR50 (4 << 19)
#define CORE_HC_SELECT_IN_HS400 (6 << 19)
#define CORE_HC_SELECT_IN_MASK (7 << 19)
@@ -1133,6 +1134,10 @@ static bool sdhci_msm_is_tuning_needed(struct sdhci_host *host)
{
struct mmc_ios *ios = &host->mmc->ios;
+ if (ios->timing == MMC_TIMING_UHS_SDR50 &&
+ host->flags & SDHCI_SDR50_NEEDS_TUNING)
+ return true;
+
/*
* Tuning is required for SDR104, HS200 and HS400 cards and
* if clock frequency is greater than 100MHz in these modes.
@@ -1201,6 +1206,8 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
struct mmc_ios ios = host->mmc->ios;
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
+ const struct sdhci_msm_offset *msm_offset = msm_host->offset;
+ u32 config;
if (!sdhci_msm_is_tuning_needed(host)) {
msm_host->use_cdr = false;
@@ -1217,6 +1224,14 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
*/
msm_host->tuning_done = 0;
+ if (ios.timing == MMC_TIMING_UHS_SDR50 &&
+ host->flags & SDHCI_SDR50_NEEDS_TUNING) {
+ config = readl_relaxed(host->ioaddr + msm_offset->core_vendor_spec);
+ config &= ~CORE_HC_SELECT_IN_MASK;
+ config |= CORE_HC_SELECT_IN_EN | CORE_HC_SELECT_IN_SDR50;
+ writel_relaxed(config, host->ioaddr + msm_offset->core_vendor_spec);
+ }
+
/*
* For HS400 tuning in HS200 timing requires:
* - select MCLK/2 in VENDOR_SPEC
--
2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH V2 2/3] mmc: sdhci-msm: Limit HS mode frequency to 37.5MHz
2025-05-23 10:57 [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card Sarthak Garg
@ 2025-05-23 10:57 ` Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 3/3] arm64: dts: qcom: sm8550: Remove SDR104/SDR50 broken caps Sarthak Garg
2025-05-23 18:25 ` [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Konrad Dybcio
3 siblings, 0 replies; 9+ messages in thread
From: Sarthak Garg @ 2025-05-23 10:57 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Adrian Hunter, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv, Sarthak Garg
For Qualcomm SoCs with level shifter delays are seen on receivers data
path due to latency added by level shifter.
To bring these delays in normal range and avoid CMD CRC errors
reduce frequency for HS mode SD cards to 37.5MHz for targets which has
level shifter.
Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
---
drivers/mmc/host/sdhci-msm.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index bf91cb96a0ea..4ab8640a9b64 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -147,6 +147,8 @@
/* Max load for SD Vdd-io supply */
#define SD_VQMMC_MAX_LOAD_UA 22000
+#define LEVEL_SHIFTER_HIGH_SPEED_FREQ 37500000
+
#define msm_host_readl(msm_host, host, offset) \
msm_host->var_ops->msm_readl_relaxed(host, offset)
@@ -262,6 +264,7 @@ struct sdhci_msm_variant_ops {
struct sdhci_msm_variant_info {
bool mci_removed;
bool restore_dll_config;
+ bool uses_level_shifter;
const struct sdhci_msm_variant_ops *var_ops;
const struct sdhci_msm_offset *offset;
};
@@ -296,6 +299,7 @@ struct sdhci_msm_host {
bool use_cdr;
u32 transfer_mode;
bool updated_ddr_cfg;
+ bool uses_level_shifter;
bool uses_tassadar_dll;
u32 dll_config;
u32 ddr_config;
@@ -375,6 +379,12 @@ static void msm_set_clock_rate_for_bus_mode(struct sdhci_host *host,
mult = msm_get_clock_mult_for_bus_mode(host);
desired_rate = clock * mult;
+
+ if (curr_ios.timing == MMC_TIMING_SD_HS &&
+ desired_rate > LEVEL_SHIFTER_HIGH_SPEED_FREQ &&
+ msm_host->uses_level_shifter)
+ desired_rate = LEVEL_SHIFTER_HIGH_SPEED_FREQ;
+
rc = dev_pm_opp_set_rate(mmc_dev(host->mmc), desired_rate);
if (rc) {
pr_err("%s: Failed to set clock at rate %u at timing %d\n",
@@ -2420,6 +2430,13 @@ static const struct sdhci_msm_variant_info sdm845_sdhci_var = {
.offset = &sdhci_msm_v5_offset,
};
+static const struct sdhci_msm_variant_info sm8550_sdhci_var = {
+ .mci_removed = true,
+ .uses_level_shifter = true,
+ .var_ops = &v5_var_ops,
+ .offset = &sdhci_msm_v5_offset,
+};
+
static const struct of_device_id sdhci_msm_dt_match[] = {
/*
* Do not add new variants to the driver which are compatible with
@@ -2430,6 +2447,7 @@ static const struct of_device_id sdhci_msm_dt_match[] = {
{.compatible = "qcom,sdm670-sdhci", .data = &sdm845_sdhci_var},
{.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
{.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
+ {.compatible = "qcom,sm8550-sdhci", .data = &sm8550_sdhci_var},
{},
};
@@ -2551,6 +2569,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
msm_host->mci_removed = var_info->mci_removed;
msm_host->restore_dll_config = var_info->restore_dll_config;
+ msm_host->uses_level_shifter = var_info->uses_level_shifter;
msm_host->var_ops = var_info->var_ops;
msm_host->offset = var_info->offset;
--
2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH V2 3/3] arm64: dts: qcom: sm8550: Remove SDR104/SDR50 broken caps
2025-05-23 10:57 [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 2/3] mmc: sdhci-msm: Limit HS mode frequency to 37.5MHz Sarthak Garg
@ 2025-05-23 10:57 ` Sarthak Garg
2025-05-23 18:25 ` [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Konrad Dybcio
3 siblings, 0 replies; 9+ messages in thread
From: Sarthak Garg @ 2025-05-23 10:57 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Adrian Hunter, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv, Sarthak Garg
For sm8550 all the level shifter limitations with respect to SD card
modes are handled in the kernel code.
Hence remove SDR104/SDR50 broken HW caps in device tree.
Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8550.dtsi | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 82cabf777cd2..bc7c4b77f277 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -3191,9 +3191,6 @@
bus-width = <4>;
dma-coherent;
- /* Forbid SDR104/SDR50 - broken hw! */
- sdhci-caps-mask = <0x3 0>;
-
status = "disabled";
sdhc2_opp_table: opp-table {
--
2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 0/3] Add level shifter support for qualcomm SOC's
2025-05-23 10:57 [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Sarthak Garg
` (2 preceding siblings ...)
2025-05-23 10:57 ` [PATCH V2 3/3] arm64: dts: qcom: sm8550: Remove SDR104/SDR50 broken caps Sarthak Garg
@ 2025-05-23 18:25 ` Konrad Dybcio
2025-05-27 14:35 ` Ulf Hansson
2025-06-16 7:13 ` Sarthak Garg
3 siblings, 2 replies; 9+ messages in thread
From: Konrad Dybcio @ 2025-05-23 18:25 UTC (permalink / raw)
To: Sarthak Garg, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Adrian Hunter, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv
On 5/23/25 12:57 PM, Sarthak Garg wrote:
> Add level shifter support for qualcomm SOC's.
>
> - Changed from v1
> - As suggested by Krzysztof Kozlowski redesigned logic to use
> compatible property for adding this level shifter support.
> - Addressed Adrian Hunter comments on V1 with resepect to
> checkpatch.
> - Cleared the bits first and then set bits in
> sdhci_msm_execute_tuning as suggested by Adrian Hunter.
> - Upated the if condition logic in msm_set_clock_rate_for_bus_mode
> as suggested by Adrian Hunter.
During internal review I suggested we could introduce a generic quirk,
perhaps called "max-hs-frequency" which would update this
currently-constant value:
---------------- drivers/mmc/core/sd.c ----------------
if (status[13] & SD_MODE_HIGH_SPEED)
card->sw_caps.hs_max_dtr = HIGH_SPEED_MAX_DTR;
-------------------------------------------------------
(50 MHz)
which I believe is where it comes from
Konrad
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 0/3] Add level shifter support for qualcomm SOC's
2025-05-23 18:25 ` [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Konrad Dybcio
@ 2025-05-27 14:35 ` Ulf Hansson
2025-06-16 7:14 ` Sarthak Garg
2025-06-16 7:13 ` Sarthak Garg
1 sibling, 1 reply; 9+ messages in thread
From: Ulf Hansson @ 2025-05-27 14:35 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Sarthak Garg, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Adrian Hunter, linux-arm-msm,
devicetree, linux-kernel, linux-mmc, quic_cang, quic_nguyenb,
quic_rampraka, quic_pragalla, quic_sayalil, quic_nitirawa,
quic_bhaskarv
On Fri, 23 May 2025 at 20:25, Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> wrote:
>
> On 5/23/25 12:57 PM, Sarthak Garg wrote:
> > Add level shifter support for qualcomm SOC's.
> >
> > - Changed from v1
> > - As suggested by Krzysztof Kozlowski redesigned logic to use
> > compatible property for adding this level shifter support.
> > - Addressed Adrian Hunter comments on V1 with resepect to
> > checkpatch.
> > - Cleared the bits first and then set bits in
> > sdhci_msm_execute_tuning as suggested by Adrian Hunter.
> > - Upated the if condition logic in msm_set_clock_rate_for_bus_mode
> > as suggested by Adrian Hunter.
>
> During internal review I suggested we could introduce a generic quirk,
> perhaps called "max-hs-frequency" which would update this
> currently-constant value:
>
> ---------------- drivers/mmc/core/sd.c ----------------
> if (status[13] & SD_MODE_HIGH_SPEED)
> card->sw_caps.hs_max_dtr = HIGH_SPEED_MAX_DTR;
> -------------------------------------------------------
>
> (50 MHz)
>
> which I believe is where it comes from
I agree that a DT property for the mmc controller would make sense.
Although, this seems limited to SD UHS-I speed modes, so perhaps
"max-sd-uhs-frequency" would be a better name for it?
Kind regards
Uffe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card
2025-05-23 10:57 ` [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card Sarthak Garg
@ 2025-05-28 11:32 ` Adrian Hunter
0 siblings, 0 replies; 9+ messages in thread
From: Adrian Hunter @ 2025-05-28 11:32 UTC (permalink / raw)
To: Sarthak Garg, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv
On 23/05/2025 13:57, Sarthak Garg wrote:
> For Qualcomm SoCs which needs level shifter for SD card, extra delay is
> seen on receiver data path.
>
> To compensate this delay enable tuning for SDR50 mode for targets which
> has level shifter. SDHCI_SDR50_NEEDS_TUNING caps will be set for targets
> with level shifter on Qualcomm SOC's.
>
> Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
Assuming this is still needed even with new generic quirk approach:
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-msm.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index 66c0d1ba2a33..bf91cb96a0ea 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -81,6 +81,7 @@
> #define CORE_IO_PAD_PWR_SWITCH_EN BIT(15)
> #define CORE_IO_PAD_PWR_SWITCH BIT(16)
> #define CORE_HC_SELECT_IN_EN BIT(18)
> +#define CORE_HC_SELECT_IN_SDR50 (4 << 19)
> #define CORE_HC_SELECT_IN_HS400 (6 << 19)
> #define CORE_HC_SELECT_IN_MASK (7 << 19)
>
> @@ -1133,6 +1134,10 @@ static bool sdhci_msm_is_tuning_needed(struct sdhci_host *host)
> {
> struct mmc_ios *ios = &host->mmc->ios;
>
> + if (ios->timing == MMC_TIMING_UHS_SDR50 &&
> + host->flags & SDHCI_SDR50_NEEDS_TUNING)
> + return true;
> +
> /*
> * Tuning is required for SDR104, HS200 and HS400 cards and
> * if clock frequency is greater than 100MHz in these modes.
> @@ -1201,6 +1206,8 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
> struct mmc_ios ios = host->mmc->ios;
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
> + const struct sdhci_msm_offset *msm_offset = msm_host->offset;
> + u32 config;
>
> if (!sdhci_msm_is_tuning_needed(host)) {
> msm_host->use_cdr = false;
> @@ -1217,6 +1224,14 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
> */
> msm_host->tuning_done = 0;
>
> + if (ios.timing == MMC_TIMING_UHS_SDR50 &&
> + host->flags & SDHCI_SDR50_NEEDS_TUNING) {
> + config = readl_relaxed(host->ioaddr + msm_offset->core_vendor_spec);
> + config &= ~CORE_HC_SELECT_IN_MASK;
> + config |= CORE_HC_SELECT_IN_EN | CORE_HC_SELECT_IN_SDR50;
> + writel_relaxed(config, host->ioaddr + msm_offset->core_vendor_spec);
> + }
> +
> /*
> * For HS400 tuning in HS200 timing requires:
> * - select MCLK/2 in VENDOR_SPEC
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 0/3] Add level shifter support for qualcomm SOC's
2025-05-23 18:25 ` [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Konrad Dybcio
2025-05-27 14:35 ` Ulf Hansson
@ 2025-06-16 7:13 ` Sarthak Garg
1 sibling, 0 replies; 9+ messages in thread
From: Sarthak Garg @ 2025-06-16 7:13 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Adrian Hunter, Ulf Hansson
Cc: linux-arm-msm, devicetree, linux-kernel, linux-mmc, quic_cang,
quic_nguyenb, quic_rampraka, quic_pragalla, quic_sayalil,
quic_nitirawa, quic_bhaskarv
On 5/23/2025 11:55 PM, Konrad Dybcio wrote:
> On 5/23/25 12:57 PM, Sarthak Garg wrote:
>> Add level shifter support for qualcomm SOC's.
>>
>> - Changed from v1
>> - As suggested by Krzysztof Kozlowski redesigned logic to use
>> compatible property for adding this level shifter support.
>> - Addressed Adrian Hunter comments on V1 with resepect to
>> checkpatch.
>> - Cleared the bits first and then set bits in
>> sdhci_msm_execute_tuning as suggested by Adrian Hunter.
>> - Upated the if condition logic in msm_set_clock_rate_for_bus_mode
>> as suggested by Adrian Hunter.
>
> During internal review I suggested we could introduce a generic quirk,
> perhaps called "max-hs-frequency" which would update this
> currently-constant value:
>
> ---------------- drivers/mmc/core/sd.c ----------------
> if (status[13] & SD_MODE_HIGH_SPEED)
> card->sw_caps.hs_max_dtr = HIGH_SPEED_MAX_DTR;
> -------------------------------------------------------
>
> (50 MHz)
>
> which I believe is where it comes from
>
> Konrad
Sure will introduce a new dtsi flag "max-sd-uhs-frequency" and update
this hs_max_dtr value in V3.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 0/3] Add level shifter support for qualcomm SOC's
2025-05-27 14:35 ` Ulf Hansson
@ 2025-06-16 7:14 ` Sarthak Garg
0 siblings, 0 replies; 9+ messages in thread
From: Sarthak Garg @ 2025-06-16 7:14 UTC (permalink / raw)
To: Ulf Hansson, Konrad Dybcio
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Adrian Hunter, linux-arm-msm, devicetree,
linux-kernel, linux-mmc, quic_cang, quic_nguyenb, quic_rampraka,
quic_pragalla, quic_sayalil, quic_nitirawa, quic_bhaskarv
On 5/27/2025 8:05 PM, Ulf Hansson wrote:
> On Fri, 23 May 2025 at 20:25, Konrad Dybcio
> <konrad.dybcio@oss.qualcomm.com> wrote:
>>
>> On 5/23/25 12:57 PM, Sarthak Garg wrote:
>>> Add level shifter support for qualcomm SOC's.
>>>
>>> - Changed from v1
>>> - As suggested by Krzysztof Kozlowski redesigned logic to use
>>> compatible property for adding this level shifter support.
>>> - Addressed Adrian Hunter comments on V1 with resepect to
>>> checkpatch.
>>> - Cleared the bits first and then set bits in
>>> sdhci_msm_execute_tuning as suggested by Adrian Hunter.
>>> - Upated the if condition logic in msm_set_clock_rate_for_bus_mode
>>> as suggested by Adrian Hunter.
>>
>> During internal review I suggested we could introduce a generic quirk,
>> perhaps called "max-hs-frequency" which would update this
>> currently-constant value:
>>
>> ---------------- drivers/mmc/core/sd.c ----------------
>> if (status[13] & SD_MODE_HIGH_SPEED)
>> card->sw_caps.hs_max_dtr = HIGH_SPEED_MAX_DTR;
>> -------------------------------------------------------
>>
>> (50 MHz)
>>
>> which I believe is where it comes from
>
> I agree that a DT property for the mmc controller would make sense.
>
> Although, this seems limited to SD UHS-I speed modes, so perhaps
> "max-sd-uhs-frequency" would be a better name for it?
>
> Kind regards
> Uffe
Sure will update this logic in V3.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-06-16 7:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-23 10:57 [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 1/3] mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card Sarthak Garg
2025-05-28 11:32 ` Adrian Hunter
2025-05-23 10:57 ` [PATCH V2 2/3] mmc: sdhci-msm: Limit HS mode frequency to 37.5MHz Sarthak Garg
2025-05-23 10:57 ` [PATCH V2 3/3] arm64: dts: qcom: sm8550: Remove SDR104/SDR50 broken caps Sarthak Garg
2025-05-23 18:25 ` [PATCH V2 0/3] Add level shifter support for qualcomm SOC's Konrad Dybcio
2025-05-27 14:35 ` Ulf Hansson
2025-06-16 7:14 ` Sarthak Garg
2025-06-16 7:13 ` Sarthak Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®