* [PATCH v3 0/2] Add AST2700 support for aspeed sdhci
@ 2026-03-23 2:07 Ryan Chen
2026-03-23 2:07 ` [PATCH v3 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible Ryan Chen
2026-03-23 2:07 ` [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen
0 siblings, 2 replies; 5+ messages in thread
From: Ryan Chen @ 2026-03-23 2:07 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>
---
Changes in v3:
- 1/2 Add items list const for ast2700 ast2600 compatible
- 1/2 Move if/then/else block after required: (per example-schema)
- Link to v2: https://lore.kernel.org/r/20260317-sdhci-v2-0-39b1f063061b@aspeedtech.com
Changes in v2:
- 1/2 use items for ast2700 compatible.
- 2/2 use devm_reset_control_get_optional_exclusive_deasserted for
reset.
- Link to v1: https://lore.kernel.org/r/20260313-sdhci-v1-0-91cea19c8a67@aspeedtech.com
---
Ryan Chen (2):
dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible
mmc: sdhci-of-aspeed: Handle optional controller reset
.../devicetree/bindings/mmc/aspeed,sdhci.yaml | 41 +++++++++++++++++-----
drivers/mmc/host/sdhci-of-aspeed.c | 6 ++++
2 files changed, 39 insertions(+), 8 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260313-sdhci-269d319fdbde
Best regards,
--
Ryan Chen <ryan_chen@aspeedtech.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v3 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible 2026-03-23 2:07 [PATCH v3 0/2] Add AST2700 support for aspeed sdhci Ryan Chen @ 2026-03-23 2:07 ` Ryan Chen 2026-03-23 2:07 ` [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen 1 sibling, 0 replies; 5+ messages in thread From: Ryan Chen @ 2026-03-23 2:07 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 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. 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] 5+ messages in thread
* [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset 2026-03-23 2:07 [PATCH v3 0/2] Add AST2700 support for aspeed sdhci Ryan Chen 2026-03-23 2:07 ` [PATCH v3 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible Ryan Chen @ 2026-03-23 2:07 ` Ryan Chen 2026-03-23 7:46 ` Krzysztof Kozlowski 2026-03-23 13:33 ` Adrian Hunter 1 sibling, 2 replies; 5+ messages in thread From: Ryan Chen @ 2026-03-23 2:07 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. Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> --- 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 ca97b01996b1..8f638ffb55ae 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" @@ -520,6 +521,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 +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] 5+ messages in thread
* Re: [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset 2026-03-23 2:07 ` [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen @ 2026-03-23 7:46 ` Krzysztof Kozlowski 2026-03-23 13:33 ` Adrian Hunter 1 sibling, 0 replies; 5+ messages in thread From: Krzysztof Kozlowski @ 2026-03-23 7:46 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 Mon, Mar 23, 2026 at 10:07:08AM +0800, Ryan Chen wrote: > 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. > > Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> > --- > Changes in v2: > - use devm_reset_control_get_optional_exclusive_deasserted replace > reset_control_get_optional_exclusive. > - add include reset.h Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset 2026-03-23 2:07 ` [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen 2026-03-23 7:46 ` Krzysztof Kozlowski @ 2026-03-23 13:33 ` Adrian Hunter 1 sibling, 0 replies; 5+ messages in thread From: Adrian Hunter @ 2026-03-23 13:33 UTC (permalink / raw) To: Ryan Chen, Andrew Jeffery, Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley, Ryan Chen, Philipp Zabel Cc: Andrew Jeffery, linux-aspeed, openbmc, linux-mmc, devicetree, linux-arm-kernel, linux-kernel On 23/03/2026 04:07, Ryan Chen wrote: > 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. > > Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> No longer applies to 'next' branch of: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git Fix that and add: Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > 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 ca97b01996b1..8f638ffb55ae 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" > @@ -520,6 +521,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 +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); > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-23 13:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-03-23 2:07 [PATCH v3 0/2] Add AST2700 support for aspeed sdhci Ryan Chen 2026-03-23 2:07 ` [PATCH v3 1/2] dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible Ryan Chen 2026-03-23 2:07 ` [PATCH v3 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset Ryan Chen 2026-03-23 7:46 ` Krzysztof Kozlowski 2026-03-23 13:33 ` Adrian Hunter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox