页次: 1
插入ch341 这种usb转串口,死活没反应,lsusb也看不到设备。但是插入usb网卡就可以正常识别。
我板子上还画了个ch342,以为是画得有问题,但是直接用usb口插了ch341也是没反应,实在不知道问题出在哪儿了,请大家看看
用的主线5.19的内核,USB相关的config设置如下:
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_OTG=y
CONFIG_USB_EHCI_HCD=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_ACM=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_SUNXI=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_CH341=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_GADGET=y
CONFIG_USB_ROLE_SWITCH=y
设备树里otg设置成的是host, ID引脚在板子上没有用到,也没有连接(typeC接口)
&usb_otg {
dr_mode = "host";
status = "okay";
};
&usbphy {
usb0_id_det = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
启动log如下:
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.19.3 (ncer@ncer-CW65S) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2022.11.1) 11.3.0, GNU ld (GNU Binutils) 2.38) #6 PREEMPT Sun Sep 17 00:49:59 CST 2023
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c53c7d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: dma_contiguous_reserve(limit ffffffff)
[ 0.000000] cma: dma_contiguous_reserve: reserving 32 MiB for global area
[ 0.000000] cma: cma_declare_contiguous_nid(size 0x02000000, base 0x00000000, limit 0xffffffff alignment 0x00000000)
[ 0.000000] cma: Reserved 32 MiB at 0x41c00000
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000040000000-0x0000000043ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x0000000043ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000043ffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] CPU: All CPU(s) started in HYP mode.
[ 0.000000] CPU: Virtualization extensions available.
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 spidev.bufsiz=65536 earlyprintk rw quiet
[ 0.000000] Unknown kernel command line parameters "earlyprintk", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 24048K/65536K available (4096K kernel code, 569K rwdata, 1120K rodata, 1024K init, 216K bss, 8720K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000015] Switching to timer-based delay loop, resolution 41ns
[ 0.000230] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000491] Console: colour dummy device 80x30
[ 0.000542] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000556] pid_max: default: 32768 minimum: 301
[ 0.000720] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000740] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001292] CPU: Testing write buffer coherency: ok
[ 0.001984] Setting up static identity map for 0x40100000 - 0x40100054
[ 0.002094] rcu: Hierarchical SRCU implementation.
[ 0.002102] rcu: Max phase no-delay instances is 1000.
[ 0.002631] devtmpfs: initialized
[ 0.006110] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006273] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006304] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.007800] pinctrl core: initialized pinctrl subsystem
[ 0.009081] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.009345] cma: cma_alloc(cma (ptrval), count 64, align 6)
[ 0.010285] cma: cma_alloc(): returned (ptrval)
[ 0.010569] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.027988] usbcore: registered new interface driver usbfs
[ 0.028043] usbcore: registered new interface driver hub
[ 0.028102] usbcore: registered new device driver usb
[ 0.028328] mc: Linux media interface: v0.10
[ 0.028382] videodev: Linux video capture interface: v2.00
[ 0.028893] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[ 0.029805] Bluetooth: Core ver 2.22
[ 0.029870] NET: Registered PF_BLUETOOTH protocol family
[ 0.029877] Bluetooth: HCI device and connection manager initialized
[ 0.029893] Bluetooth: HCI socket layer initialized
[ 0.029901] Bluetooth: L2CAP socket layer initialized
[ 0.029919] Bluetooth: SCO socket layer initialized
[ 0.030666] clocksource: Switched to clocksource arch_sys_counter
[ 0.039393] NET: Registered PF_INET protocol family
[ 0.039647] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.040614] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.040770] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.040792] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.040811] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.040828] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.040948] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.040972] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.041180] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.043279] Initialise system trusted keyrings
[ 0.043522] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.142929] NET: Registered PF_ALG protocol family
[ 0.142961] Key type asymmetric registered
[ 0.142967] Asymmetric key parser 'x509' registered
[ 0.143108] io scheduler mq-deadline registered
[ 0.143117] io scheduler kyber registered
[ 0.148451] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.152087] usbcore: registered new interface driver ath9k_htc
[ 0.152106] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.152113] ehci-platform: EHCI generic platform driver
[ 0.152462] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.152500] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.152534] cma: cma_alloc(cma (ptrval), count 1, align 0)
[ 0.152702] cma: cma_alloc(): returned (ptrval)
[ 0.152728] cma: cma_alloc(cma (ptrval), count 1, align 0)
[ 0.152777] cma: cma_alloc(): returned (ptrval)
[ 0.152794] cma: cma_alloc(cma (ptrval), count 1, align 0)
[ 0.152838] cma: cma_alloc(): returned (ptrval)
[ 0.152919] ehci-platform 1c1a000.usb: irq 24, io mem 0x01c1a000
[ 0.153061] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.153184] usbcore: registered new interface driver cdc_acm
[ 0.153192] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 0.153289] usbcore: registered new interface driver usbserial_generic
[ 0.153320] usbserial: USB Serial support registered for generic
[ 0.153351] usbcore: registered new interface driver ch341
[ 0.153376] usbserial: USB Serial support registered for ch341-uart
[ 0.154381] sun6i-rtc 1c20400.rtc: registered as rtc0
[ 0.154437] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:06:12 UTC (372)
[ 0.154580] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.154783] i2c_dev: i2c /dev entries driver
[ 0.155734] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.157010] sun4i-ss 1c15000.crypto: Die ID 7
[ 0.157456] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[ 0.157662] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 26
[ 0.158493] NET: Registered PF_PACKET protocol family
[ 0.158794] Loading compiled-in X.509 certificates
[ 0.170482] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.171018] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[ 0.171803] printk: console [ttyS0] disabled
[ 0.192056] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.192247] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.19
[ 0.192262] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.192273] usb usb1: Product: EHCI Host Controller
[ 0.192282] usb usb1: Manufacturer: Linux 5.19.3 ehci_hcd
[ 0.192290] usb usb1: SerialNumber: 1c1a000.usb
[ 0.192957] hub 1-0:1.0: USB hub found
[ 0.193004] hub 1-0:1.0: 1 port detected
[ 0.193462] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 93, base_baud = 3750000) is a U6_16550A
[ 0.193700] printk: console [ttyS0] enabled
[ 0.194307] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[ 0.215405] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 94, base_baud = 3750000) is a U6_16550A
[ 0.239225] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 95, base_baud = 3750000) is a U6_16550A
[ 0.239864] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[ 0.240374] mx25l25635e@0 enforce active low on chipselect handle
[ 0.242587] usb_phy_generic usb_phy_generic.1.auto: supply vcc not found, using dummy regulator
[ 0.242802] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[ 0.243424] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[ 0.243474] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 2
[ 0.243637] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.19
[ 0.243655] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.243666] usb usb2: Product: MUSB HDRC host driver
[ 0.243675] usb usb2: Manufacturer: Linux 5.19.3 musb-hcd
[ 0.243683] usb usb2: SerialNumber: musb-hdrc.2.auto
[ 0.244327] hub 2-0:1.0: USB hub found
[ 0.244373] hub 2-0:1.0: 1 port detected
[ 0.247217] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[ 0.248505] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator
[ 0.249496] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 0.250405] cma: cma_alloc(cma (ptrval), count 1, align 0)
[ 0.250536] cma: cma_alloc(cma (ptrval), count 1, align 0)
[ 0.250769] cma: cma_alloc(): returned (ptrval)
[ 0.251208] cma: cma_alloc(): returned (ptrval)
[ 0.253857] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 0.254015] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 0.254036] cfg80211: failed to load regulatory.db
[ 0.276210] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 0.276386] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 0.276571] Waiting for root device /dev/mmcblk0p2...
[ 0.320974] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.326797] mmc0: new high speed SD card at address 1388
[ 0.327800] mmcblk0: mmc0:1388 CS004 482 MiB
[ 0.333482] mmcblk0: p1 p2
[ 0.368681] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: disabled.
[ 0.368781] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 0.370149] devtmpfs: mounted
[ 0.371225] Freeing unused kernel image (initmem) memory: 1024K
[ 0.390806] Run /sbin/init as init process
[ 0.390818] with arguments:
[ 0.390822] /sbin/init
[ 0.390827] earlyprintk
[ 0.390831] with environment:
[ 0.390835] HOME=/
[ 0.390839] TERM=linux
[ 0.533726] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: disabled.
[ 5.860681] random: crng init done
如果插入usb网卡,是有反应的:
[ 28.710678] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 28.931602] usb 1-1: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= 1.08
[ 28.931633] usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 28.931645] usb 1-1: Product: UB93
[ 28.931654] usb 1-1: Manufacturer: ATHEROS
[ 28.931662] usb 1-1: SerialNumber: 12345
[ 28.932498] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 28.934037] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[ 28.934079] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[ 29.218971] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980
[ 29.219613] cma: cma_alloc(cma 6120d6f6, count 1, align 0)
[ 29.219945] cma: cma_alloc(): returned 53a05499
[ 29.458233] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
[ 31.743111] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
[ 31.743143] ath9k_htc 1-1:1.0: FW RMW support: Off
[ 31.743152] ath: EEPROM regdomain: 0x60
[ 31.743159] ath: EEPROM indicates we should expect a direct regpair map
[ 31.743171] ath: Country alpha2 being used: 00
[ 31.743176] ath: Regpair used: 0x60
[ 31.747491] ieee80211 phy0: Atheros AR9271 Rev:1
[ 39.123046] usb 1-1: USB disconnect, device number 2
[ 39.210929] usb 1-1: ath9k_htc: USB layer deinitialized
是使用 SDIO 嗎? 要怎麼連接呢? 我想在自己的 V3S 平台上試試看。
接线可以参考这里,接到v3s的mmc1上
https://github.com/Ncerzzk/esp-hosted/blob/cross_compile/docs/Linux_based_host/SDIO_setup.md
首先确认硬件有没有问题?
如果硬件没问题, 看下 dts 里面 该 sdc 有没有启用?
硬件问题不太好确认是不是OK的,因为感觉外围电路比较简单就直接打板了,手头也没有成品的xr819模块来对比,头疼
原理图:
https://github.com/AutopilotPi/XR819_Module/blob/master/XR819.pdf
dts是启用的,启动日志下看到有
[ 1.282352] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[ 1.415797] sunxi-mmc 1c10000.mmc: base:0xc498b000 irq:24
可能需要固件, 看下日志.
固件放到/lib/firmware 下面了,用的是这几个文件: https://github.com/armbian/firmware/tree/master/xr819
日志在这里,请晕哥帮忙看看
dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.14-licheepi-zero+ (ncer@ncer-CW65S) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #10 SMP Fri Jul 15 19:05:34 CST 2022
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat c0a46800, node_mem_map c3f7a000
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16384 pages, LIFO batch:3
[ 0.000000] random: fast init done
[ 0.000000] percpu: Embedded 16 pages/cpu @c3f5d000 s33740 r8192 d23604 u65536
[ 0.000000] pcpu-alloc: s33740 r8192 d23604 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 55012K/65536K available (6144K kernel code, 285K rwdata, 1500K rodata, 1024K init, 263K bss, 10524K 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 : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 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 - 0xc0a47460 ( 286 kB)
[ 0.000000] .bss : 0xc0a4e754 - 0xc0a9036c ( 264 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000193] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000448] Console: colour dummy device 80x30
[ 0.000485] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000500] pid_max: default: 32768 minimum: 301
[ 0.000635] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000651] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001314] CPU: Testing write buffer coherency: ok
[ 0.001701] /cpus/cpu@0 missing clock-frequency property
[ 0.001725] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002170] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002347] Hierarchical SRCU implementation.
[ 0.002857] smp: Bringing up secondary CPUs ...
[ 0.002874] smp: Brought up 1 node, 1 CPU
[ 0.002883] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002889] CPU: All CPU(s) started in SVC mode.
[ 0.003682] devtmpfs: initialized
[ 0.007283] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.007576] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.007603] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007784] pinctrl core: initialized pinctrl subsystem
[ 0.008784] NET: Registered protocol family 16
[ 0.009227] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.010400] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.010416] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.023246] SCSI subsystem initialized
[ 0.023480] usbcore: registered new interface driver usbfs
[ 0.023559] usbcore: registered new interface driver hub
[ 0.023655] usbcore: registered new device driver usb
[ 0.023890] pps_core: LinuxPPS API ver. 1 registered
[ 0.023901] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.023922] PTP clock support registered
[ 0.024110] Advanced Linux Sound Architecture Driver Initialized.
[ 0.025756] clocksource: Switched to clocksource arch_sys_counter
[ 0.034950] NET: Registered protocol family 2
[ 0.035537] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.035575] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.035600] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.035804] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.035851] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.036109] NET: Registered protocol family 1
[ 0.036804] RPC: Registered named UNIX socket transport module.
[ 0.036825] RPC: Registered udp transport module.
[ 0.036830] RPC: Registered tcp transport module.
[ 0.036836] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.038673] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.044382] NFS: Registering the id_resolver key type
[ 0.044440] Key type id_resolver registered
[ 0.044447] Key type id_legacy registered
[ 0.048392] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.048415] io scheduler noop registered
[ 0.048423] io scheduler deadline registered
[ 0.048702] io scheduler cfq registered (default)
[ 0.048714] io scheduler mq-deadline registered
[ 0.048721] io scheduler kyber registered
[ 0.049283] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[ 0.052633] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.114485] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.117599] console [ttyS0] disabled
[ 0.137858] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 3750000) is a U6_16550A
[ 0.722118] console [ttyS0] enabled
[ 0.747181] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 37, base_baud = 3750000) is a U6_16550A
[ 0.777790] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 38, base_baud = 3750000) is a U6_16550A
[ 0.791535] m25p80 spi0.0: unrecognized JEDEC id bytes: ff, ff, ff
[ 0.797969] m25p80: probe of spi0.0 failed with error -2
[ 0.805386] libphy: Fixed MDIO Bus: probed
[ 0.810219] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.816185] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.821995] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.928184] dwmac-sun8i 1c30000.ethernet: EMAC reset timeout
[ 0.934011] dwmac-sun8i: probe of 1c30000.ethernet failed with error -12
[ 0.941155] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.947830] ehci-platform: EHCI generic platform driver
[ 0.953384] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.959135] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.967189] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 0.995753] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.002981] hub 1-0:1.0: USB hub found
[ 1.006981] hub 1-0:1.0: 1 port detected
[ 1.011583] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.017984] ohci-platform: OHCI generic platform driver
[ 1.023611] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.030436] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.038496] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.110766] hub 2-0:1.0: USB hub found
[ 1.114652] hub 2-0:1.0: 1 port detected
[ 1.122382] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.132075] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.141190] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.148202] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.152845] i2c /dev entries driver
[ 1.157940] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[ 1.167022] IR NEC protocol handler initialized
[ 1.171629] IR RC5(x/sz) protocol handler initialized
[ 1.176837] IR RC6 protocol handler initialized
[ 1.181434] IR JVC protocol handler initialized
[ 1.186054] IR Sony protocol handler initialized
[ 1.190736] IR SANYO protocol handler initialized
[ 1.195503] IR Sharp protocol handler initialized
[ 1.200285] IR MCE Keyboard/mouse protocol handler initialized
[ 1.206209] IR XMP protocol handler initialized
[ 1.211495] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.275794] sunxi-mmc 1c0f000.mmc: base:0xc4987000 irq:23
[ 1.282352] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[ 1.342759] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.354968] mmc0: new high speed SD card at address 1388
[ 1.360977] mmcblk0: mmc0:1388 CS004 482 MiB
[ 1.366944] mmcblk0: p1 p2
[ 1.415797] sunxi-mmc 1c10000.mmc: base:0xc498b000 irq:24
[ 1.422233] usbcore: registered new interface driver usbhid
[ 1.427978] usbhid: USB HID core driver
[ 1.433495] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 1.441664] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.449372] NET: Registered protocol family 17
[ 1.454018] Key type dns_resolver registered
[ 1.458607] Registering SWP/SWPB emulation handler
[ 1.472287] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.483906] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.489841] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.498979] hub 3-0:1.0: USB hub found
[ 1.502906] hub 3-0:1.0: 1 port detected
[ 1.508186] using random self ethernet address
[ 1.512738] using random host ethernet address
[ 1.518239] usb0: HOST MAC 5e:4d:a2:dc:75:bf
[ 1.522677] usb0: MAC 8a:65:bb:48:f8:58
[ 1.526715] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.534305] g_cdc gadget: g_cdc ready
[ 1.540622] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.549559] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 01:14:23 UTC (4463)
[ 1.558213] vcc5v0: disabling
[ 1.561235] ALSA device list:
[ 1.564245] #0: V3s Audio Codec
[ 1.570602] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.580032] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.601151] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.609579] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.618453] devtmpfs: mounted
[ 1.622656] Freeing unused kernel memory: 1024K
[ 1.690545] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
[ 1.754568] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[ 1.995954] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 2.064274] usbcore: registered new interface driver ath9k_htc
[ 7.195764] usb 1-1: device descriptor read/64, error -110
[ 7.538402] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 7.547848] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[ 7.556762] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[ 7.848887] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980
[ 8.088394] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
[ 10.389013] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
[ 10.394646] ath9k_htc 1-1:1.0: FW RMW support: Off
[ 10.399565] ath: EEPROM regdomain: 0x60
[ 10.399570] ath: EEPROM indicates we should expect a direct regpair map
[ 10.399578] ath: Country alpha2 being used: 00
[ 10.399581] ath: Regpair used: 0x60
[ 10.405632] ieee80211 phy0: Atheros AR9271 Rev:1
[ 14.328590] wlan0: authenticate with 3c:06:a7:89:f5:bc
[ 14.625479] wlan0: send auth to 3c:06:a7:89:f5:bc (try 1/3)
[ 14.724394] wlan0: authenticated
[ 14.736192] wlan0: associate with 3c:06:a7:89:f5:bc (try 1/3)
[ 14.786298] wlan0: RX AssocResp from 3c:06:a7:89:f5:bc (capab=0x1411 status=0 aid=2)
[ 14.801663] wlan0: associated
[ 14.923340] wlan0: Limiting TX power to 20 (20 - 0) dBm as advertised by 3c:06:a7:89:f5:bc
[ 34.609873] xradio_wlan: loading out-of-tree module taints kernel.
[ 121.107540] random: crng init done
板子上使用xr819,v3s 与 xr819的连接关系为:
PE23 - reset
PE24 - WIRQ
驱动使用 https://github.com/fifteenhex/xradio ,也成功编好了,到v3s insmod xr819.ko
然后在ifconfig -a 里并没有新增加一个网卡
目前有点束手无策,不知道从哪里下手
请大佬帮忙看看可能是什么地方有问题
kernel 版本是4.14
设备树为:
/dts-v1/;
#include "sun8i-v3s.dtsi"
#include "sunxi-common-regulators.dtsi"
/ {
model = "Lichee Pi Zero";
compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";
aliases {
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
spi0 = &spi0;
ethernet1 = &xr819;
};
chosen {
stdout-path = "serial0:115200n8";
};
pwrseq_wifi: pwrseq_wifi@0 {
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
pinctrl-0 = <&wifi_rst>;
reset-gpios = <&pio 4 23 GPIO_ACTIVE_LOW>;
post-power-on-delay-ms = <50>;
};
leds {
compatible = "gpio-leds";
blue_led {
label = "licheepi:blue:usr";
gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
};
green_led {
label = "licheepi:green:usr";
gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
default-state = "on";
};
red_led {
label = "licheepi:red:usr";
gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */
};
};
};
&ehci0 {
status = "okay";
};
&mmc0 {
pinctrl-0 = <&mmc0_pins_a>;
pinctrl-names = "default";
broken-cd;
bus-width = <4>;
vmmc-supply = <®_vcc3v3>;
status = "okay";
};
&mmc1 {
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
vmmc-supply = <®_vcc3v3>;
vqmmc-supply = <®_vcc1v8>;
mmc-pwrseq = <&pwrseq_wifi>;
bus-width = <4>;
max-frequency = <16000000>;
non-removable;
status = "okay";
/*
* Explicitly define the sdio device, so that we can add an ethernet
* alias for it (which e.g. makes u-boot set a mac-address).
*/
xr819: sdio_wifi@1 {
reg = <1>;
compatible = "xradio,xr819";
pinctrl-names = "default";
pinctrl-0 = <&wifi_wake>;
interrupt-parent = <&pio>;
interrupts = <4 24 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "host-wake";
local-mac-address = [dc 44 6d c0 ff ee];
};
};
&i2c0 {
status = "okay";
ns2009: ns2009@48 {
compatible = "nsiway,ns2009";
reg = <0x48>;
};
};
&ohci0 {
status = "okay";
};
&uart0 {
pinctrl-0 = <&uart0_pins_a>;
pinctrl-names = "default";
status = "okay";
};
&uart1 {
pinctrl-0 = <&uart1_pins_a>;
pinctrl-names = "default";
status = "okay";
};
&uart2 {
pinctrl-0 = <&uart2_pins_a>;
pinctrl-names = "default";
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&pio {
spi0_cs_pins: spi0_cs_pins {
pins = "PC2", "PB3","PE16","PE15";
function = "gpio_out";
};
wifi_wake: wifi_wake {
pins = "PE24";
function = "gpio_in";
};
wifi_rst: wifi_rst {
pins = "PE23";
function = "gpio_out";
};
};
&spi0 {
status ="okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
cs-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>, <&pio 1 3 GPIO_ACTIVE_HIGH>,<&pio 4 16 GPIO_ACTIVE_HIGH>,<&pio 4 15 GPIO_ACTIVE_HIGH>;
mx25l25635e:mx25l25635e@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
};
spidev: spidevxxx@1 {
compatible = "rohm,dh2228fv";
reg = <0x1>;
spi-max-frequency = <5000000>;
};
gowin: gowin@1{
compatible = "rohm,dh2228fv";
reg = <0x2>;
spi-max-frequency = <5000000>;
};
fakegowin: gowin@2{
compatible = "rohm,dh2228fv";
reg = <0x3>;
spi-max-frequency = <5000000>;
};
};
&ccu {
assigned-clocks = <&ccu 18>;
assigned-clock-parents = <&ccu 9>;
assigned-clock-rates = <60000000>;
};
做了一些更新,考虑到要用在飞机上,使用sd卡很不安全,目前的版本换成了SD NAND。
重新用kicad画了:
https://github.com/Ncerzzk/AutoPilotPi-Hardware
使用esp 官方维护的固件和linux驱动:
https://github.com/Ncerzzk/esp-hosted/tree/cross_compile (这是我自己的修改版,主要增加些方便交叉编译的文件)
工程地址在JLC,第二次用LC EDA了,说实话,找封装比较方便,但是很多点实在用的比较难受
https://oshwhub.com/Nccer/my_v3s_copy
板载ICM20600/spl06/QMC5883L, 还有一片高云的FPGA(用来输出PWM)
这是第二版了,第一板就是下图那个比较大的方方正正的板子,那是第一次用LC EDA,画完回来发现忘记画LED了,上电一个灯都亮着实有点慌
再加上上面没有磁力计,于是就琢磨着画了第二版,把一些电机驱动电路/锂电池充电电路给去了(原来是希望能直接控制一个空心杯四轴的),
画得更小
焊得有点叙利亚成色了,因为这个芯片是吹下来的,希望能白嫖晕个的两片V3s,下次焊新芯片
调试记录,正常启动
页次: 1