您尚未登录。

楼主 #1 2018-09-23 13:10:36

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

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

本站下载地址: f1c100s_linux_4_19_patch_by_chong.7z

git clone https://github.com/torvalds/linux.git

cd linux

git reset --hard5e335542de83558e46d28de1008a1c37d5d6679a

patch -p1 < lichee_nano_upstream_patch.patch

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make











2018-10-22 更新
---------------------------------
大神的补丁下载: lichee_pi_nano_usbok_patch_5e335542de83558e46d.7z

操作步骤:

git clone https://github.com/torvalds/linux.git
cd linux
7z x lichee_pi_nano_usbok_patch_5e335542de83558e46d.7z
git reset --hard 5e335542de83558e46d28de1008a1c37d5d6679a
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch





离线

楼主 #2 2018-09-24 22:13:13

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fb000, end 816ffd8e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-rc3-licheepi-nano+ (chong@chong-ThinkPad-X230) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #14 Wed Sep 12 22:21:00 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+0x84/0x3f8 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
[    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: 22676K/32768K available (6144K kernel code, 248K rwdata, 1516K rodata, 1024K init, 239K bss, 10092K 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)   ( 249 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 240 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.000131] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000657] Console: colour dummy device 80x30
[    0.000757] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070256] pid_max: default: 32768 minimum: 301
[    0.070721] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070766] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072268] CPU: Testing write buffer coherency: ok
[    0.074137] Setting up static identity map for 0x80100000 - 0x80100058
[    0.079617] devtmpfs: initialized
[    0.085938] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.086004] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.086316] pinctrl core: initialized pinctrl subsystem
[    0.088526] NET: Registered protocol family 16
[    0.089794] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.091904] cpuidle: using governor menu
[    0.117884] SCSI subsystem initialized
[    0.118233] usbcore: registered new interface driver usbfs
[    0.118391] usbcore: registered new interface driver hub
[    0.118580] usbcore: registered new device driver usb
[    0.119044] pps_core: LinuxPPS API ver. 1 registered
[    0.119072] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.119137] PTP clock support registered
[    0.119626] Advanced Linux Sound Architecture Driver Initialized.
[    0.121243] clocksource: Switched to clocksource timer
[    0.150756] NET: Registered protocol family 2
[    0.152382] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.152458] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.152517] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.152567] TCP: Hash tables configured (established 1024 bind 1024)
[    0.152840] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.152902] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.153426] NET: Registered protocol family 1
[    0.154826] RPC: Registered named UNIX socket transport module.
[    0.154870] RPC: Registered udp transport module.
[    0.154886] RPC: Registered tcp transport module.
[    0.154902] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.157132] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.159167] Initialise system trusted keyrings
[    0.159773] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.180920] NFS: Registering the id_resolver key type
[    0.181020] Key type id_resolver registered
[    0.181040] Key type id_legacy registered
[    0.195352] Key type asymmetric registered
[    0.195392] Asymmetric key parser 'x509' registered
[    0.195571] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.195602] io scheduler noop registered
[    0.195621] io scheduler deadline registered
[    0.196103] io scheduler cfq registered (default)
[    0.196138] io scheduler mq-deadline registered
[    0.196156] io scheduler kyber registered
[    0.197787] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.208366] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.391937] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.398786] console [ttyS0] disabled
[    0.419039] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.897963] console [ttyS0] enabled
[    0.908851] panel-simple panel: panel supply power not found, using dummy regulator
[    0.916836] panel-simple panel: Linked as a consumer to regulator.0
[    0.924868] SCSI Media Changer driver v0.25 
[    0.932269] spidev spi0.0: buggy DT: spidev listed directly in DT
[    0.938384] ------------[ cut here ]------------
[    0.943154] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:730 spidev_probe+0x188/0x1fc
[    0.951138] Modules linked in:
[    0.954272] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc3-licheepi-nano+ #14
[    0.961776] Hardware name: Allwinner suniv Family
[    0.966554] [<c010e918>] (unwind_backtrace) from [<c010bb80>] (show_stack+0x10/0x14)
[    0.974381] [<c010bb80>] (show_stack) from [<c0117230>] (__warn+0xcc/0xf4)
[    0.981320] [<c0117230>] (__warn) from [<c011736c>] (warn_slowpath_null+0x3c/0x48)
[    0.988894] [<c011736c>] (warn_slowpath_null) from [<c04601c0>] (spidev_probe+0x188/0x1fc)
[    0.997237] [<c04601c0>] (spidev_probe) from [<c045cbb4>] (spi_drv_probe+0x80/0xa4)
[    1.004989] [<c045cbb4>] (spi_drv_probe) from [<c04170ac>] (really_probe+0x228/0x3fc)
[    1.012897] [<c04170ac>] (really_probe) from [<c0417428>] (driver_probe_device+0x6c/0x1bc)
[    1.021166] [<c0417428>] (driver_probe_device) from [<c0415110>] (bus_for_each_drv+0x54/0xb8)
[    1.029743] [<c0415110>] (bus_for_each_drv) from [<c0416de0>] (__device_attach+0xc8/0x164)
[    1.038062] [<c0416de0>] (__device_attach) from [<c041606c>] (bus_probe_device+0x84/0x8c)
[    1.046287] [<c041606c>] (bus_probe_device) from [<c0412c98>] (device_add+0x3f8/0x630)
[    1.054252] [<c0412c98>] (device_add) from [<c045d52c>] (spi_add_device+0xb8/0x168)
[    1.061956] [<c045d52c>] (spi_add_device) from [<c045ded0>] (spi_register_controller+0x400/0x8e8)
[    1.070820] [<c045ded0>] (spi_register_controller) from [<c045e3e8>] (devm_spi_register_controller+0x30/0x70)
[    1.080770] [<c045e3e8>] (devm_spi_register_controller) from [<c04616bc>] (sun6i_spi_probe+0x1e8/0x2ac)
[    1.090215] [<c04616bc>] (sun6i_spi_probe) from [<c0418ff4>] (platform_drv_probe+0x48/0x98)
[    1.098629] [<c0418ff4>] (platform_drv_probe) from [<c04170ac>] (really_probe+0x228/0x3fc)
[    1.106948] [<c04170ac>] (really_probe) from [<c0417428>] (driver_probe_device+0x6c/0x1bc)
[    1.115265] [<c0417428>] (driver_probe_device) from [<c0417680>] (__driver_attach+0x108/0x130)
[    1.123925] [<c0417680>] (__driver_attach) from [<c0415064>] (bus_for_each_dev+0x70/0xb4)
[    1.132153] [<c0415064>] (bus_for_each_dev) from [<c041634c>] (bus_add_driver+0x1a0/0x260)
[    1.140418] [<c041634c>] (bus_add_driver) from [<c0418038>] (driver_register+0x74/0x108)
[    1.148568] [<c0418038>] (driver_register) from [<c0102ba0>] (do_one_initcall+0x48/0x1a0)
[    1.156807] [<c0102ba0>] (do_one_initcall) from [<c0900df8>] (kernel_init_freeable+0x104/0x1c4)
[    1.165562] [<c0900df8>] (kernel_init_freeable) from [<c0694734>] (kernel_init+0x8/0x110)
[    1.173796] [<c0694734>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[    1.181395] Exception stack(0xc1831fb0 to 0xc1831ff8)
[    1.186447] 1fa0:                                     00000000 00000000 00000000 00000000
[    1.194657] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.202858] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.209476] ---[ end trace 88ef56b3121bb31e ]---
[    1.216315] i2c /dev entries driver
[    1.222067] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.1
[    1.255556] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.264906] usbcore: registered new interface driver usbhid
[    1.270483] usbhid: USB HID core driver
[    1.290060] NET: Registered protocol family 17
[    1.294854] Key type dns_resolver registered
[    1.301607] Loading compiled-in X.509 certificates
[    1.317842] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.328886] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    1.337872] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.343802] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.354120] hub 1-0:1.0: USB hub found
[    1.358103] hub 1-0:1.0: 1 port detected
[    1.364852] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.383483] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.390257] ALSA device list:
[    1.393353]   #0: Loopback 1
[    1.397331] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.406045] cfg80211: failed to load regulatory.db
[    1.411830] Waiting for root device /dev/mmcblk0p2...
[    1.423629] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.434650] mmc0: new high speed SDHC card at address 1234
[    1.443164] mmcblk0: mmc0:1234 SA04G 3.64 GiB 
[    1.451518]  mmcblk0: p1 p2
[    1.477749] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    1.485176] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    2.169099] random: fast init done
[    2.853622] EXT4-fs (mmcblk0p2): recovery complete
[    3.458697] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.466987] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    3.484174] devtmpfs: mounted
[    3.491760] Freeing unused kernel memory: 1024K
[    3.496406] Run /sbin/init as init process
starting pid 59, tty '': '/bin/mount -t proc proc /proc'
starting pid 61, tty '': '/bin/mount -t sysfs sysfs /sys'
starting pid 62, tty '': '/bin/mount -t devtmpfs devtmpfs /dev'
mount: /dev: devtmpfs already mounted on /dev.
starting pid 63, tty '': '/bin/mount -o remount,rw /'
[    3.701434] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
starting pid 64, tty '': '/bin/mkdir -p /dev/pts'
starting pid 65, tty '': '/bin/mount -t devpts devpts /dev/pts'
starting pid 66, tty '': '/bin/mount -a'
starting pid 67, tty '': '/etc/init.d/rcS'
Starting Dropbear SSH server: [    3.940139] random: dropbear: uninitialized urandom read (32 bytes read)
dropbear.
[    4.106245] using random self ethernet address
[    4.110720] using random host ethernet address
[    4.116632] usb0: HOST MAC a6:59:86:da:d1:36
[    4.121021] usb0: MAC 2a:80:e1:49:a2:53
[    4.125057] using random self ethernet address
[    4.129511] using random host ethernet address
[    4.134385] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    4.140994] g_ether gadget: g_ether ready
ifconfig: SIOCSIFADDR: Invalid argument
starting pid 81, tty '/dev/ttyS0': '/sbin/getty 115200 ttyS0'

micro-iot 0.1 pinano /dev/ttyS0

pinano login: [    4.580654] g_ether gadget: high-speed config #1: CDC Ethernet (EEM)

这是网友 @chong 发给我的.





离线

#3 2018-09-25 23:09:33

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

有没可能@chong改过涉及usb的硬件电路?

离线

#4 2018-09-25 23:11:11

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

4.19是lts内核,不知道@chong会不会将patch提交主线内核?

离线

楼主 #5 2018-09-25 23:13:33

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

ippen 说:

4.19是lts内核,不知道@chong会不会将patch提交主线内核?

这个我到时候和他说说,要不你先试一试看USB能不能跑起来?





离线

#6 2018-09-26 22:36:31

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

这个我到时候和他说说,要不你先试一试看USB能不能跑起来?

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-rc5-licheepi-nano (root@LicheepiNano) (gcc version 6.4.1 20180425 [linaro-6.4-2018.05 revision 7b15d0869c096fe39603ad63dc19ab7cf035eb70] (Linaro GCC 6.4-2018.05)) #6 Wed Sep 26 22:29:47 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+0x80/0x3f8 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: 23736K/32768K available (5120K kernel code, 222K rwdata, 1152K rodata, 1024K init, 224K 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 : 0x(ptrval) - 0x(ptrval)   (6112 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 223 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 225 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.000043] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000109] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000541] Console: colour dummy device 80x30
[    0.001104] console [tty0] enabled
[    0.001208] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.050289] pid_max: default: 32768 minimum: 301
[    0.050680] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050766] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051893] CPU: Testing write buffer coherency: ok
[    0.053783] Setting up static identity map for 0x80100000 - 0x80100058
[    0.057462] devtmpfs: initialized
[    0.062457] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.062603] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.062891] pinctrl core: initialized pinctrl subsystem
[    0.064988] NET: Registered protocol family 16
[    0.066222] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.067907] cpuidle: using governor menu
[    0.086296] SCSI subsystem initialized
[    0.086784] pps_core: LinuxPPS API ver. 1 registered
[    0.086867] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.087008] PTP clock support registered
[    0.088572] clocksource: Switched to clocksource timer
[    0.114863] NET: Registered protocol family 2
[    0.116145] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.116293] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.116368] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.116424] TCP: Hash tables configured (established 1024 bind 1024)
[    0.116717] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.116816] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.117348] NET: Registered protocol family 1
[    0.118891] RPC: Registered named UNIX socket transport module.
[    0.118994] RPC: Registered udp transport module.
[    0.119028] RPC: Registered tcp transport module.
[    0.119054] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.120955] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.122818] Initialise system trusted keyrings
[    0.123455] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.139499] NFS: Registering the id_resolver key type
[    0.139657] Key type id_resolver registered
[    0.139709] Key type id_legacy registered
[    0.151055] Key type asymmetric registered
[    0.151156] Asymmetric key parser 'x509' registered
[    0.151357] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.151430] io scheduler noop registered
[    0.151465] io scheduler deadline registered
[    0.151961] io scheduler cfq registered (default)
[    0.152049] io scheduler mq-deadline registered
[    0.152087] io scheduler kyber registered
[    0.153417] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.161781] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.323956] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.330150] console [ttyS0] disabled
[    0.350453] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.817840] console [ttyS0] enabled
[    0.823281] SCSI Media Changer driver v0.25
[    0.830673] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.836564] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.843115] Creating 4 MTD partitions on "spi0.0":
[    0.847964] 0x000000000000-0x000000100000 : "u-boot"
[    0.854184] 0x000000100000-0x000000110000 : "dtb"
[    0.860085] 0x000000110000-0x000000510000 : "kernel"
[    0.866071] 0x000000510000-0x000001000000 : "rootfs"
[    0.873368] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[    0.882680] i2c /dev entries driver
[    0.887919] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.1
[    0.921428] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    0.930995] NET: Registered protocol family 17
[    0.935725] Key type dns_resolver registered
[    0.942644] Loading compiled-in X.509 certificates
[    0.957060] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    0.968137] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    0.977681] using random self ethernet address
[    0.982346] using random host ethernet address
[    0.987909] usb0: HOST MAC 1a:27:d5:6e:43:f7
[    0.992514] usb0: MAC fa:31:fc:41:d9:f9
[    0.996492] using random self ethernet address
[    1.001082] using random host ethernet address
[    1.005911] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    1.012692] g_ether gadget: g_ether ready
[    1.017781] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.032881] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.040510] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.049333] cfg80211: failed to load regulatory.db
[    1.054949] Waiting for root device /dev/mmcblk0p2...
[    1.090316] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.102038] mmc0: new high speed SDHC card at address aaaa
[    1.110388] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
[    1.121538]  mmcblk0: p1 p2
[    1.163941] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.172321] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.183012] devtmpfs: mounted
[    1.190052] Freeing unused kernel memory: 1024K
[    1.194742] Run /sbin/init as init process
[    1.315256] random: fast init done
[    1.348840] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Initializing random number generator... [    1.631353] random: dd: uninitialized urandom read (512 bytes read)
done.

Welcome to Lichee Pi
Lichee login:

主线内核usb没反应,启动日志有看到rndis加载

日志里面有 [    0.153417] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO,usbid io错误

最近编辑记录 ippen (2018-09-26 22:38:06)

离线

楼主 #7 2018-09-26 22:56:14

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

@chong 说是不是dtb配置引起.

过段时间他会提供能用的 img.





离线

#8 2018-09-27 08:55:32

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

我看了dtb配置,应该没错,也许错误是驱动的原因

离线

#9 2018-09-27 12:16:33

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

@chong 说是不是dtb配置引起.

过段时间他会提供能用的 img.

代码会发布吗?

离线

楼主 #10 2018-09-27 13:35:15

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

现在还不确定,他这几天回家。
应该基本上都在一楼了,如果有修改也会很小。


这是他前几天发给我的tf卡zImage和dtb, 你加个u-boot和ext4 根文件系统试一试.

本站下载: f1c100s_tf_boot_by_chong.7z





离线

#11 2018-09-27 19:29:04

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

现在还不确定,他这几天回家。
应该基本上都在一楼了,如果有修改也会很小。


这是他前几天发给我的tf卡zImage和dtb, 你加个u-boot和ext4 根文件系统试一试.

本站下载: f1c100s_tf_boot_by_chong.7z

试了一下,这个内核和dtb也是一样的,用otg插入U盘没反应,usb插入pc也没反应,我猜@chong大神的板子和我们的不同

离线

楼主 #12 2018-09-27 19:36:25

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

ippen 说:
晕哥 说:

现在还不确定,他这几天回家。
应该基本上都在一楼了,如果有修改也会很小。


这是他前几天发给我的tf卡zImage和dtb, 你加个u-boot和ext4 根文件系统试一试.

本站下载: f1c100s_tf_boot_by_chong.7z

试了一下,这个内核和dtb也是一样的,用otg插入U盘没反应,usb插入pc也没反应,我猜@chong大神的板子和我们的不同

这就奇怪了,我问下他用什么板子。





离线

楼主 #13 2018-09-27 20:45:46

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

他问是不是没有加载 g_ether.ko 引起?





离线

#14 2018-09-27 22:06:42

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

他问是不是没有加载 g_ether.ko 引起?

不是编译到内核中吗?

离线

楼主 #15 2018-09-27 23:23:04

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

他这个没有吧,我记得是模块的。





离线

#16 2018-09-28 08:59:42

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

他这个没有吧,我记得是模块的。

他的编译器版本也许和我的不同,这样应该不能用吧?

离线

#17 2018-09-28 09:59:45

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

再次用@chong提供的内核编译一次
启动日志

## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e61000, end 80e65d8e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-rc3-licheepi-nano (root@LicheepiNano) (gcc version 6.4.1 20180425 [linaro-6.4-2018.05 revision 7b15d0869c096fe39603ad63dc19ab7cf035eb70] (Linaro GCC 6.4-2018.05)) #1 Thu Sep 27 22:10:44 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+0x84/0x400 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: 22676K/32768K available (6144K kernel code, 248K rwdata, 1516K rodata, 1024K init, 239K bss, 10092K 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)   ( 249 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 240 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.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000111] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000545] Console: colour dummy device 80x30
[    0.001125] console [tty0] enabled
[    0.001226] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.050293] pid_max: default: 32768 minimum: 301
[    0.050665] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050746] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.052063] CPU: Testing write buffer coherency: ok
[    0.053839] Setting up static identity map for 0x80100000 - 0x80100058
[    0.057873] devtmpfs: initialized
[    0.062835] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.062983] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.063318] pinctrl core: initialized pinctrl subsystem
[    0.065410] NET: Registered protocol family 16
[    0.066712] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.068365] cpuidle: using governor menu
[    0.088871] SCSI subsystem initialized
[    0.089272] usbcore: registered new interface driver usbfs
[    0.089476] usbcore: registered new interface driver hub
[    0.089728] usbcore: registered new device driver usb
[    0.090290] pps_core: LinuxPPS API ver. 1 registered
[    0.090376] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.090503] PTP clock support registered
[    0.090977] Advanced Linux Sound Architecture Driver Initialized.
[    0.092385] clocksource: Switched to clocksource timer
[    0.119370] NET: Registered protocol family 2
[    0.120654] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.120802] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120877] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120933] TCP: Hash tables configured (established 1024 bind 1024)
[    0.121250] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.121348] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.121872] NET: Registered protocol family 1
[    0.123408] RPC: Registered named UNIX socket transport module.
[    0.123509] RPC: Registered udp transport module.
[    0.123548] RPC: Registered tcp transport module.
[    0.123576] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.125584] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.127482] Initialise system trusted keyrings
[    0.128141] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.144485] NFS: Registering the id_resolver key type
[    0.144625] Key type id_resolver registered
[    0.144670] Key type id_legacy registered
[    0.156418] Key type asymmetric registered
[    0.156521] Asymmetric key parser 'x509' registered
[    0.156716] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.156791] io scheduler noop registered
[    0.156825] io scheduler deadline registered
[    0.157278] io scheduler cfq registered (default)
[    0.157357] io scheduler mq-deadline registered
[    0.157395] io scheduler kyber registered
[    0.158836] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.167381] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.331732] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.337924] console [ttyS0] disabled
[    0.358243] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.847381] console [ttyS0] enabled
[    0.856509] panel-simple panel: panel supply power not found, using dummy regulator
[    0.864575] panel-simple panel: Linked as a consumer to regulator.0
[    0.872316] SCSI Media Changer driver v0.25
[    0.879463] spidev spi0.0: buggy DT: spidev listed directly in DT
[    0.885775] ------------[ cut here ]------------
[    0.890466] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:730 spidev_probe+0x198/0x1e8
[    0.898556] Modules linked in:
[    0.901665] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc3-licheepi-nano #1
[    0.909039] Hardware name: Allwinner suniv Family
[    0.913904] [<c010e9c0>] (unwind_backtrace) from [<c010bc68>] (show_stack+0x10/0x14)
[    0.921723] [<c010bc68>] (show_stack) from [<c0117230>] (__warn+0xec/0x114)
[    0.928807] [<c0117230>] (__warn) from [<c011736c>] (warn_slowpath_null+0x3c/0x48)
[    0.936500] [<c011736c>] (warn_slowpath_null) from [<c0460ff8>] (spidev_probe+0x198/0x1e8)
[    0.944904] [<c0460ff8>] (spidev_probe) from [<c045d990>] (spi_drv_probe+0x88/0xa0)
[    0.952715] [<c045d990>] (spi_drv_probe) from [<c0417bf0>] (really_probe+0x25c/0x3fc)
[    0.960617] [<c0417bf0>] (really_probe) from [<c0417f38>] (driver_probe_device+0x6c/0x1bc)
[    0.969002] [<c0417f38>] (driver_probe_device) from [<c0415c4c>] (bus_for_each_drv+0x70/0xb8)
[    0.977644] [<c0415c4c>] (bus_for_each_drv) from [<c04178f0>] (__device_attach+0xc8/0x164)
[    0.986018] [<c04178f0>] (__device_attach) from [<c0416b70>] (bus_probe_device+0x84/0x8c)
[    0.994307] [<c0416b70>] (bus_probe_device) from [<c0413808>] (device_add+0x380/0x618)
[    1.002298] [<c0413808>] (device_add) from [<c045e264>] (spi_add_device+0x8c/0x16c)
[    1.010093] [<c045e264>] (spi_add_device) from [<c045ed10>] (spi_register_controller+0x44c/0x8f4)
[    1.019069] [<c045ed10>] (spi_register_controller) from [<c045f1e8>] (devm_spi_register_controller+0x30/0x70)
[    1.029079] [<c045f1e8>] (devm_spi_register_controller) from [<c04624e8>] (sun6i_spi_probe+0x1e8/0x2b0)
[    1.038593] [<c04624e8>] (sun6i_spi_probe) from [<c0419bc8>] (platform_drv_probe+0x48/0x9c)
[    1.047062] [<c0419bc8>] (platform_drv_probe) from [<c0417bf0>] (really_probe+0x25c/0x3fc)
[    1.055446] [<c0417bf0>] (really_probe) from [<c0417f38>] (driver_probe_device+0x6c/0x1bc)
[    1.063823] [<c0417f38>] (driver_probe_device) from [<c041818c>] (__driver_attach+0x104/0x12c)
[    1.072542] [<c041818c>] (__driver_attach) from [<c0415b78>] (bus_for_each_dev+0x64/0xb4)
[    1.080768] [<c0415b78>] (bus_for_each_dev) from [<c0416e3c>] (bus_add_driver+0x18c/0x264)
[    1.089141] [<c0416e3c>] (bus_add_driver) from [<c0418b68>] (driver_register+0x78/0x10c)
[    1.097352] [<c0418b68>] (driver_register) from [<c0102b80>] (do_one_initcall+0x48/0x1a0)
[    1.105670] [<c0102b80>] (do_one_initcall) from [<c0900e10>] (kernel_init_freeable+0x108/0x1c4)
[    1.114497] [<c0900e10>] (kernel_init_freeable) from [<c06973ec>] (kernel_init+0x8/0x110)
[    1.122793] [<c06973ec>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[    1.130390] Exception stack(0xc1831fb0 to 0xc1831ff8)
[    1.135519] 1fa0:                                     00000000 00000000 00000000 00000000
[    1.143774] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.151975] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.158656] ---[ end trace 99f3c12227daac5d ]---
[    1.165322] i2c /dev entries driver
[    1.170606] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.1
[    1.204142] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.213420] usbcore: registered new interface driver usbhid
[    1.219058] usbhid: USB HID core driver
[    1.235678] NET: Registered protocol family 17
[    1.240380] Key type dns_resolver registered
[    1.246956] Loading compiled-in X.509 certificates
[    1.261595] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.272739] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    1.281643] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.287641] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.297804] hub 1-0:1.0: USB hub found
[    1.301851] hub 1-0:1.0: 1 port detected
[    1.308172] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.324374] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.331206] ALSA device list:
[    1.334357]   #0: Loopback 1
[    1.338092] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.346920] cfg80211: failed to load regulatory.db
[    1.352711] Waiting for root device /dev/mmcblk0p2...
[    1.369275] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.384315] mmc0: new high speed SDHC card at address aaaa
[    1.392647] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
[    1.404268]  mmcblk0: p1 p2
[    1.424319] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.432701] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.443250] devtmpfs: mounted
[    1.450164] Freeing unused kernel memory: 1024K
[    1.454954] Run /sbin/init as init process
[    1.571469] random: fast init done
[    1.606748] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Initializing random number generator... [    1.870551] random: dd: uninitialized urandom read (512 bytes read)
done.

Welcome to Lichee Pi
Lichee login: root
Password:
# modprobe g_ether
[   15.127278] using random self ethernet address
[   15.131802] using random host ethernet address
[   15.137522] usb0: HOST MAC 86:ee:40:ce:3c:52
[   15.141973] usb0: MAC ae:98:d6:21:a2:9e
[   15.146039] using random self ethernet address
[   15.150523] using random host ethernet address
[   15.155353] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[   15.162004] g_ether gadget: g_ether ready

当中0.91秒那段日志和@chong大神的有90%的相似度

加载g_ether提示信息正常,但插入pc usb口没反应,接u盘没反应

离线

楼主 #18 2018-09-28 10:09:10

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

这个好像和我当时测试一样的了,插入U盘和电脑都没反应.





离线

#19 2018-10-08 09:28:32

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

现在还不确定,他这几天回家。
应该基本上都在一楼了,如果有修改也会很小。


这是他前几天发给我的tf卡zImage和dtb, 你加个u-boot和ext4 根文件系统试一试.

本站下载: f1c100s_tf_boot_by_chong.7z

晕哥,问一下@chong大神,帮忙看看C100s usb驱动的问题。

离线

楼主 #20 2018-10-08 09:53:34

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

20181008095026.png





离线

楼主 #21 2018-10-08 09:55:33

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

他直接烧到FLASH也不行, 他原来用 sunxi-fel 的 uboot 命令启动系统了,直接绕开了 BROM的 USB初始化.

@ippen 你也试一试这样启动,看USB是否正常.





离线

#22 2018-10-08 10:18:27

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

他直接烧到FLASH也不行, 他原来用 sunxi-fel 的 uboot 命令启动系统了,直接绕开了 BROM的 USB初始化.

@ippen 你也试一试这样启动,看USB是否正常.

晕倒了,这样没法做产品啊,难道要换芯片?

离线

楼主 #23 2018-10-08 10:46:35

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

ippen 说:
晕哥 说:

他直接烧到FLASH也不行, 他原来用 sunxi-fel 的 uboot 命令启动系统了,直接绕开了 BROM的 USB初始化.

@ippen 你也试一试这样启动,看USB是否正常.

晕倒了,这样没法做产品啊,难道要换芯片?

所以为什么叫有坑, 他也在解决中.





离线

#24 2018-10-08 14:10:55

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:
ippen 说:
晕哥 说:

他直接烧到FLASH也不行, 他原来用 sunxi-fel 的 uboot 命令启动系统了,直接绕开了 BROM的 USB初始化.

@ippen 你也试一试这样启动,看USB是否正常.

晕倒了,这样没法做产品啊,难道要换芯片?

所以为什么叫有坑, 他也在解决中.

这个坑有点大
主要是没有厂家手册

离线

#25 2018-10-08 14:45:11

apollo800
会员
注册时间: 2018-10-03
已发帖子: 21
积分: 10

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

我早就因为这个原因放弃了F1C100s,USB驱动没有,有点说不过去呀,我当初还傻傻地等那个群主说下周就发,等了。。。。,果断放弃了

离线

#26 2018-10-08 14:48:18

路人甲
会员
注册时间: 2017-09-07
已发帖子: 202
积分: 199.5

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

apollo800 说:

我早就因为这个原因放弃了F1C100s,USB驱动没有,有点说不过去呀,我当初还傻傻地等那个群主说下周就发,等了。。。。,果断放弃了

主线Linux下USB驱动确实有点问题,

但是bsp linux USB驱动基本正常了:
https://whycan.cn/t_1626.html

f1c100s 性价比很好,还是有可圈可点之处的。

离线

#27 2018-10-08 15:00:10

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

路人甲 说:
apollo800 说:

我早就因为这个原因放弃了F1C100s,USB驱动没有,有点说不过去呀,我当初还傻傻地等那个群主说下周就发,等了。。。。,果断放弃了

主线Linux下USB驱动确实有点问题,

但是bsp linux USB驱动基本正常了:
https://whycan.cn/t_1626.html

f1c100s 性价比很好,还是有可圈可点之处的。

rndis 驱动正常,但mass_storage驱动不行

离线

#28 2018-10-08 15:04:43

路人甲
会员
注册时间: 2017-09-07
已发帖子: 202
积分: 199.5

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

ippen 说:
路人甲 说:
apollo800 说:

我早就因为这个原因放弃了F1C100s,USB驱动没有,有点说不过去呀,我当初还傻傻地等那个群主说下周就发,等了。。。。,果断放弃了

主线Linux下USB驱动确实有点问题,

但是bsp linux USB驱动基本正常了:
https://whycan.cn/t_1626.html

f1c100s 性价比很好,还是有可圈可点之处的。

rndis 驱动正常,但mass_storage驱动不行

这就尴尬了.

离线

#29 2018-10-08 18:28:10

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥,你当时买来玩的那个唱戏机,有试过当device设备接电脑的usb吗?能当u盘识别?

离线

楼主 #30 2018-10-08 20:17:17

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

貌似当时没有测试,后来尸体都送给本站网友了。





离线

#31 2018-10-08 20:25:46

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

貌似当时没有测试,后来尸体都送给本站网友了。

还能用么?能不能测试一下?

从网上的宣传资料看,应该是能够实现usb device的,所以我还是觉得全志的资料不齐全,sdk有缺陷引起的

离线

#32 2018-10-08 20:50:52

路人甲
会员
注册时间: 2017-09-07
已发帖子: 202
积分: 199.5

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

ippen 说:
晕哥 说:

貌似当时没有测试,后来尸体都送给本站网友了。

还能用么?能不能测试一下?

从网上的宣传资料看,应该是能够实现usb device的,所以我还是觉得全志的资料不齐全,sdk有缺陷引起的

那个已经挂了,起不来了,而且唱戏机用的是 melis 系统,不是linux,有没有兴趣试一试?

离线

#33 2018-10-08 20:56:16

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

路人甲 说:
ippen 说:
晕哥 说:

貌似当时没有测试,后来尸体都送给本站网友了。

还能用么?能不能测试一下?

从网上的宣传资料看,应该是能够实现usb device的,所以我还是觉得全志的资料不齐全,sdk有缺陷引起的

那个已经挂了,起不来了,而且唱戏机用的是 melis 系统,不是linux,有没有兴趣试一试?

不是linux就意义不大了

离线

#34 2018-10-09 09:24:46

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

他直接烧到FLASH也不行, 他原来用 sunxi-fel 的 uboot 命令启动系统了,直接绕开了 BROM的 USB初始化.

@ippen 你也试一试这样启动,看USB是否正常.

我试了用 sunxi-fel uboot 方式启动,但到了starting kernel就停住了,不知道@chong是如何操作的

离线

#35 2018-10-15 11:46:11

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥,能问一下@chong大神,usb 驱动有没有进展?顺便问一下 sunxi-fel uboot的操作方法

离线

楼主 #36 2018-10-15 14:39:23

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

QQ20181015143413.jpg





离线

#37 2018-10-15 17:50:25

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

谢谢晕哥,我找时间试一下

离线

楼主 #38 2018-10-21 22:13:32

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

QQ20181021221115.png

一个重磅好消息砸来了。

如果 linux 4.19 在 f1c100s 搞定了, 那么 spi nand 也不是问题了,因为已经4.19集成了。





离线

#39 2018-10-21 23:07:11

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

https://whycan.cn/files/members/3/QQ20181021221115.png

一个重磅好消息砸来了。

如果 linux 4.19 在 f1c100s 搞定了, 那么 spi nand 也不是问题了,因为已经4.19集成了。

重大利好啊

离线

楼主 #40 2018-10-22 10:47:02

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

大神的补丁下载: lichee_pi_nano_usbok_patch_5e335542de83558e46d.7z

我还没有测试, 哪位先试一试.

操作方法和一楼一致。





离线

#41 2018-10-22 10:59:12

三哥
会员
注册时间: 2018-08-03
已发帖子: 72
积分: 44.5

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

牛逼

离线

#42 2018-10-22 11:24:23

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

最快速的测试报告
打了新的补丁包,4.19的内核启动后,usb device模式直接可用

离线

楼主 #43 2018-10-22 11:37:38

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

ippen 说:

最快速的测试报告
打了新的补丁包,4.19的内核启动后,usb device模式直接可用

果然神速,再试一试 usb host .





离线

#44 2018-10-22 12:19:02

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

试了usb host,插进U盘,有提示,并且正确显示U盘型号,不过/dev下没找到设备,可能是我编译内核参数的有问题

离线

#45 2018-10-22 12:27:59

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

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

真*大神!下班回家也试一下

离线

#46 2018-10-22 13:27:59

arphone
会员
注册时间: 2017-11-03
已发帖子: 92
积分: 83.5

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

wow,牛逼。。。

离线

楼主 #47 2018-10-23 15:27:53

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

git clone https://github.com/torvalds/linux.git
cd linux
git reset --hard 5e335542de83558e46d28de1008a1c37d5d6679a  ###恢复到指定版本
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make sunxi_defconfig  ###使用默认配置

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译





离线

#48 2018-10-23 15:37:29

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

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

晕哥 说:

git clone https://github.com/torvalds/linux.git
cd linux
git reset --hard 5e335542de83558e46d28de1008a1c37d5d6679a  ###恢复到指定版本
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make sunxi_defconfig  ###使用默认配置

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译

晕哥,这版4.19的内核,除了@chong 大神适配的USB驱动外,还有哪些驱动是可以用的哈?是不是要比荔枝派nano的全?

离线

#49 2018-10-23 16:32:32

v3s
会员
注册时间: 2017-09-08
已发帖子: 105
积分: 105

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

msr06rr 说:
晕哥 说:

git clone https://github.com/torvalds/linux.git
cd linux
git reset --hard 5e335542de83558e46d28de1008a1c37d5d6679a  ###恢复到指定版本
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make sunxi_defconfig  ###使用默认配置

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译

晕哥,这版4.19的内核,除了@chong 大神适配的USB驱动外,还有哪些驱动是可以用的哈?是不是要比荔枝派nano的全?

我瞄了一眼,看起来nano主线有的驱动这都有了,还多了spi nand驱动。






此人很懒,没有签名!

离线

#50 2018-10-24 16:57:16

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

晕哥 说:

git clone https://github.com/torvalds/linux.git
cd linux
git reset --hard 5e335542de83558e46d28de1008a1c37d5d6679a  ###恢复到指定版本
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make sunxi_defconfig  ###使用默认配置

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译

默认配置编译出来不是f系列cpu的内核

离线

楼主 #51 2018-10-24 17:07:43

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

ippen 说:
晕哥 说:

git clone https://github.com/torvalds/linux.git
cd linux
git reset --hard 5e335542de83558e46d28de1008a1c37d5d6679a  ###恢复到指定版本
patch -p1 < lichee_pi_nano_usbok_patch_5e335542de83558e46d.patch ###打补丁

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make sunxi_defconfig  ###使用默认配置

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 ###四进程编译

默认配置编译出来不是f系列cpu的内核

是的,suniv系列





离线

#52 2018-10-24 21:22:30

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

make sunxi_defconfig后,make menuconfig,显示是armv7的cpu
图片

离线

#53 2018-11-02 00:17:46

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

我按照指示重新编译了内核,已经生成了zImage文件,但是我使用 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4生成设备树的时候,发现没有生成对应的suniv-f1c100s-licheepi-nano.dtb文件,请指教是什么原因。谢谢!

离线

#54 2018-11-02 12:52:00

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

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

我也是遇到了这情况,不知道别人直接打patch就成功了是怎么做到的。
你查看一下Makefile,看看需要打开哪个宏,印象中是要在multi platform中选择支持arm9,然后就会有suniv的选项出来

离线

#55 2018-11-02 12:58:24

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

用1楼那个最开始的patch,里面有针对f1c100s的config文件,那个config文件编译出来是能用的

离线

#56 2018-11-02 17:13:38

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

谢谢msr06rr和ippen,我今天晚上试一下。

离线

#57 2018-11-02 21:03:50

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

我试了一楼的patch,和前面一样,没有生成suniv-f1c100s-licheepi-nano.dtb文件。我打开了menuconfig,但里面没有有关支持ARM9的选项,请大家指点一下。十分感谢!

离线

#58 2018-11-02 22:41:01

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

我刚才使用一楼patch里面的.config文件编译出来了设备树,结合编译完成的zImage,系统可以正常启动,但lsusb还是看不到设备。启动信息中有一条: sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO 不知是否有影响?使用的是随着Nano带的OTG转USB TYPE_A母口,U盘、无线网卡和鼠标我都试过。均没有识别出来。不知还有可能哪个地方存在问题?

离线

#59 2018-11-02 23:24:32

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

@ippen网友,能否把您编译成功的zImage和设备树文件发给我,试一下。我的邮箱是sygao@263.net。十分感谢!

离线

#60 2018-11-03 11:59:25

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

shengyougao 说:

@ippen网友,能否把您编译成功的zImage和设备树文件发给我,试一下。我的邮箱是sygao@263.net。十分感谢!

我想你理解错了
我的意思是用1楼补丁里面的config文件,但真正能用的补丁是40楼那个,要将两个组合起来用

我直接用的是正式板的4.19,不是chong大神的4.19-rc3版本

用4.19打40楼的补丁,用1楼补丁里面的config文件,然后再自己选内核参数编译

离线

#61 2018-11-03 13:22:51

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

谢谢ippen网友。

离线

#62 2018-11-07 20:52:18

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

ippen网友,我按照您的指导,git了正式版4.19,打上了补丁,使用1楼的.config,编译完成,生成在Image和dtb文件,结果还是看不到USB设备。能否把您的zImage文件和.dtb文件贴出来或者发给我,我试一下。如果可以找到USB设备,我再仔细查找原因。万分感谢!

离线

#63 2018-11-07 20:53:48

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

另外,我的uboot是 U-Boot 2018.01-05676-g00188782ee,是否会有影响呢?

离线

#64 2018-11-07 21:07:22

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

我的操作过程是这样的:(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一条信息。

离线

#65 2018-11-12 00:42:09

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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

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

离线

#66 2018-11-12 20:55:15

shengyougao
会员
注册时间: 2018-10-22
已发帖子: 21
积分: 6

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

十分感谢ippen网友,我刚试过了,可以识别USB设备。下面我将重点检查一下,我以前的工作差在什么地方。

离线

#67 2018-11-12 22:48:16

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

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

这个版本的LCD驱动好用吗?有老外报错说没有fb设备文件

离线

#68 2018-11-28 19:11:36

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

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

https://github.com/torvalds/linux
现在内核变成4.20了...还适用吗,如果谁来试过,冒个泡。

离线

楼主 #69 2018-11-28 19:33:36

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

迪卡 说:

https://github.com/torvalds/linux
现在内核变成4.20了...还适用吗,如果谁来试过,冒个泡。

组织把这个重任交给你了。





离线

#70 2018-11-29 15:08:44

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

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

晕哥,怎么编译出dtb呀,我参考nano.lichee.pro。
使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs
结果,在目录下arch/arm/boot/dts目录,找不到dtb文件

离线

楼主 #71 2018-11-29 15:22:27

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

迪卡 说:

晕哥,怎么编译出dtb呀,我参考nano.lichee.pro。
使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs
结果,在目录下arch/arm/boot/dts目录,找不到dtb文件

用这个命令找找: find . |grep \\.dtb$





离线

#72 2018-11-29 15:32:59

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

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

晕哥 说:
迪卡 说:

晕哥,怎么编译出dtb呀,我参考nano.lichee.pro。
使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs
结果,在目录下arch/arm/boot/dts目录,找不到dtb文件

用这个命令找找: find . |grep \\.dtb$

确认,没有需要的dtb,都是sun45678i

难道是我用的linux源码不对??
我下载的4.19.5
我在下载个4.19.0试试

离线

楼主 #73 2018-11-29 15:41:27

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

迪卡 说:
晕哥 说:
迪卡 说:

晕哥,怎么编译出dtb呀,我参考nano.lichee.pro。
使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs
结果,在目录下arch/arm/boot/dts目录,找不到dtb文件

用这个命令找找: find . |grep \\.dtb$

确认,没有需要的dtb,都是sun45678i

难道是我用的linux源码不对??
我下载的4.19.5
我在下载个4.19.0试试

一楼的补丁包我试过的,肯定没有问题.
后面的补丁包没有来得及测试, 按上面网友应该也是没有问题,注意姿势。





离线

#74 2018-11-29 16:01:56

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

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

FluxBB bbcode 测试
这是从https://www.kernel.org/下载的4.19.5稳定版。
在arch/arm/boot/dts目录搜到的
文件存在,就是说明提交到主线内核了??
这个.5版的源码是在本帖patch发布之后出的。
我一样打上了patch和config。
编译出来的无法生成dtb,已经确认。

翻了翻上面,看到53楼一样的效果。
不懂得小白都会照着命令输,
本来挺好的.config,搞个make sunxi_defconfig
会不会把配置好的配置给弄不对了....

最近编辑记录 迪卡 (2018-11-29 16:04:26)

离线

楼主 #75 2018-11-29 16:10:32

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

你检查一下 .config 文件里面的设备树 dts文件是否存在





离线

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

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

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
已发帖子: 916
积分: 903
个人网站

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
已发帖子: 916
积分: 903
个人网站

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
已发帖子: 916
积分: 903
个人网站

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
已发帖子: 916
积分: 903
个人网站

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

没错,就是没放fs

离线

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

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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
已发帖子: 31
积分: 26

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

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

离线

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

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

@error_0  感谢分享!





离线

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

科技植
会员
注册时间: 2018-11-05
已发帖子: 35
积分: 35

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
积分: 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
积分: 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
积分: 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

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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

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





离线

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

Michael
会员
注册时间: 2019-01-13
已发帖子: 18
积分: 18

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
已发帖子: 18
积分: 18

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

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

离线

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

Michael
会员
注册时间: 2019-01-13
已发帖子: 18
积分: 18

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
积分: 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
已发帖子: 18
积分: 18

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

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

离线

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

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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
已发帖子: 113
积分: 113

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
已发帖子: 735
积分: 735

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
已发帖子: 113
积分: 113

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

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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
已发帖子: 63
积分: 22.5

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
已发帖子: 916
积分: 903
个人网站

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

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

离线

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

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

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
积分: 36

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

MARK一下,稍后试验!

离线

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

arphone
会员
注册时间: 2017-11-03
已发帖子: 92
积分: 83.5

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

MARK,感谢分享。。。

离线

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

ippen
会员
注册时间: 2018-07-22
已发帖子: 345
积分: 339.5

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
积分: 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
已发帖子: 113
积分: 113

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
已发帖子: 345
积分: 339.5

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
已发帖子: 408
积分: 407

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
已发帖子: 50
积分: 8

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
已发帖子: 14
积分: 14

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

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

离线

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

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

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
已发帖子: 14
积分: 14

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
已发帖子: 735
积分: 735

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
已发帖子: 14
积分: 14

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
已发帖子: 58
积分: 43

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

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

离线

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

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,343
积分: 9202

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
已发帖子: 58
积分: 43

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

晕哥 说:
duckduckgo 说:

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

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

多谢提醒!

离线

#118 2019-08-21 23:35:39

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

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

mark!我内核用的是4.14-exp,host模式没反应,原来这样,明天试试

Michael 说:

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

离线

#119 2019-08-22 14:28:35

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

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

直接按照上面各位大佬的步骤patch到4.14内核是没问题的,但荔枝派官方4.14-exp版本内核有个bug,就是105楼@Peter所遇到的
填坑:修改drivers/usb/musb/sunxi.c:742行

-      of_device_is_compatible(np, "allwinner,suniv-musb")) {
+      of_device_is_compatible(np, "allwinner,suniv-f1c100s-musb")) {

修改后usb正常,log如下:

=> setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
=> load mmc 0:1 0x80C00000 suniv-f1c100s-licheepi-nano-with-lcd.dtb
reading suniv-f1c100s-licheepi-nano-with-lcd.dtb
7868 bytes read in 27 ms (284.2 KiB/s)
=> load mmc 0:1 0x80008000 zImage
reading zImage
3809368 bytes read in 205 ms (17.7 MiB/s)
=> bootz 0x80008000 - 0x80C00000
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e05000, end 80e09ebb ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-licheepi-nano (root@ubuntu) (gcc version 7.3.0 (Buildroot 2018.08.2)) #4 Thu Aug 22 14:11:09 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] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: 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: 22676K/32768K available (6144K kernel code, 212K rwdata, 1372K rodata, 1024K init, 249K bss, 10092K 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 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a352a0   ( 213 kB)
[    0.000000]        .bss : 0xc0a3a40c - 0xc0a7880c   ( 249 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.000056] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000131] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000764] Console: colour dummy device 80x30
[    0.000861] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070255] pid_max: default: 32768 minimum: 301
[    0.070616] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070665] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072231] CPU: Testing write buffer coherency: ok
[    0.074116] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076756] devtmpfs: initialized
[    0.083336] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083400] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083654] pinctrl core: initialized pinctrl subsystem
[    0.085723] random: get_random_u32 called from bucket_table_alloc+0x80/0x1a4 with crng_init=0
[    0.086014] NET: Registered protocol family 16
[    0.087906] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.089886] cpuidle: using governor menu
[    0.115794] SCSI subsystem initialized
[    0.116148] usbcore: registered new interface driver usbfs
[    0.116306] usbcore: registered new interface driver hub
[    0.116537] usbcore: registered new device driver usb
[    0.117059] pps_core: LinuxPPS API ver. 1 registered
[    0.117087] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.117162] PTP clock support registered
[    0.117696] Advanced Linux Sound Architecture Driver Initialized.
[    0.118658] random: fast init done
[    0.121022] clocksource: Switched to clocksource timer
[    0.150646] NET: Registered protocol family 2
[    0.152327] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.152415] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.152476] TCP: Hash tables configured (established 1024 bind 1024)
[    0.152840] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.152917] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.153436] NET: Registered protocol family 1
[    0.154546] RPC: Registered named UNIX socket transport module.
[    0.154593] RPC: Registered udp transport module.
[    0.154613] RPC: Registered tcp transport module.
[    0.154629] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.155666] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.157519] Initialise system trusted keyrings
[    0.158082] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.175928] NFS: Registering the id_resolver key type
[    0.176036] Key type id_resolver registered
[    0.176058] Key type id_legacy registered
[    0.189551] Key type asymmetric registered
[    0.189597] Asymmetric key parser 'x509' registered
[    0.189836] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.189872] io scheduler noop registered
[    0.189890] io scheduler deadline registered
[    0.190662] io scheduler cfq registered (default)
[    0.190700] io scheduler mq-deadline registered
[    0.190719] io scheduler kyber registered
[    0.192098] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.202410] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.394628] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.402035] console [ttyS0] disabled
[    0.422307] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.901117] console [ttyS0] enabled
[    0.911948] panel-simple panel: panel supply power not found, using dummy regulator
[    0.921291] SCSI Media Changer driver v0.25 
[    0.926949] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.933619] ehci-platform: EHCI generic platform driver
[    0.939138] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.945453] ohci-platform: OHCI generic platform driver
[    0.951267] usbcore: registered new interface driver usb-storage
[    0.958575] i2c /dev entries driver
[    1.021166] sunxi-mmc 1c0f000.mmc: base:0xc2855000 irq:19
[    1.028685] usbcore: registered new interface driver usbhid
[    1.034394] usbhid: USB HID core driver
[    1.057282] NET: Registered protocol family 17
[    1.062150] Key type dns_resolver registered
[    1.068913] Loading compiled-in X.509 certificates
[    1.087802] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.094579] [drm] No driver support for vblank timestamp query.
[    1.101621] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0738a08)
[    1.110371] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0737dbc)
[    1.228518] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.250909] Console: switching to colour frame buffer device 100x30
[    1.251838] mmc0: new high speed SDHC card at address 0001
[    1.253048] mmcblk0: mmc0:0001 SD8GB 7.28 GiB 
[    1.255682]  mmcblk0: p1 p2
[    1.311473] sun4i-drm display-engine: fb0:  frame buffer device
[    1.318660] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.327882] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.339985] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.345924] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.356115] hub 1-0:1.0: USB hub found
[    1.360055] hub 1-0:1.0: 1 port detected
[    1.366563] ALSA device list:
[    1.369562]   #0: Loopback 1
[    1.375778] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.406576] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.414972] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.424770] devtmpfs: mounted
[    1.433995] Freeing unused kernel memory: 1024K
[    1.628349] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Starting mdev...
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK

Welcome to Buildroot
buildroot login: root
# ls
# lsusb
Bus 001 Device 001: ID 1d6b:0002
# [  168.701148] random: crng init done
jiangming1399 说:
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版本的内核,就只改了那里,自己测试时是可以用的,你要不试试重新下载下来用默认配置文件编译?

最近编辑记录 checkout (2019-08-22 14:30:13)

离线

#120 2019-08-22 15:00:00

firstman
会员
注册时间: 2019-04-06
已发帖子: 279
积分: 279

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

@checkout 厉害厉害, 105楼那个问题我当时也遇到了,没有深究, 就直接用 4.15 了

离线

#121 2019-09-03 17:00:59

傅伟清
会员
注册时间: 2019-07-17
已发帖子: 39
积分: 39

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

ippen 说:

再次用@chong提供的内核编译一次
启动日志

## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e61000, end 80e65d8e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-rc3-licheepi-nano (root@LicheepiNano) (gcc version 6.4.1 20180425 [linaro-6.4-2018.05 revision 7b15d0869c096fe39603ad63dc19ab7cf035eb70] (Linaro GCC 6.4-2018.05)) #1 Thu Sep 27 22:10:44 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+0x84/0x400 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: 22676K/32768K available (6144K kernel code, 248K rwdata, 1516K rodata, 1024K init, 239K bss, 10092K 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)   ( 249 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 240 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.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000111] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000545] Console: colour dummy device 80x30
[    0.001125] console [tty0] enabled
[    0.001226] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.050293] pid_max: default: 32768 minimum: 301
[    0.050665] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050746] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.052063] CPU: Testing write buffer coherency: ok
[    0.053839] Setting up static identity map for 0x80100000 - 0x80100058
[    0.057873] devtmpfs: initialized
[    0.062835] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.062983] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.063318] pinctrl core: initialized pinctrl subsystem
[    0.065410] NET: Registered protocol family 16
[    0.066712] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.068365] cpuidle: using governor menu
[    0.088871] SCSI subsystem initialized
[    0.089272] usbcore: registered new interface driver usbfs
[    0.089476] usbcore: registered new interface driver hub
[    0.089728] usbcore: registered new device driver usb
[    0.090290] pps_core: LinuxPPS API ver. 1 registered
[    0.090376] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.090503] PTP clock support registered
[    0.090977] Advanced Linux Sound Architecture Driver Initialized.
[    0.092385] clocksource: Switched to clocksource timer
[    0.119370] NET: Registered protocol family 2
[    0.120654] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.120802] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120877] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120933] TCP: Hash tables configured (established 1024 bind 1024)
[    0.121250] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.121348] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.121872] NET: Registered protocol family 1
[    0.123408] RPC: Registered named UNIX socket transport module.
[    0.123509] RPC: Registered udp transport module.
[    0.123548] RPC: Registered tcp transport module.
[    0.123576] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.125584] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.127482] Initialise system trusted keyrings
[    0.128141] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.144485] NFS: Registering the id_resolver key type
[    0.144625] Key type id_resolver registered
[    0.144670] Key type id_legacy registered
[    0.156418] Key type asymmetric registered
[    0.156521] Asymmetric key parser 'x509' registered
[    0.156716] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.156791] io scheduler noop registered
[    0.156825] io scheduler deadline registered
[    0.157278] io scheduler cfq registered (default)
[    0.157357] io scheduler mq-deadline registered
[    0.157395] io scheduler kyber registered
[    0.158836] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.167381] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.331732] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.337924] console [ttyS0] disabled
[    0.358243] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.847381] console [ttyS0] enabled
[    0.856509] panel-simple panel: panel supply power not found, using dummy regulator
[    0.864575] panel-simple panel: Linked as a consumer to regulator.0
[    0.872316] SCSI Media Changer driver v0.25
[    0.879463] spidev spi0.0: buggy DT: spidev listed directly in DT
[    0.885775] ------------[ cut here ]------------
[    0.890466] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:730 spidev_probe+0x198/0x1e8
[    0.898556] Modules linked in:
[    0.901665] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.0-rc3-licheepi-nano #1
[    0.909039] Hardware name: Allwinner suniv Family
[    0.913904] [<c010e9c0>] (unwind_backtrace) from [<c010bc68>] (show_stack+0x10/0x14)
[    0.921723] [<c010bc68>] (show_stack) from [<c0117230>] (__warn+0xec/0x114)
[    0.928807] [<c0117230>] (__warn) from [<c011736c>] (warn_slowpath_null+0x3c/0x48)
[    0.936500] [<c011736c>] (warn_slowpath_null) from [<c0460ff8>] (spidev_probe+0x198/0x1e8)
[    0.944904] [<c0460ff8>] (spidev_probe) from [<c045d990>] (spi_drv_probe+0x88/0xa0)
[    0.952715] [<c045d990>] (spi_drv_probe) from [<c0417bf0>] (really_probe+0x25c/0x3fc)
[    0.960617] [<c0417bf0>] (really_probe) from [<c0417f38>] (driver_probe_device+0x6c/0x1bc)
[    0.969002] [<c0417f38>] (driver_probe_device) from [<c0415c4c>] (bus_for_each_drv+0x70/0xb8)
[    0.977644] [<c0415c4c>] (bus_for_each_drv) from [<c04178f0>] (__device_attach+0xc8/0x164)
[    0.986018] [<c04178f0>] (__device_attach) from [<c0416b70>] (bus_probe_device+0x84/0x8c)
[    0.994307] [<c0416b70>] (bus_probe_device) from [<c0413808>] (device_add+0x380/0x618)
[    1.002298] [<c0413808>] (device_add) from [<c045e264>] (spi_add_device+0x8c/0x16c)
[    1.010093] [<c045e264>] (spi_add_device) from [<c045ed10>] (spi_register_controller+0x44c/0x8f4)
[    1.019069] [<c045ed10>] (spi_register_controller) from [<c045f1e8>] (devm_spi_register_controller+0x30/0x70)
[    1.029079] [<c045f1e8>] (devm_spi_register_controller) from [<c04624e8>] (sun6i_spi_probe+0x1e8/0x2b0)
[    1.038593] [<c04624e8>] (sun6i_spi_probe) from [<c0419bc8>] (platform_drv_probe+0x48/0x9c)
[    1.047062] [<c0419bc8>] (platform_drv_probe) from [<c0417bf0>] (really_probe+0x25c/0x3fc)
[    1.055446] [<c0417bf0>] (really_probe) from [<c0417f38>] (driver_probe_device+0x6c/0x1bc)
[    1.063823] [<c0417f38>] (driver_probe_device) from [<c041818c>] (__driver_attach+0x104/0x12c)
[    1.072542] [<c041818c>] (__driver_attach) from [<c0415b78>] (bus_for_each_dev+0x64/0xb4)
[    1.080768] [<c0415b78>] (bus_for_each_dev) from [<c0416e3c>] (bus_add_driver+0x18c/0x264)
[    1.089141] [<c0416e3c>] (bus_add_driver) from [<c0418b68>] (driver_register+0x78/0x10c)
[    1.097352] [<c0418b68>] (driver_register) from [<c0102b80>] (do_one_initcall+0x48/0x1a0)
[    1.105670] [<c0102b80>] (do_one_initcall) from [<c0900e10>] (kernel_init_freeable+0x108/0x1c4)
[    1.114497] [<c0900e10>] (kernel_init_freeable) from [<c06973ec>] (kernel_init+0x8/0x110)
[    1.122793] [<c06973ec>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[    1.130390] Exception stack(0xc1831fb0 to 0xc1831ff8)
[    1.135519] 1fa0:                                     00000000 00000000 00000000 00000000
[    1.143774] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.151975] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.158656] ---[ end trace 99f3c12227daac5d ]---
[    1.165322] i2c /dev entries driver
[    1.170606] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.1
[    1.204142] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.213420] usbcore: registered new interface driver usbhid
[    1.219058] usbhid: USB HID core driver
[    1.235678] NET: Registered protocol family 17
[    1.240380] Key type dns_resolver registered
[    1.246956] Loading compiled-in X.509 certificates
[    1.261595] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.272739] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    1.281643] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.287641] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.297804] hub 1-0:1.0: USB hub found
[    1.301851] hub 1-0:1.0: 1 port detected
[    1.308172] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.324374] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.331206] ALSA device list:
[    1.334357]   #0: Loopback 1
[    1.338092] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.346920] cfg80211: failed to load regulatory.db
[    1.352711] Waiting for root device /dev/mmcblk0p2...
[    1.369275] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.384315] mmc0: new high speed SDHC card at address aaaa
[    1.392647] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
[    1.404268]  mmcblk0: p1 p2
[    1.424319] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.432701] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.443250] devtmpfs: mounted
[    1.450164] Freeing unused kernel memory: 1024K
[    1.454954] Run /sbin/init as init process
[    1.571469] random: fast init done
[    1.606748] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Initializing random number generator... [    1.870551] random: dd: uninitialized urandom read (512 bytes read)
done.

Welcome to Lichee Pi
Lichee login: root
Password:
# modprobe g_ether
[   15.127278] using random self ethernet address
[   15.131802] using random host ethernet address
[   15.137522] usb0: HOST MAC 86:ee:40:ce:3c:52
[   15.141973] usb0: MAC ae:98:d6:21:a2:9e
[   15.146039] using random self ethernet address
[   15.150523] using random host ethernet address
[   15.155353] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[   15.162004] g_ether gadget: g_ether ready

当中0.91秒那段日志和@chong大神的有90%的相似度

加载g_ether提示信息正常,但插入pc usb口没反应,接u盘没反应

为啥我没有
[    1.261595] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.272739] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    1.281643] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.287641] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
这几行日志呀,内核里选了静态编译啦

离线

#122 2019-09-16 09:27:13

傅伟清
会员
注册时间: 2019-07-17
已发帖子: 39
积分: 39

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

请问大神的这个补丁包音频能用吗,看日志好像识别了

离线

#123 2019-09-16 21:09:49

jiangming1399
会员
注册时间: 2018-06-14
已发帖子: 113
积分: 113

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

5.2的内核已经合并了这个更改了,后续应该是不用手动更改了

离线

#124 2019-09-17 13:52:44

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

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

给力,准备试试

离线

#125 2019-09-21 09:53:56

还能这么玩
会员
注册时间: 2019-04-14
已发帖子: 119
积分: 119

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

jiangming1399 说:

5.2的内核已经合并了这个更改了,后续应该是不用手动更改了

是说这个吗: https://whycan.cn/t_2896.html

离线

#126 2019-09-24 20:37:45

xxdebug
会员
注册时间: 2018-12-08
已发帖子: 14
积分: 14

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

5.3.0

离线

#127 2019-12-06 13:50:59

gdfsli
会员
注册时间: 2018-07-11
已发帖子: 28
积分: 28

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

有没有人试过v3s的uboot能否直接读写u盘?

离线

#128 2020-02-25 17:01:50

yytyu
会员
注册时间: 2018-11-01
已发帖子: 34
积分: 18

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

MARK,感谢分享。。。

离线

#129 2020-04-18 19:53:42

hzy831225
会员
注册时间: 2020-04-11
已发帖子: 40
积分: 35

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

HOST模式有人搞来没,我插U盘没反映

离线

#130 2020-04-26 20:38:06

viken
会员
注册时间: 2020-02-28
已发帖子: 14
积分: 14

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

你好zero v3s 这个地方要改吗?

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

离线

#131 2020-04-28 14:59:05

sknown
会员
注册时间: 2020-04-28
已发帖子: 7
积分: 2

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

usb还没有搞定

离线

#132 2020-04-28 15:00:01

sknown
会员
注册时间: 2020-04-28
已发帖子: 7
积分: 2

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

为了积分,拼了

离线

#133 2020-04-28 15:11:05

sknown
会员
注册时间: 2020-04-28
已发帖子: 7
积分: 2

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

阅读帖子成本有点搞,建议把帖子整理再一楼

离线

#134 2020-05-07 09:50:29

gzhssl
会员
注册时间: 2019-11-22
已发帖子: 18
积分: 62.5

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

谢谢分享,正在尝试4.19版本编译

离线

#135 2020-05-15 16:20:09

xiaoqinhu2020
会员
注册时间: 2020-05-14
已发帖子: 7
积分: 7

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

感谢大神分享,我已经弄了好久都没成功,看到这个贴终于看到希望了

离线

#136 2020-06-10 09:29:18

秦皇岛岛主
会员
注册时间: 2020-05-22
已发帖子: 59
积分: 38

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

由于很多人git下载速度太慢,本人下载了5e335542de83558e46d28de1008a1c37d5d6679a版本的linux内核,上传上来方便大家使用
话说怎么上传文件啊,传不上来
由于论坛请把文件改名为zip格式,然后解压

最近编辑记录 秦皇岛岛主 (2020-06-10 10:04:29)

离线

#137 2020-07-04 20:28:20

ispsubb
会员
注册时间: 2020-07-04
已发帖子: 2
积分: 2

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

正在做usb gadget 相关, 在f1c200s 上面。端点数是不是8 个? FIFO 是不是8K? 两份资料有冲突

离线

#138 2021-11-24 16:59:07

chenzh
会员
注册时间: 2021-09-29
已发帖子: 28
积分: 8

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

该评论内容与本帖子无关,鼓励各位坑友积极发言讨论与帖子有关的内容!

离线

  • 不通过:其他

#139 2021-11-29 20:16:09

somnus
会员
注册时间: 2021-11-29
已发帖子: 17
积分: 2

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

4.15 主线USB host 是不是个天坑,USB 全部无反应

离线

#140 2022-03-24 16:32:34

lorenzo
会员
注册时间: 2022-03-24
已发帖子: 15
积分: 0

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

小白有个问题,如果用usb-C口如何自动切换host和device模式

离线

#141 2022-05-04 16:34:40

jiaqi7
会员
注册时间: 2022-05-02
已发帖子: 5
积分: 5

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

如果我想在内核中开启其他的服务,比如nfs,那么我利用make menuconfig去生成新的.config文件的话,那这样是不是就不能用了?

离线

#142 2022-06-22 12:35:52

dragon101788
会员
注册时间: 2019-02-21
已发帖子: 3
积分: 3

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

就想用个usb,到底要怎么办

离线

页脚

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

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