jasonbu opened a new pull request, #18501:
URL: https://github.com/apache/nuttx/pull/18501

   ## Summary
   Add GPIO and eMMC (USDHC) support for the i.MX95 A55 EVK board, enabling 
8-bit eMMC access with MBR/GPT partition table parsing.
   
   ## Changes
   
   ### 1. `imx9: add GPIO support for imx95`
   - Add imx95 GPIO register definitions (same IP block as imx93)
   - Fill `g_gpio_base[]` array for imx95
   - Include `imx95_gpio.h` from the common header
   - Compile `imx9_gpio.c` / `imx9_gpiobase.c` for imx95 in cmake
   
   ### 2. `imx95-a55-evk: add USDHC eMMC driver support`
   - Create `imx95_pinmux.h` / `imx95_ccm.h` / `imx95_pll.h` hardware 
definitions for imx95
   - Add USDHC1 8-bit eMMC pin mux and clock macros to `board.h`
   - Create board-level `imx9_usdhc.c` glue code
   - Update `imx9_bringup.c` with DMA allocator and USDHC init
   - Add `CONFIG_IMX9_CLK_OVER_SCMI` compile-time guards in `imx9_usdhc.c` to 
isolate the IMX95 SCMI clock path from the existing IMX93 direct-CCM path — no 
functional change for IMX93
   
   ### 3. `imx9: usdhc fix dmapreflight rejecting small unaligned buffers`
   - `imx9_dmapreflight()` rejected unaligned buffers unconditionally, but 
`dmarecvsetup()` has a bounce path via `priv->rxbuffer` for small transfers
   - Add a `buflen > sizeof(priv->rxbuffer)` check so that small reads (e.g. 
ext_csd 512-byte stack buffer) can use the bounce buffer instead of failing 
with `-EFAULT`
   
   ### 4. `imx95-a55-evk: add MBR/GPT partition table parsing on eMMC`
   - Parse the partition table on `/dev/mmcsd0` during board bringup and 
register each partition as `/dev/mmcsd0pN`
   - Add custom MBR handler for unnamed partition entries
   
   ## Impact
   
   - IMX93 code paths are fully preserved behind `#ifndef 
CONFIG_IMX9_CLK_OVER_SCMI` guards — zero functional change for existing IMX93 
boards
   - The `dmapreflight` fix is a generic improvement that benefits all imx9 
USDHC users
   - If using i.mx95-FRDM EVK, able to mount the /boot partition same with 
uboot/linux, after patch.
   
   ## Testing
   
   Verified on i.MX95 FRDM EVK:
   - eMMC device recognized and initialized (8-bit mode)
   - Partition table parsed, partitions registered
   - `mount -t vfat /dev/mmcsd0p0 /data` works
   
   ```bash
   nsh> mount -t vfat /dev/mmcsd0p0 /data
   nsh> ls -l /data/nuttx.bin
    -rw-rw-rw-      515184 /data/nuttx.bin
   ```
   
   ostest passed in i.MX95 FRDM EVK
   ```
   [2026-03-06 17:57:11] user_main: Exiting
   [2026-03-06 17:57:11] ostest_main: Exiting with status 0
   [2026-03-06 17:57:11] nsh> 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to