Skip to content
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

Open
1 task done
mszyndel opened this issue Nov 22, 2024 · 10 comments
Open
1 task done

NanoPi NEO3 | Add device tree overlay for USB pins host mode #7286

mszyndel opened this issue Nov 22, 2024 · 10 comments

Comments

@mszyndel
Copy link

Creating a bug report/issue

  • I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.8.0 fresh off the downloads
  • Distro version | bookworm
  • Kernel version | Linux DietPi 6.6.56-current-rockchip64 #1 SMP PREEMPT Thu Oct 10 10:50:06 UTC 2024 aarch64 GNU/Linux
  • SBC model | NanoPi NEO3 (aarch64)
  • Power supply used | 5V 1A RAVpower
  • SD card used | SanDisk 32G

Additional Information (if applicable)

  • Software title | (EG: Nextcloud) N/A
  • Was the software title installed freshly or updated/migrated? N/A
  • Can this issue be replicated on a fresh installation of DietPi? YES
  • Bug report ID | N/A

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

Screenshot 2024-11-22 at 18 19 35

lsusb

Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsmod

Module                  Size  Used by
snd_soc_pcm5102a       12288  1
snd_soc_simple_card    20480  0
snd_soc_simple_card_utils    24576  1 snd_soc_simple_card
snd_soc_rockchip_spdif    12288  0
snd_soc_rockchip_i2s    24576  2
snd_soc_core          208896  5 snd_soc_pcm5102a,snd_soc_rockchip_spdif,snd_soc_simple_card_utils,snd_soc_rockchip_i2s,snd_soc_simple_card
snd_compress           24576  1 snd_soc_core
snd_pcm_dmaengine      12288  1 snd_soc_core
snd_pcm               106496  4 snd_compress,snd_soc_simple_card_utils,snd_soc_core,snd_pcm_dmaengine
snd_timer              36864  1 snd_pcm
rk_crypto              28672  0
snd                    77824  4 snd_timer,snd_compress,snd_soc_core,snd_pcm
rng_core               16384  1 rk_crypto
soundcore              12288  1 snd
cpufreq_dt             16384  0
dm_mod                126976  0
ip_tables              28672  0
x_tables               36864  1 ip_tables
autofs4                40960  2
realtek                32768  1
dwmac_rk               28672  0
stmmac_platform        20480  1 dwmac_rk
stmmac                233472  3 stmmac_platform,dwmac_rk
pcs_xpcs               20480  1 stmmac
gpio_syscon            16384  0

dmesg

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.56-current-rockchip64 (build@armbian) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT Thu Oct 10 10:50:06 UTC 2024
[    0.000000] KASLR disabled due to lack of seed
[    0.000000] Machine model: FriendlyElec NanoPi NEO3
[    0.000000] efi: UEFI not found.
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x000000007fffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x7fba8980-0x7fbaafff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000200000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x000000007fffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] cma: Reserved 128 MiB at 0x0000000073200000 on node -1
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 31 pages/cpu s88296 r8192 d30488 u126976
[    0.000000] pcpu-alloc: s88296 r8192 d30488 u126976 alloc=31*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: root=UUID=d35cf75b-1dbb-4513-8d65-1675a7e0bc68 rootfstype=ext4 rootwait console=ttyS2,1500000 consoleblank=0 coherent_pool=2M usb-storage.quirks= net.ifnames=0
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Fallback order for Node 0: 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 515592
[    0.000000] Policy zone: DMA
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 1MB
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x000000007f616000-0x000000007f816000] (2MB)
[    0.000000] Memory: 1878396K/2095104K available (16960K kernel code, 2318K rwdata, 5248K rodata, 4736K init, 604K bss, 85636K reserved, 131072K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.001134] Console: colour dummy device 80x25
[    0.001316] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.001339] pid_max: default: 32768 minimum: 301
[    0.001523] LSM: initializing lsm=capability,yama,apparmor,integrity
[    0.001585] Yama: becoming mindful.
[    0.001772] AppArmor: AppArmor initialized
[    0.001969] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.002004] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.006019] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.006208] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.006667] rcu: Hierarchical SRCU implementation.
[    0.006676] rcu: 	Max phase no-delay instances is 1000.
[    0.010511] EFI services will not be available.
[    0.011349] smp: Bringing up secondary CPUs ...
[    0.012718] Detected VIPT I-cache on CPU1
[    0.012920] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.014345] Detected VIPT I-cache on CPU2
[    0.014535] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.016033] Detected VIPT I-cache on CPU3
[    0.016225] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.016442] smp: Brought up 1 node, 4 CPUs
[    0.016459] SMP: Total of 4 processors activated.
[    0.016468] CPU features: detected: 32-bit EL0 Support
[    0.016474] CPU features: detected: 32-bit EL1 Support
[    0.016488] CPU features: detected: CRC32 instructions
[    0.016647] CPU: All CPU(s) started at EL2
[    0.016707] alternatives: applying system-wide alternatives
[    0.020546] devtmpfs: initialized
[    0.042093] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.042168] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.049651] pinctrl core: initialized pinctrl subsystem
[    0.050618] DMI not present or invalid.
[    0.052119] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.055107] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.056668] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.058306] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.058461] audit: initializing netlink subsys (disabled)
[    0.059005] audit: type=2000 audit(0.056:1): state=initialized audit_enabled=0 res=1
[    0.060616] thermal_sys: Registered thermal governor 'fair_share'
[    0.060631] thermal_sys: Registered thermal governor 'bang_bang'
[    0.060639] thermal_sys: Registered thermal governor 'step_wise'
[    0.060647] thermal_sys: Registered thermal governor 'user_space'
[    0.060784] cpuidle: using governor menu
[    0.061211] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.061443] ASID allocator initialised with 65536 entries
[    0.063745] Serial: AMBA PL011 UART driver
[    0.090605] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.091269] rockchip-gpio ff210000.gpio: probed /pinctrl/gpio@ff210000
[    0.092247] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.092799] rockchip-gpio ff220000.gpio: probed /pinctrl/gpio@ff220000
[    0.093445] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.093980] rockchip-gpio ff230000.gpio: probed /pinctrl/gpio@ff230000
[    0.094587] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.095071] rockchip-gpio ff240000.gpio: probed /pinctrl/gpio@ff240000
[    0.102548] Modules: 25248 pages in range for non-PLT usage
[    0.102571] Modules: 516768 pages in range for PLT usage
[    0.104663] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.104687] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.104700] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.104709] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.104721] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.104730] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.104745] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.104754] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.106537] cryptd: max_cpu_qlen set to 1000
[    0.176581] raid6: neonx8   gen()  1071 MB/s
[    0.244736] raid6: neonx4   gen()  1098 MB/s
[    0.312890] raid6: neonx2   gen()  1039 MB/s
[    0.381042] raid6: neonx1   gen()   888 MB/s
[    0.449182] raid6: int64x8  gen()   682 MB/s
[    0.517368] raid6: int64x4  gen()   800 MB/s
[    0.585500] raid6: int64x2  gen()   695 MB/s
[    0.653647] raid6: int64x1  gen()   515 MB/s
[    0.653656] raid6: using algorithm neonx4 gen() 1098 MB/s
[    0.721771] raid6: .... xor() 781 MB/s, rmw enabled
[    0.721783] raid6: using neon recovery algorithm
[    0.723237] iommu: Default domain type: Translated
[    0.723263] iommu: DMA domain TLB invalidation policy: strict mode
[    0.724297] SCSI subsystem initialized
[    0.725176] libata version 3.00 loaded.
[    0.725697] usbcore: registered new interface driver usbfs
[    0.725758] usbcore: registered new interface driver hub
[    0.725904] usbcore: registered new device driver usb
[    0.726814] pps_core: LinuxPPS API ver. 1 registered
[    0.726823] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.726851] PTP clock support registered
[    0.727225] EDAC MC: Ver: 3.0.0
[    0.728434] scmi_core: SCMI protocol bus registered
[    0.730679] NetLabel: Initializing
[    0.730699] NetLabel:  domain hash size = 128
[    0.730708] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.730847] NetLabel:  unlabeled traffic allowed by default
[    0.731267] vgaarb: loaded
[    0.732151] clocksource: Switched to clocksource arch_sys_counter
[    0.736735] VFS: Disk quotas dquot_6.6.0
[    0.736831] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.737953] AppArmor: AppArmor Filesystem Enabled
[    0.753046] NET: Registered PF_INET protocol family
[    0.753490] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.757387] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.757689] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.757784] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.758225] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[    0.759039] TCP: Hash tables configured (established 16384 bind 16384)
[    0.759367] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.759487] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.759975] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.760039] NET: Registered PF_XDP protocol family
[    0.760067] PCI: CLS 0 bytes, default 64
[    0.760594] Trying to unpack rootfs image as initramfs...
[    0.762277] kvm [1]: IPA Size Limit: 40 bits
[    0.765167] kvm [1]: vgic interrupt IRQ9
[    0.765266] kvm [1]: Hyp mode initialized successfully
[    0.769642] Initialise system trusted keyrings
[    0.769807] Key type blacklist registered
[    0.770580] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    0.770807] zbud: loaded
[    0.772011] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.773310] fuse: init (API version 7.39)
[    0.777118] integrity: Platform Keyring initialized
[    0.842458] xor: measuring software checksum speed
[    0.845168]    8regs           :  1226 MB/sec
[    0.847820]    32regs          :  1261 MB/sec
[    0.850710]    arm64_neon      :  1143 MB/sec
[    0.850731] xor: using function: 32regs (1261 MB/sec)
[    0.850762] Key type asymmetric registered
[    0.850773] Asymmetric key parser 'x509' registered
[    0.851011] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.851501] io scheduler mq-deadline registered
[    0.851521] io scheduler kyber registered
[    0.851629] io scheduler bfq registered
[    0.872082] dma-pl330 ff1f0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.872215] dma-pl330 ff1f0000.dma-controller: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    0.876022] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.885546] ff120000.serial: ttyS1 at MMIO 0xff120000 (irq = 23, base_baud = 1500000) is a 16550A
[    0.888605] ff130000.serial: ttyS2 at MMIO 0xff130000 (irq = 24, base_baud = 1500000) is a 16550A
[    0.888752] printk: console [ttyS2] enabled
[    0.987455] Serial: AMBA driver
[    0.994773] rockchip-drm display-subsystem: [drm:rockchip_drm_platform_probe] *ERROR* No available vop found for display-subsystem.
[    1.013325] loop: module loaded
[    1.022284] tun: Universal TUN/TAP device driver, 1.6
[    1.024447] thunder_xcv, ver 1.0
[    1.024827] thunder_bgx, ver 1.0
[    1.025169] nicpf, ver 1.0
[    1.026422] e1000e: Intel(R) PRO/1000 Network Driver
[    1.026890] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.027486] igb: Intel(R) Gigabit Ethernet Network Driver
[    1.027974] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.028578] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[    1.029140] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.030227] sky2: driver version 1.30
[    1.034237] dwc2 ff580000.usb: supply vusb_d not found, using dummy regulator
[    1.035146] dwc2 ff580000.usb: supply vusb_a not found, using dummy regulator
[    1.168404] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM
[    1.169661] dwc2 ff580000.usb: DWC OTG Controller
[    1.170201] dwc2 ff580000.usb: new USB bus registered, assigned bus number 1
[    1.170899] dwc2 ff580000.usb: irq 29, io mem 0xff580000
[    1.171984] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    1.172783] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.173434] usb usb1: Product: DWC OTG Controller
[    1.173864] usb usb1: Manufacturer: Linux 6.6.56-current-rockchip64 dwc2_hsotg
[    1.174512] usb usb1: SerialNumber: ff580000.usb
[    1.176491] hub 1-0:1.0: USB hub found
[    1.177000] hub 1-0:1.0: 1 port detected
[    1.181977] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    1.182554] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    1.183508] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000008002000010
[    1.183681] ehci-platform ff5c0000.usb: EHCI Host Controller
[    1.183723] ohci-platform ff5d0000.usb: Generic Platform OHCI controller
[    1.183780] ohci-platform ff5d0000.usb: new USB bus registered, assigned bus number 3
[    1.184020] ohci-platform ff5d0000.usb: irq 31, io mem 0xff5d0000
[    1.184751] xhci-hcd xhci-hcd.0.auto: irq 28, io mem 0xff600000
[    1.184993] ehci-platform ff5c0000.usb: new USB bus registered, assigned bus number 4
[    1.185842] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    1.186424] ehci-platform ff5c0000.usb: irq 30, io mem 0xff5c0000
[    1.186753] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 5
[    1.189775] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    1.190963] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    1.191750] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.192451] usb usb2: Product: xHCI Host Controller
[    1.192905] usb usb2: Manufacturer: Linux 6.6.56-current-rockchip64 xhci-hcd
[    1.193533] usb usb2: SerialNumber: xhci-hcd.0.auto
[    1.195256] hub 2-0:1.0: USB hub found
[    1.195743] hub 2-0:1.0: 1 port detected
[    1.197474] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.198551] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    1.199310] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.199954] usb usb5: Product: xHCI Host Controller
[    1.200441] usb usb5: Manufacturer: Linux 6.6.56-current-rockchip64 xhci-hcd
[    1.201078] usb usb5: SerialNumber: xhci-hcd.0.auto
[    1.203079] hub 5-0:1.0: USB hub found
[    1.203552] hub 5-0:1.0: 1 port detected
[    1.204233] ehci-platform ff5c0000.usb: USB 2.0 started, EHCI 1.00
[    1.205406] usbcore: registered new interface driver usb-storage
[    1.205778] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    1.206713] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.207362] usb usb4: Product: EHCI Host Controller
[    1.207805] usb usb4: Manufacturer: Linux 6.6.56-current-rockchip64 ehci_hcd
[    1.208476] usb usb4: SerialNumber: ff5c0000.usb
[    1.208708] mousedev: PS/2 mouse device common for all mice
[    1.210346] hub 4-0:1.0: USB hub found
[    1.210917] hub 4-0:1.0: 1 port detected
[    1.211314] i2c_dev: i2c /dev entries driver
[    1.215636] i2c 1-0018: Fixed dependency cycle(s) with /i2c@ff160000/rk805@18/regulators/DCDC_REG4
[    1.226384] rk808-regulator rk808-regulator.2.auto: there is no dvs0 gpio
[    1.227079] rk808-regulator rk808-regulator.2.auto: there is no dvs1 gpio
[    1.227689] rk808-regulator rk808-regulator.2.auto: max buck steps per change: 8
[    1.244856] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 6.06
[    1.245634] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.246279] usb usb3: Product: Generic Platform OHCI controller
[    1.246809] usb usb3: Manufacturer: Linux 6.6.56-current-rockchip64 ohci_hcd
[    1.247435] usb usb3: SerialNumber: ff5d0000.usb
[    1.249478] hub 3-0:1.0: USB hub found
[    1.250054] hub 3-0:1.0: 1 port detected
[    1.259907] rk808-rtc rk808-rtc.4.auto: registered as rtc0
[    1.262452] rk808-rtc rk808-rtc.4.auto: setting system clock to 2024-11-22T17:21:34 UTC (1732296094)
[    1.266132] input: rk805 pwrkey as /devices/platform/ff160000.i2c/i2c-1/1-0018/rk805-pwrkey.6.auto/input/input0
[    1.271357] rockchip-thermal ff250000.tsadc: Missing tshut mode property, using default (cru)
[    1.272244] rockchip-thermal ff250000.tsadc: Missing tshut-polarity property, using default (low)
[    1.275733] dw_wdt ff1a0000.watchdog: No valid TOPs array specified
[    1.281503] sdhci: Secure Digital Host Controller Interface driver
[    1.282095] sdhci: Copyright(c) Pierre Ossman
[    1.282597] Synopsys Designware Multimedia Card Interface Driver
[    1.284473] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.289358] ledtrig-cpu: registered to indicate activity on CPUs
[    1.291243] hid: raw HID events driver (C) Jiri Kosina
[    1.291939] usbcore: registered new interface driver usbhid
[    1.292528] usbhid: USB HID core driver
[    1.298342] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    1.303089] drop_monitor: Initializing network drop monitor service
[    1.304664] NET: Registered PF_INET6 protocol family
[    2.193774] Freeing initrd memory: 12628K
[    2.282111] Segment Routing with IPv6
[    2.282655] In-situ OAM (IOAM) with IPv6
[    2.283220] NET: Registered PF_PACKET protocol family
[    2.284349] 8021q: 802.1Q VLAN Support v1.8
[    2.284891] Key type dns_resolver registered
[    2.304764] registered taskstats version 1
[    2.305468] Loading compiled-in X.509 certificates
[    2.310365] zswap: loaded using pool zstd/zbud
[    2.335273] Key type .fscrypt registered
[    2.335666] Key type fscrypt-provisioning registered
[    2.341411] Btrfs loaded, zoned=yes, fsverity=yes
[    2.342224] Key type encrypted registered
[    2.342606] AppArmor: AppArmor sha1 policy hashing enabled
[    2.378858] rk3328-dmc ff780000.dmc: current ATF version 0x101
[    2.379621] dwmmc_rockchip ff500000.mmc: IDMAC supports 32-bit address mode.
[    2.380356] dwmmc_rockchip ff500000.mmc: Using internal DMA controller.
[    2.380954] dwmmc_rockchip ff500000.mmc: Version ID is 270a
[    2.381535] dwmmc_rockchip ff500000.mmc: DW MMC controller at irq 49,32 bit host data width,256 deep fifo
[    2.400289] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.412993] WCN: marlin_init entry!
[    2.414890] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[    2.416888] of_cfs_init
[    2.417317] of_cfs_init: OK
[    2.417956] clk: Disabling unused clocks
[    2.420605] dw-apb-uart ff130000.serial: forbid DMA for kernel console
[    2.425015] Freeing unused kernel memory: 4736K
[    2.425709] Run /init as init process
[    2.426048]   with arguments:
[    2.426061]     /init
[    2.426073]   with environment:
[    2.426083]     HOME=/
[    2.426094]     TERM=linux
[    2.510235] mmc_host mmc0: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[    2.934019] dwmmc_rockchip ff500000.mmc: Successfully tuned phase to 190
[    2.934663] mmc0: new ultra high speed SDR104 SDHC card at address aaaa
[    2.936918] mmcblk0: mmc0:aaaa SP32G 29.7 GiB
[    2.943101]  mmcblk0: p1
[    3.187956] gpio-syscon ff100000.syscon:gpio: can't read the data register offset!
[    3.311462] rk_gmac-dwmac ff540000.ethernet: IRQ eth_wake_irq not found
[    3.312081] rk_gmac-dwmac ff540000.ethernet: IRQ eth_lpi not found
[    3.323009] rk_gmac-dwmac ff540000.ethernet: PTP uses main clock
[    3.323931] rk_gmac-dwmac ff540000.ethernet: clock input or output? (input).
[    3.329654] rk_gmac-dwmac ff540000.ethernet: TX delay(0x24).
[    3.330191] rk_gmac-dwmac ff540000.ethernet: RX delay(0x18).
[    3.333362] rk_gmac-dwmac ff540000.ethernet: integrated PHY? (no).
[    3.334008] rk_gmac-dwmac ff540000.ethernet: clock input from PHY
[    3.339587] rk_gmac-dwmac ff540000.ethernet: init for RGMII
[    3.343011] rk_gmac-dwmac ff540000.ethernet: User ID: 0x10, Synopsys ID: 0x35
[    3.343680] rk_gmac-dwmac ff540000.ethernet: 	DWMAC1000
[    3.344200] rk_gmac-dwmac ff540000.ethernet: DMA HW capability register supported
[    3.344877] rk_gmac-dwmac ff540000.ethernet: RX Checksum Offload Engine supported
[    3.345544] rk_gmac-dwmac ff540000.ethernet: COE Type 2
[    3.346018] rk_gmac-dwmac ff540000.ethernet: TX Checksum insertion supported
[    3.346646] rk_gmac-dwmac ff540000.ethernet: Wake-Up On Lan supported
[    3.347389] rk_gmac-dwmac ff540000.ethernet: Normal descriptors
[    3.347937] rk_gmac-dwmac ff540000.ethernet: Ring mode enabled
[    3.348706] rk_gmac-dwmac ff540000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    3.610550] EXT4-fs (mmcblk0p1): mounted filesystem d35cf75b-1dbb-4513-8d65-1675a7e0bc68 ro with ordered data mode. Quota mode: none.
[    4.192762] systemd[1]: Inserted module 'autofs4'
[    4.258497] systemd[1]: systemd 252.31-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    4.261487] systemd[1]: Detected architecture arm64.
[    4.269398] systemd[1]: Hostname set to <DietPi>.
[    5.095044] systemd[1]: Queued start job for default target graphical.target.
[    5.123261] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe.
[    5.139138] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[    5.153211] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch.
[    5.164952] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[    5.177580] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point.
[    5.188532] systemd[1]: Expecting device dev-ttyS2.device - /dev/ttyS2...
[    5.200600] systemd[1]: Reached target cryptsetup.target - Local Encrypted Volumes.
[    5.212633] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes.
[    5.224736] systemd[1]: Reached target paths.target - Path Units.
[    5.236543] systemd[1]: Reached target remote-fs.target - Remote File Systems.
[    5.248573] systemd[1]: Reached target slices.target - Slice Units.
[    5.260627] systemd[1]: Reached target swap.target - Swaps.
[    5.272732] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes.
[    5.285446] systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd communication Socket.
[    5.297107] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe.
[    5.310441] systemd[1]: Listening on systemd-journald-audit.socket - Journal Audit Socket.
[    5.321548] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log).
[    5.333628] systemd[1]: Listening on systemd-journald.socket - Journal Socket.
[    5.348559] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
[    5.361408] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
[    5.372546] systemd[1]: Reached target sockets.target - Socket Units.
[    5.416716] systemd[1]: Mounting dev-hugepages.mount - Huge Pages File System...
[    5.435856] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
[    5.459350] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
[    5.479539] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
[    5.506580] systemd[1]: Starting fake-hwclock.service - Restore / save the current clock...
[    5.535735] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout...
[    5.557793] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
[    5.577187] systemd[1]: Starting [email protected] - Load Kernel Module configfs...
[    5.596984] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
[    5.616869] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
[    5.636855] systemd[1]: Starting [email protected] - Load Kernel Module fuse...
[    5.641899] device-mapper: uevent: version 1.0.3
[    5.643173] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: [email protected]
[    5.649533] systemd[1]: Starting [email protected] - Load Kernel Module loop...
[    5.664801] systemd[1]: systemd-fsck-root.service - File System Check on Root Device was skipped because of an unmet condition check (ConditionPathExists=!/run/initramfs/fsck-root).
[    5.678673] systemd[1]: Starting systemd-journald.service - Journal Service...
[    5.692653] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
[    5.714590] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
[    5.728987] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[    5.760594] systemd[1]: Mounted dev-hugepages.mount - Huge Pages File System.
[    5.766310] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System.
[    5.773342] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System.
[    5.785579] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System.
[    5.796389] systemd[1]: Finished fake-hwclock.service - Restore / save the current clock.
[    5.811251] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes.
[    5.826883] systemd[1]: [email protected]: Deactivated successfully.
[    5.830417] systemd[1]: Finished [email protected] - Load Kernel Module configfs.
[    5.836312] EXT4-fs (mmcblk0p1): re-mounted d35cf75b-1dbb-4513-8d65-1675a7e0bc68 r/w. Quota mode: none.
[    5.838339] systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
[    5.840564] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module dm_mod.
[    5.859861] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
[    5.862746] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore.
[    5.883320] systemd[1]: [email protected]: Deactivated successfully.
[    5.885541] systemd[1]: Finished [email protected] - Load Kernel Module fuse.
[    5.898986] systemd[1]: [email protected]: Deactivated successfully.
[    5.908379] systemd[1]: Finished [email protected] - Load Kernel Module loop.
[    5.923010] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules.
[    5.930792] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems.
[    5.988847] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System...
[    6.012526] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System...
[    6.024752] systemd[1]: systemd-firstboot.service - First Boot Wizard was skipped because of an unmet condition check (ConditionFirstBoot=yes).
[    6.026370] systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival was skipped because of an unmet condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore).
[    6.039004] systemd[1]: Starting systemd-random-seed.service - Load/Save Random Seed...
[    6.043850] systemd[1]: systemd-repart.service - Repartition Root Disk was skipped because no trigger condition checks were met.
[    6.059839] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
[    6.086810] systemd[1]: Starting systemd-sysusers.service - Create System Users...
[    6.117198] systemd[1]: Started systemd-journald.service - Journal Service.
[    6.587596] systemd-journald[207]: Received client request to flush runtime journal.
[    8.060184] rk3288-crypto ff060000.crypto: will run requests pump with realtime priority
[    8.060276] rk3288-crypto ff060000.crypto: Register ecb(aes) as ecb-aes-rk
[    8.060358] rk3288-crypto ff060000.crypto: Register cbc(aes) as cbc-aes-rk
[    8.060379] rk3288-crypto ff060000.crypto: Register ecb(des) as ecb-des-rk
[    8.060399] rk3288-crypto ff060000.crypto: Register cbc(des) as cbc-des-rk
[    8.060418] rk3288-crypto ff060000.crypto: Register ecb(des3_ede) as ecb-des3-ede-rk
[    8.060437] rk3288-crypto ff060000.crypto: Register cbc(des3_ede) as cbc-des3-ede-rk
[    8.060457] rk3288-crypto ff060000.crypto: Register sha1 as rk-sha1
[    8.060477] rk3288-crypto ff060000.crypto: Register sha256 as rk-sha256
[    8.060497] rk3288-crypto ff060000.crypto: Register md5 as rk-md5
[    8.549715] rk_gmac-dwmac ff540000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[    8.552734] rk_gmac-dwmac ff540000.ethernet eth0: PHY [stmmac-0:00] driver [RTL8211E Gigabit Ethernet] (irq=POLL)
[    8.560298] rk_gmac-dwmac ff540000.ethernet eth0: No Safety Features support found
[    8.560329] rk_gmac-dwmac ff540000.ethernet eth0: PTP not supported by HW
[    8.560738] rk_gmac-dwmac ff540000.ethernet eth0: configuring for phy/rgmii link mode
[   10.764142] random: crng init done
[   13.665287] rk_gmac-dwmac ff540000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   18.401641] platform sound-spdif: deferred probe pending

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 handy

lsusb

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 19d1:0001 BYD EigenComm Compo
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsmod

Module                  Size  Used by
lima                   49152  0
gpu_sched              28672  1 lima
drm_shmem_helper       12288  1 lima
sun8i_thermal          12288  0
sunxi_cedrus           40960  0
v4l2_mem2mem           16384  1 sunxi_cedrus
videobuf2_dma_contig    16384  1 sunxi_cedrus
videobuf2_memops       16384  1 videobuf2_dma_contig
videobuf2_v4l2         16384  2 sunxi_cedrus,v4l2_mem2mem
cdc_acm                28672  0
videodev              180224  3 sunxi_cedrus,v4l2_mem2mem,videobuf2_v4l2
videobuf2_common       45056  5 sunxi_cedrus,videobuf2_dma_contig,videobuf2_memops,v4l2_mem2mem,videobuf2_v4l2
mc                     36864  5 sunxi_cedrus,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
cpufreq_dt             16384  0
evdev                  16384  0
uio_pdrv_genirq        16384  0
uio                    16384  1 uio_pdrv_genirq
dm_mod                 98304  0
ip_tables              20480  0
x_tables               24576  1 ip_tables
autofs4                36864  2
rndis_host             16384  0
cdc_ether              16384  1 rndis_host
usbnet                 32768  2 rndis_host,cdc_ether
sunxi                  12288  0
phy_generic            16384  2 sunxi
gpio_keys              16384  0
ac200_phy              12288  1

dmesg -6 (selected lines)

[    5.214210] usb 1-1: New USB device found, idVendor=19d1, idProduct=0001, bcdDevice= 2.00
[    5.222631] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.229878] usb 1-1: Product: EigenComm Compo
[    5.234295] usb 1-1: Manufacturer: EigenComm
[    5.238606] usb 1-1: SerialNumber: 000000000001
[    6.605343] usbcore: registered new interface driver cdc_ether
[    6.666027] rndis_host 1-1:1.0: rndis media connect
[    6.735450] rndis_host 1-1:1.0 eth1: register 'rndis_host' at usb-1c1b000.usb-1, RNDIS device, 20:89:84:6a:96:ab
[    6.746377] usbcore: registered new interface driver rndis_host
[   14.193924] cdc_acm 1-1:1.2: ttyACM0: USB ACM device
[   14.249228] cdc_acm 1-1:1.4: ttyACM1: USB ACM device
[   14.284910] cdc_acm 1-1:1.6: ttyACM2: USB ACM device
[   14.285106] usbcore: registered new interface driver cdc_acm
[   14.285117] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
@MichaIng
Copy link
Owner

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.

@mszyndel
Copy link
Author

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

@MichaIng
Copy link
Owner

Sadly here is no overlay coming with the kernel, to toggle USB support on GPIO:
image

The Allwinner kernel has interfaces for usbhosts, which we enable by default for some SBCs, including the NanoPi NEO. See /boot/dietpiEnv.txt.
image

I'll check the source of those overlays, maybe we can try to create similar ones for the RK3328.

@MichaIng
Copy link
Owner

MichaIng commented Nov 22, 2024

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

@mszyndel
Copy link
Author

mszyndel commented Nov 23, 2024

After running the command I can't ssh into it. Either times out or says Host is down . I will try to connect through UART later

@MichaIng
Copy link
Owner

Hmm, it worked fine here, and the /proc/device-tree/usb@ff580000/dr_mode output verified the mode switch. Also even if an overlay is broken, and causes an error when being applied, the boost script just reverts to the original device tree 🤔.

... ah, I see there was an exec in my command, which replaces the shell process with the dtc command. Copy&paste from another script 😅. However, it terminates the shell session, but another SSH login did work in my case, to repeat the steps without exec, resp. from the dtc command on.

@mszyndel
Copy link
Author

mszyndel commented Nov 24, 2024

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!

cat /proc/device-tree/usb@ff580000/dr_mode; echo
host
# lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 19d1:0001 BYD EigenComm Compo
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Welcome message shows following

curl: (28) Resolving timed out after 3000 milliseconds
# dmesg | grep eth
[    3.357006] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-ff580000.usb-1, RNDIS device, 20:89:84:6a:96:ab
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 20:89:84:6a:96:ab brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.2/24 brd 192.168.10.255 scope global dynamic eth0
       valid_lft 86125sec preferred_lft 86125sec
    inet6 fe80::2289:84ff:fe6a:96ab/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether d2:8a:a2:8b:b5:86 brd ff:ff:ff:ff:ff:ff

ping works when I specify the interface

root@DietPi:~# ping 8.8.8.8
ping: connect: Network is unreachable
root@DietPi:~# ping -Ieth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.10.2 eth0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=113 time=151 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=113 time=44.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=113 time=44.4 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=113 time=51.8 ms

same for curl

root@DietPi:~# curl  https://google.com
curl: (7) Failed to connect to google.com port 443 after 3053 ms: Couldn't connect to server
root@DietPi:~# curl --interface eth0 https://google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.com/">here</A>.
</BODY></HTML>

I'll poke around a little more now that we're safely in userland 😅

@mszyndel
Copy link
Author

Okay, to make it work I did following changes to network interfaces

root@DietPi:~# cat /etc/network/interfaces
# Location: /etc/network/interfaces
# Please modify network settings via: dietpi-config
# Or create your own drop-ins in: /etc/network/interfaces.d/

# Drop-in configs
source interfaces.d/*

auto eth1

# 4G
allow-hotplug eth0
iface eth0 inet dhcp
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
# dns-nameservers 9.9.9.9 149.112.112.112

# Ethernet
allow-hotplug eth1
iface eth1 inet dhcp
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 9.9.9.9

@MichaIng
Copy link
Owner

Sorry for the late reply. So The 4G module shows up as eth0, that is interesting. That also broke the network connection, I guess, as previously eth0 was the Ethernet adapter.

auto eth1 should not be needed, as allow-hotplug eth1 configures it already, once detected.

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
#7286 (comment)

@mszyndel
Copy link
Author

So the solution to get the $G module detected as USB device was the overlay, right #7286 (comment)

Yes

@MichaIng MichaIng added this to the v9.10 milestone Dec 12, 2024
@MichaIng MichaIng changed the title Bundled 4G module doesn't work on NanoPi NEO3 (aarch64) (but does on NanoPi NEO) NanoPi NEO3 | Add device tree overlay for USB pins host mode Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants