Dahlia Board with Verdin iMX8M-Plus: USB-C power role change


We have a Dahlia Board v1.1C with Verdin iMX8M-Plus v1.0D and running Toradex Reference Multimedia Image v5.7 on it. (Linux verdin-imx8mp-07174279 5.4.193-5.7.0+git.f78299297185 #1 SMP PREEMPT Mon Jul 11 14:42:03 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux)

I have connected an iPad to Dahlia board’s USB-C DRP port. I want to charge iPad from this port but that is not happening. According to another forum, following commands should be enough to change the power roles. But Toradex Linux seems doesn’t have such a folder to switch the roles.

> echo source >/sys/class/typec/port0/power_role
> cat /sys/class/typec/port0/power_role
[source] sink

Any idea, how we can charge the iPad and keep RNDIS peripheral device active on the SoM side?

Thank you.

Hi @Fide !

We have some comments about this, although we didn’t check with the experts yet.

On Dahlia, the USB that is dual role capable (X3A, if I am not wrong), is actually only USB 2.0 capable. And from the remark on the schematics, we can see that for this case, we have only 0.5A. On 5V, this will be 2.5W. Is this enough to charge an iPad?

Also, from the Linux kernel documentation, to enable the typec on sysfs (/sys/class/typec/port0/power_role) , seems like the usb-c-connector is needed:



About this, more research is needed.

Best regards,

Hi @henrique.tx,

we can see that for this case, we have only 0.5A. On 5V, this will be 2.5W. Is this enough to charge an iPad?

When I plug it to an USB2.0 port on an old PC, it starts charging.

Regulator on the Dahlia board AOZ1353 supports up to 3.5A. But since PORT pin is floating, it advertised as 500mA capable only. But rather than the charging capacity, my actual problem is that I don’t see any attempt to charge external hosts like iPad or iPhone.

According to my study USB-C supports that SoM can be a peripheral (RNDIS gadget) and iPad/iPhone can have a host role and still sinks power from the SoM side. And as I see Dahlia schematics support that but not linux.

I believe that there must be a way to configure it on linux so that the electronics starts charging iPad/iPhone which is host.


Hi @henrique.tx,

Any update on the topic?

Thank you.

Hi @Fide !

Sorry for the delay.

Please check this webinar about USB-C from one of Toradex’s Hardware Experts: Peter Lischer

At time 59min50s, Peter answers a question about charging devices from Dahlia’s or Verdin Developer Board’s USB-C connector.

I also recommend watching the whole video, since Peter shares very important information related to USB-C standards.

Best regards,

Hi @henrique.tx,

I have attended to the webinar. That question was mine. But unfortunately the answer was not targeting my question. iPad for sure accepts any standard USB voltages including 5V and 900mA for charging and yet this is still not the case for Dahlia board. The reason is not clear.

Thank you.

Hi @Fide !

I see…

For a quick test, I connected a Samsung S20 FE (Android 12) to the Verdin Development Board V1.1A & Verdin iMX8M Mini V1.1A running Reference Minimal Image from BSP 5.7.0 using a USB-C/USB-C cable and the phone is charging.

Really seems like iPad might need some special support on Linux side.

Best regards,

Hi @henrique.tx ,

I just made another test using Samsung Galaxy A12 Phone which has embedded USB-C port.

When I plug the phone to Dahlia board’s USB DRP socket directly with an USB-C to USB-C cable, on the top left of the phone’s screen I see that an USB logo appears which means the phone recognizes the Dahlia Board but the phone is not being charged.

Isn’t Development board same as Dahlia board in terms of USB connectivity? Next week I can test it on development board as well. We have that too but currently another colleague using it.

Please also note that: As I remember minimal image does’t have USB Gadget RNDIS enabled. You should use Toradex Reference Multimedia Image v5.7 for testing.



I’m new to USB C and watched that useful webinar.

As I understand it, simple CC pins role configuration with IC like TUSB321 allows a) DFP (host with power source), b) UFP (device with power sink), or c) DRP (like OTG, switching between DFP and UFP, simultaneously host<>device and source<>sink). Power role switch without device<>host role switch has stronger requirements. Special comms protocol over CCx/VBUS lets cable ends negotiating role switch so that nothing blows on any cable end. PTN5100 mentioned on webinar Notebook Example slide is one of such advanced IC’s. TPS6598x list of role swap requirements on page 7 may give you a clue what do those IC’s
TPS6598x Power and Data Role Swaps (Rev. A) (ti.com)

Minimal image indeed includes RNDIS gadget.

Not sure about phones with USB C, but I guess by default it should just connect to power supply as UFP. Sharing pictures or files is UFP, internet tethering is UFP as well. As I understand @Fide was asking about iPhone initially in DFP mode and power role switching to iPhone = power sink, and Verdin = power source. So switching your Android phone to host somehow should make Verdin board stop charging it.

We support IP connection from iPhone to USB A on our board. Iphone (at least version we tested) for some very smart reason allows sharing only mobile internet, but not Wi-Fi. Anyway, while mobile network sharing is established (and of course iPhone keeps charging from our host), app on iPhone is able to TCP/IP communicate with our USB host (usbmuxd, ipheth, service for pairing with iPhone and voila, we are connected). So, if indeed you operate with iPhone in host mode, there still should be a way to connect it as device.



Hi @Fide .

Taking a look at the Reference Minimal Image from BSP 5.7.0, there are USB RNDIS related files:

root@verdin-imx8mp-06849036:/# cat /etc/os-release
NAME="TDX Wayland with XWayland"
VERSION="5.7.0+build.20 (dunfell)"
PRETTY_NAME="TDX Wayland with XWayland 5.7.0+build.20 (dunfell)"
root@verdin-imx8mp-06849036:/# find / -name "*rndis*"

Best regards,

Hi @Fide !

I am following up with some tests on your hunch Minimal vs Multimedia Reference Image regarding phone charging over USB-C.

As I am using only Verdin Development Board (V1.1A), I am talking about connector X34, marked as USB DRP on the carrier board.

I tested 2 modules:

  • Verdin iMX8M Mini DL 1Gb V1.1A
  • Verdin iMX8M Plus Quad 4Gb WB IT V1.0b

And 2 images from BSP 5.7.0:

  • Reference Minimal
    • on Verdin Mini and on Verdin Plus
  • Reference Multimedia
    • on Verdin Mini and on Verdin Plus

And the smartphone is the same as above: Samsung S20 FE with Android 12.

These are the results for the question “Does the phone charge?”:

Modules On Reference Minimal On Reference Multimedia
Verdin iMX8M Mini DL 1Gb V1.1A YES YES
Verdin iMX8M Plus Quad 4Gb WB IT V1.0b NO NO

So, seems like there is either something related to the module Verdin iMX8M Plus itself or something related to the setup on the Reference Minimal Image for Verdin iMX8M Plus (since the Reference Multimedia Image “includes” the Minimal).

What I understand from this is that Verdin Development carrier board is capable (at least at some level) of power delivery using the port X34.

Right now I also don’t if USB-C power delivery capability is meant to be a feature or not.

I will bring these results to be internally discussed and I will update this thread as soon as I get feedback.

Thanks for bringing this up, @Fide. And thank you @Edward for your contribution, which is always greatly appreciated :slight_smile:

Best regards,

Hi @Fide, how are you?

In complement to what @henrique.tx has said, we did some additional tests with the Verdin iMX8MP V1.1A and it’s indeed able to charge a cellphone. We tested it with a similar setup and an Iphone.

If you have a look at the module’s errata: https://docs.toradex.com/109492-verdin-imx8m-plus-errata.pdf you can see that on the V1.0 of the modules there was a problem with the USB and this explains why we weren’t able to do power delivery with this module and version.

Does this help you?

Best regards,

Hi @Fide !

I was informed that you received some Verdin iMX8MP V1.1A. Is that right?

Were you able to test its phone charging capabilities?

Best regards,

Hi @henrique.tx,

Yes we have received the modules with v1.1A. I had a chance to do couple of tests.

I observed that new modules attempts to charge iPad when I first plug it. But after a few second iPad reports back that “it is not charging”

I conducted the same test on a Samsung Phone which has build in USB-C port. There it seems working fine.

Then I installed R18 10Kohm on IC5 to make Dahlia board 5V and 3A capable. After this modification both Samsung and iPad stopped charging and the module started behaving exactly like v1.0D.

Hi @Fide !

Thanks for the feedback. I also had access to the video that you share with your account manager.

From this, we can conclude that both hardware and software supports charging devices, right?

Your requirement is specifically to charge Apple devices? Does it work iPhone?

If iPad and iPhone don’t charge, maybe there is a need for some software support for charging Apple devices… :thinking:

If iPad doesn’t charge, but iPhone does, might still be a lack of software support (who knows what Apple does under the hood :stuck_out_tongue_winking_eye: ) or maybe iPad is too hungry?

Best regards,

Subject is about USB-C power role change (as I understand from first message, power role switch independently from device<>host role switch). I think changing just power role is not supported on Dahlia. I’d love to be clear, are we talking about independent power role switch or not?

iPad must be much more power hangrier than iPhone. Googling for a minute gives a lot of results, overall impression that older iPads do charge even from PC and all cheap power banks and newer ones deny most of sources and may require wall adapter with >5V power delivery.

1 Like

I have only just started to work with Toradex in general and therefore have no experience in the software area,
but since our product is also going in a similar direction to @Fide, I tried some things with USB-C, maybe I can help someone

I have the following hardware:

  • Verdin Development Board V1.1C
  • Verdin MX8MP Q 4GB IT V1.1A

I was able to use a USB-Tester to measure the output current of diffrent devices.
The maximun output current of the Development Board is 0.9A.
Equipping with 500K or 10K does not change that.
(Are software changes necessary to get the specified current of 1.5A or 3A?)

Especially with regard to the Ipad, the limit of “charging” seems to be around 1A.
The iPhone, for example, charges at 0.9A.

Tested with some other power sources:

Power Source Output Ipad Status
Verdin Development Board approx. 0.9A "does not charge"
PC approx. 0.5A "does not charge"
USB hub (externally supplied) approx. 1.4A "charging"
USB Wall Adapter (1A) approx. 1.1A "charging"

P.S.: The Ipad shows “Not charging” but is still supplied with the 0.9A, which is enough to slowly charge it (in standby).

I guess this Ipad simply doesn’t care about USB-C standard and uses legacy USB charger methods like this

From https://www.instructables.com/Modify-a-cheap-USB-charger-to-feed-an-iPod-iPhone/

“Nowadays the iPhone expects a certain voltage on those two pins to decide how much current to absorb from the charger. Putting a 2.0 V voltage on both the pins the iPhone will absorb about 500 mA, while with 2.8 V on D- and 2.0 V on D+ it will absorb about 1000 mA.
The same behaviour I expected to be observed on my iPod.”

Hi all!

@d.baum and @Edward for pitching in and sharing valuable information.

@Fide, I have more information from R&D about Dahlia’s hardware:

  • It is not Apple-certified
  • Its USB DRP port hasn’t been specifically designed to charge devices
  • The power budget has not been calculated with providing 3A@5V (15W) to any device via the DRP port, but depending on the use case, this could potentially still work, if there are no external devices drawing current from the 5V rail (could be interesting to see the +V5_SW rail while the charging attempt happens). You can check to which devices this power rail is connected on Dahlia’s schematic (Design Resources section): Dahlia Carrier Board | Toradex Developer Center

Having said that, some tests that you can perform:

  • Tweak R18/R21 to reduce the advertised current to 1.5A
    • R17 would need to be checked and adjusted as well in any case (otherwise IC4 won’t deliver the current that is announced via IC5)
  • As both ports connected together may be DRP ports, it could depend on various factors which one is ending up as the DFP one
    • one could try connecting and disconnecting the cable several times, ensuring that the Dahlia-side connector is connected first, or
    • fixing the role of the Dahlia via tweaking R19/R111 could be another option

Does this help you?

There is also a document from Apple about potential issues with devices that won’t charge: If your iPhone or iPod touch won't charge - Apple Support. It might be helpful.

And did you test charging an iPhone? Did it work?
Which cable are you using to connect Dahlia’s USB to the Apple device?

Best regards,

Hi @Fide !

Do you have any news on this topic?

Best regards,