public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add AST2700 support for aspeed sdhci
@ 2026-03-13  5:27 Ryan Chen
  2026-03-13  5:27 ` [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support Ryan Chen
  2026-03-13  5:27 ` [PATCH 2/2] mmc: sdhci-of-aspeed: " Ryan Chen
  0 siblings, 2 replies; 14+ messages in thread
From: Ryan Chen @ 2026-03-13  5:27 UTC (permalink / raw)
  To: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel
  Cc: Andrew Jeffery, linux-aspeed, openbmc, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel, Ryan Chen

This series add aspeed sdhci support for AST2700. The AST2700 sdhci
requires an reset. This series updates the binding and driver to
support reset requirements.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
---
Ryan Chen (2):
      dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
      mmc: sdhci-of-aspeed: Add ast2700 support

 Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++
 drivers/mmc/host/sdhci-of-aspeed.c                      | 11 +++++++++++
 2 files changed, 27 insertions(+)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260313-sdhci-269d319fdbde

Best regards,
-- 
Ryan Chen <ryan_chen@aspeedtech.com>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
  2026-03-13  5:27 [PATCH 0/2] Add AST2700 support for aspeed sdhci Ryan Chen
@ 2026-03-13  5:27 ` Ryan Chen
  2026-03-14 10:23   ` Krzysztof Kozlowski
  2026-03-14 10:24   ` Krzysztof Kozlowski
  2026-03-13  5:27 ` [PATCH 2/2] mmc: sdhci-of-aspeed: " Ryan Chen
  1 sibling, 2 replies; 14+ messages in thread
From: Ryan Chen @ 2026-03-13  5:27 UTC (permalink / raw)
  To: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel
  Cc: Andrew Jeffery, linux-aspeed, openbmc, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel, Ryan Chen

Add the "aspeed,ast2700-sd-controller" compatible. The ast2700 sdhci
controller requires an reset, so make the "resets" property mandatory
for this compatible to reflect the hardware requirement.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
---
 Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
index d24950ccea95..a2ff9a94db13 100644
--- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
@@ -26,6 +26,7 @@ properties:
       - aspeed,ast2400-sd-controller
       - aspeed,ast2500-sd-controller
       - aspeed,ast2600-sd-controller
+      - aspeed,ast2700-sd-controller
   reg:
     maxItems: 1
     description: Common configuration registers
@@ -37,6 +38,20 @@ properties:
   clocks:
     maxItems: 1
     description: The SD/SDIO controller clock gate
+  resets:
+    maxItems: 1
+if:
+  properties:
+    compatible:
+      contains:
+        const: aspeed,ast2700-sd-controller
+then:
+  required:
+    - resets
+
+else:
+  properties:
+    resets: false
 
 patternProperties:
   "^sdhci@[0-9a-f]+$":
@@ -50,6 +65,7 @@ patternProperties:
           - aspeed,ast2400-sdhci
           - aspeed,ast2500-sdhci
           - aspeed,ast2600-sdhci
+          - aspeed,ast2700-sdhci
       reg:
         maxItems: 1
         description: The SDHCI registers

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-13  5:27 [PATCH 0/2] Add AST2700 support for aspeed sdhci Ryan Chen
  2026-03-13  5:27 ` [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support Ryan Chen
@ 2026-03-13  5:27 ` Ryan Chen
  2026-03-13  8:25   ` Philipp Zabel
                     ` (2 more replies)
  1 sibling, 3 replies; 14+ messages in thread
From: Ryan Chen @ 2026-03-13  5:27 UTC (permalink / raw)
  To: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel
  Cc: Andrew Jeffery, linux-aspeed, openbmc, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel, Ryan Chen

Add support for the AST2700 SOC in the sd controller driver. AST2700 sd
controller requires an reset line, so hook up the optional reset control
and deassert it during probe.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
---
 drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
index ca97b01996b1..91c36245e506 100644
--- a/drivers/mmc/host/sdhci-of-aspeed.c
+++ b/drivers/mmc/host/sdhci-of-aspeed.c
@@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
 
 {
 	struct device_node *parent, *child;
+	struct reset_control *reset;
 	struct aspeed_sdc *sdc;
 	int ret;
 
@@ -529,6 +530,15 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
 
 	spin_lock_init(&sdc->lock);
 
+	reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
+	if (IS_ERR(reset))
+		return dev_err_probe(&pdev->dev, PTR_ERR(reset),
+				     "unable to acquire reset\n");
+	ret = reset_control_deassert(sdc->rst);
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret,
+				     "reset deassert failed\n");
+
 	sdc->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(sdc->clk))
 		return PTR_ERR(sdc->clk);
@@ -577,6 +587,7 @@ static const struct of_device_id aspeed_sdc_of_match[] = {
 	{ .compatible = "aspeed,ast2400-sd-controller", },
 	{ .compatible = "aspeed,ast2500-sd-controller", },
 	{ .compatible = "aspeed,ast2600-sd-controller", },
+	{ .compatible = "aspeed,ast2700-sd-controller", },
 	{ }
 };
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-13  5:27 ` [PATCH 2/2] mmc: sdhci-of-aspeed: " Ryan Chen
@ 2026-03-13  8:25   ` Philipp Zabel
  2026-03-13  8:35     ` Ryan Chen
  2026-03-14 10:23   ` Krzysztof Kozlowski
  2026-03-14 20:39   ` kernel test robot
  2 siblings, 1 reply; 14+ messages in thread
From: Philipp Zabel @ 2026-03-13  8:25 UTC (permalink / raw)
  To: Ryan Chen, Andrew Jeffery, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Joel Stanley, Ryan Chen,
	Adrian Hunter
  Cc: Andrew Jeffery, linux-aspeed, openbmc, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel

On Fr, 2026-03-13 at 13:27 +0800, Ryan Chen wrote:
> Add support for the AST2700 SOC in the sd controller driver. AST2700 sd
> controller requires an reset line, so hook up the optional reset control
> and deassert it during probe.
> 
> Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> ---
>  drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
> index ca97b01996b1..91c36245e506 100644
> --- a/drivers/mmc/host/sdhci-of-aspeed.c
> +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> @@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
>  
>  {
>  	struct device_node *parent, *child;
> +	struct reset_control *reset;
>  	struct aspeed_sdc *sdc;
>  	int ret;
>  
> @@ -529,6 +530,15 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
>  
>  	spin_lock_init(&sdc->lock);
>  
> +	reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);

This is missing a reset_control_put() in aspeed_sdc_remove(). Or use
devm_reset_control_get_optional_exclusive().

Is it ok to assert this reset control in _remove()? If so, you could
use devm_reset_control_get_optional_exclusive_deasserted().


regards
Philipp

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-13  8:25   ` Philipp Zabel
@ 2026-03-13  8:35     ` Ryan Chen
  2026-03-14  1:21       ` Ryan Chen
  0 siblings, 1 reply; 14+ messages in thread
From: Ryan Chen @ 2026-03-13  8:35 UTC (permalink / raw)
  To: Philipp Zabel, Andrew Jeffery, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Joel Stanley, Ryan Chen,
	Adrian Hunter
  Cc: Andrew Jeffery, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

> Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
> 
> On Fr, 2026-03-13 at 13:27 +0800, Ryan Chen wrote:
> > Add support for the AST2700 SOC in the sd controller driver. AST2700
> > sd controller requires an reset line, so hook up the optional reset
> > control and deassert it during probe.
> >
> > Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> > ---
> >  drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci-of-aspeed.c
> > b/drivers/mmc/host/sdhci-of-aspeed.c
> > index ca97b01996b1..91c36245e506 100644
> > --- a/drivers/mmc/host/sdhci-of-aspeed.c
> > +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> > @@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct platform_device
> > *pdev)
> >
> >  {
> >  	struct device_node *parent, *child;
> > +	struct reset_control *reset;
> >  	struct aspeed_sdc *sdc;
> >  	int ret;
> >
> > @@ -529,6 +530,15 @@ static int aspeed_sdc_probe(struct
> > platform_device *pdev)
> >
> >  	spin_lock_init(&sdc->lock);
> >
> > +	reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
> 
> This is missing a reset_control_put() in aspeed_sdc_remove(). Or use
> devm_reset_control_get_optional_exclusive().
> 
> Is it ok to assert this reset control in _remove()? If so, you could use
> devm_reset_control_get_optional_exclusive_deasserted().
> 
Thanks the guidance.
I will update use
sdc->rst = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
if (IS_ERR(sdc->rst))
	return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
			     "unable to acquire reset\n");

Ryan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-13  8:35     ` Ryan Chen
@ 2026-03-14  1:21       ` Ryan Chen
  2026-03-16  9:44         ` Philipp Zabel
  0 siblings, 1 reply; 14+ messages in thread
From: Ryan Chen @ 2026-03-14  1:21 UTC (permalink / raw)
  To: Ryan Chen, Philipp Zabel, Andrew Jeffery, Ulf Hansson,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
	Ryan Chen, Adrian Hunter
  Cc: Andrew Jeffery, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

> Subject: RE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
> 
> > Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
> >
> > On Fr, 2026-03-13 at 13:27 +0800, Ryan Chen wrote:
> > > Add support for the AST2700 SOC in the sd controller driver. AST2700
> > > sd controller requires an reset line, so hook up the optional reset
> > > control and deassert it during probe.
> > >
> > > Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> > > ---
> > >  drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > >
> > > diff --git a/drivers/mmc/host/sdhci-of-aspeed.c
> > > b/drivers/mmc/host/sdhci-of-aspeed.c
> > > index ca97b01996b1..91c36245e506 100644
> > > --- a/drivers/mmc/host/sdhci-of-aspeed.c
> > > +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> > > @@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct
> > > platform_device
> > > *pdev)
> > >
> > >  {
> > >  	struct device_node *parent, *child;
> > > +	struct reset_control *reset;
> > >  	struct aspeed_sdc *sdc;
> > >  	int ret;
> > >
> > > @@ -529,6 +530,15 @@ static int aspeed_sdc_probe(struct
> > > platform_device *pdev)
> > >
> > >  	spin_lock_init(&sdc->lock);
> > >
> > > +	reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
> >
> > This is missing a reset_control_put() in aspeed_sdc_remove(). Or use
> > devm_reset_control_get_optional_exclusive().
> >
> > Is it ok to assert this reset control in _remove()? If so, you could
> > use devm_reset_control_get_optional_exclusive_deasserted().
> >
> Thanks the guidance.
> I will update use
> sdc->rst = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
> if (IS_ERR(sdc->rst))
> 	return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
> 			     "unable to acquire reset\n");
> 
Sorry, I review the devm_reset_control_get_optional_exclusive_deasserted
I will modify with following in probe.

	sdc->rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
									NULL);
	if (IS_ERR(sdc->rst))
		return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
				     "unable to acquire reset\n");

And add reset_control_assert(sdc->rst); in remove.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
  2026-03-13  5:27 ` [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support Ryan Chen
@ 2026-03-14 10:23   ` Krzysztof Kozlowski
  2026-03-16  1:59     ` Ryan Chen
  2026-03-14 10:24   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-14 10:23 UTC (permalink / raw)
  To: Ryan Chen
  Cc: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel, Andrew Jeffery, linux-aspeed, openbmc, linux-mmc,
	devicetree, linux-arm-kernel, linux-kernel

On Fri, Mar 13, 2026 at 01:27:56PM +0800, Ryan Chen wrote:
> Add the "aspeed,ast2700-sd-controller" compatible. The ast2700 sdhci
> controller requires an reset, so make the "resets" property mandatory
> for this compatible to reflect the hardware requirement.

Subject - there is never space before ':'

> 
> Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> ---
>  Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> index d24950ccea95..a2ff9a94db13 100644
> --- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> @@ -26,6 +26,7 @@ properties:
>        - aspeed,ast2400-sd-controller
>        - aspeed,ast2500-sd-controller
>        - aspeed,ast2600-sd-controller
> +      - aspeed,ast2700-sd-controller

Missing blank lines everywhere in your patchset.

>    reg:
>      maxItems: 1
>      description: Common configuration registers
> @@ -37,6 +38,20 @@ properties:
>    clocks:
>      maxItems: 1
>      description: The SD/SDIO controller clock gate

Blank line

> +  resets:
> +    maxItems: 1

Blank line, just open any other bindings. If this is because you used
LLM, then obviously NAK, because we should not waste time to review
unsupervised poor quality LLM output. It is your task to review it, not
ours.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-13  5:27 ` [PATCH 2/2] mmc: sdhci-of-aspeed: " Ryan Chen
  2026-03-13  8:25   ` Philipp Zabel
@ 2026-03-14 10:23   ` Krzysztof Kozlowski
  2026-03-16  5:51     ` Ryan Chen
  2026-03-14 20:39   ` kernel test robot
  2 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-14 10:23 UTC (permalink / raw)
  To: Ryan Chen
  Cc: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel, Andrew Jeffery, linux-aspeed, openbmc, linux-mmc,
	devicetree, linux-arm-kernel, linux-kernel

On Fri, Mar 13, 2026 at 01:27:57PM +0800, Ryan Chen wrote:
> Add support for the AST2700 SOC in the sd controller driver. AST2700 sd
> controller requires an reset line, so hook up the optional reset control
> and deassert it during probe.
> 
> Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> ---
>  drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
> index ca97b01996b1..91c36245e506 100644
> --- a/drivers/mmc/host/sdhci-of-aspeed.c
> +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> @@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
>  
>  {
>  	struct device_node *parent, *child;
> +	struct reset_control *reset;
>  	struct aspeed_sdc *sdc;
>  	int ret;
>  
> @@ -529,6 +530,15 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
>  
>  	spin_lock_init(&sdc->lock);
>  
> +	reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
> +	if (IS_ERR(reset))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(reset),
> +				     "unable to acquire reset\n");
> +	ret = reset_control_deassert(sdc->rst);
> +	if (ret)
> +		return dev_err_probe(&pdev->dev, ret,
> +				     "reset deassert failed\n");
> +
>  	sdc->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(sdc->clk))
>  		return PTR_ERR(sdc->clk);
> @@ -577,6 +587,7 @@ static const struct of_device_id aspeed_sdc_of_match[] = {
>  	{ .compatible = "aspeed,ast2400-sd-controller", },
>  	{ .compatible = "aspeed,ast2500-sd-controller", },
>  	{ .compatible = "aspeed,ast2600-sd-controller", },
> +	{ .compatible = "aspeed,ast2700-sd-controller", },

So devices are fully compatible. You must express it in the bindings and
drop this hunk.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
  2026-03-13  5:27 ` [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support Ryan Chen
  2026-03-14 10:23   ` Krzysztof Kozlowski
@ 2026-03-14 10:24   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-14 10:24 UTC (permalink / raw)
  To: Ryan Chen
  Cc: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel, Andrew Jeffery, linux-aspeed, openbmc, linux-mmc,
	devicetree, linux-arm-kernel, linux-kernel

On Fri, Mar 13, 2026 at 01:27:56PM +0800, Ryan Chen wrote:
> Add the "aspeed,ast2700-sd-controller" compatible. The ast2700 sdhci
> controller requires an reset, so make the "resets" property mandatory
> for this compatible to reflect the hardware requirement.
> 
> Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> ---
>  Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> index d24950ccea95..a2ff9a94db13 100644
> --- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> @@ -26,6 +26,7 @@ properties:
>        - aspeed,ast2400-sd-controller
>        - aspeed,ast2500-sd-controller
>        - aspeed,ast2600-sd-controller
> +      - aspeed,ast2700-sd-controller

Also, not matching your driver.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-13  5:27 ` [PATCH 2/2] mmc: sdhci-of-aspeed: " Ryan Chen
  2026-03-13  8:25   ` Philipp Zabel
  2026-03-14 10:23   ` Krzysztof Kozlowski
@ 2026-03-14 20:39   ` kernel test robot
  2 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2026-03-14 20:39 UTC (permalink / raw)
  To: Ryan Chen, Andrew Jeffery, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Joel Stanley, Ryan Chen,
	Adrian Hunter, Philipp Zabel
  Cc: oe-kbuild-all, linux-aspeed, openbmc, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel

Hi Ryan,

kernel test robot noticed the following build errors:

[auto build test ERROR on 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f]

url:    https://github.com/intel-lab-lkp/linux/commits/Ryan-Chen/dt-bindings-mmc-sdhci-of-aspeed-Add-ast2700-support/20260314-132323
base:   6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
patch link:    https://lore.kernel.org/r/20260313-sdhci-v1-2-91cea19c8a67%40aspeedtech.com
patch subject: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20260315/202603150439.FM8mt7EG-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260315/202603150439.FM8mt7EG-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603150439.FM8mt7EG-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/mmc/host/sdhci-of-aspeed.c: In function 'aspeed_sdc_probe':
>> drivers/mmc/host/sdhci-of-aspeed.c:533:17: error: implicit declaration of function 'reset_control_get_optional_exclusive' [-Wimplicit-function-declaration]
     533 |         reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/host/sdhci-of-aspeed.c:533:15: error: assignment to 'struct reset_control *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     533 |         reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
         |               ^
>> drivers/mmc/host/sdhci-of-aspeed.c:537:15: error: implicit declaration of function 'reset_control_deassert' [-Wimplicit-function-declaration]
     537 |         ret = reset_control_deassert(sdc->rst);
         |               ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/host/sdhci-of-aspeed.c:537:41: error: 'struct aspeed_sdc' has no member named 'rst'
     537 |         ret = reset_control_deassert(sdc->rst);
         |                                         ^~


vim +/reset_control_get_optional_exclusive +533 drivers/mmc/host/sdhci-of-aspeed.c

   520	
   521	{
   522		struct device_node *parent, *child;
   523		struct reset_control *reset;
   524		struct aspeed_sdc *sdc;
   525		int ret;
   526	
   527		sdc = devm_kzalloc(&pdev->dev, sizeof(*sdc), GFP_KERNEL);
   528		if (!sdc)
   529			return -ENOMEM;
   530	
   531		spin_lock_init(&sdc->lock);
   532	
 > 533		reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
   534		if (IS_ERR(reset))
   535			return dev_err_probe(&pdev->dev, PTR_ERR(reset),
   536					     "unable to acquire reset\n");
 > 537		ret = reset_control_deassert(sdc->rst);
   538		if (ret)
   539			return dev_err_probe(&pdev->dev, ret,
   540					     "reset deassert failed\n");
   541	
   542		sdc->clk = devm_clk_get(&pdev->dev, NULL);
   543		if (IS_ERR(sdc->clk))
   544			return PTR_ERR(sdc->clk);
   545	
   546		ret = clk_prepare_enable(sdc->clk);
   547		if (ret) {
   548			dev_err(&pdev->dev, "Unable to enable SDCLK\n");
   549			return ret;
   550		}
   551	
   552		sdc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &sdc->res);
   553		if (IS_ERR(sdc->regs)) {
   554			ret = PTR_ERR(sdc->regs);
   555			goto err_clk;
   556		}
   557	
   558		dev_set_drvdata(&pdev->dev, sdc);
   559	
   560		parent = pdev->dev.of_node;
   561		for_each_available_child_of_node(parent, child) {
   562			struct platform_device *cpdev;
   563	
   564			cpdev = of_platform_device_create(child, NULL, &pdev->dev);
   565			if (!cpdev) {
   566				of_node_put(child);
   567				ret = -ENODEV;
   568				goto err_clk;
   569			}
   570		}
   571	
   572		return 0;
   573	
   574	err_clk:
   575		clk_disable_unprepare(sdc->clk);
   576		return ret;
   577	}
   578	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
  2026-03-14 10:23   ` Krzysztof Kozlowski
@ 2026-03-16  1:59     ` Ryan Chen
  0 siblings, 0 replies; 14+ messages in thread
From: Ryan Chen @ 2026-03-16  1:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel, Andrew Jeffery, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

> Subject: Re: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700
> support
> 
> On Fri, Mar 13, 2026 at 01:27:56PM +0800, Ryan Chen wrote:
> > Add the "aspeed,ast2700-sd-controller" compatible. The ast2700 sdhci
> > controller requires an reset, so make the "resets" property mandatory
> > for this compatible to reflect the hardware requirement.
> 
> Subject - there is never space before ':'
Will update
dt-bindings: mmc: sdhci-of-aspeed: Add ast2700 support
> 
> >
> > Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> > ---
> >  Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16
> > ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> > b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> > index d24950ccea95..a2ff9a94db13 100644
> > --- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
> > @@ -26,6 +26,7 @@ properties:
> >        - aspeed,ast2400-sd-controller
> >        - aspeed,ast2500-sd-controller
> >        - aspeed,ast2600-sd-controller
> > +      - aspeed,ast2700-sd-controller
> 
> Missing blank lines everywhere in your patchset.
Will add blank lines.
> 
> >    reg:
> >      maxItems: 1
> >      description: Common configuration registers @@ -37,6 +38,20 @@
> > properties:
> >    clocks:
> >      maxItems: 1
> >      description: The SD/SDIO controller clock gate
> 
> Blank line
Will add blank lines.
> 
> > +  resets:
> > +    maxItems: 1
> 
> Blank line, just open any other bindings. If this is because you used LLM, then
> obviously NAK, because we should not waste time to review unsupervised poor
> quality LLM output. It is your task to review it, not ours.
Will add blank lines.

When I submit, I did checkpatch.pl and also 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
make dt_binding_check W=1 didn’t see error, I will review it again. 

Thanks your review.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-14 10:23   ` Krzysztof Kozlowski
@ 2026-03-16  5:51     ` Ryan Chen
  0 siblings, 0 replies; 14+ messages in thread
From: Ryan Chen @ 2026-03-16  5:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Joel Stanley, Ryan Chen, Adrian Hunter,
	Philipp Zabel, Andrew Jeffery, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

> Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
> 
> On Fri, Mar 13, 2026 at 01:27:57PM +0800, Ryan Chen wrote:
> > Add support for the AST2700 SOC in the sd controller driver. AST2700
> > sd controller requires an reset line, so hook up the optional reset
> > control and deassert it during probe.
> >
> > Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
> > ---
> >  drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci-of-aspeed.c
> > b/drivers/mmc/host/sdhci-of-aspeed.c
> > index ca97b01996b1..91c36245e506 100644
> > --- a/drivers/mmc/host/sdhci-of-aspeed.c
> > +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> > @@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct platform_device
> > *pdev)
> >
> >  {
> >  	struct device_node *parent, *child;
> > +	struct reset_control *reset;
> >  	struct aspeed_sdc *sdc;
> >  	int ret;
> >
> > @@ -529,6 +530,15 @@ static int aspeed_sdc_probe(struct
> > platform_device *pdev)
> >
> >  	spin_lock_init(&sdc->lock);
> >
> > +	reset = reset_control_get_optional_exclusive(&pdev->dev, NULL);
> > +	if (IS_ERR(reset))
> > +		return dev_err_probe(&pdev->dev, PTR_ERR(reset),
> > +				     "unable to acquire reset\n");
> > +	ret = reset_control_deassert(sdc->rst);
> > +	if (ret)
> > +		return dev_err_probe(&pdev->dev, ret,
> > +				     "reset deassert failed\n");
> > +
> >  	sdc->clk = devm_clk_get(&pdev->dev, NULL);
> >  	if (IS_ERR(sdc->clk))
> >  		return PTR_ERR(sdc->clk);
> > @@ -577,6 +587,7 @@ static const struct of_device_id
> aspeed_sdc_of_match[] = {
> >  	{ .compatible = "aspeed,ast2400-sd-controller", },
> >  	{ .compatible = "aspeed,ast2500-sd-controller", },
> >  	{ .compatible = "aspeed,ast2600-sd-controller", },
> > +	{ .compatible = "aspeed,ast2700-sd-controller", },
> 
> So devices are fully compatible. You must express it in the bindings and drop
> this hunk.

Thanks the review.
Do you mean I modify the binding with following.
properties:
  compatible:
    oneOf:
      - const: aspeed,ast2400-sd-controller
      - const: aspeed,ast2500-sd-controller
      - const: aspeed,ast2600-sd-controller
      - items:
          - const: aspeed,ast2700-sd-controller
          - const: aspeed,ast2600-sd-controller

And still keep this 
if:
  properties:
    compatible:
      contains:
        const: aspeed,ast2700-sd-controller
then:
  required:
    - resets
else:
  properties:
    resets: false

also the child 
patternProperties:
  "^sdhci@[0-9a-f]+$":
    type: object
    $ref: sdhci-common.yaml
    unevaluatedProperties: false

    properties:
      compatible:
        oneOf:
          - const: aspeed,ast2400-sdhci
          - const: aspeed,ast2500-sdhci
          - const: aspeed,ast2600-sdhci
          - items:
              - const: aspeed,ast2700-sdhci
              - const: aspeed,ast2600-sdhci

Then my dts will be following?

sdc@... {
        compatible = "aspeed,ast2700-sd-controller",
                     "aspeed,ast2600-sd-controller";
        resets = <...>;
        ...
        sdhci0: sdhci@100 {
                compatible = "aspeed,ast2700-sdhci",
                             "aspeed,ast2600-sdhci";
                ...
        };

        sdhci1: sdhci@200 {
                compatible = "aspeed,ast2700-sdhci",
                             "aspeed,ast2600-sdhci";
                ...
        };
};

> 
> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-14  1:21       ` Ryan Chen
@ 2026-03-16  9:44         ` Philipp Zabel
  2026-03-16  9:51           ` Ryan Chen
  0 siblings, 1 reply; 14+ messages in thread
From: Philipp Zabel @ 2026-03-16  9:44 UTC (permalink / raw)
  To: Ryan Chen, Andrew Jeffery, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Joel Stanley, Ryan Chen,
	Adrian Hunter
  Cc: Andrew Jeffery, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

On Sa, 2026-03-14 at 01:21 +0000, Ryan Chen wrote:
[...]
> > 
> > Thanks the guidance.
> > I will update use
> > sdc->rst = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
> > if (IS_ERR(sdc->rst))
> > 	return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
> > 			     "unable to acquire reset\n");
> > 
> Sorry, I review the devm_reset_control_get_optional_exclusive_deasserted
> I will modify with following in probe.
> 
> 	sdc->rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
> 									NULL);
> 	if (IS_ERR(sdc->rst))
> 		return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
> 				     "unable to acquire reset\n");
> 
> And add reset_control_assert(sdc->rst); in remove.

Only do one of those two changes. The devm_..._deasserted() function
will call reset_control_assert() automatically. See:

https://docs.kernel.org/driver-api/reset.html#c.devm_reset_control_get_optional_exclusive_deasserted

regards
Philipp

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
  2026-03-16  9:44         ` Philipp Zabel
@ 2026-03-16  9:51           ` Ryan Chen
  0 siblings, 0 replies; 14+ messages in thread
From: Ryan Chen @ 2026-03-16  9:51 UTC (permalink / raw)
  To: Philipp Zabel, Andrew Jeffery, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Joel Stanley, Ryan Chen,
	Adrian Hunter
  Cc: Andrew Jeffery, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

> Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
> 
> On Sa, 2026-03-14 at 01:21 +0000, Ryan Chen wrote:
> [...]
> > >
> > > Thanks the guidance.
> > > I will update use
> > > sdc->rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
> > > sdc->NULL);
> > > if (IS_ERR(sdc->rst))
> > > 	return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
> > > 			     "unable to acquire reset\n");
> > >
> > Sorry, I review the
> > devm_reset_control_get_optional_exclusive_deasserted
> > I will modify with following in probe.
> >
> > 	sdc->rst =
> devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
> > 									NULL);
> > 	if (IS_ERR(sdc->rst))
> > 		return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst),
> > 				     "unable to acquire reset\n");
> >
> > And add reset_control_assert(sdc->rst); in remove.
> 
> Only do one of those two changes. The devm_..._deasserted() function will call
> reset_control_assert() automatically. See:
> 
> https://docs.kernel.org/driver-api/reset.html#c.devm_reset_control_get_optio
> nal_exclusive_deasserted
> 
Understood. thanks for guidance.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-03-16  9:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13  5:27 [PATCH 0/2] Add AST2700 support for aspeed sdhci Ryan Chen
2026-03-13  5:27 ` [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support Ryan Chen
2026-03-14 10:23   ` Krzysztof Kozlowski
2026-03-16  1:59     ` Ryan Chen
2026-03-14 10:24   ` Krzysztof Kozlowski
2026-03-13  5:27 ` [PATCH 2/2] mmc: sdhci-of-aspeed: " Ryan Chen
2026-03-13  8:25   ` Philipp Zabel
2026-03-13  8:35     ` Ryan Chen
2026-03-14  1:21       ` Ryan Chen
2026-03-16  9:44         ` Philipp Zabel
2026-03-16  9:51           ` Ryan Chen
2026-03-14 10:23   ` Krzysztof Kozlowski
2026-03-16  5:51     ` Ryan Chen
2026-03-14 20:39   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox