Closed ckuethe closed 3 years ago
Many thanks for your report.
The second USB port works and the serial device is detected ~3 minutes after boot, but disconnected 2 seconds later:
[ 184.643397] usb 6-1: new full-speed USB device number 2 using ohci-platform
[ 184.870381] usb 6-1: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 4.00
[ 184.870409] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 184.870426] usb 6-1: Product: USB-Serial Controller
[ 184.870441] usb 6-1: Manufacturer: Prolific Technology Inc.
[ 184.950305] usbcore: registered new interface driver usbserial_generic
[ 184.950406] usbserial: USB Serial support registered for generic
[ 184.969560] usbcore: registered new interface driver pl2303
[ 184.969774] usbserial: USB Serial support registered for pl2303
[ 184.970151] pl2303 6-1:1.0: pl2303 converter detected
[ 184.996857] usb 6-1: pl2303 converter now attached to ttyUSB0
[ 186.657008] usb 6-1: USB disconnect, device number 2
[ 186.658151] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 186.658308] pl2303 6-1:1.0: device disconnected
Can you try to attach it before booting the system? And can you also try to attach it as only USB device, leaving the camera unplugged to see whether this makes a difference? Bad cables and voltage issues can lead to flaky peripheral connections, so good to test things isolated. FriendlyWRT ships with a much older kernel, so things may be loaded in a different way/order, CPU frequency may be lower by default, or other reasons why the USB device stays connected.
Btw, there are two device tree overlays to enable additional USB host controllers. In /boot/armbianEnv.txt
add usbhost2 usbhost3
to the overlays=
line. But I doubt that this helps with the second USB port as the device was detected for a short while (or did you plug it into the first USB port for testing?) and the R1 doesn't have more. Probably also this breaks the internally via USB attached second Ethernet port. But worth to give it a shot, at least here it seems to have helped: https://forum.armbian.com/topic/17123-usb-on-nanopi-r1s-not-working-under-armbian_21021_nanopi-r1_buster_current_51012-or-armbian_21021_nanopi-r1_focal_current_51012/
If it really turns out that it is disabled by default and the usbhost2
enables it, I'll update our image and PREP to have this overlay added by default.
Having a device plugged in to the second port at boot doesn't help.
That second connect was me plugging and unplugging for testing. Enabling usbhost2
fixes the second port and allows me to use the usb-serial device that I wanted to use. I'm not using ethernet at all on this device but ip link
and dmesg
still show two interfaces after enabling usbhost2
Okay great. I'll add this overlay by default to our image.
Also new images will have it enabled now by default: https://github.com/MichaIng/DietPi/commit/cc154ff Existing image updated and Cloudflare cache cleared.
I'd call this issue fixed, then. Thanks for the speedy resolution.
Creating a bug report/issue
Required Information
cat /boot/dietpi/.version
echo $G_DISTRO_NAME $G_RASPBIAN
bullseye
uname -a
Linux r1 5.10.60-sunxi #21.08.2 SMP Tue Sep 14 16:28:44 UTC 2021 armv7l GNU/Linux
echo $G_HW_MODEL_NAME
or (EG: RPi3)NanoPi R1 (armv7l)
Vilros 5V 2.5A
SAMSUNG 32GB Evo Plus Class 10 Micro SDHC
Additional Information (if applicable)
dmesg
,minicom
echo $G_HW_UUID
Steps to reproduce
lsusb -tv
Expected behaviour
Actual behaviour
Extra details
My particular R1 came with internal eMMC preloaded with FriendlyWRT which does see both usb ports. I've attached a tarball of its
/boot
partition - I haven't yet determined what they're doing to enable the second port.dmesg from dietpi
Logfile attached. Click to expand!
``` [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.10.60-sunxi (root@runner4) (arm-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0, GNU ld (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 2.32.0.20190321) #21.08.2 SMP Tue Sep 14 16:28:44 UTC 2021 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: FriendlyElec NanoPi-R1 [ 0.000000] earlycon: uart0 at MMIO32 0x01c28000 (options '115200n8') [ 0.000000] printk: bootconsole [uart0] enabled [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 128 MiB at 0x77c00000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000040000000-0x000000006fffffff] [ 0.000000] HighMem [mem 0x0000000070000000-0x000000007fffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x000000007fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff] [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] Normal zone: 1728 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:63 [ 0.000000] HighMem zone: 65536 pages, LIFO batch:15 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: Using PSCI v0.1 Function IDs from DT [ 0.000000] percpu: Embedded 20 pages/cpu s50764 r8192 d22964 u81920 [ 0.000000] pcpu-alloc: s50764 r8192 d22964 u81920 alloc=20*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260416 [ 0.000000] Kernel command line: root=UUID=1c77f31f-94b7-432e-94d3-73ea68d8a05d rootwait rootfstype=ext4 earlycon console=ttyS1,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=4 ubootpart=453dbe72-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u net.ifnames=0 sunxi_wdt.nowayout=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off [ 0.000000] Memory: 882264K/1048576K available (9216K kernel code, 1460K rwdata, 3232K rodata, 1024K init, 333K bss, 35240K reserved, 131072K cma-reserved, 131060K highmem) [ 0.000000] random: get_random_u32 called from __kmem_cache_create+0x1b/0x298 with crng_init=0 [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 42134 entries in 83 pages [ 0.000000] ftrace: allocated 83 pages with 4 groups [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4. [ 0.000000] Rude 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: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 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.000012] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000034] Switching to timer-based delay loop, resolution 41ns [ 0.000495] Console: colour dummy device 80x30 [ 0.000597] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000) [ 0.000630] pid_max: default: 32768 minimum: 301 [ 0.001009] LSM: Security Framework initializing [ 0.001120] Yama: becoming mindful. [ 0.001444] AppArmor: AppArmor initialized [ 0.001594] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.001622] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.003564] CPU: Testing write buffer coherency: ok [ 0.004337] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.005654] Setting up static identity map for 0x40100000 - 0x40100054 [ 0.005875] rcu: Hierarchical SRCU implementation. [ 0.008000] smp: Bringing up secondary CPUs ... [ 0.019407] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.030959] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.042344] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.042541] smp: Brought up 1 node, 4 CPUs [ 0.042569] SMP: Total of 4 processors activated (192.00 BogoMIPS). [ 0.042581] CPU: All CPU(s) started in HYP mode. [ 0.042589] CPU: Virtualization extensions available. [ 0.044062] allocated 1048576 bytes of page_ext [ 0.045108] devtmpfs: initialized [ 0.060093] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.060486] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.060572] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.067108] pinctrl core: initialized pinctrl subsystem [ 0.069210] NET: Registered protocol family 16 [ 0.072402] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.073599] audit: initializing netlink subsys (disabled) [ 0.074097] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1 [ 0.075080] thermal_sys: Registered thermal governor 'fair_share' [ 0.075094] thermal_sys: Registered thermal governor 'bang_bang' [ 0.075107] thermal_sys: Registered thermal governor 'step_wise' [ 0.076190] cpuidle: using governor ladder [ 0.076436] cpuidle: using governor menu [ 0.077514] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.077526] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.127566] cryptd: max_cpu_qlen set to 1000 [ 0.203011] raid6: neonx8 gen() 370 MB/s [ 0.271239] raid6: neonx8 xor() 275 MB/s [ 0.339472] raid6: neonx4 gen() 394 MB/s [ 0.407692] raid6: neonx4 xor() 300 MB/s [ 0.475878] raid6: neonx2 gen() 435 MB/s [ 0.544103] raid6: neonx2 xor() 310 MB/s [ 0.612346] raid6: neonx1 gen() 388 MB/s [ 0.680550] raid6: neonx1 xor() 269 MB/s [ 0.748864] raid6: int32x8 gen() 144 MB/s [ 0.817061] raid6: int32x8 xor() 85 MB/s [ 0.885272] raid6: int32x4 gen() 168 MB/s [ 0.953521] raid6: int32x4 xor() 98 MB/s [ 1.021727] raid6: int32x2 gen() 190 MB/s [ 1.089976] raid6: int32x2 xor() 101 MB/s [ 1.158189] raid6: int32x1 gen() 191 MB/s [ 1.226364] raid6: int32x1 xor() 91 MB/s [ 1.226377] raid6: using algorithm neonx2 gen() 435 MB/s [ 1.226387] raid6: .... xor() 310 MB/s, rmw enabled [ 1.226398] raid6: using neon recovery algorithm [ 1.229172] iommu: Default domain type: Translated [ 1.229835] SCSI subsystem initialized [ 1.230210] libata version 3.00 loaded. [ 1.230610] usbcore: registered new interface driver usbfs [ 1.230696] usbcore: registered new interface driver hub [ 1.230837] usbcore: registered new device driver usb [ 1.231023] mc: Linux media interface: v0.10 [ 1.231085] videodev: Linux video capture interface: v2.00 [ 1.231328] pps_core: LinuxPPS API ver. 1 registered [ 1.231341] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giomettidmesg from friendlywrt on internal emmc
Logfile attached. Click to expand!
``` [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.14.111 (root@ubuntu) (gcc version 4.9.3 (ctng-1.21.0-229g-FA)) #193 SMP Thu Jun 10 18:20:47 CST 2021 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: FriendlyElec NanoPi-R1 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] Reserved memory: created CMA memory pool at 0x000000007bc00000, size 64 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] free_area_init_node: node 0, pgdat c1260040, node_mem_map ef6fa000 [ 0.000000] Normal zone: 1728 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:31 [ 0.000000] HighMem zone: 65536 pages, LIFO batch:15 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: Using PSCI v0.1 Function IDs from DT [ 0.000000] percpu: Embedded 17 pages/cpu @ef69b000 s37120 r8192 d24320 u69632 [ 0.000000] pcpu-alloc: s37120 r8192 d24320 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260416 [ 0.000000] Kernel command line: console=ttyS1,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait fsck.repair=yes panic=10 fbcon=map:0 data=/dev/mmcblk0p3 snd-soc-core.pmdown_time=3600000 [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 949260K/1048576K available (10240K kernel code, 391K rwdata, 2080K rodata, 2048K init, 303K bss, 33780K reserved, 65536K cma-reserved, 196600K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0c00000 (12256 kB) [ 0.000000] .init : 0xc1000000 - 0xc1200000 (2048 kB) [ 0.000000] .data : 0xc1200000 - 0xc1261f00 ( 392 kB) [ 0.000000] .bss : 0xc126a884 - 0xc12b6850 ( 304 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000018] Switching to timer-based delay loop, resolution 41ns [ 0.000215] Console: colour dummy device 80x30 [ 0.000253] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=120000) [ 0.000266] pid_max: default: 32768 minimum: 301 [ 0.000435] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000450] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.001156] CPU: Testing write buffer coherency: ok [ 0.001587] CPU0: update cpu_capacity 1024 [ 0.001599] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.001964] Setting up static identity map for 0x40200000 - 0x40200060 [ 0.002081] Hierarchical SRCU implementation. [ 0.002634] smp: Bringing up secondary CPUs ... [ 0.013411] CPU1: update cpu_capacity 1024 [ 0.013417] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.024310] CPU2: update cpu_capacity 1024 [ 0.024316] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.035110] CPU3: update cpu_capacity 1024 [ 0.035115] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.035203] smp: Brought up 1 node, 4 CPUs [ 0.035231] SMP: Total of 4 processors activated (192.00 BogoMIPS). [ 0.035238] CPU: All CPU(s) started in HYP mode. [ 0.035243] CPU: Virtualization extensions available. [ 0.036009] devtmpfs: initialized [ 0.043030] random: get_random_u32 called from bucket_table_alloc+0xf0/0x240 with crng_init=0 [ 0.043632] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.043898] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns [ 0.043922] futex hash table entries: 1024 (order: 4, 65536 bytes) [ 0.046560] xor: measuring software checksum speed [ 0.094889] arm4regs : 1372.800 MB/sec [ 0.144944] 8regs : 769.600 MB/sec [ 0.194998] 32regs : 850.400 MB/sec [ 0.245055] neon : 1283.200 MB/sec [ 0.245063] xor: using function: arm4regs (1372.800 MB/sec) [ 0.245081] pinctrl core: initialized pinctrl subsystem [ 0.246032] NET: Registered protocol family 16 [ 0.247359] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.248306] cpuidle: using governor ladder [ 0.248464] cpuidle: using governor menu [ 0.248866] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.248875] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.268368] SCSI subsystem initialized [ 0.268580] libata version 3.00 loaded. [ 0.268798] usbcore: registered new interface driver usbfs [ 0.268860] usbcore: registered new interface driver hub [ 0.268944] usbcore: registered new device driver usb [ 0.269129] media: Linux media interface: v0.10 [ 0.269166] Linux video capture interface: v2.00 [ 0.269265] pps_core: LinuxPPS API ver. 1 registered [ 0.269273] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giomettifriendlywrt-boot-tgz.zip