Changes

Jump to: navigation, search

DESK-MX6UL-L/Peripherals/SD

4,458 bytes added, 09:50, 21 April 2021
Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le..."
<section begin=History/>
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Apr 2021
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK release
|-
|-
|}
<section end=History/>
<section begin=Body/>

==Peripheral SD==

=== Device tree configuration ===
Here below an example of device tree configuration used on standard DAVE's kit for the [[AXEL ULite SOM]]:

From <code>imx6ul-lynx-som0013.dtsi</code>:

<pre>
&usdhc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1>;
cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
no-1-8-v;
keep-power-in-suspend;
enable-sdio-wakeup;
status = "okay";
};
...
...
&iomuxc {
...
...
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059
MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10071
MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x17059
MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x17059
MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059
MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD2 CD */
>;
};
...
...
};
</pre>

The USDHC interface is re-configured on carrier device tree because of the ''Card Detect'' pin (which is related to the real board hardware implementation).

===Accessing the peripheral===

Once initialized, the SD device is mapped to the standard <code>/dev/mmcblk0pX</code> block device, depending on how many partition are created on the SD card.

====Linux messages at boot time====

If the microSd card is inserted at boot time, the kernel - once the USDHC interface has been initialized - prints the device information and the partition detected like ''p1'', ''p2'', etc.:

<pre class="workstation-terminal">
...
...
[ 3.656628] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
[ 3.723545] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[ 3.781083] mmc0: host does not support reading read-only switch, assuming write-enable
[ 3.795391] mmc0: new high speed SDHC card at address 59b4
[ 3.802522] mmcblk0: mmc0:59b4 USDU1 14.9 GiB
[ 3.819777] mmcblk0: p1 p2
[ 3.883026] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
...
...
[ 5.270986] EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 subsystem
[ 5.335083] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)...
[ 4.857362] EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 subsystem
[ 4.877965] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
</pre>

=== Additional information ===
If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:

<pre class="workstation-terminal">
root@desk-mx6ul-axelulite:~# mkdir -p /mnt/boot
root@desk-mx6ul-axelulite:~# mount /dev/mmcblk0p1 /mnt/boot
[ 699.148927] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@desk-mx6ul-axelulite:~#
</pre>

and then the mounted partition is available on the ''/mnt/boot'' root file system directory.

----

[[Category:AXEL ULite]]
8,226
edits

Navigation menu