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

   ## Summary
     
     - arch/arm/stm32: Move the STM32H7 OTG device and host drivers to common
       (`stm32_otgdev_v2.c`, `stm32_otghost_v2.c`), selected by
       `STM32_HAVE_IP_OTG_V2`.
     - arch/arm/stm32: Build the OTG v2 drivers only for a role the chip
       supports.
     - arch/arm/stm32n6: Add USB host support. USB1 or USB2 OTG HS runs the
       common host driver at full and low speed on its embedded HS PHY, which
       `stm32_otg_phyif.c` powers and clocks. After the root port reset the host
       waits for the port to be enabled. Before this, a device that reconnected
       after the reset lost the first SETUP.
     - boards/stm32n6570-dk: Add the USB host on the USB2 Type-A connector (VBUS
       switch on PB9) or the USB1 Type-C connector (VBUS through the TCPP03), 
and
       the `usbhost` configuration (USB mass storage and FAT). 
   - arch/arm/stm32: Wait for the port enable after the OTG host port reset.
      A device can reconnect after the root port reset; the connect interrupt
      then reset the port again while the first SETUP was in flight. 
       
   ## Impact
       
     - STM32H7 OTG users: the drivers move to `arch/arm/src/common/stm32/`. The
       Kconfig options and board code are unchanged.
     - STM32N6: new USB host support. USB device mode is not supported yet.
       
   ## Testing
       
     STM32N6570-DK, `usbhost`, USB2 Type-A port with a FAT flash drive:
     
         nsh> mount -t vfat /dev/sda /mnt
         nsh> echo hello > /mnt/n6test.txt
         nsh> cat /mnt/n6test.txt
         hello
         nsh> dd if=/dev/zero of=/mnt/big.bin bs=4096 count=256
         1048576 bytes (256 blocks) copied, 8280000 usec, 123 KB/s
         nsh> dd if=/mnt/big.bin of=/dev/null bs=4096
         1048576 bytes (256 blocks) copied, 7740000 usec, 132 KB/s
         nsh> umount /mnt
         
     The drive was detected on every boot (3 of 3 runs), and the files were
     still there after a remount.
         
     USB1 (Type-C) is not tested on hardware.


-- 
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]

  • [PR] arch/arm/stm32n6: Add US... raiden00pl (via GitHub) via commits

Reply via email to