您尚未登录。

楼主 #1 2020-09-04 18:51:50

liuliu
会员
注册时间: 2020-09-04
已发帖子: 2
积分: 17

新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

硬件是新的R3板。配套的USB OTG线。
完全按照 https://github.com/aodzip/buildroot-tiny200 这个来编译。
启动之后如果连接USB 线到电脑,可以识别到。
板端显示:
[   77.827933] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
PC端lsusb可以显示:
Bus 001 Device 002: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

但是是互相PING不通的。PC UBUNTU 隔一段时间的显示connection fail。
后来修改linux-menuconfig里面
Device Drivers > USB support > USB Gadget Support
把Ethernet Gadget (with CDC Ethernet support) 改为Network Control Model (NCM) support 后,
重新编译就可以PING通了。
证明USB是可以工作在DEVICE模式的。

但是现在问题是用OTG 线接鼠标键盘,U盘都不能识别。测量USB口是有5V电压的。
OTG线接在ANDROID手机上是可以读到U盘的,就是线是好的。
奇怪的是无论什么情况下用 lsusb都是什么都没有显示,连根USB设备都没有显示。
这是什么情况呢?


启动的信息如下:

reboot
# Stopping network: OK
Saving random seed: SKIP (read-only file system detected)
Stopping klogd: OK
Stopping syslogd: OK
umount: devtmpfs busy - remounted read-only
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
[   88.669563] reboot: Restarting system

U-Boot SPL 2020.07 (Aug 31 2020 - 12:20:16 +0800)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI


U-Boot 2020.07 (Aug 31 2020 - 12:20:16 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 480x272 lcd console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0 
Booting from FEL...
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
List of MTD devices:
No MTD device found
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Booting from SPI-NOR...
device 0 offset 0x80000, size 0x4000
SF: 16384 bytes @ 0x80000 Read: OK
device 0 offset 0x100000, size 0x700000
SF: 7340032 bytes @ 0x100000 Read: OK
## Flattened Device Tree blob at 80700000
   Booting using the fdt blob at 0x80700000
   Loading Device Tree to 816f9000, end 816ff714 ... OK
Cannot setup simplefb: node not found

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.58 (root@ubuntu) (gcc version 8.4.0 (Buildroot 2020.02.4)) #6 Fri Sep 4 18:14:40 PST 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Widora TINY200 R3
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x83000000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=/dev/mtdblock3
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 38756K/65536K available (6144K kernel code, 238K rwdata, 1620K rodata, 1024K init, 221K bss, 10396K reserved, 16384K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[    0.000034] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000096] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000552] Console: colour dummy device 80x30
[    0.000633] Calibrating delay loop... 383.38 BogoMIPS (lpj=1916928)
[    0.050223] pid_max: default: 32768 minimum: 301
[    0.050551] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.050582] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.051901] CPU: Testing write buffer coherency: ok
[    0.053427] Setting up static identity map for 0x80100000 - 0x80100058
[    0.054406] devtmpfs: initialized
[    0.060825] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.060870] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.063958] pinctrl core: initialized pinctrl subsystem
[    0.065778] NET: Registered protocol family 16
[    0.068024] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.069402] cpuidle: using governor menu
[    0.098795] SCSI subsystem initialized
[    0.099067] usbcore: registered new interface driver usbfs
[    0.099173] usbcore: registered new interface driver hub
[    0.099307] usbcore: registered new device driver usb
[    0.099679] mc: Linux media interface: v0.10
[    0.099758] videodev: Linux video capture interface: v2.00
[    0.099866] pps_core: LinuxPPS API ver. 1 registered
[    0.099878] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.099919] PTP clock support registered
[    0.100319] Advanced Linux Sound Architecture Driver Initialized.
[    0.101984] clocksource: Switched to clocksource timer
[    0.124782] thermal_sys: Registered thermal governor 'step_wise'
[    0.125306] NET: Registered protocol family 2
[    0.126369] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.126422] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.126453] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.126480] TCP: Hash tables configured (established 1024 bind 1024)
[    0.126702] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.126746] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.127120] NET: Registered protocol family 1
[    0.128825] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.130121] Initialise system trusted keyrings
[    0.130600] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.144023] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.207356] Key type asymmetric registered
[    0.207385] Asymmetric key parser 'x509' registered
[    0.207520] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.207537] io scheduler mq-deadline registered
[    0.207546] io scheduler kyber registered
[    0.217288] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.232950] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.237166] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.238169] printk: console [ttyS0] disabled
[    0.258436] 1c25400.serial: ttyS0 at MMIO 0x1c25400 (irq = 28, base_baud = 6250000) is a 16550A
[    0.672791] printk: console [ttyS0] enabled
[    0.680392] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    0.697224] panel-simple panel: panel supply power not found, using dummy regulator
[    0.706196] SCSI Media Changer driver v0.25 
[    0.711506] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.723840] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.729527] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.735969] Creating 4 MTD partitions on "spi0.0":
[    0.740764] 0x000000000000-0x000000080000 : "u-boot"
[    0.748311] 0x000000080000-0x000000090000 : "dtb"
[    0.755590] 0x000000100000-0x000000800000 : "kernel"
[    0.763138] 0x000000800000-0x000001000000 : "rootfs"
[    0.770982] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.777604] ehci-platform: EHCI generic platform driver
[    0.783143] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.789375] ohci-platform: OHCI generic platform driver
[    0.795019] usbcore: registered new interface driver usb-storage
[    0.801728] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    0.814405] using random self ethernet address
[    0.818860] using random host ethernet address
[    0.824275] usb0: HOST MAC fe:04:df:84:69:02
[    0.828627] usb0: MAC 16:1f:34:3e:3c:1a
[    0.832623] using random self ethernet address
[    0.837064] using random host ethernet address
[    0.841639] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    0.848323] g_ether gadget: g_ether ready
[    0.852718] i2c /dev entries driver
[    0.856637] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    0.869060] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    0.879892] ov5640 0-003c: 0-003c supply DOVDD not found, using dummy regulator
[    0.887473] ov5640 0-003c: 0-003c supply AVDD not found, using dummy regulator
[    0.894901] ov5640 0-003c: 0-003c supply DVDD not found, using dummy regulator
[    0.902611] ov5640 0-003c: ov5640_read_reg: error: reg=300a
[    0.908186] ov5640 0-003c: ov5640_check_chip_id: failed to read chip identifier
[    0.916539] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    0.928790] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.938145] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.975460] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    0.984075] usbcore: registered new interface driver usbhid
[    0.989640] usbhid: USB HID core driver
[    0.996396] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[    1.008959] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[    1.021823] NET: Registered protocol family 17
[    1.026452] Key type dns_resolver registered
[    1.031517] Loading compiled-in X.509 certificates
[    1.045502] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[    1.056054] sun4i-drm soc:display-engine: bound 1e60000.display-backend (ops 0xc0739a14)
[    1.065163] sun4i-drm soc:display-engine: bound 1c0c000.lcd-controller (ops 0xc07385b4)
[    1.073593] sun4i-drm soc:display-engine: bound 1c0a000.tv-encoder (ops 0xc07392d4)
[    1.081241] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.087923] [drm] No driver support for vblank timestamp query.
[    1.095108] [drm] Initialized sun4i-drm 1.0.0 20150629 for soc:display-engine on minor 0
[    1.103891] [drm] kms: can't enable cloning when we probably wanted to.
[    1.154323] Console: switching to colour frame buffer device 60x34
[    1.177495] sun4i-drm soc:display-engine: fb0: sun4i-drmdrmfb frame buffer device
[    1.185777] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.199397] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.206219] ALSA device list:
[    1.209200]   #0: F1C100s Audio Codec
[    1.213331] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.222046] cfg80211: failed to load regulatory.db
[    1.229335] random: fast init done
[    1.238436] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.249363] devtmpfs: mounted
[    1.255940] Freeing unused kernel memory: 1024K
[    1.260547] Run /sbin/init as init process
[    1.342827] random: crng init done
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: SKIP (read-only file system detected)
Starting network: OK

Welcome to Widora TINY200 R3
buildroot login: root
# lsusb
#

离线

#2 2020-09-04 18:57:40

aodzip
会员
注册时间: 2019-10-15
已发帖子: 130
积分: 100

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

R3硬件不支持OTG切换(删除了ID线),自行修改dts为host模式

离线

#3 2020-09-04 22:39:33

netwp
会员
注册时间: 2018-08-19
已发帖子: 31
积分: 5

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

&usb_otg {
    dr_mode = "peripheral"; /* otg host peripheral */
    status = "okay";
};

&usbphy {
    // usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
    status = "okay";
};
改为host就可以了。
下面那个PE2的ID被注释掉了,恢复后是不是就可以使用OTG模式了,还需要改内核驱动吗

离线

#4 2020-09-05 13:45:52

mango
会员
所在地: 芒果派
注册时间: 2017-12-02
已发帖子: 779
积分: 730

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

IO太紧张,所以没usb-id识别线。
软件主动设置HOST才行。






歪朵拉开源硬件: https://widora.cn
淘宝:  https://widora.taobao.com/

离线

#5 2020-11-30 15:31:57

darthmike
会员
注册时间: 2020-11-19
已发帖子: 19
积分: 4

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

本人也是R3,非常想知道楼主说的linux-menuconfig是怎么进去配置的啊,是buildroot吗

离线

#6 2020-11-30 15:48:10

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

darthmike 说:

本人也是R3,非常想知道楼主说的linux-menuconfig是怎么进去配置的啊,是buildroot吗

是的,buildroot已经处理好了。

make linux-menuconfig

离线

#7 2020-12-08 11:46:30

shaoshengli
会员
注册时间: 2020-10-27
已发帖子: 5
积分: 100

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

各位亲,怎么改USB HOST模式呢? 修改了DTS还是不行,

&usb_otg {
    dr_mode = "peripheral"; /* otg host peripheral */
    status = "okay";
};

&usbphy {
   //usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
    status = "okay";
};
应该要怎么改呢?

离线

#8 2020-12-08 11:53:33

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

dr_mode = "host"

离线

#9 2020-12-09 10:53:50

shaoshengli
会员
注册时间: 2020-10-27
已发帖子: 5
积分: 100

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

已经改了DTS了,是不是内核也需要更改啊,还是不行,只有一个虚拟网卡的USBID

离线

#10 2020-12-09 11:11:01

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

shaoshengli 说:

已经改了DTS了,是不是内核也需要更改啊,还是不行,只有一个虚拟网卡的USBID

lsusb 有反应吗?

离线

#11 2020-12-09 11:40:05

shaoshengli
会员
注册时间: 2020-10-27
已发帖子: 5
积分: 100

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

没有我接入的USB设备的ID号,只有一个默认的虚拟网卡ID ,内核是4.15的

离线

#12 2020-12-09 12:36:00

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

shaoshengli 说:

没有我接入的USB设备的ID号,只有一个默认的虚拟网卡ID ,内核是4.15的

buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
http://whycan.com/t_5221.html
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)





离线

#13 2020-12-10 11:26:47

shaoshengli
会员
注册时间: 2020-10-27
已发帖子: 5
积分: 100

Re: 新买的WIDORA TINNY200 R3,不能使用USB HOST功能,但是能用USB DEVICE功能,请大家帮忙看看

可以取消USB Gadget吗,同时USB支持host模式,我发现取消了USB Gadget USB一个都识别不到了

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn