Skip to contentSkip to conversation

Add SDHCI driver for Broadcom BRCMSTB/BMIPS Soc's

PATCH Superseded Al Cooper 1 participant 3 messages Jun 2, 2016

Subsystems (5)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Al Cooper

author maintainer
#0 lore raw

v5 cover Add SDHCI driver for Broadcom BRCMSTB/BMIPS Soc's

V5 - Don't create new device tree properties to disable broken UHS
modes. Use devm_clk_get() to get clk and change clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
V4 - Change the DT compatible property to "brcm,bcm7425-sdhci".
Add "clocks" property to DT bindings document.
V3 - Don't add new QUIRKS to workaround Host Controller issues.
It turns out that all the issues could be solved by using SDHCI_QUIRK_MISSING_CAPS to supply modified "caps" and "caps1" Host Controller registers.

Al Cooper (2):
mmc: sdhci-brcmstb: Add driver for Broadcom BRCMSTB SoCs
mmc: DT: sdhci-brcmstb: Add device tree bindings

 .../devicetree/bindings/mmc/brcm,bcm7425-sdhci.txt |  32 +++++
 MAINTAINERS                                        |   7 ++
 drivers/mmc/host/Kconfig                           |  11 ++
 drivers/mmc/host/Makefile                          |   1 +
 drivers/mmc/host/sdhci-brcmstb.c                   | 137 +++++++++++++++++++++
 5 files changed, 188 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm7425-sdhci.txt
 create mode 100644 drivers/mmc/host/sdhci-brcmstb.c
Signature · 1 line
1.9.0.138.g2de3478
author maintainer
#1 lore raw

PATCH v5 1/2 mmc: sdhci-brcmstb: Add driver for Broadcom BRCMSTB SoCs

---
 MAINTAINERS                      |   7 ++
 drivers/mmc/host/Kconfig         |  11 ++++
 drivers/mmc/host/Makefile        |   1 +
 drivers/mmc/host/sdhci-brcmstb.c | 137 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 156 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-brcmstb.c
MAINTAINERS +7 -0
index 7304d2e..e5528cf 100644
@@ -10187,6 +10187,13 @@ F:	tools/testing/selftests/seccomp/*
 K:	\bsecure_computing
 K:	\bTIF_SECCOMP\b
 
+SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) Broadcom BRCMSTB DRIVER
+M:	Al Cooper <[email protected]>
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	drivers/mmc/host/sdhci-brcmstb*
+
 SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
 M:	Ben Dooks <[email protected]>
 M:	Jaehoon Chung <[email protected]>
drivers/mmc/host/Kconfig +11 -0
index 0aa484c..1038c9a 100644
@@ -798,3 +798,14 @@ config MMC_SDHCI_MICROCHIP_PIC32
           If you have a controller with this interface, say Y or M here.
 
           If unsure, say N.
+config MMC_SDHCI_BRCMSTB
+	tristate "Broadcom SDIO/SD/MMC support"
+	depends on ARCH_BRCMSTB || BMIPS_GENERIC
+	depends on MMC_SDHCI_PLTFM
+	default y
+	select MMC_SDHCI_IO_ACCESSORS
+	help
+	  This selects support for the SDIO/SD/MMC Host Controller on
+	  Broadcom STB SoCs.
+
+	  If unsure, say Y.
drivers/mmc/host/Makefile +1 -0
index af918d2..2075c11 100644
@@ -76,6 +76,7 @@ obj-$(CONFIG_MMC_SDHCI_IPROC)		+= sdhci-iproc.o
 obj-$(CONFIG_MMC_SDHCI_MSM)		+= sdhci-msm.o
 obj-$(CONFIG_MMC_SDHCI_ST)		+= sdhci-st.o
 obj-$(CONFIG_MMC_SDHCI_MICROCHIP_PIC32)	+= sdhci-pic32.o
+obj-$(CONFIG_MMC_SDHCI_BRCMSTB)		+= sdhci-brcmstb.o
 
 ifeq ($(CONFIG_CB710_DEBUG),y)
 	CFLAGS-cb710-mmc	+= -DDEBUG
drivers/mmc/host/sdhci-brcmstb.c new file +137 -0

137 lines not on this page · raw message

Signature · 1 line
1.9.0.138.g2de3478
author maintainer
#2 lore raw

PATCH v5 2/2 mmc: DT: sdhci-brcmstb: Add device tree bindings

In reply to Al Cooper
---
 .../devicetree/bindings/mmc/brcm,bcm7425-sdhci.txt | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm7425-sdhci.txt
Documentation/devicetree/bindings/mmc/brcm,bcm7425-sdhci.txt new file +32 -0
new file mode 100644
index 0000000..4c73671
@@ -0,0 +1,32 @@
+* BROADCOM BRCMSTB/BMIPS SDHCI Controller
+
+This file documents differences between the core properties in mmc.txt
+and the properties used by the sdhci-brcmstb driver.
+
+Required properties:
+- compatible: "brcm,bcm7425-sdhci"
+
+Refer to clocks/clock-bindings.txt for generic clock consumer properties.
+
+Example:
+
+	sdhci@f03e0100 {
+		compatible = "brcm,bcm7425-sdhci";
+		reg = <0xf03e0000 0x100>;
+		interrupts = <0x0 0x26 0x0>;
+		sdhci,auto-cmd12;
+		clocks = <&sw_sdio>;
+		sd-uhs-sdr50;
+		sd-uhs-ddr50;
+	};
+
+	sdhci@f03e0300 {
+		non-removable;
+		bus-width = <0x8>;
+		compatible = "brcm,bcm7425-sdhci";
+		reg = <0xf03e0200 0x100>;
+		interrupts = <0x0 0x27 0x0>;
+		sdhci,auto-cmd12;
+		clocks = <sw_sdio>;
+		mmc-hs200-1_8v;
+	};
Signature · 1 line
1.9.0.138.g2de3478