Jump to content

BPI‑M4 Zero : how to force USB0 (Type‑C OTG) into host mode on Armbian?


Go to solution Solved by c0rnelius,

Recommended Posts

Posted (edited)

Hi,

Board: BPI‑M4 Zero
OS: Armbian (Bookworm), kernel 6.12.35 (current)

This board has two USB‑C ports: one fixed HOST and one OTG. I’d like the OTG port (USB0) to operate as a host as well. I can’t find any Armbian overlay in armbian-config or on the forums that flips USB0 to host.

 

If anyone has this working, it would be cool to let me know :).

Thanks!

Edited by Samor140
Posted

If there is no overlay available you may need to write one by yourself.

I'd start by modifying the device tree itself and set the port in question to host and see if this actually works.

I think armbian-config comes with a device tree editor. Make sure to make a backup beforehand.

  • Solution
Posted

HOST

/dts-v1/;
/plugin/;

/ {
	fragment@0 {
		target = <&usbotg>;
		__overlay__ {
			dr_mode = "host";
		};
	};
};

 

OTG

/dts-v1/;
/plugin/;

/ {
	fragment@0 {
		target = <&usbotg>;
		__overlay__ {
			dr_mode = "otg";
		};
	};
};

 

By default it is set to peripheral.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines