Jump to content

Samor140

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Samor140

  1. Maybe I am not expressing myself clearly, sorry for that.
    (edit -> i just saw you're new overlay -> trying it right now)
     

    I am trying to use the designated PWR / OTG port as a HOST port exactly; this option is called usb0-host with an Orange Pi overlay. I am doing that because I am powering the device from underneath with GPIO. So I want to be able to free both ports to be HOST. The one already designated works fine as intended, but yeah, I want to use the PWR port USB0 as a HOST. I will share u-boot log quite soon.
     

    Here is how I do it on the Orange Pi Zero 2W. Both are really similar, using H618, so I was thinking it was possible for the BPI-M4 Zero too:
    http://www.orangepi.org/orangepiwiki/index.php?title=Orange_Pi_Zero_2W&mobileaction=toggle_view_desktop#How_to_set_USB0_to_HOST_mode

    image.thumb.png.31643369d84c195ec420cf70f5bac9e3.png

     

  2. @c0rnelius

    I must be doing something wrong.
    I just used armbian-build, built a custom image -> Armbian-unofficial_25.08.0-trunk_Bananapim4zero_bookworm_current_6.12.35_xfce_desktop.

     

    Then I did nothing except log in.

     

    I then did this:

    nano usb0-host.dts

    -----------------------------------------
    /dts-v1/;
    /plugin/;

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

    -----------------------------------------

    Saved, then ran sudo armbian-add-overlay usb0-host.dts
    -> then I rebooted.

     

    Once rebooted, using the usual port, everything is detected. But using usb0, nothing is detected.
    So it must not be the power source, since the usual port works perfectly.

     

    Also, using this particular image, my USB modem (SIM7600G) is not listed when doing dmesg | grep tty.Reverting back to an older kernel fixed that issue. If with the same image you can't replicate any of this, maybe it is my unit that is defective. But that would be weird since i tested with 3 different boards and got the same results.

     

    Thanks a lot.

  3. I am currently using the base image from the Armbian website (XFCE Bookworm variant) which is clearly not on the most recent kernel. For the power source, I’m using the Waveshare UPS HAT (C) for Raspberry Pi Zero (5V). I’ve been using the same unit with the Orange Pi Zero 2W and never had any issues with USB host mode, with them it's an official overlay already.

    I switched to the Banana Pi because you guys offer better support, and the presence of eMMC was a big plus. So I don’t believe the power source is the issue, since the other USB port has never failed with the UPS.

    I currently don't have access to the device, but tomorrow I will switch to the latest kernel and test with edge if necessary. I had previously avoided newer builds because, about two weeks ago, I ran into an issue with modem detection using mmcli on the latest kernel and build. After switching to the older kernel, the one currently available on the website, my modem was detected again with no changes whatsoever.

     

    Thanks a lot for the quick response. I’ll follow up tomorrow. Great work, by the way, on the BPi M4 Zero and Armbian in general, you’ve been really active.

  4. @c0rnelius


    Sorry for the late follow-up. Initially I thought everything was fine since the overlay compiled successfully, but once I freed the USB0 port (now using an ups hat for power), I ran into an issue.

    I created and applied a custom device tree overlay to force USB into host mode (the one you gave me):

    -----------------------------------------
    /dts-v1/;
    /plugin/;

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

    -----------------------------------------

    The overlay was compiled and added using armbian-add-overlay, then referenced in /boot/armbianEnv.txt. After rebooting, I confirmed the following:

        - /proc/device-tree/soc/.../dr_mode -> shows host for all USB nodes

        - Power is delivered to the USB ports (LED indicators on devices turn on)

     

    However, no USB devices are recognized. I also tried to target directly all known USB controller nodes manually with an overlay (usb@5100000, usb@5101000, usb@5200000, etc.) and forced dr_mode = "host" on each of them. All report host under /proc/device-tree, but:

        - lsusb lists only the root hubs

        - No new logs appear in dmesg when plugging in keyboards or mice (usb0)

        - Devices are never recognized or enumerated

     

    So the overlay seems to apply correctly (the peripheral mode is gone), but the USB controller is still non-functional in host mode.

    Any ideas or suggestions for further debugging ? I am new with all this stuff an I appreciate the help a lot.

    Thanks !

     

  5. 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!

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines