Add eMMC support for Axiado SCM3005 board
cover Add eMMC support for Axiado SCM3005 board
This series adds eMMC support for the Axiado SCM3005 board, based on the AX3005 SoC, which uses an Arasan SDHCI controller paired with a dedicated eMMC PHY.
The series is split as follows:
- Patch 1 adds the eMMC PHY driver (PHY_AXIADO_EMMC). The PHY provides signal conditioning and DLL functionality required for high-speed operation with data rates beyond 52MHz, and is based on the Arasan PHY.
- Patch 2 adds the SDHCI host controller driver (MMC_SDHCI_AXIADO) for the Arasan controller. It builds on the generic SDHCI framework and adds SoC-specific signal voltage switching, HS200 tuning and eMMC PHY power sequencing through the generic PHY API.
- Patch 3 adds the device tree nodes for the SDHCI controller, the eMMC PHY and their supporting fixed clock (clk_xin) to ax3005.dtsi, and enables the SDHCI node in ax3005-scm3005.dts.
- Patch 4 enables the new drivers in ax3005_scm3005_defconfig, stores the environment in MMC and bumps CONFIG_SYS_MALLOC_LEN to 0x400000 to accommodate MMC operations.
Tested on the Axiado SCM3005 board: the eMMC is detected and enumerated, and read/write access through the MMC subsystem works, including high-speed modes exercised by the PHY tuning path.
---
Siu Ming Tong (4):
phy: Add Axiado eMMC PHY driver
mmc: Add Axiado SDHCI driver
arm: dts: ax3005: Add SDHCI, eMMC PHY and clock node
configs: ax3005_scm3005: Enable eMMC support
MAINTAINERS | 2 + arch/arm/dts/ax3005-scm3005.dts | 4 + arch/arm/dts/ax3005.dtsi | 25 ++++ configs/ax3005_scm3005_defconfig | 10 +- drivers/mmc/Kconfig | 7 + drivers/mmc/Makefile | 1 + drivers/mmc/axiado_sdhci.c | 311 +++++++++++++++++++++++++++++++++++++++ drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-axiado-emmc.c | 208 ++++++++++++++++++++++++++ 10 files changed, 576 insertions(+), 2 deletions(-)
---
base-commit: 02f8b8ab6d6095dccf867d899099322f7430d20d
change-id: 20260727-dev-scm3005-d62c69354074
Best regards,
Signature · 1 line
Siu Ming Tong <[email protected]>
PATCH 1/4 phy: Add Axiado eMMC PHY driver
Add a PHY driver (PHY_AXIADO_EMMC) for the eMMC PHY found on the Axiado AX3005 SoC. The PHY provides signal conditioning and DLL functionality required for high-speed eMMC operation with data rates beyond 52MHz.
The driver is based on the Arasan PHY (sdhci-pci-arasan.c) and programs the calibration, DLL and clock-buffer settings through a memory-mapped regmap.
--- MAINTAINERS | 1 + drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-axiado-emmc.c | 208 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 219 insertions(+)
MAINTAINERS +1 -0
@@ -232,6 +232,7 @@ F: arch/arm/dts/ax3005* F: arch/arm/mach-axiado/ F: board/axiado/scm3005/ F: configs/ax3005_scm3005_defconfig +F: drivers/phy/phy-axiado-emmc.c F: include/configs/ax3005-scm3005.h ARM BROADCOM BCM283X / BCM27XX
drivers/phy/Kconfig +9 -0
@@ -81,6 +81,15 @@ config APPLE_ATCPHY This is a dummy driver since the PHY is initialized sufficiently by previous stage firmware. +config PHY_AXIADO_EMMC + bool "Axiado eMMC PHY driver support" + depends on PHY + imply REGMAP + help + Enable this to support the Axiado eMMC PHY found in the Ax3005 SoC. + This PHY provides signal conditioning and DLL functionality for + high-speed eMMC operations with data rates beyond 52MHz. + config BCM6318_USBH_PHY bool "BCM6318 USBH PHY support" depends on PHY && ARCH_BMIPS
drivers/phy/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_OMAP_USB2_PHY) += omap-usb2-phy.o obj-$(CONFIG_KEYSTONE_USB_PHY) += keystone-usb-phy.o obj-$(CONFIG_MT7620_USB_PHY) += mt7620-usb-phy.o obj-$(CONFIG_MT76X8_USB_PHY) += mt76x8-usb-phy.o +obj-$(CONFIG_PHY_AXIADO_EMMC) += phy-axiado-emmc.o obj-$(CONFIG_PHY_DA8XX_USB) += phy-da8xx-usb.o obj-$(CONFIG_PHY_EXYNOS_USBDRD) += phy-exynos-usbdrd.o obj-$(CONFIG_PHY_MTK_TPHY) += phy-mtk-tphy.o
drivers/phy/phy-axiado-emmc.c new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 2/4 mmc: Add Axiado SDHCI driver
In reply to Siu Ming TongAdd an SDHCI host controller driver (MMC_SDHCI_AXIADO) for the Arasan SDHCI controller found on the Axiado AX3005 SoC. The driver builds on the generic SDHCI framework and adds SoC-specific handling for signal voltage switching, HS200 tuning and eMMC PHY power sequencing through the generic PHY API.
--- MAINTAINERS | 1 + drivers/mmc/Kconfig | 7 + drivers/mmc/Makefile | 1 + drivers/mmc/axiado_sdhci.c | 311 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 320 insertions(+)
MAINTAINERS +1 -0
@@ -232,6 +232,7 @@ F: arch/arm/dts/ax3005* F: arch/arm/mach-axiado/ F: board/axiado/scm3005/ F: configs/ax3005_scm3005_defconfig +F: drivers/mmc/axiado_sdhci.c F: drivers/phy/phy-axiado-emmc.c F: include/configs/ax3005-scm3005.h
drivers/mmc/Kconfig +7 -0
@@ -114,6 +114,13 @@ config MMC_QUIRKS are enabled by default, other may require additional flags or are enabled by the host driver. +config MMC_SDHCI_AXIADO + bool "Axiado eMMC sdhci driver support" + depends on MMC + help + Enable this to support the Axiado eMMC sdhci found in the Ax3005 SoC. + This sdhci provides functionality for interface with sdhci driver. + config SYS_MMC_MAX_BLK_COUNT int "Block count limit" default 65535
drivers/mmc/Makefile +1 -0
@@ -56,6 +56,7 @@ obj-$(CONFIG_NEXELL_DWMMC) += nexell_dw_mmc.o 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_AXIADO) += axiado_sdhci.o obj-$(CONFIG_MMC_SDHCI_BCM2835) += bcm2835_sdhci.o obj-$(CONFIG_MMC_SDHCI_BCMSTB) += bcmstb_sdhci.o obj-$(CONFIG_MMC_SDHCI_CADENCE) += sdhci-cadence.o
drivers/mmc/axiado_sdhci.c new file +311 -0
311 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 3/4 arm: dts: ax3005: Add SDHCI, eMMC PHY and clock node
In reply to Siu Ming TongAdd device tree nodes for the Arasan SDHCI controller and the eMMC PHY on the AX3005 SoC, together with the supporting fixed clock (clk_xin), in ax3005.dtsi. Enable the SDHCI node in ax3005-scm3005.dts for the SCM3005 board.
--- arch/arm/dts/ax3005-scm3005.dts | 4 ++++ arch/arm/dts/ax3005.dtsi | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+)
arch/arm/dts/ax3005-scm3005.dts +4 -0
@@ -26,3 +26,7 @@ &uart3 { status = "okay"; }; + +&sdhci0 { + status = "okay"; +};
arch/arm/dts/ax3005.dtsi +25 -0
@@ -64,6 +64,12 @@ clock-frequency = <125000000>; bootph-pre-reloc; }; + + clk_xin: clk_xin { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + }; }; soc: soc {
@@ -96,5 +102,24 @@ bootph-pre-reloc; status = "disabled"; }; + + emmc_phy: emmc-phy@33301c00 { + compatible = "axiado,ax3005-emmc-phy"; + reg = <0x00 0x33301c00 0x00 0x100>; + #phy-cells = <0>; + }; + + sdhci0: mmc0@46000000 { + compatible = "axiado,ax3005-sdhci"; + reg = <0x0 0x46000000 0x00 0x1000>; + clock-names = "clk_xin"; + clocks = <&clk_xin>; + interrupt-parent = <&gic500>; + interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; + bus-width = <8>; + phys = <&emmc_phy>; + phy-names = "phy_arasan"; + status = "disabled"; + }; }; };
Signature · 1 line
2.34.1
PATCH 4/4 configs: ax3005_scm3005: Enable eMMC support
In reply to Siu Ming TongEnable the Axiado SDHCI (MMC_SDHCI_AXIADO) and eMMC PHY (PHY_AXIADO_EMMC) drivers on the SCM3005 board and store the environment in MMC (CONFIG_ENV_IS_IN_MMC / CONFIG_ENV_OVERWRITE). Increase CONFIG_SYS_MALLOC_LEN to 0x400000 to accommodate MMC operations.
--- configs/ax3005_scm3005_defconfig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
configs/ax3005_scm3005_defconfig +8 -2
@@ -5,7 +5,7 @@ CONFIG_TEXT_BASE=0x80000000 CONFIG_SYS_MONITOR_BASE=0x80000000 CONFIG_SYS_LOAD_ADDR=0x80100000 CONFIG_SYS_MALLOC_F_LEN=0x8000 -CONFIG_SYS_MALLOC_LEN=0x20000 +CONFIG_SYS_MALLOC_LEN=0x400000 CONFIG_SYS_BOOTM_LEN=0x20000000 CONFIG_ENV_SIZE=0x10000 CONFIG_ENV_OFFSET=0x5000
@@ -58,12 +58,18 @@ CONFIG_OF_CONTROL=y CONFIG_OF_SEPARATE=y CONFIG_DEFAULT_DEVICE_TREE="ax3005-scm3005" CONFIG_MULTI_DTB_FIT=y -# CONFIG_ENV_IS_IN_MMC is not set +CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_OVERWRITE=y CONFIG_DM_MMC=y # CONFIG_SUPPORT_EMMC_BOOT is not set CONFIG_MMC_IO_VOLTAGE=y CONFIG_MMC_UHS_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ADMA=y +CONFIG_MMC_SDHCI_AXIADO=y +CONFIG_PHY=y +CONFIG_PHY_AXIADO_EMMC=y CONFIG_TARGET_SCM3005=y CONFIG_CLK=y CONFIG_LZMA=y
Signature · 1 line
2.34.1
Quoted 4 lines · Siu Ming Tong
This series adds eMMC support for the Axiado SCM3005 board, based on the AX3005 SoC, which uses an Arasan SDHCI controller paired with a dedicated eMMC PHY.
Quoted 8 lines
The series is split as follows:
- Patch 1 adds the eMMC PHY driver (
PHY_AXIADO_EMMC). The PHY provides signal conditioning and DLL functionality required for high-speed operation with data rates beyond 52MHz, and is based on the Arasan PHY.[...]
Applied to u-boot/next, thanks!
[1/4] phy: Add Axiado eMMC PHY driver
commit: 21b087049df1936524e0470334459feaead8f052
[2/4] mmc: Add Axiado SDHCI driver
commit: f79df8488647a381f972d6e4c71daffa0ecc3a63
[3/4] arm: dts: ax3005: Add SDHCI, eMMC PHY and clock node
commit: bf622c66e6dcca6d336656b10813e185709878ad
[4/4] configs: ax3005_scm3005: Enable eMMC support
commit: f77229cb1ca1245b9383204d421a2f2f3b233eb5Signature · 1 line
Tom