Skip to content

Commit 5fd343b

Browse files
darrenlu-ambiqkartben
authored andcommitted
dts: add SDIO support to apollo4p_evb
Update dts for using SDIO on apollo4p_evb. Signed-off-by: Darren Lu <[email protected]>
1 parent 129ccf9 commit 5fd343b

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

boards/ambiq/apollo4p_evb/apollo4p_evb-pinctrl.dtsi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,25 @@
171171
ambiq,iom-nce-module = <36>;
172172
};
173173
};
174+
sdio0_default: sdio0_default {
175+
group0 {
176+
pinmux = <SDIF_DAT1_P85>,
177+
<SDIF_DAT3_P87>,
178+
<SDIF_DAT4_P79>,
179+
<SDIF_DAT5_P80>,
180+
<SDIF_DAT6_P81>,
181+
<SDIF_DAT7_P82>;
182+
drive-strength = "1.0";
183+
};
184+
group1 {
185+
pinmux =
186+
<SDIF_DAT0_P84>,
187+
<SDIF_DAT2_P86>,
188+
<SDIF_CMD_P83>,
189+
<SDIF_CLKOUT_P88>;
190+
drive-strength = "1.0";
191+
bias-pull-up;
192+
ambiq,pull-up-ohms = <12000>;
193+
};
194+
};
174195
};

boards/ambiq/apollo4p_evb/apollo4p_evb.dts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
sw0 = &button0;
2727
sw1 = &button1;
2828
rtc = &rtc0;
29+
sdhc0 = &sdio0;
2930
};
3031

3132
leds {
@@ -154,6 +155,19 @@
154155
clk-source = <3>;
155156
};
156157

158+
&sdio0 {
159+
pinctrl-0 = <&sdio0_default>;
160+
pinctrl-names = "default";
161+
txdelay = <0>;
162+
rxdelay = <0>;
163+
status = "okay";
164+
mmc {
165+
compatible = "zephyr,mmc-disk";
166+
disk-name = "SD2";
167+
status = "okay";
168+
};
169+
};
170+
157171
zephyr_udc0: &usb {
158172
vddusb33-gpios = <&gpio96_127 7 (GPIO_PULL_UP)>;
159173
vddusb0p9-gpios = <&gpio96_127 5 (GPIO_PULL_UP)>;

dts/arm/ambiq/ambiq_apollo4p.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,17 @@
368368
status = "disabled";
369369
};
370370

371+
sdio0: sdio@40070000 {
372+
compatible = "ambiq,sdio";
373+
reg = <0x40070000 0x100>;
374+
interrupts = <26 0>;
375+
max-bus-freq = <96000000>;
376+
min-bus-freq = <375000>;
377+
power-delay-ms = <50>;
378+
status = "disabled";
379+
zephyr,pm-device-runtime-auto;
380+
};
381+
371382
usb: usb@400b0000 {
372383
compatible = "ambiq,usb";
373384
reg = <0x400B0000 0x4100>;

0 commit comments

Comments
 (0)