Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: st: add eMMC support on STM32MP257F-DK
@ 2026-09-12 20:45 Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 1/3] arm64: dts: st: add sdmmc2 node on stm32mp251 Mateusz Nowicki
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mateusz Nowicki @ 2026-09-12 20:45 UTC (permalink / raw)
  To: alexandre.torgue, mcoquelin.stm32
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add the SDMMC2 controller, its 8-bit pin groups and enable the
8-Gbyte eMMC of the STM32MP257F-DK. Only MMC High Speed for now.

Tested on STM32MP257F-DK.

Mateusz Nowicki (3):
  arm64: dts: st: add sdmmc2 node on stm32mp251
  arm64: dts: st: add sdmmc2 pins on stm32mp25
  arm64: dts: st: enable eMMC on stm32mp257f-dk

 arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi | 69 +++++++++++++++++++
 arch/arm64/boot/dts/st/stm32mp251.dtsi        | 15 ++++
 arch/arm64/boot/dts/st/stm32mp257f-dk.dts     | 21 ++++++
 3 files changed, 105 insertions(+)

-- 
2.55.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] arm64: dts: st: add sdmmc2 node on stm32mp251
  2026-09-12 20:45 [PATCH 0/3] arm64: dts: st: add eMMC support on STM32MP257F-DK Mateusz Nowicki
@ 2026-09-12 20:45 ` Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 2/3] arm64: dts: st: add sdmmc2 pins on stm32mp25 Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 3/3] arm64: dts: st: enable eMMC on stm32mp257f-dk Mateusz Nowicki
  2 siblings, 0 replies; 4+ messages in thread
From: Mateusz Nowicki @ 2026-09-12 20:45 UTC (permalink / raw)
  To: alexandre.torgue, mcoquelin.stm32
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add the SDMMC2 controller, the same PL18x/SDMMC2 block as SDMMC1 with
its own delay block in SYSCFG (DLYBSD2). It is used for the eMMC on
the STM32MP257F-DK and STM32MP257F-EV1 boards.

Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
---
 arch/arm64/boot/dts/st/stm32mp251.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index 9c63fdb5a885..0d10023ec1e3 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -1667,6 +1667,21 @@ sdmmc1: mmc@48220000 {
 				status = "disabled";
 			};
 
+			sdmmc2: mmc@48230000 {
+				compatible = "st,stm32mp25-sdmmc2", "arm,pl18x", "arm,primecell";
+				arm,primecell-periphid = <0x00353180>;
+				reg = <0x48230000 0x400>, <0x44230800 0x8>;
+				interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&rcc CK_KER_SDMMC2>;
+				clock-names = "apb_pclk";
+				resets = <&rcc SDMMC2_R>;
+				cap-sd-highspeed;
+				cap-mmc-highspeed;
+				max-frequency = <120000000>;
+				access-controllers = <&rifsc 77>;
+				status = "disabled";
+			};
+
 			ethernet1: ethernet@482c0000 {
 				compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20";
 				reg = <0x482c0000 0x4000>;
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] arm64: dts: st: add sdmmc2 pins on stm32mp25
  2026-09-12 20:45 [PATCH 0/3] arm64: dts: st: add eMMC support on STM32MP257F-DK Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 1/3] arm64: dts: st: add sdmmc2 node on stm32mp251 Mateusz Nowicki
@ 2026-09-12 20:45 ` Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 3/3] arm64: dts: st: enable eMMC on stm32mp257f-dk Mateusz Nowicki
  2 siblings, 0 replies; 4+ messages in thread
From: Mateusz Nowicki @ 2026-09-12 20:45 UTC (permalink / raw)
  To: alexandre.torgue, mcoquelin.stm32
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add the 8-bit bus pin groups of SDMMC2 on port E, used by the eMMC
on the STM32MP257F-DK.

Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
---
 arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi | 69 +++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi b/arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi
index 456ece7f8ebc..ad55791a72fc 100644
--- a/arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi
@@ -431,6 +431,75 @@ pins {
 		};
 	};
 
+	/omit-if-no-ref/
+	sdmmc2_b8_pins_a: sdmmc2-b8-0 {
+		pins1 {
+			pinmux = <STM32_PINMUX('E', 13, AF12)>, /* SDMMC2_D0 */
+				 <STM32_PINMUX('E', 11, AF12)>, /* SDMMC2_D1 */
+				 <STM32_PINMUX('E', 8,  AF12)>, /* SDMMC2_D2 */
+				 <STM32_PINMUX('E', 12, AF12)>, /* SDMMC2_D3 */
+				 <STM32_PINMUX('E', 10, AF12)>, /* SDMMC2_D4 */
+				 <STM32_PINMUX('E', 9,  AF12)>, /* SDMMC2_D5 */
+				 <STM32_PINMUX('E', 6,  AF12)>, /* SDMMC2_D6 */
+				 <STM32_PINMUX('E', 7,  AF12)>, /* SDMMC2_D7 */
+				 <STM32_PINMUX('E', 15, AF12)>; /* SDMMC2_CMD */
+			slew-rate = <2>;
+			drive-push-pull;
+			bias-disable;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('E', 14, AF12)>; /* SDMMC2_CK */
+			slew-rate = <3>;
+			drive-push-pull;
+			bias-disable;
+		};
+	};
+
+	/omit-if-no-ref/
+	sdmmc2_b8_od_pins_a: sdmmc2-b8-od-0 {
+		pins1 {
+			pinmux = <STM32_PINMUX('E', 13, AF12)>, /* SDMMC2_D0 */
+				 <STM32_PINMUX('E', 11, AF12)>, /* SDMMC2_D1 */
+				 <STM32_PINMUX('E', 8,  AF12)>, /* SDMMC2_D2 */
+				 <STM32_PINMUX('E', 12, AF12)>, /* SDMMC2_D3 */
+				 <STM32_PINMUX('E', 10, AF12)>, /* SDMMC2_D4 */
+				 <STM32_PINMUX('E', 9,  AF12)>, /* SDMMC2_D5 */
+				 <STM32_PINMUX('E', 6,  AF12)>, /* SDMMC2_D6 */
+				 <STM32_PINMUX('E', 7,  AF12)>; /* SDMMC2_D7 */
+			slew-rate = <2>;
+			drive-push-pull;
+			bias-disable;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('E', 14, AF12)>; /* SDMMC2_CK */
+			slew-rate = <3>;
+			drive-push-pull;
+			bias-disable;
+		};
+		pins3 {
+			pinmux = <STM32_PINMUX('E', 15, AF12)>; /* SDMMC2_CMD */
+			slew-rate = <2>;
+			drive-open-drain;
+			bias-disable;
+		};
+	};
+
+	/omit-if-no-ref/
+	sdmmc2_b8_sleep_pins_a: sdmmc2-b8-sleep-0 {
+		pins {
+			pinmux = <STM32_PINMUX('E', 13, ANALOG)>, /* SDMMC2_D0 */
+				 <STM32_PINMUX('E', 11, ANALOG)>, /* SDMMC2_D1 */
+				 <STM32_PINMUX('E', 8,  ANALOG)>, /* SDMMC2_D2 */
+				 <STM32_PINMUX('E', 12, ANALOG)>, /* SDMMC2_D3 */
+				 <STM32_PINMUX('E', 10, ANALOG)>, /* SDMMC2_D4 */
+				 <STM32_PINMUX('E', 9,  ANALOG)>, /* SDMMC2_D5 */
+				 <STM32_PINMUX('E', 6,  ANALOG)>, /* SDMMC2_D6 */
+				 <STM32_PINMUX('E', 7,  ANALOG)>, /* SDMMC2_D7 */
+				 <STM32_PINMUX('E', 15, ANALOG)>, /* SDMMC2_CMD */
+				 <STM32_PINMUX('E', 14, ANALOG)>; /* SDMMC2_CK */
+		};
+	};
+
 	/omit-if-no-ref/
 	spi3_pins_a: spi3-0 {
 		pins1 {
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] arm64: dts: st: enable eMMC on stm32mp257f-dk
  2026-09-12 20:45 [PATCH 0/3] arm64: dts: st: add eMMC support on STM32MP257F-DK Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 1/3] arm64: dts: st: add sdmmc2 node on stm32mp251 Mateusz Nowicki
  2026-09-12 20:45 ` [PATCH 2/3] arm64: dts: st: add sdmmc2 pins on stm32mp25 Mateusz Nowicki
@ 2026-09-12 20:45 ` Mateusz Nowicki
  2 siblings, 0 replies; 4+ messages in thread
From: Mateusz Nowicki @ 2026-09-12 20:45 UTC (permalink / raw)
  To: alexandre.torgue, mcoquelin.stm32
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Enable the 8-Gbyte eMMC v5.1 connected to SDMMC2 with an 8-bit bus.
Faster 1.8V modes are not enabled as they could not be tested yet.

Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
---
 arch/arm64/boot/dts/st/stm32mp257f-dk.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp257f-dk.dts b/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
index 8daf3dfd5133..8c6aabac367e 100644
--- a/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
+++ b/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
@@ -21,6 +21,8 @@ / {
 	aliases {
 		ethernet0 = &ethernet1;
 		serial0 = &usart2;
+		mmc0 = &sdmmc1;
+		mmc1 = &sdmmc2;
 	};
 
 	chosen {
@@ -231,6 +233,10 @@ scmi_vddio1: regulator@0 {
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <3300000>;
 	};
+	scmi_vddio2: regulator@1 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+	};
 	scmi_vddcore: regulator@11 {
 		reg = <VOLTD_SCMI_STPMIC2_BUCK2>;
 		regulator-name = "vddcore";
@@ -279,6 +285,21 @@ &sdmmc1 {
 	status = "okay";
 };
 
+&sdmmc2 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc2_b8_pins_a>;
+	pinctrl-1 = <&sdmmc2_b8_od_pins_a>;
+	pinctrl-2 = <&sdmmc2_b8_sleep_pins_a>;
+	non-removable;
+	no-sd;
+	no-sdio;
+	st,neg-edge;
+	bus-width = <8>;
+	status = "okay";
+	vmmc-supply = <&scmi_vdd_emmc>;
+	vqmmc-supply = <&scmi_vddio2>;
+};
+
 &usart2 {
 	pinctrl-names = "default", "idle", "sleep";
 	pinctrl-0 = <&usart2_pins_a>;
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-12 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-12 20:45 [PATCH 0/3] arm64: dts: st: add eMMC support on STM32MP257F-DK Mateusz Nowicki
2026-09-12 20:45 ` [PATCH 1/3] arm64: dts: st: add sdmmc2 node on stm32mp251 Mateusz Nowicki
2026-09-12 20:45 ` [PATCH 2/3] arm64: dts: st: add sdmmc2 pins on stm32mp25 Mateusz Nowicki
2026-09-12 20:45 ` [PATCH 3/3] arm64: dts: st: enable eMMC on stm32mp257f-dk Mateusz Nowicki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox