Skip to content

Commit 5c95995

Browse files
committed
boards: art_pi2: Add SDMMC1 configuration with PLL2 kernel clock
Configure SDMMC1 with 4-bit bus width and card detection. Use PLL2S as kernel peripheral clock (150MHz) divided by 15 to achieve 10MHz SDMMC clock with clk-div = <13>. Signed-off-by: Shan Pen <[email protected]>
1 parent 0a8c58f commit 5c95995

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ART-Pi2 board configuration
2+
#
3+
# Copyright (c) 2025 Shan Pen <[email protected]>
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
if DISK_DRIVER_SDMMC
8+
9+
config SDMMC_STM32_CLOCK_CHECK
10+
default n
11+
12+
endif # DISK_DRIVER_SDMMC

boards/ruiside/art_pi2/art_pi2.dts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@
8080
status = "okay";
8181
};
8282

83+
&pll2 {
84+
div-m = <2>;
85+
mul-n = <50>;
86+
div-p = <2>;
87+
div-q = <2>;
88+
div-r = <2>;
89+
div-s = <4>;
90+
div-t = <2>;
91+
clocks = <&clk_hse>;
92+
status = "okay";
93+
};
94+
8395
&rcc {
8496
clocks = <&pll>;
8597
clock-frequency = <DT_FREQ_M(250)>;
@@ -98,6 +110,18 @@
98110
status = "okay";
99111
};
100112

113+
&sdmmc1 {
114+
pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
115+
&sdmmc1_d2_pc10 &sdmmc1_d3_pc11
116+
&sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>;
117+
pinctrl-names = "default";
118+
clk-div = <13>;
119+
bus-width = <4>;
120+
cd-gpios = <&gpion 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
121+
disk-name = "SD";
122+
status = "okay";
123+
};
124+
101125
&rng {
102126
status = "okay";
103127
};
@@ -116,4 +140,4 @@
116140

117141
&vbat {
118142
status = "okay";
119-
};
143+
};

0 commit comments

Comments
 (0)