Add mmc driver for Sunplus SP7021 SOC
Subsystems (3)
Tony Huang
maintainerv12 cover Add mmc driver for Sunplus SP7021 SOC
This is a patch series for mmc driver for Sunplus SP7021 SOC.
Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control.
Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.html
Tony Huang (2):
dt-binding: mmc: Add mmc yaml file for Sunplus SP7021
mmc: Add mmc driver for Sunplus SP7021
.../devicetree/bindings/mmc/sunplus,mmc.yaml | 62 ++ MAINTAINERS | 7 + drivers/mmc/host/Kconfig | 9 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sunplus-mmc.c | 1000 ++++++++++++++++++++ 5 files changed, 1079 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml create mode 100644 drivers/mmc/host/sunplus-mmc.c
Signature · 1 line
2.7.4
Tony Huang
maintainerPATCH v12 1/2 dt-binding: mmc: Add mmc yaml file for Sunplus SP7021
Add MMC YAML file for Sunplus SP7021.
---
Changes in v5:
- Addressed comments from Krzysztof.
Changes in v6:
- Addressed comments from Krzysztof.
- To substitute MMC for mmc. To substitute YMAL for ymal.
- Remove max-frequency.
- Fixed wrong file name.
Changes in v7:
-No change.
Changes in v8:
-No change.
Changes in v9:
-No change.
Changes in v10:
-No change.
Changes in v11:
-No change.
Changes in v12:
-No change.
.../devicetree/bindings/mmc/sunplus,mmc.yaml | 62 ++++++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml
Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml new file +62 -0
@@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) Sunplus Ltd. Co. 2021 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/sunplus,mmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus MMC Controller + +maintainers: + - Tony Huang <[email protected]> + - Li-hao Kuo <[email protected]> + +allOf: + - $ref: "mmc-controller.yaml" + +properties: + compatible: + enum: + - sunplus,sp7021-mmc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - resets + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + mmc0: mmc@9c003b00 { + compatible = "sunplus,sp7021-mmc"; + reg = <0x9c003b00 0x180>; + interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clkc 0x4e>; + resets = <&rstc 0x3e>; + bus-width = <8>; + max-frequency = <52000000>; + non-removable; + disable-wp; + cap-mmc-highspeed; + mmc-ddr-3_3v; + no-sdio; + no-sd; + }; +
MAINTAINERS +6 -0
@@ -19748,6 +19748,12 @@ W: https://sunplus.atlassian.net/wiki/spaces/doc/overview F: Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml F: drivers/net/ethernet/sunplus/ +SUNPLUS MMC DRIVER +M: Tony Huang <[email protected]> +M: Li-hao Kuo <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml + SUNPLUS OCOTP DRIVER M: Vincent Shih <[email protected]> S: Maintained
Signature · 1 line
2.7.4
Re: [PATCH v12 1/2] dt-binding: mmc: Add mmc yaml file for Sunplus SP7021
Quoted 9 lines · Tony Huang
Add MMC YAML file for Sunplus SP7021.
+++
b/Documentation/devicetree/bindings/mmc/sunplus,mmc.yamlDocumentation/devicetree/bindings/mmc/sunplus,mmc.yaml new file +5
-0@@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) Sunplus Ltd. Co. 2021 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/sunplus,mmc.yaml#
Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml line 15
Quoted 10 lines
Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml new file +10
-0+$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus MMC Controller + +maintainers: + - Tony Huang <[email protected]> + - Li-hao Kuo <[email protected]> + +allOf: + - $ref: "mmc-controller.yaml"
If there is going to be resend, drop the quotes (and keep my Reviewed-by tag).
Best regards,
Krzysztof
Tony Huang
maintainerPATCH v12 2/2 mmc: Add mmc driver for Sunplus SP7021
In reply to Tony HuangThis is a patch for mmc driver for Sunplus SP7021 SOC. Supports eMMC 4.41 DDR 104MB/s speed mode.
---
Changes in v5:
- Addressed comments from Krzysztof.
- Remove the relevant sdcard code.
- Submit the emmc code only.
Changes in v6:
- Addressed comments from Arnd.
- Use SYSTEM_SLEEP_PM_OPS instead of SET_SYSTEM_SLEEP_PM_OPS.
- Use RUNTIME_PM_OPS instead of SET_RUNTIME_PM_OPS.
- Remove #ifdef check.
- Fixed mutex lock and unlock imbalance issue.
Changes in v7:
- Addressed comments from kernel test robot.
- Remove unused vairable.
- Add previous prototype.
- Addressed make error and warning in kernel 5.18-rc1.
Changes in v8:
- Addressed comments from Uffe.
Changes in v9:
- Addressed comments from Uffe.
Changes in v10:
- Addressed comments from Uffe.
- Addressed MMC test failed.
Changes in v11:
- Addressed comments from Arnd.
- Addressed comments from MMC test failed.
Changes in v12:
- Addressed comments from Uffe.
- Addressed read EXT4 file error for eMMC booting.
MAINTAINERS | 1 + drivers/mmc/host/Kconfig | 9 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sunplus-mmc.c | 1000 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1011 insertions(+) create mode 100644 drivers/mmc/host/sunplus-mmc.c
MAINTAINERS +1 -0
@@ -19753,6 +19753,7 @@ M: Tony Huang <[email protected]> M: Li-hao Kuo <[email protected]> S: Maintained F: Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml +F: drivers/mmc/host/sunplus-mmc.c SUNPLUS OCOTP DRIVER M: Vincent Shih <[email protected]>
drivers/mmc/host/Kconfig +9 -0
@@ -14,6 +14,15 @@ config MMC_DEBUG added host drivers please don't invent their private macro for debugging. +config MMC_SUNPLUS + tristate "Sunplus SP7021 MMC Controller" + depends on ARCH_SUNPLUS || COMPILE_TEST + help + If you say yes here, you will get support for eMMC host interface + on Sunplus SoCs. + + If unsure, say N + config MMC_ARMMMCI tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA
drivers/mmc/host/Makefile +1 -0
@@ -97,6 +97,7 @@ obj-$(CONFIG_MMC_SDHCI_MICROCHIP_PIC32) += sdhci-pic32.o obj-$(CONFIG_MMC_SDHCI_BRCMSTB) += sdhci-brcmstb.o obj-$(CONFIG_MMC_SDHCI_OMAP) += sdhci-omap.o obj-$(CONFIG_MMC_SDHCI_SPRD) += sdhci-sprd.o +obj-$(CONFIG_MMC_SUNPLUS) += sunplus-mmc.o obj-$(CONFIG_MMC_CQHCI) += cqhci.o cqhci-y += cqhci-core.o cqhci-$(CONFIG_MMC_CRYPTO) += cqhci-crypto.o
drivers/mmc/host/sunplus-mmc.c new file +1000 -0
1,000 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 15 lines · Tony Huang
This is a patch series for mmc driver for Sunplus SP7021 SOC.
Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control.
Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.htmlTony Huang (2):
dt-binding: mmc: Add mmc yaml file for Sunplus SP7021
mmc: Add mmc driver for Sunplus SP7021
Quoted 9 lines
.../devicetree/bindings/mmc/sunplus,mmc.yaml | 62 ++ MAINTAINERS | 7 + drivers/mmc/host/Kconfig | 9 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sunplus-mmc.c | 1000 ++++++++++++++++++++ 5 files changed, 1079 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml create mode 100644 drivers/mmc/host/sunplus-mmc.c
Applied for next, thanks!
Kind regards
Uffe