* [PATCH v4 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible
2026-03-24 1:58 [PATCH v4 0/2] Add AST2700 support for aspeed sdhci Ryan Chen
@ 2026-03-24 1:58 ` Ryan Chen
2026-03-24 1:58 ` [PATCH v4 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen
2026-03-24 15:03 ` [PATCH v4 0/2] Add AST2700 support for aspeed sdhci Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ryan Chen @ 2026-03-24 1:58 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, Krzysztof Kozlowski
AST2700 SDHCI controller is fully compatible with AST2600.
However, it is necessary to take the AST2700 SD controller out of
reset, so require the 'resets' property.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
---
Changes in v3:
- Add items list const for ast2700 ast2600 compatible
- Move if/then/else block after required: (per example-schema)
Changes in v2:
- add missing blank line
- modify ast2700 compatible items const
---
.../devicetree/bindings/mmc/aspeed,sdhci.yaml | 41 +++++++++++++++++-----
1 file changed, 33 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
index d24950ccea95..e4a9c2810893 100644
--- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
@@ -22,10 +22,15 @@ description: |+
properties:
compatible:
- enum:
- - aspeed,ast2400-sd-controller
- - aspeed,ast2500-sd-controller
- - aspeed,ast2600-sd-controller
+ oneOf:
+ - enum:
+ - aspeed,ast2400-sd-controller
+ - aspeed,ast2500-sd-controller
+ - aspeed,ast2600-sd-controller
+ - items:
+ - const: aspeed,ast2700-sd-controller
+ - const: aspeed,ast2600-sd-controller
+
reg:
maxItems: 1
description: Common configuration registers
@@ -38,6 +43,9 @@ properties:
maxItems: 1
description: The SD/SDIO controller clock gate
+ resets:
+ maxItems: 1
+
patternProperties:
"^sdhci@[0-9a-f]+$":
type: object
@@ -46,10 +54,15 @@ patternProperties:
properties:
compatible:
- enum:
- - aspeed,ast2400-sdhci
- - aspeed,ast2500-sdhci
- - aspeed,ast2600-sdhci
+ oneOf:
+ - enum:
+ - aspeed,ast2400-sdhci
+ - aspeed,ast2500-sdhci
+ - aspeed,ast2600-sdhci
+ - items:
+ - const: aspeed,ast2700-sdhci
+ - const: aspeed,ast2600-sdhci
+
reg:
maxItems: 1
description: The SDHCI registers
@@ -78,6 +91,18 @@ required:
- ranges
- clocks
+if:
+ properties:
+ compatible:
+ contains:
+ const: aspeed,ast2700-sd-controller
+then:
+ required:
+ - resets
+else:
+ properties:
+ resets: false
+
examples:
- |
#include <dt-bindings/clock/aspeed-clock.h>
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v4 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset
2026-03-24 1:58 [PATCH v4 0/2] Add AST2700 support for aspeed sdhci Ryan Chen
2026-03-24 1:58 ` [PATCH v4 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible Ryan Chen
@ 2026-03-24 1:58 ` Ryan Chen
2026-03-24 15:03 ` [PATCH v4 0/2] Add AST2700 support for aspeed sdhci Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ryan Chen @ 2026-03-24 1:58 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
Get the optional reset line for the ASPEED SD controller during probe by
using devm_reset_control_get_optional_exclusive_deasserted().
This allows platforms such as AST2700, which require the SD controller
to be taken out of reset before use, to work with the existing driver.
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
---
Changes in v4:
- rebase git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
next branch fix the conflit.
Changes in v2:
- use devm_reset_control_get_optional_exclusive_deasserted replace
reset_control_get_optional_exclusive.
- add include reset.h
---
drivers/mmc/host/sdhci-of-aspeed.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
index 4296def69436..f5d973783cbe 100644
--- a/drivers/mmc/host/sdhci-of-aspeed.c
+++ b/drivers/mmc/host/sdhci-of-aspeed.c
@@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <linux/reset.h>
#include <linux/spinlock.h>
#include "sdhci-pltfm.h"
@@ -519,6 +520,7 @@ static struct platform_driver aspeed_sdhci_driver = {
static int aspeed_sdc_probe(struct platform_device *pdev)
{
+ struct reset_control *reset;
struct device_node *parent;
struct aspeed_sdc *sdc;
int ret;
@@ -529,6 +531,10 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
spin_lock_init(&sdc->lock);
+ reset = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev, NULL);
+ if (IS_ERR(reset))
+ return dev_err_probe(&pdev->dev, PTR_ERR(reset), "unable to acquire reset\n");
+
sdc->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(sdc->clk))
return PTR_ERR(sdc->clk);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v4 0/2] Add AST2700 support for aspeed sdhci
2026-03-24 1:58 [PATCH v4 0/2] Add AST2700 support for aspeed sdhci Ryan Chen
2026-03-24 1:58 ` [PATCH v4 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible Ryan Chen
2026-03-24 1:58 ` [PATCH v4 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen
@ 2026-03-24 15:03 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2026-03-24 15:03 UTC (permalink / raw)
To: Ryan Chen
Cc: Andrew Jeffery, 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, Krzysztof Kozlowski
On Tue, 24 Mar 2026 at 02:58, Ryan Chen <ryan_chen@aspeedtech.com> wrote:
>
> 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>
> ---
> Changes in v4:
> - 2/2 rebase git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
> next branch fix the conflit.
> - Link to v3: https://lore.kernel.org/r/20260323-sdhci-v3-0-93555b8f6411@aspeedtech.com
>
The series applied for next, thanks!
[...]
Kind regards
Uffe
^ permalink raw reply [flat|nested] 4+ messages in thread