@@ -24,7 +24,7 @@ or a non-standard pin assignment. The exact subset of arguments supported will
2424vary from platform to platform.
2525
2626.. class :: SDCard(slot=1, width=1, cd=None, wp=None, sck=None, miso=None, mosi=None,
27- cs=None, cmd=None, data=None, freq=20000000)
27+ cs=None, cmd=None, data=None, ldo=None, freq=20000000)
2828
2929 This class provides access to SD or MMC storage cards using either
3030 a dedicated SD/MMC interface hardware or through an SPI channel.
@@ -60,6 +60,9 @@ vary from platform to platform.
6060 - *data * can be used to specify a list or tuple of SD data bus pins
6161 (ESP32-S3 only).
6262
63+ - *ldo * can be used to specify the internal LDO channel used for SD
64+ card logic level for SDIO 3.0 (ESP32-P4 only).
65+
6366 - *freq * selects the SD/MMC interface frequency in Hz.
6467
6568Implementation-specific details
@@ -188,6 +191,16 @@ parameters ``sck``, ``cs``, ``miso``, ``mosi`` as needed to assign pins.
188191In either mode the ``cd `` and ``wp `` pins default to disabled, unless set in the
189192constructor.
190193
194+ ESP32-P4
195+ ~~~~~~~~
196+
197+ The ESP32-P4 has multiple internal adjustable LDO regulators, and some boards use
198+ one of LDOs to control the SD card logic level required by SDIO 3.0. Most boards
199+ will automatically select the correct LDO channel, but it may be necessary to
200+ manually specify the ``ldo `` parameter as an integer (1 through 4). For example::
201+
202+ sd = SDCard(ldo=4)
203+
191204Other ESP32 chips
192205~~~~~~~~~~~~~~~~~
193206
0 commit comments