Skip to content

Commit 4740f1b

Browse files
committedMar 26, 2025
boards: st: stm32n6570_dk: configure and enable sdmmc2
Configure and enable SDMMC2 for the STM32N6570-DK. Also configure and enable the PLL2 and the IC4 to use them as a 48MHz source clock for the SDMMC. Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
1 parent 519d4c0 commit 4740f1b

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
 

‎boards/st/stm32n6570_dk/doc/index.rst

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ Default Zephyr Peripheral Mapping:
8787
- I2C4_SDA : PE14
8888
- LD1 : PO1
8989
- LD2 : PG10
90+
- SDMMC2_CK : PC2
91+
- SDMMC2_CMD : PC3
92+
- SDMMC2_D0 : PC4
93+
- SDMMC2_D1 : PC5
94+
- SDMMC2_D2 : PC0
95+
- SDMMC2_D3 : PE4
9096
- SPI5_SCK : PE15
9197
- SPI5_MOSI : PG2
9298
- SPI5_MISO : PH8

‎boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

+28
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@
5959
status = "okay";
6060
};
6161

62+
&pll2 {
63+
clocks = <&clk_hsi>;
64+
div-m = <4>;
65+
mul-n = <24>;
66+
div-p1 = <2>;
67+
div-p2 = <2>;
68+
status = "okay";
69+
};
70+
6271
&ic1 {
6372
pll-src = <1>;
6473
ic-div = <2>;
@@ -71,6 +80,12 @@
7180
status = "okay";
7281
};
7382

83+
&ic4 {
84+
pll-src = <2>;
85+
ic-div = <2>;
86+
status = "okay";
87+
};
88+
7489
&ic6 {
7590
pll-src = <1>;
7691
ic-div = <2>;
@@ -140,6 +155,19 @@
140155
status = "okay";
141156
};
142157

158+
&sdmmc2 {
159+
status = "okay";
160+
clocks = <&rcc STM32_CLOCK(AHB5, 7)>,
161+
<&rcc STM32_SRC_IC4 SDMMC2_SEL(2)>;
162+
pinctrl-0 = <&sdmmc2_d0_pc4 &sdmmc2_d1_pc5
163+
&sdmmc2_d2_pc0 &sdmmc2_d3_pe4
164+
&sdmmc2_ck_pc2 &sdmmc2_cmd_pc3>;
165+
pinctrl-names = "default";
166+
bus-width = <4>;
167+
cd-gpios = <&gpion 8 GPIO_ACTIVE_HIGH>;
168+
pwr-gpios = <&gpioq 7 GPIO_ACTIVE_HIGH>;
169+
};
170+
143171
&spi5 {
144172
clocks = <&rcc STM32_CLOCK(APB2, 20)>,
145173
<&rcc STM32_SRC_CKPER SPI5_SEL(1)>;

0 commit comments

Comments
 (0)