WhyCan Forum

本站无需注册,无需积分,无需回复可下载所有资料,如果真的喜欢小站,请您注册之后请至少回复一个帖子激活Id,谢谢支持! 站长QQ: 516333132 (挖坑网/填坑网) admin@whycan.cn

您尚未登录。

#76 2018-11-29 16:13:03

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

使用1楼f1c100s_linux_4_19_patch_by_chong里的config
使用40楼lichee_pi_nano_usbok_patch_5e335542de83558e46d里的patch

修改config_rndis_ok   ->    .config
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译

离线

#77 2018-11-29 16:21:29

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

迪卡 说:

使用1楼f1c100s_linux_4_19_patch_by_chong里的config
使用40楼lichee_pi_nano_usbok_patch_5e335542de83558e46d里的patch

修改config_rndis_ok   ->    .config
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译

这样就能生成dtb。
如果你照着晕哥的使用默认配置,就错了:D
晚上回家运行试验

离线

#78 2018-11-29 21:17:06

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

FluxBB bbcode 测试
按照上面的
使用1楼f1c100s_linux_4_19_patch_by_chong里的config
使用40楼lichee_pi_nano_usbok_patch_5e335542de83558e46d里的patch
修改config_rndis_ok   ->    .config
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译
编译出来的,开启内核是这样...

离线

#79 2018-11-29 21:56:47

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

ippen 说:

https://whycan.cn/files/members/1028/suniv-f1c100s-licheepi-nano.rar
压缩包里面有dtb,zImage,config三个文件,能识别u盘,插入电脑,会识别为网卡

直接把你的zImage和config放到第一分区,起不来,我自己编译的也出现这种情况着

U-Boot SPL 2018.01 (Nov 29 2018 - 21:35:48)
DRAM: 32 MiB
Trying to boot from MMC1


U-Boot 2018.01 (Nov 29 2018 - 21:35:48 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

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
279 bytes read in 15 ms (17.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
7975 bytes read in 34 ms (228.5 KiB/s)
reading zImage
2738312 bytes read in 155 ms (16.8 MiB/s)
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fb000, end 816fff26 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-licheepi-nano (root@TFROM) (gcc version 6.4.1 20180425 [linaro-6.4-2018.05 revision 7b15d0869c096fe39603ad63dc19ab7cf035eb70] (Linaro GCC 6.4-2018.05)) #2 Mon Nov 12 00:30:10 CST 2018
[    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: get_random_bytes called from start_kernel+0x88/0x394 with crng_init=0
[    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: 25812K/32768K available (4114K kernel code, 201K rwdata, 928K rodata, 1024K init, 214K bss, 6956K 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)   (5107 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 202 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 215 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.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000116] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000578] Console: colour dummy device 80x30
[    0.001668] console [tty0] enabled
[    0.001812] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070304] pid_max: default: 32768 minimum: 301
[    0.070862] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070960] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072294] CPU: Testing write buffer coherency: ok
[    0.074234] Setting up static identity map for 0x80100000 - 0x8010003c
[    0.076927] devtmpfs: initialized
[    0.083984] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.084165] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.084442] pinctrl core: initialized pinctrl subsystem
[    0.085887] NET: Registered protocol family 16
[    0.087284] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.089420] cpuidle: using governor menu
[    0.110034] SCSI subsystem initialized
[    0.110569] usbcore: registered new interface driver usbfs
[    0.110831] usbcore: registered new interface driver hub
[    0.111095] usbcore: registered new device driver usb
[    0.113471] clocksource: Switched to clocksource timer
[    0.138900] NET: Registered protocol family 2
[    0.140878] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.141087] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.141200] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.141291] TCP: Hash tables configured (established 1024 bind 1024)
[    0.141617] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.141738] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.142297] NET: Registered protocol family 1
[    0.144782] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.171468] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.172278] ntfs: driver 2.1.32 [Flags: R/O].
[    0.176343] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.176491] io scheduler noop registered
[    0.176548] io scheduler deadline registered
[    0.177356] io scheduler cfq registered (default)
[    0.177459] io scheduler mq-deadline registered
[    0.177516] io scheduler kyber registered
[    0.180401] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.192046] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.350321] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.356519] console [ttyS0] disabled
[    0.376873] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.796556] console [ttyS0] enabled
[    0.822426] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 24, base_baud = 6250000) is a 16550A
[    0.847929] loop: module loaded
[    0.855144] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, c8, d1
[    0.862055] usbcore: registered new interface driver usb-storage
[    0.869273] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[    0.878367] i2c /dev entries driver
[    0.884307] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.1
[    0.917727] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    0.925825] usbcore: registered new interface driver usbhid
[    0.931481] usbhid: USB HID core driver
[    0.936798] NET: Registered protocol family 17
[    0.946446] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    0.957472] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    0.966484] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    0.972364] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    0.983199] hub 1-0:1.0: USB hub found
[    0.987472] hub 1-0:1.0: 1 port detected
[    0.992982] using random self ethernet address
[    0.997661] using random host ethernet address
[    1.003741] usb0: HOST MAC 6a:41:fa:5f:cb:e8
[    1.008225] usb0: MAC d6:3d:86:a6:5b:7f
[    1.012205] using random self ethernet address
[    1.016823] using random host ethernet address
[    1.021495] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    1.028273] g_ether gadget: g_ether ready
[    1.034691] Waiting for root device /dev/mmcblk0p2...
[    1.084850] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.097176] mmc0: new high speed SD card at address e624
[    1.105462] mmcblk0: mmc0:e624 SU02G 1.84 GiB
[    1.112840]  mmcblk0: p1 p2
[    1.163972] FAT-fs (mmcblk0p2): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    1.174209] VFS: Mounted root (vfat filesystem) on device 179:2.
[    1.180684] devtmpfs: error mounting -2
[    1.189247] Freeing unused kernel memory: 1024K
[    1.194054] Run /sbin/init as init process
[    1.198638] Run /etc/init as init process
[    1.203074] Run /bin/init as init process
[    1.207631] Run /bin/sh as init process
[    1.211600] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[    1.225835] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-licheepi-nano #2
[    1.232820] Hardware name: Allwinner suniv Family
[    1.237541] Backtrace:
[    1.240076] [<c0106338>] (dump_backtrace) from [<c01065f8>] (show_stack+0x18/0x1c)
[    1.247701]  r7:00000000 r6:c0582010 r5:00000000 r4:c0732980
[    1.253417] [<c01065e0>] (show_stack) from [<c04ea76c>] (dump_stack+0x20/0x28)
[    1.260721] [<c04ea74c>] (dump_stack) from [<c0111520>] (panic+0xd0/0x24c)
[    1.267670] [<c0111454>] (panic) from [<c050041c>] (kernel_init+0xe0/0x118)
[    1.274676]  r3:00000000 r2:0e3c70e5 r1:0e3c70e5 r0:c0582010
[    1.280355]  r7:00000000
[    1.282942] [<c050033c>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[    1.290550] Exception stack(0xc182dfb0 to 0xc182dff8)
[    1.295634] dfa0:                                     00000000 00000000 00000000 00000000
[    1.303858] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.312075] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.318712]  r5:c050033c r4:00000000
[    1.322320] Rebooting in 5 seconds..
[    7.301582] Reboot failed -- System halted

离线

#80 2018-11-29 22:13:23

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

没错,就是没放fs

离线

#81 2018-12-02 09:05:55

ippen
会员
注册时间: 2018-07-22
累计积分: 172

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

迪卡 说:

没错,就是没放fs

用licheepi nano 原厂提供的tf卡镜像,将我的内核和dtb文件替换上去是可以用的,如果自己重做系统,要按licheepi的文档一步步来

离线

#82 2018-12-10 21:11:22

error_0
会员
注册时间: 2018-12-10
累计积分: 27

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

感谢开源的大佬们,我上传一下我使用的教程:
USB.pdfconfig.zip

离线

#83 2018-12-10 21:38:55

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,127

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

@error_0  感谢分享!

在线

#84 2018-12-31 16:41:15

科技植
会员
注册时间: 2018-11-05
累计积分: 34

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

有用4.19内核+dts在文件系统下生成了/dev/fb0的小伙伴吗? 我试了很久都没成功。https://whycan.cn/t_2002.html#p13642

离线

#85 2019-01-06 17:24:47

monosail
会员
注册时间: 2019-01-06
累计积分: 12

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

shengyougao 说:

我的操作过程是这样的:(1)git clone 4.19正式版的内核;(2)打上40楼的补丁。(3)复制1楼的.config文件。(4)编译内核和设备树;(5)复制zImage和dtb文件到TF卡。
硬件上,使用的是荔枝派nano配的OTG转TYPE_A母口,插上USB接口无线网卡和USB鼠标、U盘均没反应。lsusb仅有Bus 001 Device 001: ID 1d6b:0002一条信息。

我的操作流程以及遇到的现象同你是相同的,请问你后来是如何解决的?

离线

#86 2019-01-11 11:44:42

lrkj
会员
注册时间: 2019-01-07
累计积分: 14

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

lsusb仅有Bus 001 Device 001: ID 1d6b:0002。
我也是遇到这个问题了,晕哥这哥怎么解决的呢?

离线

#87 2019-01-11 16:38:27

lrkj
会员
注册时间: 2019-01-07
累计积分: 14

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

问题已解决,开始编译的zimage有5.7M,重新下载又编译一边2.8M,USB正常(device和host),但是在dev/,没有发现设备,正在找原因。15471952191.png

离线

#88 2019-01-11 17:21:33

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,127

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

@lrkj 加油哦,搞定之后有空的话写一份教程,提供一份可用固件,方便后来者参考,如何?

在线

#89 2019-01-15 19:00:18

Michael
会员
注册时间: 2019-01-13
累计积分: 13

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

为啥俺们同样的操作识别的只有一个USB设备呢,插上HID设备和U盘都没有反应,难道是config有问题么?

离线

#90 2019-01-15 19:01:32

Michael
会员
注册时间: 2019-01-13
累计积分: 13

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

还是在硬件上需要将一根数据线拉高才能是Host模式接入键盘鼠标

离线

#91 2019-01-18 23:57:48

Michael
会员
注册时间: 2019-01-13
累计积分: 13

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

需要在设备数文件里设置ID脚的电平才能设置为host活着device模式。

离线

#92 2019-01-19 00:04:04

basicdev
会员
注册时间: 2017-10-02
累计积分: 159

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

Michael 说:

需要在设备数文件里设置ID脚的电平才能设置为host活着device模式。

具体如何写呢?

离线

#93 2019-01-19 00:22:23

Michael
会员
注册时间: 2019-01-13
累计积分: 13

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

设备树文件里有个PE2的gpio电平设置,补丁里面设置的是active high为device模式,改为low就是host模式

离线

#94 2019-01-19 10:11:18

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,127

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

Michael 说:

设备树文件里有个PE2的gpio电平设置,补丁里面设置的是active high为device模式,改为low就是host模式

感谢分享, 感谢填坑

在线

#95 2019-01-23 09:36:12

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 29

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

花了一点时间对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应该也就能跑了。

离线

#96 2019-01-23 09:41:28

smartcar
会员
注册时间: 2018-02-19
累计积分: 237

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

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应该也就能跑了。

有nano的朋友可以试一试这位的想法, 这种 bug 还真难找

离线

#97 2019-01-23 10:44:54

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 29

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

smartcar 说:
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应该也就能跑了。

有nano的朋友可以试一试这位的想法, 这种 bug 还真难找

自己尝试了一下,真的可以跑了。

离线

#98 2019-01-23 10:46:25

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,127

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

jiangming1399 说:
smartcar 说:
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应该也就能跑了。

有nano的朋友可以试一试这位的想法, 这种 bug 还真难找

自己尝试了一下,真的可以跑了。

感谢填坑, 看来就是一个 bit 影响了 USB 的工作.

在线

#99 2019-01-23 11:27:33

木子猫
会员
注册时间: 2018-03-27
累计积分: 35

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

jiangming1399 说:
smartcar 说:
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应该也就能跑了。

有nano的朋友可以试一试这位的想法, 这种 bug 还真难找

自己尝试了一下,真的可以跑了。


是不是理论上4.13的也可以

离线

#100 2019-01-26 15:54:31

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

哇塞,真棒,意思是荔枝的代码改一下这个位就可以支持usb了呀

离线

#101 2019-02-11 21:47:41

迪卡
会员
注册时间: 2018-11-02
累计积分: 59

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

按照上面的补丁说明,将8改成1.果然,
运行的linux4.15.0 在dev下有bus,里面有usb 里面有001.
也就是说usb可以使用。
那么内核编译没啥问题了。接下来,开始调各种io和接口还有usb

离线

#102 2019-02-12 09:05:31

Peter
会员
注册时间: 2018-12-12
累计积分: 36

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

MARK一下,稍后试验!

离线

#103 2019-02-12 09:46:58

arphone
会员
注册时间: 2017-11-03
累计积分: 60

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

MARK,感谢分享。。。

离线

#104 2019-02-13 15:16:16

ippen
会员
注册时间: 2018-07-22
累计积分: 172

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

晕哥 说:
jiangming1399 说:
smartcar 说:

有nano的朋友可以试一试这位的想法, 这种 bug 还真难找

自己尝试了一下,真的可以跑了。

感谢填坑, 看来就是一个 bit 影响了 USB 的工作.

这个bit就是开启usb时钟的控制位,原来的没有开启usb时钟

离线

#105 2019-02-14 15:06:52

Peter
会员
注册时间: 2018-12-12
累计积分: 36

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

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应该也就能跑了。


@jiangming1399 我的4.14内核只修改此处,USB没办法正常运行,请问你用的哪个内核?
内核:https://github.com/Lichee-Pi/linux/tree/nano-4.14-exp
内核日志:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-licheepi-nano (peter@peter-ThinkPad-T440p) (gcc version 6.4.0 (Buildroot 2018.11.1)) #25 Thu Feb 14 14:42:36 CST 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] PID hash table entries: 128 (order: -3, 512 bytes)
[    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: 23736K/32768K available (5120K kernel code, 187K rwdata, 1148K rodata, 1024K init, 229K bss, 9032K 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 : 0xc0008000 - 0xc0600000   (6112 kB)
[    0.000000]       .init : 0xc0800000 - 0xc0900000   (1024 kB)
[    0.000000]       .data : 0xc0900000 - 0xc092ef40   ( 188 kB)
[    0.000000]        .bss : 0xc0933830 - 0xc096d00c   ( 230 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.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000115] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000628] Console: colour dummy device 80x30
[    0.001539] console [tty0] enabled
[    0.001644] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070285] pid_max: default: 32768 minimum: 301
[    0.070650] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070744] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072205] CPU: Testing write buffer coherency: ok
[    0.073908] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076430] devtmpfs: initialized
[    0.082809] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.082969] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083279] pinctrl core: initialized pinctrl subsystem
[    0.085309] NET: Registered protocol family 16
[    0.086631] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.088521] cpuidle: using governor menu
[    0.108569] SCSI subsystem initialized
[    0.108976] usbcore: registered new interface driver usbfs
[    0.109224] usbcore: registered new interface driver hub
[    0.109470] usbcore: registered new device driver usb
[    0.109969] pps_core: LinuxPPS API ver. 1 registered
[    0.110054] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.110293] PTP clock support registered
[    0.112052] clocksource: Switched to clocksource timer
[    0.138288] NET: Registered protocol family 2
[    0.139776] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.139930] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.140021] TCP: Hash tables configured (established 1024 bind 1024)
[    0.140335] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.140446] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.140970] NET: Registered protocol family 1
[    0.141489] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.143450] Initialise system trusted keyrings
[    0.144298] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.172281] Key type asymmetric registered
[    0.172394] Asymmetric key parser 'x509' registered
[    0.172638] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.172736] io scheduler noop registered
[    0.172784] io scheduler deadline registered
[    0.173593] io scheduler cfq registered (default)
[    0.173690] io scheduler mq-deadline registered
[    0.173743] io scheduler kyber registered
[    0.174895] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.185088] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.353071] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.359799] console [ttyS0] disabled
[    0.380122] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.815430] console [ttyS0] enabled
[    0.825943] panel-simple panel: panel supply power not found, using dummy regulator
[    0.835166] SCSI Media Changer driver v0.25 
[    0.842257] mousedev: PS/2 mouse device common for all mice
[    0.849609] input: 1c24800.rtp as /devices/platform/soc/1c24800.rtp/input/input0
[    0.858396] i2c /dev entries driver
[    0.922179] sunxi-mmc 1c0f000.mmc: base:0xc2857000 irq:19
[    0.930592] NET: Registered protocol family 17
[    0.935344] Key type dns_resolver registered
[    0.941835] Loading compiled-in X.509 certificates
[    0.957017] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.963848] [drm] No driver support for vblank timestamp query.
[    0.970811] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0635088)
[    0.979760] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc063443c)
[    1.122547] Console: switching to colour frame buffer device 100x30
[    1.130367] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.132568] mmc0: new high speed SD card at address 2143
[    1.133765] mmcblk0: mmc0:2143 APPSD 120 MiB 
[    1.171682]  mmcblk0: p1 p2
[    1.172550] mmcblk0: p2 size 1048576 extends beyond EOD, truncated
[    1.256746] sun4i-drm display-engine: fb0:  frame buffer device
[    1.275094] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.295646] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.330101] ------------[ cut here ]------------
[    1.346479] WARNING: CPU: 0 PID: 3 at drivers/usb/musb/sunxi.c:411 sunxi_musb_ep_offset+0x3c/0x54
[    1.367375] sunxi_musb_ep_offset called with non 0 offset
[    1.384570] Modules linked in:
[    1.399371] CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.14.0-licheepi-nano #25
[    1.418797] Hardware name: Allwinner suniv Family
[    1.435493] Workqueue: events deferred_probe_work_func
[    1.452838] [<c010e6d8>] (unwind_backtrace) from [<c010b88c>] (show_stack+0x10/0x14)
[    1.473318] [<c010b88c>] (show_stack) from [<c0116708>] (__warn+0xd4/0xfc)
[    1.492822] [<c0116708>] (__warn) from [<c0116768>] (warn_slowpath_fmt+0x38/0x48)
[    1.513050] [<c0116768>] (warn_slowpath_fmt) from [<c0418418>] (sunxi_musb_ep_offset+0x3c/0x54)
[    1.534686] [<c0418418>] (sunxi_musb_ep_offset) from [<c040c060>] (ep_config_from_hw+0xe0/0x158)
[    1.556405] [<c040c060>] (ep_config_from_hw) from [<c040d8c4>] (musb_probe+0x528/0xc0c)
[    1.577327] [<c040d8c4>] (musb_probe) from [<c03a6c64>] (platform_drv_probe+0x50/0xb0)
[    1.598033] [<c03a6c64>] (platform_drv_probe) from [<c03a5394>] (driver_probe_device+0x22c/0x2f0)
[    1.619738] [<c03a5394>] (driver_probe_device) from [<c03a39c8>] (bus_for_each_drv+0x64/0x94)
[    1.641224] [<c03a39c8>] (bus_for_each_drv) from [<c03a5084>] (__device_attach+0xac/0x114)
[    1.662464] [<c03a5084>] (__device_attach) from [<c03a467c>] (bus_probe_device+0x84/0x8c)
[    1.683726] [<c03a467c>] (bus_probe_device) from [<c03a2b88>] (device_add+0x3c8/0x578)
[    1.704952] [<c03a2b88>] (device_add) from [<c03a69d8>] (platform_device_add+0x100/0x218)
[    1.726576] [<c03a69d8>] (platform_device_add) from [<c03a73c8>] (platform_device_register_full+0xf0/0x114)
[    1.762783] [<c03a73c8>] (platform_device_register_full) from [<c0418090>] (sunxi_musb_probe+0x26c/0x414)
[    1.798970] [<c0418090>] (sunxi_musb_probe) from [<c03a6c64>] (platform_drv_probe+0x50/0xb0)
[    1.821539] [<c03a6c64>] (platform_drv_probe) from [<c03a5394>] (driver_probe_device+0x22c/0x2f0)
[    1.844552] [<c03a5394>] (driver_probe_device) from [<c03a39c8>] (bus_for_each_drv+0x64/0x94)
[    1.867118] [<c03a39c8>] (bus_for_each_drv) from [<c03a5084>] (__device_attach+0xac/0x114)
[    1.889558] [<c03a5084>] (__device_attach) from [<c03a467c>] (bus_probe_device+0x84/0x8c)
[    1.911845] [<c03a467c>] (bus_probe_device) from [<c03a4ac8>] (deferred_probe_work_func+0x4c/0x140)
[    1.948664] [<c03a4ac8>] (deferred_probe_work_func) from [<c0129de8>] (process_one_work+0x1f4/0x404)
[    1.986179] [<c0129de8>] (process_one_work) from [<c012a27c>] (worker_thread+0x284/0x59c)
[    2.009350] [<c012a27c>] (worker_thread) from [<c012f434>] (kthread+0xf8/0x138)
[    2.031533] [<c012f434>] (kthread) from [<c0107f48>] (ret_from_fork+0x14/0x2c)
[    2.053322] ---[ end trace 0009ee3b665ce1e0 ]---
[    2.072380] musb-sunxi 1c13000.usb: Error unknown readb offset 128
[    2.093172] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -22
[    2.115552] musb-hdrc: probe of musb-hdrc.1.auto failed with error -22
[    2.140270] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    2.387597] EXT4-fs (mmcblk0p2): recovery complete
[    2.448078] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.470667] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.492549] devtmpfs: mounted
[    2.516475] Freeing unused kernel memory: 1024K
[    2.720487] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered

离线

#106 2019-02-15 09:20:40

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 29

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

Peter 说:
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应该也就能跑了。


@jiangming1399 我的4.14内核只修改此处,USB没办法正常运行,请问你用的哪个内核?
内核:https://github.com/Lichee-Pi/linux/tree/nano-4.14-exp
内核日志:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-licheepi-nano (peter@peter-ThinkPad-T440p) (gcc version 6.4.0 (Buildroot 2018.11.1)) #25 Thu Feb 14 14:42:36 CST 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] PID hash table entries: 128 (order: -3, 512 bytes)
[    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: 23736K/32768K available (5120K kernel code, 187K rwdata, 1148K rodata, 1024K init, 229K bss, 9032K 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 : 0xc0008000 - 0xc0600000   (6112 kB)
[    0.000000]       .init : 0xc0800000 - 0xc0900000   (1024 kB)
[    0.000000]       .data : 0xc0900000 - 0xc092ef40   ( 188 kB)
[    0.000000]        .bss : 0xc0933830 - 0xc096d00c   ( 230 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.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000115] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000628] Console: colour dummy device 80x30
[    0.001539] console [tty0] enabled
[    0.001644] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070285] pid_max: default: 32768 minimum: 301
[    0.070650] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070744] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072205] CPU: Testing write buffer coherency: ok
[    0.073908] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076430] devtmpfs: initialized
[    0.082809] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.082969] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083279] pinctrl core: initialized pinctrl subsystem
[    0.085309] NET: Registered protocol family 16
[    0.086631] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.088521] cpuidle: using governor menu
[    0.108569] SCSI subsystem initialized
[    0.108976] usbcore: registered new interface driver usbfs
[    0.109224] usbcore: registered new interface driver hub
[    0.109470] usbcore: registered new device driver usb
[    0.109969] pps_core: LinuxPPS API ver. 1 registered
[    0.110054] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.110293] PTP clock support registered
[    0.112052] clocksource: Switched to clocksource timer
[    0.138288] NET: Registered protocol family 2
[    0.139776] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.139930] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.140021] TCP: Hash tables configured (established 1024 bind 1024)
[    0.140335] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.140446] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.140970] NET: Registered protocol family 1
[    0.141489] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.143450] Initialise system trusted keyrings
[    0.144298] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.172281] Key type asymmetric registered
[    0.172394] Asymmetric key parser 'x509' registered
[    0.172638] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.172736] io scheduler noop registered
[    0.172784] io scheduler deadline registered
[    0.173593] io scheduler cfq registered (default)
[    0.173690] io scheduler mq-deadline registered
[    0.173743] io scheduler kyber registered
[    0.174895] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.185088] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.353071] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.359799] console [ttyS0] disabled
[    0.380122] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.815430] console [ttyS0] enabled
[    0.825943] panel-simple panel: panel supply power not found, using dummy regulator
[    0.835166] SCSI Media Changer driver v0.25 
[    0.842257] mousedev: PS/2 mouse device common for all mice
[    0.849609] input: 1c24800.rtp as /devices/platform/soc/1c24800.rtp/input/input0
[    0.858396] i2c /dev entries driver
[    0.922179] sunxi-mmc 1c0f000.mmc: base:0xc2857000 irq:19
[    0.930592] NET: Registered protocol family 17
[    0.935344] Key type dns_resolver registered
[    0.941835] Loading compiled-in X.509 certificates
[    0.957017] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.963848] [drm] No driver support for vblank timestamp query.
[    0.970811] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0635088)
[    0.979760] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc063443c)
[    1.122547] Console: switching to colour frame buffer device 100x30
[    1.130367] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.132568] mmc0: new high speed SD card at address 2143
[    1.133765] mmcblk0: mmc0:2143 APPSD 120 MiB 
[    1.171682]  mmcblk0: p1 p2
[    1.172550] mmcblk0: p2 size 1048576 extends beyond EOD, truncated
[    1.256746] sun4i-drm display-engine: fb0:  frame buffer device
[    1.275094] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.295646] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.330101] ------------[ cut here ]------------
[    1.346479] WARNING: CPU: 0 PID: 3 at drivers/usb/musb/sunxi.c:411 sunxi_musb_ep_offset+0x3c/0x54
[    1.367375] sunxi_musb_ep_offset called with non 0 offset
[    1.384570] Modules linked in:
[    1.399371] CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.14.0-licheepi-nano #25
[    1.418797] Hardware name: Allwinner suniv Family
[    1.435493] Workqueue: events deferred_probe_work_func
[    1.452838] [<c010e6d8>] (unwind_backtrace) from [<c010b88c>] (show_stack+0x10/0x14)
[    1.473318] [<c010b88c>] (show_stack) from [<c0116708>] (__warn+0xd4/0xfc)
[    1.492822] [<c0116708>] (__warn) from [<c0116768>] (warn_slowpath_fmt+0x38/0x48)
[    1.513050] [<c0116768>] (warn_slowpath_fmt) from [<c0418418>] (sunxi_musb_ep_offset+0x3c/0x54)
[    1.534686] [<c0418418>] (sunxi_musb_ep_offset) from [<c040c060>] (ep_config_from_hw+0xe0/0x158)
[    1.556405] [<c040c060>] (ep_config_from_hw) from [<c040d8c4>] (musb_probe+0x528/0xc0c)
[    1.577327] [<c040d8c4>] (musb_probe) from [<c03a6c64>] (platform_drv_probe+0x50/0xb0)
[    1.598033] [<c03a6c64>] (platform_drv_probe) from [<c03a5394>] (driver_probe_device+0x22c/0x2f0)
[    1.619738] [<c03a5394>] (driver_probe_device) from [<c03a39c8>] (bus_for_each_drv+0x64/0x94)
[    1.641224] [<c03a39c8>] (bus_for_each_drv) from [<c03a5084>] (__device_attach+0xac/0x114)
[    1.662464] [<c03a5084>] (__device_attach) from [<c03a467c>] (bus_probe_device+0x84/0x8c)
[    1.683726] [<c03a467c>] (bus_probe_device) from [<c03a2b88>] (device_add+0x3c8/0x578)
[    1.704952] [<c03a2b88>] (device_add) from [<c03a69d8>] (platform_device_add+0x100/0x218)
[    1.726576] [<c03a69d8>] (platform_device_add) from [<c03a73c8>] (platform_device_register_full+0xf0/0x114)
[    1.762783] [<c03a73c8>] (platform_device_register_full) from [<c0418090>] (sunxi_musb_probe+0x26c/0x414)
[    1.798970] [<c0418090>] (sunxi_musb_probe) from [<c03a6c64>] (platform_drv_probe+0x50/0xb0)
[    1.821539] [<c03a6c64>] (platform_drv_probe) from [<c03a5394>] (driver_probe_device+0x22c/0x2f0)
[    1.844552] [<c03a5394>] (driver_probe_device) from [<c03a39c8>] (bus_for_each_drv+0x64/0x94)
[    1.867118] [<c03a39c8>] (bus_for_each_drv) from [<c03a5084>] (__device_attach+0xac/0x114)
[    1.889558] [<c03a5084>] (__device_attach) from [<c03a467c>] (bus_probe_device+0x84/0x8c)
[    1.911845] [<c03a467c>] (bus_probe_device) from [<c03a4ac8>] (deferred_probe_work_func+0x4c/0x140)
[    1.948664] [<c03a4ac8>] (deferred_probe_work_func) from [<c0129de8>] (process_one_work+0x1f4/0x404)
[    1.986179] [<c0129de8>] (process_one_work) from [<c012a27c>] (worker_thread+0x284/0x59c)
[    2.009350] [<c012a27c>] (worker_thread) from [<c012f434>] (kthread+0xf8/0x138)
[    2.031533] [<c012f434>] (kthread) from [<c0107f48>] (ret_from_fork+0x14/0x2c)
[    2.053322] ---[ end trace 0009ee3b665ce1e0 ]---
[    2.072380] musb-sunxi 1c13000.usb: Error unknown readb offset 128
[    2.093172] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -22
[    2.115552] musb-hdrc: probe of musb-hdrc.1.auto failed with error -22
[    2.140270] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    2.387597] EXT4-fs (mmcblk0p2): recovery complete
[    2.448078] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.470667] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.492549] devtmpfs: mounted
[    2.516475] Freeing unused kernel memory: 1024K
[    2.720487] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered

我用的就是这个4.14版本的内核,就只改了那里,自己测试时是可以用的,你要不试试重新下载下来用默认配置文件编译?

最近编辑记录 jiangming1399 (2019-02-15 09:21:19)

离线

#107 2019-03-15 11:09:54

ippen
会员
注册时间: 2018-07-22
累计积分: 172

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

试了一下4.14的内核,usb的device模式是正常的,但usb host 模式无法识别设备,u盘和usb网卡都试过,不行

离线

#108 2019-03-15 11:22:35

超级萌新
会员
注册时间: 2018-05-04
累计积分: 179

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

ippen 说:

试了一下4.14的内核,usb的device模式是正常的,但usb host 模式无法识别设备,u盘和usb网卡都试过,不行

手动切换到 host 模式可以吗?

离线

#109 2019-03-19 11:34:41

fogwizard
会员
注册时间: 2019-03-19
累计积分: 13

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

感谢网友开源,参照文档 https://whycan.cn/files/members/1304/USB.pdf,
ubuntu可以出一张usb0网卡也可以配置ip地址,但是在板子上ifconfig,没有任何信息,有遇到一样
问题的吗? 谢谢

最近编辑记录 fogwizard (2019-03-19 11:35:12)

离线

#110 2019-04-10 09:55:26

qifengsvn
会员
注册时间: 2019-04-10
累计积分: 3

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

有么有网友有想法做usb连接4g网卡,做产品的,可以交流下

离线

#111 2019-04-10 11:03:48

smartcar
会员
注册时间: 2018-02-19
累计积分: 237

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

qifengsvn 说:

有么有网友有想法做usb连接4g网卡,做产品的,可以交流下

合宙AIR720,我朋友公司已经用在产品上了。

离线

#112 2019-04-10 11:51:49

qifengsvn
会员
注册时间: 2019-04-10
累计积分: 3

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

smartcar 说:
qifengsvn 说:

有么有网友有想法做usb连接4g网卡,做产品的,可以交流下

合宙AIR720,我朋友公司已经用在产品上了。

哪个公司,什么产品奥,可以了解下不?

离线

#113 2019-04-10 14:30:09

smartcar
会员
注册时间: 2018-02-19
累计积分: 237

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

qifengsvn 说:
smartcar 说:
qifengsvn 说:

有么有网友有想法做usb连接4g网卡,做产品的,可以交流下

合宙AIR720,我朋友公司已经用在产品上了。

哪个公司,什么产品奥,可以了解下不?

我问了一下 据说是一个保密项目不方便公开。

不过 air720 有linux usb 驱动,很容易整合进来的,官网有文章。

离线

#114 2019-04-11 10:49:41

qifengsvn
会员
注册时间: 2019-04-10
累计积分: 3

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

smartcar 说:
qifengsvn 说:
smartcar 说:

合宙AIR720,我朋友公司已经用在产品上了。

哪个公司,什么产品奥,可以了解下不?

我问了一下 据说是一个保密项目不方便公开。

不过 air720 有linux usb 驱动,很容易整合进来的,官网有文章。

感谢,我去学习一下

离线

#115 2019-04-12 19:46:20

duckduckgo
会员
注册时间: 2018-12-13
累计积分: 42

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

什么时候会有裸机的USB例程?

离线

#116 2019-04-12 20:03:25

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,127

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

duckduckgo 说:

什么时候会有裸机的USB例程?

大神早就弄出来了: https://whycan.cn/t_1810.html

在线

#117 2019-04-13 20:52:59

duckduckgo
会员
注册时间: 2018-12-13
累计积分: 42

Re: 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device)

晕哥 说:
duckduckgo 说:

什么时候会有裸机的USB例程?

大神早就弄出来了: https://whycan.cn/t_1810.html

多谢提醒!

离线

页脚