Add support for Nuvoton MA35D1 SDHCI
Subsystems (4)
v3 cover Add support for Nuvoton MA35D1 SDHCI
This patch adds the SDHCI driver and DT binding documentation for the Nuvoton MA35D1 platform.
This MA35D1 SDHCI driver has been tested on the MA35D1 SOM board with Linux 6.10
v3:
- Update ma35d1 sdhci driver
- Fixing "Alignment" and "spaces preferred around"
- Fixing style for multi-line comments
- Fixing double call to sdhci_pltfm_free()
v2:
- Update to nuvoton,ma35d1-sdhci.yaml
- Remove some redundant descriptions.
- Replace 'minitem' with 'maxitem' in the clock settings.
- Make corrections to nuvoton,sys description.
- Add sdhci-common.yaml.
- Remove '|' except where necessary to be preserved.
- Keeping one example is sufficient.
- Add regulators in the example.
- Update ma35d1 sdhci driver
- Refer to 'include what you use' to modify included header files.
- Replace the number 8 with sizeof(u8), and similarly for others.
- Use "dev" instead of "&pdev->dev".
- Use the min() macro to improve the code.
- Use dev_err_probe() instead of dev_err().
- Implement an error reset check mechanism.
- Add devm_add_action_or_reset() to help with sdhci_pltfm_free().
- Use devm_reset_control_get_exclusive() instead of devm_reset_control_get().
Shan-Chun Hung (2):
dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI
controller
mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver
.../bindings/mmc/nuvoton,ma35d1-sdhci.yaml | 88 ++++++ drivers/mmc/host/Kconfig | 12 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-ma35d1.c | 297 ++++++++++++++++++ 4 files changed, 398 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/nuvoton,ma35d1-sdhci.yaml create mode 100644 drivers/mmc/host/sdhci-of-ma35d1.c
--
2.25.1
PATCH v3 1/2 dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI controller
Add binding for Nuvoton MA35D1 SDHCI controller.
--- .../bindings/mmc/nuvoton,ma35d1-sdhci.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/nuvoton,ma35d1-sdhci.yaml
Documentation/devicetree/bindings/mmc/nuvoton,ma35d1-sdhci.yaml new file +88 -0
@@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/nuvoton,ma35d1-sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35D1 SD/SDIO/MMC Controller + +maintainers: + - Shan-Chun Hung <[email protected]> + +allOf: + - $ref: sdhci-common.yaml# + +properties: + compatible: + enum: + - nuvoton,ma35d1-sdhci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + pinctrl-names: + minItems: 1 + items: + - const: default + - const: state_uhs + + pinctrl-0: + description: + Should contain default/high speed pin ctrl. + maxItems: 1 + + pinctrl-1: + description: + Should contain uhs mode pin ctrl. + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + nuvoton,sys: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to access GCR (Global Control Register) registers. + +required: + - compatible + - reg + - interrupts + - clocks + - pinctrl-names + - pinctrl-0 + - resets + - nuvoton,sys + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/nuvoton,ma35d1-clk.h> + #include <dt-bindings/reset/nuvoton,ma35d1-reset.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + mmc@40190000 { + compatible = "nuvoton,ma35d1-sdhci"; + reg = <0x0 0x40190000 0x0 0x2000>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk SDH1_GATE>; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&pinctrl_sdhci1>; + pinctrl-1 = <&pinctrl_sdhci1_uhs>; + resets = <&sys MA35D1_RESET_SDH1>; + nuvoton,sys = <&sys>; + vqmmc-supply = <&sdhci1_vqmmc_regulator>; + bus-width = <8>; + max-frequency = <200000000>; + status = "disabled"; + }; + };
--
2.25.1
PATCH v3 2/2 mmc: sdhci-of-ma35d1: Add Nuvoton MA35D1 SDHCI driver
In reply to Shan-Chun HungAdd the SDHCI driver for the MA35D1 platform. It is based upon the SDHCI interface, but requires some extra initialization.
--- drivers/mmc/host/Kconfig | 12 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-of-ma35d1.c | 297 +++++++++++++++++++++++++++++ 3 files changed, 310 insertions(+) create mode 100644 drivers/mmc/host/sdhci-of-ma35d1.c
drivers/mmc/host/Kconfig +12 -0
@@ -252,6 +252,18 @@ config MMC_SDHCI_OF_SPARX5 If unsure, say N. +config MMC_SDHCI_OF_MA35D1 + tristate "SDHCI OF support for the MA35D1 SDHCI controller" + depends on ARCH_MA35 || COMPILE_TEST + depends on MMC_SDHCI_PLTFM + help + This selects the MA35D1 Secure Digital Host Controller Interface. + + If you have a controller with this interface, say Y or M here. You + also need to enable an appropriate bus interface. + + If unsure, say N. + config MMC_SDHCI_CADENCE tristate "SDHCI support for the Cadence SD/SDIO/eMMC controller" depends on MMC_SDHCI_PLTFM
drivers/mmc/host/Makefile +1 -0
@@ -88,6 +88,7 @@ obj-$(CONFIG_MMC_SDHCI_OF_ESDHC) += sdhci-of-esdhc.o obj-$(CONFIG_MMC_SDHCI_OF_HLWD) += sdhci-of-hlwd.o obj-$(CONFIG_MMC_SDHCI_OF_DWCMSHC) += sdhci-of-dwcmshc.o obj-$(CONFIG_MMC_SDHCI_OF_SPARX5) += sdhci-of-sparx5.o +obj-$(CONFIG_MMC_SDHCI_OF_MA35D1) += sdhci-of-ma35d1.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_NPCM) += sdhci-npcm.o
drivers/mmc/host/sdhci-of-ma35d1.c new file +297 -0
297 lines not on this page · raw message
--
2.25.1
Re: [PATCH v3 1/2] dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI controller
In reply to Shan-Chun HungQuoted 3 lines · Shan-Chun Hung
Add binding for Nuvoton MA35D1 SDHCI controller.
Signed-off-by Shan-Chun Hung <[email protected]>
You ignored comment third time.
NAK.
<form letter>
This is a friendly reminder during the review process.
It seems my or other reviewer's previous comments were not fully addressed. Maybe the feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.
Thank you.
</form letter>
Best regards,
Krzysztof
Re: [PATCH v3 1/2] dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI controller
Dear Krzysztof,
Thanks for your review.
I'm sorry, I just realized I missed an important letter.
I will drop status = "disabled" in the next version.
Quoted 16 lines · Shan-Chun Hung
Quoted 3 lines
Add binding for Nuvoton MA35D1 SDHCI controller.
Signed-off-by Shan-Chun Hung <[email protected]>You ignored comment third time.
NAK.
<form letter>
This is a friendly reminder during the review process.It seems my or other reviewer's previous comments were not fully addressed. Maybe the feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.
Quoted 6 lines
Thank you.
</form letter>Best regards,
Krzysztof
Best Regards,
Shan-Chun