Add AST2700 support for aspeed sdhci
Subsystems (5)
Ryan Chen
reviewercover Add AST2700 support for aspeed sdhci
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.
---
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,
Signature · 1 line
Ryan Chen <[email protected]>
Ryan Chen
reviewerPATCH 1/2 dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
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.
--- Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +16 -0
@@ -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
Signature · 1 line
2.34.1
Ryan Chen
reviewerPATCH 2/2 mmc: sdhci-of-aspeed: Add ast2700 support
In reply to Ryan ChenAdd 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.
--- drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/mmc/host/sdhci-of-aspeed.c +11 -0
@@ -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", }, { } };
Signature · 1 line
2.34.1
Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 22 lines · 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 <[email protected]>--- drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/mmc/host/sdhci-of-aspeed.c +1
-0@@ -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;
drivers/mmc/host/sdhci-of-aspeed.c static int aspeed_sdc_probe(struct platform_device *pdev) · line 533
Quoted 4 lines
drivers/mmc/host/sdhci-of-aspeed.c +1
-0@@ -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
Ryan Chen
reviewerRE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 31 lines
Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 28 lines · 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 <[email protected]>--- drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/mmc/host/sdhci-of-aspeed.c +1
-0@@ -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);
Quoted 8 lines
drivers/mmc/host/sdhci-of-aspeed.c static int aspeed_sdc_probe(struct platform_device *pdev) · line 533
Quoted 1 line
drivers/mmc/host/sdhci-of-aspeed.c +1
-0+ reset =reset_control_get_optional_exclusive (&pdev->dev,NULL );This is missing a
reset_control_put()inaspeed_sdc_remove(). Or usedevm_reset_control_get_optional_exclusive().Is it ok to assert this reset control in
_remove()? If so, you could usedevm_reset_control_get_optional_exclusive_deasserted().
Thanks the guidance.
I will update usesdc->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
Ryan Chen
reviewerRE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 42 lines
Subject: RE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 32 lines
Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 29 lines · 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 <[email protected]>--- drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/mmc/host/sdhci-of-aspeed.c +0
-0@@ -520,6 +520,7 @@ static int aspeed_sdc_probe(struct
platform_device
*pdev){
drivers/mmc/host/sdhci-of-aspeed.c +1
-0struct 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);Quoted 8 lines
drivers/mmc/host/sdhci-of-aspeed.c static int aspeed_sdc_probe(struct platform_device *pdev) · line 533
Quoted 1 line
drivers/mmc/host/sdhci-of-aspeed.c +1
-0+ reset =reset_control_get_optional_exclusive (&pdev->dev,NULL );This is missing a
reset_control_put()inaspeed_sdc_remove(). Or usedevm_reset_control_get_optional_exclusive().Is it ok to assert this reset control in
_remove()? If so, you could usedevm_reset_control_get_optional_exclusive_deasserted().
Quoted 7 lines
Thanks the guidance.
I will update usesdc->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.
Re: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
In reply to Ryan ChenQuoted 3 lines · 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.
Subject - there is never space before ':'
Quoted 11 lines
Signed-off-by Ryan Chen <[email protected]>--- Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +0
-0
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml properties: · line 29
Quoted 4 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +1
-0@@ -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.
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml properties: · line 40
Quoted 7 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +0
-0reg: maxItems: 1 description: Common configuration registers@@ -37,6 +38,20 @@ properties: clocks: maxItems: 1 description: The SD/SDIO controller clock gate
Blank line
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml properties: · line 42
Quoted 2 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +2
-0+ 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.
Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
In reply to Ryan ChenQuoted 38 lines · 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 <[email protected]>--- drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/mmc/host/sdhci-of-aspeed.c +10
-0@@ -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);
drivers/mmc/host/sdhci-of-aspeed.c static const struct of_device_id aspeed_sdc_of_match[] = { · line 590
Quoted 4 lines
drivers/mmc/host/sdhci-of-aspeed.c +1
-0@@ -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
Re: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
In reply to Ryan ChenQuoted 14 lines · 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 <[email protected]>--- Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +0
-0
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml properties: · line 29
Quoted 4 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +1
-0@@ -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
kernel test robot
build botRe: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
In reply to Ryan Chenkernel test robot noticed the following build errors:
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/[email protected]/config) compiler: m68k-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260315/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
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
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Ryan Chen
reviewerRE: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
In reply to Krzysztof KozlowskiQuoted 9 lines
Subject: Re: [PATCH 1/2] dt-bindings: mmc: sdhci-of-aspeed : Add ast2700 support
Quoted 3 lines · 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.
Subject - there is never space before ':'
Will update
dt-bindings: mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 8 lines
Quoted 8 lines
Signed-off-by Ryan Chen <[email protected]>--- Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Quoted 12 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml properties: · line 29
Quoted 10 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +1
-0@@ -26,6 +26,7 @@ properties: - aspeed,ast2400-sd-controller - aspeed,ast2500-sd-controller - aspeed,ast2600-sd-controller + - aspeed,ast2700-sd-controllerMissing blank lines everywhere in your patchset.
Will add blank lines.
Quoted 10 lines
Quoted 8 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +0
-0reg: maxItems: 1 description: Common configuration registers @@ -37,6 +38,20 @@properties:
clocks:
maxItems: 1
description: The SD/SDIO controller clock gateBlank line
Will add blank lines.
Quoted 7 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml properties: · line 42
Quoted 3 lines
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +2
-0+ resets: + maxItems: 1Blank 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.
Ryan Chen
reviewerRE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
In reply to Krzysztof KozlowskiQuoted 45 lines
Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
drivers/mmc/host/sdhci-of-aspeed.c static const struct of_device_id
Quoted 41 lines · 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 <[email protected]>--- drivers/mmc/host/sdhci-of-aspeed.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/mmc/host/sdhci-of-aspeed.c +10
-0@@ -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))drivers/mmc/host/sdhci-of-aspeed.c +0
-0return PTR_ERR (sdc->clk);@@ -577,6 +587,7 @@ static const struct of_device_idaspeed_sdc_of_match[] = {
Quoted 7 lines
drivers/mmc/host/sdhci-of-aspeed.c static const struct of_device_id aspeed_sdc_of_match[] = { · line 590
Quoted 4 lines
drivers/mmc/host/sdhci-of-aspeed.c +1
-0{ .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";
...
};
};Quoted 3 lines
Best regards,
Krzysztof
Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
In reply to Ryan ChenOn Sa, 2026-03-14 at 01:21 +0000, Ryan Chen wrote:
[...]
Quoted 11 lines
Quoted 8 lines
Thanks the guidance.
I will update usesdc->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_deassertedI will modify with following in probe.
Quoted 7 lines
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
Ryan Chen
reviewerRE: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
Quoted 24 lines
Subject: Re: [PATCH 2/2] mmc: sdhci-of-aspeed: Add ast2700 support
On Sa, 2026-03-14 at 01:21 +0000, Ryan Chen wrote:
[...]Quoted 9 lines
Quoted 9 lines
Thanks the guidance.
I will update usesdc->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");Quoted 5 lines
Sorry, I review the
devm_reset_control_get_optional_exclusive_deassertedI will modify with following in probe.sdc->rst =devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
Quoted 5 lines
NULL); if (IS_ERR(sdc->rst)) return dev_err_probe(&pdev->dev, PTR_ERR(sdc->rst), "unable to acquire reset\n");
Quoted 8 lines
Quoted 1 line
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.