USB-C peripheral can power the host?

Hi,

We use Verdin iMX8M-Plus SoM on one of our projects.
The SoM on our custom carrier board has an USB-C port exactly like one on Dahlia Board.

The Linux on the SoM configured to act as a peripheral and as an USB Ethernet gadget.

We use this port to connect it to an iPad and iPad recognizes the SoM as an ethernet device.
All good.

But we have one problem in this configuration that, we can not source the power to the iPad therefore iPad dies once its batteries are depleted. Our SoM has an external power and it is capable to provide enough power to the iPad. But that must be done through USB-C port since iPad has only that port.

My question is that, can a SoM module configured as an peripheral (USB Ethernet gadget) act as an peripheral and at the same time it can deliver power to a Host (in this case iPad) ?

Thank you.

Not possible in peripheral mode. But it is possible to use USB Ethernet so that your board acts as the USB host and thus also provides power. At least with Android tablet this works (my custom board as RNDIS host, android as client), not sure about iOS.

1 Like

Hi @tuomas86,

Thank you for your reply. Usually when I plug an iPad or an Android phone to my PC (which is host), they are all recognized as storage devices.

Is it possible to change phone or tablet behavior to act as an ethernet device instead of a storage device?

In your case, did you need to configure Android to be an ethernet device, or somehow configure your SoM only to behave as an host and RNDIS? I’m not familiar with the terminology “RNDIS host”. Could you please little bit explain for me?

Thanks.

Yes when android connects to another DRP (dual role port) USB device, it uses some default setting, but also offers you to change the mode and decide which end is the controlling device.

By default, the controlling device is android tablet, and default mode “transferring files/android auto”, and on toradex board cdc_acm driver is loaded. By choosing “USB tethering” mode, rndis_host driver is loaded on toradex board and it provides android with IP address. (RNDIS is just one of the few USB Ethernet protocols).

I actually have an opposite problem, that I DON’T want that my device charges the android device, and I cannot get the connection working the other way like you did (tablet as host)… :slight_smile:

Sorry, this is probably not very useful to you, but maybe something to investige incase it works for your use case.

1 Like

Hi @tuomas86,

In our configuration, iPad is a host, and SoM is used with an USB NCM Ethernet gadget. RNDIS doesn’t work with iPad but NCM is recognized automatically. This configuration is fully ok for us but we can not charge the iPad :slight_smile:

We will look for an alternative solution, thank you for your prompt response.

Hi @Fide,

Could you please share your device-tree configuration for the USB-C so that we can check on our side and try to reproduce the issue?

Also, thanks @tuomas86 for helping out :smiley:

Hi @Fide,

Have you been able to make it work?

Best regards,

Hi @gclaudino.tx,

Yes, we had to enable CONFIG_USB_IPHETH in linux kernel defconfig and added usbmuxd recipe to make it work.

Thank you.

Hi @Fide,

Thanks for updating. I’ll tag the post as solved then :smiley:

1 Like