Skip to content

Instantly share code, notes, and snippets.

@logic
Created September 28, 2024 05:46
Show Gist options
  • Save logic/cecbc5827211a3aa69011af90eaa6d04 to your computer and use it in GitHub Desktop.
Save logic/cecbc5827211a3aa69011af90eaa6d04 to your computer and use it in GitHub Desktop.
Getting USB OTG on a Banana Pi CM4 board working
/dts-v1/;
/plugin/;
/ {
compatible = "bananapi,bpi-cm4io", "bananapi,bpi-cm4", "amlogic,a311d", "amlogic,g12b";
fragment@0 {
target = <&usb>;
__overlay__ {
dr_mode = "host";
};
};
};
@logic
Copy link
Author

logic commented Sep 28, 2024

Borrowed from the Armbian forum, this snippet makes it possible to force the USB interface on a Banana Pi CM4 to be operated in host mode, which turns out to be necessary when said Banana Pi CM4 is mounted on a Turing Pi 2 cluster board using one of their CM4 adapters.

Save this to meson-g12b-bananapi-cm4-waveshare-usb.dts, then (as root) run armbian-add-overlay meson-g12b-bananapi-cm4-waveshare-usb.dts, and reboot. Suddenly, you should have a working USB port that you can attach exciting devices to, like keyboards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment