Skip to contentSkip to conversation

mmc: add support for bcm63158

PATCH In review Philippe Reynes 2 participants 6 messages Apr 13, 2022 – Jun 16, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover mmc: add support for bcm63158

This serie adds the support of mmc for bcm63158. The first commit adds a driver that support sdhci on bcm63158. The two next commits add support of mmc in the device tree, and the last one enables the support of mmc and gpt for the reference board bcm963158.

Philippe Reynes (4):
drivers: mmc: bcm63158_sdhci: initial support
arch: arm: dts: bcm63158.dtsi: add mmc support
arch: arm: dts: bcm963158.dts: enable sdhci support
configs: bcm963158_ram_defconfig: enable mmc and gpt support

 arch/arm/dts/bcm63158.dtsi      |   9 ++
 arch/arm/dts/bcm963158.dts      |   4 +
 configs/bcm963158_ram_defconfig |   8 +-
 drivers/mmc/Kconfig             |  12 +++
 drivers/mmc/Makefile            |   1 +
 drivers/mmc/bcm63158_sdhci.c    | 153 ++++++++++++++++++++++++++++++++
 6 files changed, 184 insertions(+), 3 deletions(-)
 create mode 100644 drivers/mmc/bcm63158_sdhci.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/4 drivers: mmc: bcm63158_sdhci: initial support

Adds a driver to support shdci on bcm63158.

---
 drivers/mmc/Kconfig          |  12 +++
 drivers/mmc/Makefile         |   1 +
 drivers/mmc/bcm63158_sdhci.c | 153 +++++++++++++++++++++++++++++++++++
 3 files changed, 166 insertions(+)
 create mode 100644 drivers/mmc/bcm63158_sdhci.c
drivers/mmc/Kconfig +12 -0
index f04cc44e19..a08e8245cf 100644
@@ -520,6 +520,18 @@ config MMC_SDHCI_BCM2835
 
 	  If unsure, say N.
 
+config MMC_SDHCI_BCM63158
+	bool "SDHCI support for the BCM63158 SD/MMC Controller"
+	depends on ARCH_BCM63158
+	depends on MMC_SDHCI
+	help
+	  This selects the BCM63158 SD/MMC controller.
+
+	  If you have a BCM63158 platform with SD or MMC devices,
+	  say Y here.
+
+	  If unsure, say N.
+
 config MMC_SDHCI_BCMSTB
 	tristate "SDHCI support for the BCMSTB SD/MMC Controller"
 	depends on MMC_SDHCI
drivers/mmc/Makefile +1 -0
index 17ebc04203..5cebd55549 100644
@@ -55,6 +55,7 @@ obj-$(CONFIG_MMC_SDHCI)			+= sdhci.o
 obj-$(CONFIG_MMC_SDHCI_ASPEED)		+= aspeed_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_ATMEL)		+= atmel_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_BCM2835)		+= bcm2835_sdhci.o
+obj-$(CONFIG_MMC_SDHCI_BCM63158)	+= bcm63158_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_BCMSTB)		+= bcmstb_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_CADENCE)		+= sdhci-cadence.o
 obj-$(CONFIG_MMC_SDHCI_AM654)		+= am654_sdhci.o
drivers/mmc/bcm63158_sdhci.c new file +153 -0

153 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/4 arch: arm: dts: bcm63158.dtsi: add mmc support

In reply to Philippe Reynes

Adds the support of sdhci on bcm63158.

---
 arch/arm/dts/bcm63158.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/dts/bcm63158.dtsi +9 -0
index 7dd2858438..4e0f5f2dbd 100644
@@ -229,5 +229,14 @@
 
 			status = "disabled";
 		};
+
+		sdhci: sdhci {
+			compatible = "brcm,bcm63158-sdhci";
+			reg-names = "sdhci-base", "sdhci-boot";
+			reg = <0x00000000 0xff810000 0x00000000 0x00000100>,
+			      <0x00000000 0xff810200 0x00000000 0x00000040>;
+			bus-width = <0x00000008>;
+			no-1-8-v;
+		};
 	};
 };
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/4 arch: arm: dts: bcm963158.dts: enable sdhci support

In reply to Philippe Reynes

Enable the support of sdhci on bcm63158.

---
 arch/arm/dts/bcm963158.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/bcm963158.dts +4 -0
index c2bdd33274..c96fa60841 100644
@@ -137,3 +137,7 @@
 		spi-max-frequency = <25000000>;
 	};
 };
+
+&sdhci {
+	status = "okay";
+};
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/4 configs: bcm963158_ram_defconfig: enable mmc and gpt support

In reply to Philippe Reynes

Enable the support of emmc and gpt on bcm63158

---
 configs/bcm963158_ram_defconfig | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
configs/bcm963158_ram_defconfig +5 -3
index 642faf511f..5fc89fc99d 100644
@@ -24,21 +24,23 @@ CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_UNZIP is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_GPT_RENAME=y
+CONFIG_CMD_MMC=y
 CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND=y
 CONFIG_CMD_CACHE=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ISO_PARTITION=y
-CONFIG_EFI_PARTITION=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_NET is not set
-CONFIG_BLK=y
 CONFIG_CLK=y
 CONFIG_BCM6345_GPIO=y
 CONFIG_LED=y
 CONFIG_LED_BCM6858=y
 CONFIG_LED_BLINK=y
-# CONFIG_MMC is not set
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_BCM63158=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
Signature · 1 line
2.25.1
#5 lore raw
In reply to Philippe Reynes

Hi Philippe,

Quoted 7 lines · Philippe Reynes

This serie adds the support of mmc for bcm63158. The first commit adds a driver that support sdhci on bcm63158. The two next commits add support of mmc in the device tree, and the last one enables the support of mmc and gpt for the reference board bcm963158.

Sorry. I missed your patchset in my mailbox.
I will check this on today.

Best Regards,
Jaehoon Chung

Quoted 16 lines

Philippe Reynes (4):
drivers: mmc: bcm63158_sdhci: initial support
arch: arm: dts: bcm63158.dtsi: add mmc support
arch: arm: dts: bcm963158.dts: enable sdhci support
configs: bcm963158_ram_defconfig: enable mmc and gpt support

 arch/arm/dts/bcm63158.dtsi      |   9 ++
 arch/arm/dts/bcm963158.dts      |   4 +
 configs/bcm963158_ram_defconfig |   8 +-
 drivers/mmc/Kconfig             |  12 +++
 drivers/mmc/Makefile            |   1 +
 drivers/mmc/bcm63158_sdhci.c    | 153 ++++++++++++++++++++++++++++++++
 6 files changed, 184 insertions(+), 3 deletions(-)
 create mode 100644 drivers/mmc/bcm63158_sdhci.c