[PATCH 6/8] mmc: host: axiado: add AX3000 eMMC PHY support to sdhci-of-arasan

Tzu-Hao Wei posted 8 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH 6/8] mmc: host: axiado: add AX3000 eMMC PHY support to sdhci-of-arasan
Posted by Tzu-Hao Wei 1 month, 2 weeks ago
From: SriNavmani A <srinavmani@axiado.com>

Add support for the external eMMC PHY used on the AX3000 SoC in the
sdhci-of-arasan driver. The default Arasan host driver operates at
25 MHz, but with the external PHY support, the controller can achieve
HS200 mode operation at 200 MHz.

This change integrates the AX3000 eMMC PHY driver with the existing
sdhci-of-arasan host controller driver to enable high-speed eMMC
operations.

Signed-off-by: Tzu-Hao Wei <twei@axiado.com>
---
 drivers/mmc/host/sdhci-of-arasan.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index ab7f0ffe7b4f007a58eb0a26868b08b0b02b40f3..2d4f64e9014ae168957113478edc11209cd76b64 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -1547,6 +1547,10 @@ static const struct of_device_id sdhci_arasan_of_match[] = {
 		.compatible = "arasan,sdhci-5.1",
 		.data = &sdhci_arasan_generic_data,
 	},
+	{
+		.compatible = "axiado,ax3000-sdhci-5.1-emmc",
+		.data = &sdhci_arasan_generic_data,
+	},
 	{
 		.compatible = "arasan,sdhci-4.9a",
 		.data = &sdhci_arasan_generic_data,
@@ -2019,15 +2023,17 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 			goto unreg_clk;
 		}
 
-		host->mmc_host_ops.hs400_enhanced_strobe =
+		if (!of_device_is_compatible(np, "axiado,ax3000-sdhci-5.1-emmc")) {
+			host->mmc_host_ops.hs400_enhanced_strobe =
 					sdhci_arasan_hs400_enhanced_strobe;
-		host->mmc_host_ops.start_signal_voltage_switch =
-					sdhci_arasan_voltage_switch;
-		sdhci_arasan->has_cqe = true;
-		host->mmc->caps2 |= MMC_CAP2_CQE;
+			host->mmc_host_ops.start_signal_voltage_switch =
+				sdhci_arasan_voltage_switch;
+			sdhci_arasan->has_cqe = true;
+			host->mmc->caps2 |= MMC_CAP2_CQE;
 
-		if (!of_property_read_bool(np, "disable-cqe-dcmd"))
-			host->mmc->caps2 |= MMC_CAP2_CQE_DCMD;
+			if (!of_property_read_bool(np, "disable-cqe-dcmd"))
+				host->mmc->caps2 |= MMC_CAP2_CQE_DCMD;
+		}
 	}
 
 	if (of_device_is_compatible(np, "xlnx,versal-net-emmc"))

-- 
2.48.1
Re: [PATCH 6/8] mmc: host: axiado: add AX3000 eMMC PHY support to sdhci-of-arasan
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On Mon, Dec 22, 2025 at 04:45:05PM +0800, Tzu-Hao Wei wrote:
> From: SriNavmani A <srinavmani@axiado.com>
> 
> Add support for the external eMMC PHY used on the AX3000 SoC in the
> sdhci-of-arasan driver. The default Arasan host driver operates at
> 25 MHz, but with the external PHY support, the controller can achieve
> HS200 mode operation at 200 MHz.
> 
> This change integrates the AX3000 eMMC PHY driver with the existing
> sdhci-of-arasan host controller driver to enable high-speed eMMC
> operations.
> 
> Signed-off-by: Tzu-Hao Wei <twei@axiado.com>
> ---
>  drivers/mmc/host/sdhci-of-arasan.c | 20 +++++++++++++-------

Why do you mix mmc, phy and soc into one patchset?

>  1 file changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index ab7f0ffe7b4f007a58eb0a26868b08b0b02b40f3..2d4f64e9014ae168957113478edc11209cd76b64 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -1547,6 +1547,10 @@ static const struct of_device_id sdhci_arasan_of_match[] = {
>  		.compatible = "arasan,sdhci-5.1",
>  		.data = &sdhci_arasan_generic_data,
>  	},
> +	{
> +		.compatible = "axiado,ax3000-sdhci-5.1-emmc",
> +		.data = &sdhci_arasan_generic_data,
> +	},
>  	{
>  		.compatible = "arasan,sdhci-4.9a",
>  		.data = &sdhci_arasan_generic_data,
> @@ -2019,15 +2023,17 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>  			goto unreg_clk;
>  		}
>  
> -		host->mmc_host_ops.hs400_enhanced_strobe =
> +		if (!of_device_is_compatible(np, "axiado,ax3000-sdhci-5.1-emmc")) {

No, don't sprinkle compatibles all around. You should use driver match
data for this.

Best regards,
Krzysztof
Re: [PATCH 6/8] mmc: host: axiado: add AX3000 eMMC PHY support to sdhci-of-arasan
Posted by Tzu-Hao Wei 4 days, 20 hours ago
On 12/23/2025 10:34 PM, Krzysztof Kozlowski wrote:
>> @@ -2019,15 +2023,17 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>>                       goto unreg_clk;
>>               }
>>
>> -             host->mmc_host_ops.hs400_enhanced_strobe =
>> +             if (!of_device_is_compatible(np, "axiado,ax3000-sdhci-5.1-emmc")) {
> 
> No, don't sprinkle compatibles all around. You should use driver match
> data for this.
> 
> Best regards,
> Krzysztof
> 
Thanks for suggestion. The new patch uses driver match data instead of sprinkling compatibles.

Best regards,
TH
Re: [PATCH 6/8] mmc: host: axiado: add AX3000 eMMC PHY support to sdhci-of-arasan
Posted by Krzysztof Kozlowski 4 days, 14 hours ago
On 05/02/2026 04:36, Tzu-Hao Wei wrote:
> On 12/23/2025 10:34 PM, Krzysztof Kozlowski wrote:
>>> @@ -2019,15 +2023,17 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>>>                       goto unreg_clk;
>>>               }
>>>
>>> -             host->mmc_host_ops.hs400_enhanced_strobe =
>>> +             if (!of_device_is_compatible(np, "axiado,ax3000-sdhci-5.1-emmc")) {
>>
>> No, don't sprinkle compatibles all around. You should use driver match
>> data for this.
>>
>> Best regards,
>> Krzysztof
>>
> Thanks for suggestion. The new patch uses driver match data instead of sprinkling compatibles.

You replied to a review from more than a month ago, even though I gave
you review after one day. I don't have anything of this in my inbox, so
in case you asked of something - I still expect all feedback to be
implemented.

Best regards,
Krzysztof