Skip to content

Commit e761db3

Browse files
MCHP-MPU-Solutions-SHAcfriedt
authored andcommitted
boards: microchip: sam: add sdmmc device for sama7g5
Add sdmmc0 sdmmc1 for sama7g5-ek Signed-off-by: CHEN Xing <[email protected]>
1 parent 3a6ae2b commit e761db3

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

boards/microchip/sam/sama7g54_ek/sama7g54_ek.dts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
aliases {
2222
led0 = &led_green;
2323
sw0 = &button_user;
24+
sdhc0 = &sdmmc0;
25+
sdhc1 = &sdmmc1;
2426
};
2527

2628
chosen {
@@ -135,8 +137,83 @@
135137
bias-disable;
136138
};
137139
};
140+
141+
pinctrl_sdmmc0_default: sdmmc0_default {
142+
cmd_data {
143+
pinmux = <PIN_PA1__SDMMC0_CMD>,
144+
<PIN_PA3__SDMMC0_DAT0>,
145+
<PIN_PA4__SDMMC0_DAT1>,
146+
<PIN_PA5__SDMMC0_DAT2>,
147+
<PIN_PA6__SDMMC0_DAT3>,
148+
<PIN_PA7__SDMMC0_DAT4>,
149+
<PIN_PA8__SDMMC0_DAT5>,
150+
<PIN_PA9__SDMMC0_DAT6>,
151+
<PIN_PA10__SDMMC0_DAT7>;
152+
bias-pull-up;
153+
};
154+
155+
ck_cd_rstn_vddsel {
156+
pinmux = <PIN_PA0__SDMMC0_CK>,
157+
<PIN_PA2__SDMMC0_RSTN>,
158+
<PIN_PA11__SDMMC0_DS>;
159+
bias-pull-up;
160+
};
161+
};
162+
163+
pinctrl_sdmmc1_default: sdmmc1_default {
164+
cmd_data {
165+
pinmux = <PIN_PB29__SDMMC1_CMD>,
166+
<PIN_PB31__SDMMC1_DAT0>,
167+
<PIN_PC0__SDMMC1_DAT1>,
168+
<PIN_PC1__SDMMC1_DAT2>,
169+
<PIN_PC2__SDMMC1_DAT3>;
170+
bias-pull-up;
171+
};
172+
173+
ck_cd_rstn_vddsel {
174+
pinmux = <PIN_PB30__SDMMC1_CK>,
175+
<PIN_PB28__SDMMC1_RSTN>,
176+
<PIN_PC5__SDMMC1_1V8SEL>,
177+
<PIN_PC4__SDMMC1_CD>;
178+
bias-pull-up;
179+
};
180+
};
181+
138182
};
139183

140184
&pit64b0 {
141185
clock-frequency = <DT_FREQ_M(10)>;
142186
};
187+
188+
&sdmmc0 {
189+
pinctrl-names = "default";
190+
pinctrl-0 = <&pinctrl_sdmmc0_default>;
191+
max-bus-freq = <DT_FREQ_M(208)>;
192+
non-removable;
193+
bus-width = <8>;
194+
no-1-8-v;
195+
auto-cmd23;
196+
status = "okay";
197+
198+
sdmmc {
199+
compatible = "zephyr,mmc-disk";
200+
disk-name = "SD2";
201+
status = "okay";
202+
};
203+
};
204+
205+
&sdmmc1 {
206+
pinctrl-names = "default";
207+
pinctrl-0 = <&pinctrl_sdmmc1_default>;
208+
max-bus-freq = <DT_FREQ_M(208)>;
209+
no-1-8-v;
210+
rstn-power-en;
211+
auto-cmd12;
212+
status = "okay";
213+
214+
sdmmc {
215+
compatible = "zephyr,sdmmc-disk";
216+
disk-name = "SD";
217+
status = "okay";
218+
};
219+
};

boards/microchip/sam/sama7g54_ek/sama7g54_ek.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ toolchain:
99
- zephyr
1010
ram: 128
1111
supported:
12+
- sdhc
1213
- shell
1314
- uart
1415
vendor: microchip

0 commit comments

Comments
 (0)