OTG on Rock Pi E

I am trying to enable g_ether on the USB OTG port, but I am not able to see the RNDIS device come up on my Mac.

I connected Data-, Data+ and GND to the respective pins 16, 18 and 20 on the 40-pin header.

Do I need to enable any particular Device Tree overlay to enable OTG?
https://wiki.radxa.com/Device-tree-overlays

dmesg
https://www.icloud.com/iclouddrive/0QOX-7om033cXR6DqtewrB2yg#dmesg

/var/log/messages

Those will probably not work OOB on a modern (armbian) kernel. If they were developed/ported, you can see this in armbian-config -> hardware … otherwise you need to poke DT manually to try to enable this.

Thank you @igorp, I know you are a busy man and appreciate your help.

armbian-config -> system -> hardware does not offer any OTG option:

@radxa, @jack, @hipboi, any suggestions on how to enable OTG on Rock Pi E running Armbian 20.11.0 kernel 5.8.10, please?

https://www.armbian.com/donate
We will anyway make it one day, like we made those.

what about the 5V power source?

I tried connecting 5V to the header and the Pi powered on, but OTG did not work.

Also, I tried powering the Pi using its USB-C port and it powered on, but I had no luck with the OTG.

SSH to the Pi via eth0 and eth1 worked like a charm.

Jerry from the WLAN Pi team managed to enable OTG on the Rock Pi E running Armbian. Here are his instructions for everyone’s reference:

Convert DTB to DTS

sudo dtc -I dtb /boot/dtb/rockchip/rk3328-rock-pi-e.dtb -O dts -o /boot/dtb/rockchip/rk3328-rock-pi-e.dts

Modify rk3328-rock-pi-e.dts

sudo nano /boot/dtb/rockchip/rk3328-rock-pi-e.dts

Locate section usb@ff580000

    usb@ff580000 {
            compatible = "rockchip,rk3328-usb\0rockchip,rk3066-usb\0snps,dwc2";
            reg = < 0x00 0xff580000 0x00 0x40000 >;
            interrupts = < 0x00 0x17 0x04 >;
            clocks = < 0x02 0x14d >;
            clock-names = "otg";
            dr_mode = "host";
            g-np-tx-fifo-size = < 0x10 >;
            g-rx-fifo-size = < 0x118 >;
            g-tx-fifo-size = < 0x100 0x80 0x80 0x40 0x20 0x10 >;
            phys = < 0x5a >;
            phy-names = "usb2-phy";
            status = "okay";
            phandle = < 0x9d >;
    };

Modify dr_mode

Change
dr_mode = “host”;
To
dr_mode = “otg”;

Convert DTS file back to DTB format

sudo dtc -I dts /boot/dtb/rockchip/rk3328-rock-pi-e.dts -O dtb -o /boot/dtb/rockchip/rk3328-rock-pi-e-rev01.dtb

Add DTB to armbianEnv.txt

sudo nano /boot/armbianEnv.txt

Add the following line

fdtfile=rockchip/rk3328-rock-pi-e-rev01.dtb

Should look like this - armbianEnv.txt

verbosity=1
bootlogo=false
overlay_prefix=rockchip
rootdev=UUID=8a77dff9-013f-4a2f-8c9b-4e2c0afb076d
rootfstype=ext4
console=serial
overlays=i2c7 i2c8
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
fdtfile=rockchip/rk3328-rock-pi-e-rev01.dtb

Add g_ether module

sudo nano /etc/modules

Add the following to /etc/modules

g_ether

Reboot and OTG should be working!

Cc: @igorp

3 Likes