Buster image on banana pi pro . Host mode activation of the USB OTG port


Recommended Posts

Armbianmonitor:

Hi ,

I just move my banana pi pro which was running bananian  up to now to buster minimal.

I'm using it as domoticz server. It requires few usb port to have all my gateway working.

So I need to make USB OTG running in HOST mode.

 

I did lot of testing, read many thread, but quite stuck right now.

Here is what I have already done :

 

First I have activated in DTB usb@1c13000 , and change mode to host. I have also activated usb0-vbus.

I added also regulator-boot-on in usb0-bus. and last test I did is adding usb0_vbus-supply = < 0xb1 >; in phy@1c13400.

 

For those who may need later on, here is the command I did:

$> cd /boot/dtb

$> sudo cp sun7i-a20-bananapro.dtb sun7i-a20-bananapro.dtb.org

$> sudo dtc -I dtb -O dts -o  sun7i-a20-bananapro.dts sun7i-a20-bananapro.dtb

$> nano sun7i-a20-bananapro.dts

$> sudo dtc -I dts -O dtb -o sun7i-a20-bananapro.dtb sun7i-a20-bananapro.dts

 

$> sudo dtc -I dtb -O dts -o  sun7i-a20-bananapro.dts.org sun7i-a20-bananapro.dtb.org

$> diff sun7i-a20-bananapro.dts.org sun7i-a20-bananapro.dts
530,531c530,531
<             dr_mode = "otg";
<             status = "disabled";
---
>             dr_mode = "host";
>             status = "okay";
544a545
>             usb0_vbus-supply = < 0xb1 >;
1629a1631
>         regulator-boot-on;
1632c1634
<         status = "disabled";
---
>         status = "okay";

 

In /boot/armbianEnv.txt, I added

overlays=usbhost0 usbhost1 usbhost2 usbhost3

 

When the board boot, since I added  regulator-boot-on;, I can see the peripheral connected on the USB OTG port getting power.

But later on, usb0-vbus is disabled and I don't know why.

 

$> dmesg -T

[jeu. mai  7 14:06:33 2020] zram1: detected capacity change from 0 to 522608640
[jeu. mai  7 14:06:34 2020] Adding 510356k swap on /dev/zram1.  Priority:5 extents:1 across:510356k SSFS
[jeu. mai  7 14:06:35 2020] zram0: detected capacity change from 0 to 52428800
[jeu. mai  7 14:06:37 2020] EXT4-fs (zram0): mounted filesystem without journal. Opts: discard
[jeu. mai  7 14:06:37 2020] ext4 filesystem being mounted at /var/log supports timestamps until 2038 (0x7fffffff)
[jeu. mai  7 14:06:42 2020] random: crng init done
[jeu. mai  7 14:06:42 2020] random: 7 urandom warning(s) missed due to ratelimiting
[jeu. mai  7 14:06:45 2020] aufs 5.4-20191223
[jeu. mai  7 14:06:46 2020] sun7i-dwmac 1c50000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet]
[jeu. mai  7 14:06:46 2020] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[jeu. mai  7 14:06:46 2020] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[jeu. mai  7 14:06:46 2020] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[jeu. mai  7 14:06:46 2020] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[jeu. mai  7 14:06:46 2020] sun7i-dwmac 1c50000.ethernet eth0: configuring for phy/rgmii link mode
[jeu. mai  7 14:06:49 2020] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred
[jeu. mai  7 14:06:49 2020] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5
[jeu. mai  7 14:06:51 2020] vcc3v0: disabling
[jeu. mai  7 14:06:51 2020] vcc5v0: disabling
[jeu. mai  7 14:06:51 2020] usb0-vbus: disabling
[jeu. mai  7 14:06:52 2020] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[jeu. mai  7 14:06:52 2020] ieee80211 phy0: brcmf_fweh_call_event_handler: no interface object
[jeu. mai  7 14:06:52 2020] ieee80211 phy0: brcmf_fweh_event_worker: event handler failed (72)
[jeu. mai  7 14:06:54 2020] ieee80211 phy0: brcmf_fweh_call_event_handler: no interface object
[jeu. mai  7 14:06:54 2020] ieee80211 phy0: brcmf_fweh_event_worker: event handler failed (72)
[jeu. mai  7 14:06:58 2020] ieee80211 phy0: brcmf_fweh_call_event_handler: no interface object
[jeu. mai  7 14:06:58 2020] ieee80211 phy0: brcmf_fweh_event_worker: event handler failed (72)
[jeu. mai  7 14:06:58 2020] ieee80211 phy0: brcmf_fweh_call_event_handler: no interface object
[jeu. mai  7 14:06:58 2020] ieee80211 phy0: brcmf_fweh_event_worker: event handler failed (72)
[jeu. mai  7 14:07:02 2020] Bridge firewalling registered
[jeu. mai  7 14:07:05 2020] ieee80211 phy0: brcmf_fweh_call_event_handler: no interface object
[jeu. mai  7 14:07:05 2020] ieee80211 phy0: brcmf_fweh_event_worker: event handler failed (72)

 

I don't know how to re-enable usb0-vbus. Is there a module missing?

 

If you have any advice .

Rgds

Kevin

 

Nota; I have to figure out why I have those phy0 failure, but wifi is working well.

 

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

 

Looking at @sooperior thread, where @dryce seems to make it working using SimpleNAS DTB, I'm wondering if I have a missing change in my current DTB, or if it is just normal difference because not based on same parameters.

 

Not clear yet for me if I have to add in phy section equivalent line

 usb0_id_det-gpio = <0x25 0x7 0x3 0x0>;

 

Link to post
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...