-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NanoPi NEO3 | Add device tree overlay for USB pins host mode #7286
Comments
On the NEO3, the USB device is not detected at all, hence missing driver is not the issue. I guess the pins need to be configured. Let me check for device tree overlays. |
Thanks for blazing fast response! Please let me know if I can provide any more details. Documentation for 4g module is sparse to nonexistent but here’s friendlyelec page for the board https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO3 |
Please try this: apt install device-tree-compiler
mkdir -p /boot/overlay-user
cd /boot/overlay-user
cat << '_EOF_' > usbhost.dts
/dts-v1/;
/plugin/;
/ {
compatible = "rockchip,rk3328";
fragment@0 {
target = <&usb20_otg>;
__overlay__ {
dr_mode = "host";
};
};
};
_EOF_
dtc -I dts -O dtb -o usbhost.dtbo usbhost.dts
G_CONFIG_INJECT 'user_overlays=' 'user_overlays=usbhost' /boot/dietpiEnv.txt
reboot
cat /proc/device-tree/usb@ff580000/dr_mode; echo The last command is to check whether this USB port has been switched to host mode. It is weird:
But let's see ... FriendlyELEC sets it also to host mode in their own device tree: https://github.com/friendlyarm/kernel-rockchip/blob/nanopi-r2-v6.1.y-opp1/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2-rev02.dts |
After running the command I can't ssh into it. Either times out or says |
Hmm, it worked fine here, and the ... ah, I see there was an |
Sorry, I didn't have time to connect via UART. Your fix works, as in USB device/network card is detected successfully. However, 4G modem is detected before LAN and therefore I couldn't ssh into the box. Here's some more info First of all, it works!
Welcome message shows following
ping works when I specify the interface
same for curl
I'll poke around a little more now that we're safely in userland 😅 |
Okay, to make it work I did following changes to network interfaces
|
Sorry for the late reply. So The 4G module shows up as
Since you have both interfaces configured with DHCP, is an Ethernet cable even connected, and if so, which of the two is then used is default gateway? ip r l 0/0 So the solution to get the $G module detected as USB device was the overlay, right |
Yes |
Creating a bug report/issue
Required Information
9.8.0
fresh off the downloadsbookworm
Linux DietPi 6.6.56-current-rockchip64 #1 SMP PREEMPT Thu Oct 10 10:50:06 UTC 2024 aarch64 GNU/Linux
NanoPi NEO3 (aarch64)
Additional Information (if applicable)
Steps to reproduce
Boot DietPi on NanoPi NEO3 bundled with 4G module. Usb 4G device is not detected, no eth1.
Expected behaviour
DietPi should detect USB and run it using cdc_ether/rndis_host driver
It does work on Debian-based distro provided by the manufacturer, also works on DietPi on another board out of the box (see below).
Doesn't look like manufacturer bundles any special drivers, but I wasn't able to solve this myself. I tried stuff like
modprobe ...
adding all modules that I see used on NanoPI NEO, but to no avail.Actual behaviour
USB device/4G modem is not detected at all
Extra details
Photo of the setup
lsusb
lsmod
dmesg
Aliexpress link https://pl.aliexpress.com/item/1005007291382440.html?spm=a2g0o.order_list.order_list_main.110.26291c243HOKnn&gatewayAdapt=glo2pol
Extra extra - It works on NanoPi NEO!
A similar 4G card works out of the box on
NanoPi NEO (armv7l)
. Including some details as they may be handylsusb
lsmod
dmesg -6 (selected lines)
The text was updated successfully, but these errors were encountered: