页次: 1
今天在调试USB 网卡(rtl8152b),直接插入USB网卡后,驱动正常插上网线正常通信,可以PING通路由器,也可以PING 外网;
但是中断加了个USB HUB后奇怪的事情发生了,网卡驱动貌似加载成功了,LSUSB也正常,ifconfig up 网卡也正常,手动分配IP也正常;
eth0 Link encap:Ethernet HWaddr 00:E0:4C:36:93:11
inet addr:192.168.31.123 Bcast:192.168.31.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
但是,就是PING不通路由器;
各位兄台有遇到此类问题不!
昨天收了,nano 发现SPI flas不是华邦W25Q128,是XT25Q128(国产芯片)。uboot 报错,内核启动失败;
最近W25Q128芯片涨价,所以发货时都使用XT的替换了
报FLASH不识别,ID为0b,40,18
修改uboot
u-boot/drivers/mtd/spi/u-boot/drivers/mtd/spi/spi_flash_ids.c
{"w25q128bv", INFO(0xef4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
+{"xt25q128", INFO(0x0b4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
修改内核源码下的 ./drivers/mtd/spi/spi-nor.c
- { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
+{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },
+{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },
重新编译下载OK;
哪位大神帮看一下,U盘与USB 网卡插上去一点反映也没有,LSUSB,输出“Bus 001 Device 001: ID 1d6b:0002”
dts配置以下:
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
status = "okay";
};
以下为启动打印
[ 0.902736] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.909287] ehci-platform: EHCI generic platform driver
[ 0.914804] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.921106] ohci-platform: OHCI generic platform driver
[ 0.926700] usbcore: registered new interface driver cdc_acm
[ 0.932449] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 0.940643] usbcore: registered new interface driver usb-storage
[ 0.946891] usbcore: registered new interface driver usbserial_generic
[ 0.953603] usbserial: USB Serial support registered for generic
[ 0.960576] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 0.972367] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 0.978291] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 0.988241] hub 1-0:1.0: USB hub found
[ 0.992154] hub 1-0:1.0: 1 port detected
[ 0.998619] i2c /dev entries driver
[ 1.004153] usbcore: registered new interface driver usbhid
[ 1.009857] usbhid: USB HID core driver
[ 1.014602] NET: Registered protocol family 17
[ 1.019268] Key type dns_resolver registered
[ 1.025543] Loading compiled-in X.509 certificates
[ 1.037346] vcc3v3: disabling
[ 1.138148] random: crng init done
[ 2.454461] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 2.462205] devtmpfs: mounted
[ 2.469721] Freeing unused kernel memory: 1024K
荔枝派F1C100S,我启动好像是正常的,OTG功能,USB插入电脑有反映WIN可以驱动加载,但是HOST功能一直不行
我插入U盘、USB网卡都没反映,lsus,出来一直具返回一行“Bus 001 Device 001: ID 1d6b:0002”;
我看PE2,插入电脑高电压,插U盘是低电压,理论是对的
以下为启动代码 :
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0-next-20180202-licheepi-nano (f1c200s@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #15 Sat Apr 18 13:40:27 CST 2020
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: 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=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[ 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: 24780K/32768K available (4096K kernel code, 214K rwdata, 944K rodata, 1024K init, 217K bss, 7988K 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) (5088 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 215 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 218 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.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000110] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000625] Console: colour dummy device 80x30
[ 0.000709] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070230] pid_max: default: 32768 minimum: 301
[ 0.070671] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070712] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.072084] CPU: Testing write buffer coherency: ok
[ 0.073731] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076226] devtmpfs: initialized
[ 0.082180] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.082238] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.082516] pinctrl core: initialized pinctrl subsystem
[ 0.084535] NET: Registered protocol family 16
[ 0.085793] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.087507] cpuidle: using governor menu
[ 0.106809] SCSI subsystem initialized
[ 0.107153] usbcore: registered new interface driver usbfs
[ 0.107300] usbcore: registered new interface driver hub
[ 0.107473] usbcore: registered new device driver usb
[ 0.107904] pps_core: LinuxPPS API ver. 1 registered
[ 0.107931] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.107996] PTP clock support registered
[ 0.109464] clocksource: Switched to clocksource timer
[ 0.136044] NET: Registered protocol family 2
[ 0.137485] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.137559] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.137620] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.137670] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.137927] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.137985] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.138471] NET: Registered protocol family 1
[ 0.138921] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.140906] Initialise system trusted keyrings
[ 0.141498] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.155708] jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
[ 0.169944] Key type asymmetric registered
[ 0.169987] Asymmetric key parser 'x509' registered
[ 0.170209] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.170243] io scheduler noop registered
[ 0.170261] io scheduler deadline registered
[ 0.171030] io scheduler cfq registered (default)
[ 0.171064] io scheduler mq-deadline registered
[ 0.171083] io scheduler kyber registered
[ 0.183856] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.351846] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.358423] console [ttyS0] disabled
[ 0.378673] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 22, base_baud = 6250000) is a 16550A
[ 0.813852] console [ttyS0] enabled
[ 0.819374] SCSI Media Changer driver v0.25
[ 0.827051] m25p80 spi0.0: found xt25q128, expected w25q128
[ 0.832783] m25p80 spi0.0: xt25q128 (16384 Kbytes)
[ 0.837632] 4 ofpart partitions found on MTD device spi0.0
[ 0.843181] Creating 4 MTD partitions on "spi0.0":
[ 0.847985] 0x000000000000-0x000000070000 : "u-boot"
[ 0.855605] 0x000000070000-0x000000080000 : "dtb"
[ 0.862883] 0x000000080000-0x000000380000 : "kernel"
[ 0.870452] 0x000000380000-0x000001000000 : "rootfs"
[ 0.878311] PPP generic driver version 2.4.2
[ 0.883229] PPP BSD Compression module registered
[ 0.887943] PPP Deflate Compression module registered
[ 0.893119] PPP MPPE Compression module registered
[ 0.897908] NET: Registered protocol family 24
[ 0.902460] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
[ 0.909552] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.916064] ehci-platform: EHCI generic platform driver
[ 0.921596] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.927816] ohci-platform: OHCI generic platform driver
[ 0.933474] usbcore: registered new interface driver usb-storage
[ 0.940465] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 0.952269] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 0.958061] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 0.968017] hub 1-0:1.0: USB hub found
[ 0.972043] hub 1-0:1.0: 1 port detected
[ 0.978324] using random self ethernet address
[ 0.982929] using random host ethernet address
[ 0.989174] usb0: HOST MAC 2a:74:ae:fb:3b:fa
[ 0.993712] usb0: MAC 2a:7e:20:87:c3:39
[ 0.997650] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.005218] g_cdc gadget: g_cdc ready
[ 1.009217] i2c /dev entries driver
[ 1.014961] usbcore: registered new interface driver usbhid
[ 1.020651] usbhid: USB HID core driver
[ 1.025404] NET: Registered protocol family 17
[ 1.030069] Key type dns_resolver registered
[ 1.036290] Loading compiled-in X.509 certificates
[ 1.048269] vcc3v3: disabling
[ 1.147018] random: crng init done
[ 2.444995] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 2.452735] devtmpfs: mounted
[ 2.460244] Freeing unused kernel memory: 1024K
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
页次: 1