USB Host/Device selection for Core1106

  • Hello, the method to switch USB modes on the Luckfox Pico Pi is implemented by modifying the kernel device tree directly via luckfox-config. The DIP switch only changes the physical connection interface — the working mode still needs to be set manually.

    Since the RV1106 does not have an OTG_ID pin, it is not possible to achieve the functionality you need purely through the driver. A workaround is to use a regular GPIO as a substitute for the OTG_ID pin to detect whether the connected device is a host or a peripheral. Based on that, you can set the mode by writing peripheral or host to /sys/devices/platform/ff3e0000.usb2-phy/otg_mode (make sure the device tree sets dr_mode="otg").
  • Thank you.