Add MMC support for STM32H7 discovery and evaluation
Subsystems (3)
cover Add MMC support for STM32H7 discovery and evaluation
From: Patrice Chotard <[email protected]>
Add pinctrl and MMC nodes for both disco and eval boards Enable filesystem related flags to read different type of SD/MMC partition Fix drivers/mmc/Kconfig to remove obsolete DM_MMC_OPS flag
Patrice Chotard (7):
ARM: DTS: stm32: add SDMMC support for stm32h743 disco
ARM: DTS: stm32: add SDMMC support fo stm32h743-eval
dm: mmc: remove DM_MMC_OPS for STM32_SDMMC
configs: stm32h743-eval: enable SDMMC support
configs: stm32h743-disco: enable SDMMC support
configs: stm32h743-disco: enable filesystem related flags
configs: stm32h743-eval: enable filesystem related flags
arch/arm/dts/stm32h743-pinctrl.dtsi | 26 ++++++++++++++++++++++++++ arch/arm/dts/stm32h743.dtsi | 13 +++++++++++++ arch/arm/dts/stm32h743i-disco.dts | 9 +++++++++ arch/arm/dts/stm32h743i-eval.dts | 9 +++++++++ configs/stm32h743-disco_defconfig | 9 +++++++++ configs/stm32h743-eval_defconfig | 9 +++++++++ drivers/mmc/Kconfig | 2 +- 7 files changed, 76 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
PATCH 1/7 ARM: DTS: stm32: add SDMMC support for stm32h743 disco
From: Patrice Chotard <[email protected]>
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 discovery board.
--- arch/arm/dts/stm32h743-pinctrl.dtsi | 15 +++++++++++++++ arch/arm/dts/stm32h743.dtsi | 13 +++++++++++++ arch/arm/dts/stm32h743i-disco.dts | 9 +++++++++ 3 files changed, 37 insertions(+)
arch/arm/dts/stm32h743-pinctrl.dtsi +15 -0
@@ -244,6 +244,21 @@ slew-rate = <3>; }; }; + + sdmmc1_pins: sdmmc at 0 { + pins { + pinmux = <STM32H7_PC8_FUNC_SDMMC1_D0>, + <STM32H7_PC9_FUNC_SDMMC1_D1>, + <STM32H7_PC10_FUNC_SDMMC1_D2>, + <STM32H7_PC11_FUNC_SDMMC1_D3>, + <STM32H7_PC12_FUNC_SDMMC1_CK>, + <STM32H7_PD2_FUNC_SDMMC1_CMD>; + + slew-rate = <3>; + drive-push-pull; + bias-disable; + }; + }; }; }; };
arch/arm/dts/stm32h743.dtsi +13 -0
@@ -43,6 +43,7 @@ #include "skeleton.dtsi" #include "armv7-m.dtsi" #include <dt-bindings/clock/stm32h7-clks.h> +#include <dt-bindings/mfd/stm32h7-rcc.h> / { clocks {
@@ -120,6 +121,18 @@ compatible = "fixed-clock"; clock-frequency = <4000000>; }; + + sdmmc1: sdmmc at 52007000 { + compatible = "st,stm32-sdmmc2"; + reg = <0x52007000 0x1000>; + interrupts = <49>; + clocks = <&rcc SDMMC1_CK>; + resets = <&rcc STM32H7_AHB3_RESET(SDMMC1)>; + st,idma = <1>; + cap-sd-highspeed; + cap-mmc-highspeed; + status = "disabled"; + }; }; };
arch/arm/dts/stm32h743i-disco.dts +9 -0
@@ -60,6 +60,7 @@ aliases { serial0 = &usart2; + mmc0 = &sdmmc1; gpio0 = &gpioa; gpio1 = &gpiob; gpio2 = &gpioc;
@@ -98,3 +99,11 @@ st,sdram-refcount = <1539>; }; }; + +&sdmmc1 { + status = "okay"; + pinctrl-0 = <&sdmmc1_pins>; + pinctrl-names = "default"; + bus-width = <4>; + cd-gpios = <&gpioi 8 1>; +};
Signature · 1 line
1.9.1
PATCH 1/7 ARM: DTS: stm32: add SDMMC support for stm32h743 disco
Quoted 6 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 discovery board.
Signed-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/7c0782d5/attachment.sig>
PATCH 2/7 ARM: DTS: stm32: add SDMMC support fo stm32h743-eval
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 evaluation board.
Evaluation board needs a second pinctrl node "pinctrl_sdmmc1_level_shifter" to drive a level shifter on MMC bus.
--- arch/arm/dts/stm32h743-pinctrl.dtsi | 11 +++++++++++ arch/arm/dts/stm32h743i-eval.dts | 9 +++++++++ 2 files changed, 20 insertions(+)
arch/arm/dts/stm32h743-pinctrl.dtsi +11 -0
@@ -259,6 +259,17 @@ bias-disable; }; }; + + pinctrl_sdmmc1_level_shifter: sdmmc0_ls at 0 { + pins { + pinmux = <STM32H7_PB8_FUNC_SDMMC1_CKIN>, + <STM32H7_PB9_FUNC_SDMMC1_CDIR>, + <STM32H7_PC6_FUNC_SDMMC1_D0DIR>, + <STM32H7_PC7_FUNC_SDMMC1_D123DIR>; + drive-push-pull; + slew-rate = <3>; + }; + }; }; }; };
arch/arm/dts/stm32h743i-eval.dts +9 -0
@@ -98,3 +98,12 @@ st,sdram-refcount = <1539>; }; }; + +&sdmmc1 { + status = "okay"; + pinctrl-0 = <&sdmmc1_pins>, + <&pinctrl_sdmmc1_level_shifter>; + pinctrl-names = "default"; + bus-width = <4>; + st,dirpol; +};
Signature · 1 line
1.9.1
PATCH 2/7 ARM: DTS: stm32: add SDMMC support fo stm32h743-eval
Quoted 10 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 evaluation board.
Evaluation board needs a second pinctrl node "
pinctrl_sdmmc1_level_shifter" to drive a level shifter on MMC bus.Signed-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/27f198b4/attachment.sig>
PATCH 3/7 dm: mmc: remove DM_MMC_OPS for STM32_SDMMC
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Since e7881d85 "dm: mmc: Drop CONFIG_DM_MMC_OPS" DM_MMC_OPS is no more used, remove it from STM32_SDMMC2 dependencies
--- drivers/mmc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/Kconfig +1 -1
@@ -386,7 +386,7 @@ config GENERIC_ATMEL_MCI config STM32_SDMMC2 bool "STMicroelectronics STM32H7 SD/MMC Host Controller support" - depends on DM_MMC && BLK && OF_CONTROL && DM_MMC_OPS + depends on DM_MMC && BLK && OF_CONTROL help This selects support for the SD/MMC controller on STM32H7 SoCs. If you have a board based on such a SoC and with a SD/MMC slot,
Signature · 1 line
1.9.1
PATCH 3/7 dm: mmc: remove DM_MMC_OPS for STM32_SDMMC
Quoted 6 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Since
e7881d85"dm: mmc: DropCONFIG_DM_MMC_OPS"DM_MMC_OPSis no more used, remove it fromSTM32_SDMMC2dependenciesSigned-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/59b1fd68/attachment.sig>
PATCH 4/7 configs: stm32h743-eval: enable SDMMC support
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags
--- configs/stm32h743-eval_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/stm32h743-eval_defconfig +3 -0
@@ -16,12 +16,15 @@ CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FPGA is not set +CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_TIMER=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y +CONFIG_DM_MMC=y +CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set # CONFIG_SPL_SERIAL_PRESENT is not set CONFIG_REGEX=y
Signature · 1 line
1.9.1
PATCH 4/7 configs: stm32h743-eval: enable SDMMC support
Quoted 5 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Enable
CMD_MMC,DM_MMCandSTM32_SDMMC2flagsSigned-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/c19728ef/attachment.sig>
PATCH 5/7 configs: stm32h743-disco: enable SDMMC support
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags
--- configs/stm32h743-disco_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/stm32h743-disco_defconfig +3 -0
@@ -16,12 +16,15 @@ CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FPGA is not set +CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_TIMER=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y +CONFIG_DM_MMC=y +CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set # CONFIG_SPL_SERIAL_PRESENT is not set CONFIG_REGEX=y
Signature · 1 line
1.9.1
PATCH 5/7 configs: stm32h743-disco: enable SDMMC support
Quoted 5 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Enable
CMD_MMC,DM_MMCandSTM32_SDMMC2flagsSigned-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/9637f018/attachment.sig>
PATCH 6/7 configs: stm32h743-disco: enable filesystem related flags
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags
--- configs/stm32h743-disco_defconfig | 6 ++++++ 1 file changed, 6 insertions(+)
configs/stm32h743-disco_defconfig +6 -0
@@ -16,11 +16,17 @@ CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FPGA is not set +CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_TIMER=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM_MMC=y
Signature · 1 line
1.9.1
PATCH 6/7 configs: stm32h743-disco: enable filesystem related flags
Quoted 5 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags
Signed-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/d43c3ad0/attachment.sig>
PATCH 7/7 configs: stm32h743-eval: enable filesystem related flags
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags
--- configs/stm32h743-eval_defconfig | 6 ++++++ 1 file changed, 6 insertions(+)
configs/stm32h743-eval_defconfig +6 -0
@@ -16,11 +16,17 @@ CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FPGA is not set +CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NET is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_TIMER=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_DM_MMC=y
Signature · 1 line
1.9.1
PATCH 7/7 configs: stm32h743-eval: enable filesystem related flags
Quoted 5 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags
Signed-off-by Patrice Chotard <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/50c6bada/attachment.sig>