F1C100S的USB作为纯USB HOST使用,外部接了一个GL850G的HUB,HUB下面挂了一个RTL8188(wifi),一个CH340G,还有一个U盘,
1、直接用nano的config文件,没法发现usb设备,貌似被作为device了。lsusb 只有一个root hub
2、我把kernel中USB OTG相关的menuconfig部分取消选择了,结果lsusb 什么都没有了,下面是启动log
kernel_config.zip (直接改成.config)
U-Boot 2018.01-05676-g00188782ee (Apr 08 2018 - 16:10:25 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
Setting up a 480x272 lcd console (overscan 0x0)
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
280 bytes read in 15 ms (17.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
7583 bytes read in 26 ms (284.2 KiB/s)
reading zImage
3940448 bytes read in 281 ms (13.4 MiB/s)
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 80e60000, end 80e64d9e ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (njatech@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #7 Sun May 12 22:54:34 PDT 2019
[ 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: Lichee Pi Nano
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] random: fast init done
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Memory: 22664K/32768K available (6144K kernel code, 255K rwdata, 1420K rodata, 1024K init, 244K bss, 10104K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc2800000 - 0xff800000 ( 976 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7136 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 256 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 245 kB)
[ 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.000044] 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.000544] Console: colour dummy device 80x30
[ 0.001097] console [tty0] enabled
[ 0.001180] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[ 0.050258] pid_max: default: 32768 minimum: 301
[ 0.050514] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.050586] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.051784] CPU: Testing write buffer coherency: ok
[ 0.053386] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.055406] devtmpfs: initialized
[ 0.059925] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.060058] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.060416] pinctrl core: initialized pinctrl subsystem
[ 0.062159] NET: Registered protocol family 16
[ 0.063420] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.064867] cpuidle: using governor menu
[ 0.083400] SCSI subsystem initialized
[ 0.083780] usbcore: registered new interface driver usbfs
[ 0.083961] usbcore: registered new interface driver hub
[ 0.084166] usbcore: registered new device driver usb
[ 0.084569] pps_core: LinuxPPS API ver. 1 registered
[ 0.084636] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.084726] PTP clock support registered
[ 0.085106] Advanced Linux Sound Architecture Driver Initialized.
[ 0.086362] clocksource: Switched to clocksource timer
[ 0.109472] NET: Registered protocol family 2
[ 0.110617] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.110737] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.110798] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.111095] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.111183] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.111622] NET: Registered protocol family 1
[ 0.112787] RPC: Registered named UNIX socket transport module.
[ 0.112888] RPC: Registered udp transport module.
[ 0.112924] RPC: Registered tcp transport module.
[ 0.112953] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.114751] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.116477] Initialise system trusted keyrings
[ 0.117071] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.129274] NFS: Registering the id_resolver key type
[ 0.129415] Key type id_resolver registered
[ 0.129456] Key type id_legacy registered
[ 0.140187] Key type asymmetric registered
[ 0.140285] Asymmetric key parser 'x509' registered
[ 0.140507] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.140581] io scheduler noop registered
[ 0.140616] io scheduler deadline registered
[ 0.141235] io scheduler cfq registered (default)
[ 0.141315] io scheduler mq-deadline registered
[ 0.141350] io scheduler kyber registered
[ 0.142248] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[ 0.149160] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.296870] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.302576] console [ttyS0] disabled
[ 0.322873] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.793241] console [ttyS0] enabled
[ 0.801832] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.810996] SCSI Media Changer driver v0.25
[ 0.816603] usbcore: registered new interface driver rtl8187
[ 0.822445] usbcore: registered new interface driver rtl8xxxu
[ 0.828432] usbcore: registered new interface driver rtl8150
[ 0.834235] usbcore: registered new interface driver r8152
[ 0.840209] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.846861] ehci-platform: EHCI generic platform driver
[ 0.852339] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.858677] ohci-platform: OHCI generic platform driver
[ 0.864237] usbcore: registered new interface driver cdc_wdm
[ 0.870175] usbcore: registered new interface driver usb-storage
[ 0.876543] usbcore: registered new interface driver usbserial_generic
[ 0.883193] usbserial: USB Serial support registered for generic
[ 0.889441] usbcore: registered new interface driver ch341
[ 0.895036] usbserial: USB Serial support registered for ch341-uart
[ 0.901791] musb-sunxi 1c13000.usb: Invalid or missing 'dr_mode' property
[ 0.908769] musb-sunxi: probe of 1c13000.usb failed with error -22
[ 0.915280] i2c /dev entries driver
[ 0.976480] sunxi-mmc 1c0f000.mmc: base:0xa5d79b30 irq:19
[ 0.983576] usbcore: registered new interface driver usbhid
[ 0.989331] usbhid: USB HID core driver
[ 1.007982] NET: Registered protocol family 17
[ 1.012693] Key type dns_resolver registered
[ 1.019181] Loading compiled-in X.509 certificates
[ 1.033705] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07396b8)
[ 1.042559] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073899c)
[ 1.050407] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.057105] [drm] No driver support for vblank timestamp query.
[ 1.103887] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.108792] Console: switching to colour frame buffer device 60x34
[ 1.109445] mmc0: new high speed SDHC card at address 1234
[ 1.110416] mmcblk0: mmc0:1234 SA08G 7.21 GiB
[ 1.112786] mmcblk0: p1 p2
[ 1.166306] sun4i-drm display-engine: fb0: frame buffer device
[ 1.180033] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.195356] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.216873] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.231103] ALSA device list:
[ 1.237869] #0: Loopback 1
[ 1.245275] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.261328] cfg80211: failed to load regulatory.db
[ 1.271969] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.313933] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.329768] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.344717] devtmpfs: mounted
[ 1.356061] Freeing unused kernel memory: 1024K
[ 1.522052] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Welcome to Lichee Pi
Lichee login: [ 6.625019] random: crng init done
Welcome to Lichee Pi
最近编辑记录 阿黄 (2019-05-13 14:06:24)
离线
估计是原来的已经可以了,只是我的PE2没有加上拉,导致OTG认为是低,因此变成设备了。
离线
我用nano加底板 不接microUSB也是一样,显示g_cdc_gadget:g_cdc ready, 可能这个内核版本USB驱动有问题吧,看OTG那个帖子讨论,要把USB Clock配置改下,估计还要查一下
离线
也有可能本来就是这样,只是告诉用户 cdc 驱动准备好了,没有别的意思
离线
花了一点时间对Icenowy的patch和chong的patch进行了比较,结果发现chong的patch包基本上就是在Icenowy的基础上更改了下面的这个文件:
--- ../linux/drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-15 22:48:18.824587965 +0800
+++ drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-23 09:05:17.959348454 +0800
@@ -238,7 +238,7 @@
/* The BSP header file has a CIR_CFG, but no mod clock uses this definition */static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M",
- 0x0cc, BIT(8), 0);
+ 0x0cc, BIT(1), 0);static SUNXI_CCU_GATE(dram_ve_clk, "dram-ve", "pll-ddr",
0x100, BIT(0), 0);理论上将上面这个patch应用到Icenowy的4.14内核中,USB应该也就能跑了。
按照这个修改,测试看看
离线
jiangming1399 说:花了一点时间对Icenowy的patch和chong的patch进行了比较,结果发现chong的patch包基本上就是在Icenowy的基础上更改了下面的这个文件:
--- ../linux/drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-15 22:48:18.824587965 +0800
+++ drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-23 09:05:17.959348454 +0800
@@ -238,7 +238,7 @@
/* The BSP header file has a CIR_CFG, but no mod clock uses this definition */static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M",
- 0x0cc, BIT(8), 0);
+ 0x0cc, BIT(1), 0);static SUNXI_CCU_GATE(dram_ve_clk, "dram-ve", "pll-ddr",
0x100, BIT(0), 0);理论上将上面这个patch应用到Icenowy的4.14内核中,USB应该也就能跑了。
按照这个修改,测试看看
就是修改这个,就OK了。 另外我PE是悬空的,目前设备树里面的PE2 ACTIVE HIGH 不改就可以
最近编辑记录 阿黄 (2019-05-13 16:31:09)
离线
好贴火钳留名
请问楼主, 荔枝派 nano 应该如何改?
离线
好贴火钳留名
请问楼主, 荔枝派 nano 应该如何改?
就是nano啊
离线
还能这么玩 说:好贴火钳留名
请问楼主, 荔枝派 nano 应该如何改?
就是nano啊
好的,谢谢楼主, 一会我也试一试。
离线
https://github.com/Lichee-Pi/linux/commits/nano-4.14-exp
https://github.com/Lichee-Pi/linux/commit/44874751dbc7e112de0c78cbfb0479574cdb2332
发现 nano-4.14-exp 这个分支已经改好了 ^_^
clk: sunxi-ng: suniv: fix USB PHY gate clock bit offset
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
离线
我用nano加底板 不接microUSB也是一样,显示g_cdc_gadget:g_cdc ready, 可能这个内核版本USB驱动有问题吧,看OTG那个帖子讨论,要把USB Clock配置改下,估计还要查一下
请问,用荔枝派ZERO,TF卡启动,也有很大概率显示:g_cdc_gadget:g_cdc ready,然后卡死,也会是USB驱动问题吗
离线
感觉不是,可能是硬件问题,或者操作问题吧。
离线
阿黄 说:我用nano加底板 不接microUSB也是一样,显示g_cdc_gadget:g_cdc ready, 可能这个内核版本USB驱动有问题吧,看OTG那个帖子讨论,要把USB Clock配置改下,估计还要查一下
请问,用荔枝派ZERO,TF卡启动,也有很大概率显示:g_cdc_gadget:g_cdc ready,然后卡死,也会是USB驱动问题吗
打印这个是正常的,卡死应该是其他某个任务没法退出,查一下/etc/init.d/里面启动任务
离线
Jmhh247 说:阿黄 说:我用nano加底板 不接microUSB也是一样,显示g_cdc_gadget:g_cdc ready, 可能这个内核版本USB驱动有问题吧,看OTG那个帖子讨论,要把USB Clock配置改下,估计还要查一下
请问,用荔枝派ZERO,TF卡启动,也有很大概率显示:g_cdc_gadget:g_cdc ready,然后卡死,也会是USB驱动问题吗
打印这个是正常的,卡死应该是其他某个任务没法退出,查一下/etc/init.d/里面启动任务
好的,多谢指导
离线
1楼,我改了cc-suniv.c 里但是还是HOST没用,插U盘没反映
离线
标记下,后面应该会用得到,谢谢分享!
离线
标记下
离线
请问楼主,你F1C100S下挂GL850G的HUB,挂的设备能同时工作么?
目前发现HUB挂的设备能枚举,但是无法同时工作,看了太多帖子了,又说什么端点不够的,又说linux-4.x内核不行,需要linux-5内核的
我目前拿到的板子,F1C100S挂的HUB,下面挂了2个设备,一个移远的4G-CAT1模块,一个是8188的WIFI模块
现在枚举都是正常的,但是无法使用,感觉数据不通
离线
大牛好,我的dev目录下没有ttyUSB文件,是什么原因?
离线
@阿黄
--- ../linux/drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-15 22:48:18.824587965 +0800
+++ drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-23 09:05:17.959348454 +0800
@@ -238,7 +238,7 @@
/* The BSP header file has a CIR_CFG, but no mod clock uses this definition */
static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M",
- 0x0cc, BIT(8), 0);
+ 0x0cc, BIT(1), 0);
修改时钟后,插入USB鼠标、键盘有反映,插入U盘或者USB转串口,还是没有反应。
离线