Jump to content

BananaPi CM4: Add force USB host mode capability


Go to solution Solved by c0rnelius,

Recommended Posts

The BananaPi CM4 doesn't play well with a number of third party base boards in that often, USB does not work on them. Usually, that is because the third party base board designer connected the USB hub IC to an SOC OTG port without connecting a line to switch the OTG port into host mode. The problem was demonstrated at least with the Waveshare CM4 Base Board B and the MCUZone POE baseboard. In the Banana Pi forums, Sinovoip engineer "August" posted a DTBO for Ubuntu 20.04 which solves the issue by forcing host mode. Below is the DTBO decompiled to DTS.

I would like to request that this overlay be updated for the Armbian kernel and included as an optional overlay into the Meson 64 / BananaPi CM4 distribution.

 

dts-v1/;

/ {

        fragment@0 {
                target = <0xffffffff>;

                __overlay__ {
                        controller-type = <0x01>;
                };
        };

        fragment@1 {
                target = <0xffffffff>;

                __overlay__ {
                        otg = <0x00>;
                };
        };

        __fixups__ {
                dwc2_a = "/fragment@0:target:0";
                usb3_phy_v2 = "/fragment@1:target:0";
        };
};

 

Link to comment
Share on other sites

  • Solution

Give it a whirl and let me know.

 

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 001 Device 003: ID 0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

 

 

meson-g12b-bananapi-cm4-waveshare-usb.dts

Link to comment
Share on other sites

@c0rnelius

Thank you!

Unfortunately, I can't get it to work on either the Waveshare or the MCUZone board. It doesn't seem to disturb the function on the bananapi base board, though.

I copied the dts-file and did a sudo armbian-add-overlay meson-g12b-bananapi-cm4-waveshare-usb.dts.

There is a corresponding dtbo now in /boot/overlay-user and a line "user_overlays=meson-g12b-bananapi-cm4-waveshare-usb" in /boot/armbianENV.txt

I tried several flash drives and 2 different keyboards. No device shows up in dmesg or lsusb.

Please let me know if I have missed anything. I'm an experienced Linux user but fairly new to armbian.

 

EDIT:

Never mind, I'm an idiot! I forgot check the boot switch on the Waveshare board. It was set to "on". Set to "off", the Waveshare board works!

The MCUZone board doesn't at first glance. The boot jumper doesn't seem to do anything. I'll do some experimenting but that board is also fairly buggy- The USB hub e.g. is very temperature sensitive.

Edited by sgofferj
Link to comment
Share on other sites

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