T113 USB0不能读取U盘
-
T113 usb1读取U盘正常, usb0不能读取.
表现为, 插入U盘毫无反应, 就和没插入一样.确认已经进行过usbhost指令切换.
使用usb1时, 输出:
[ 12.519347] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect [ 12.797467] usb 1-1: new high-speed USB device number 2 using sunxi-ehci [ 13.000365] usb-storage 1-1:1.0: USB Mass Storage device detected [ 13.007895] scsi host0: usb-storage 1-1:1.0 [ 14.048728] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6 [ 14.065939] sd 0:0:0:0: [sda] 61341696 512-byte logical blocks: (31.4 GB/29.3 GiB) [ 14.076421] sd 0:0:0:0: [sda] Write Protect is off [ 14.081846] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 14.088548] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 14.191826] sda: sda1 sda2 [ 14.211084] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 14.317085] [EXFAT] trying to mount... [ 14.321379] EXFAT: Attempted to mount VFAT filesystem [ 14.469469] FAT-fs (sda2): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [ 14.561102] ntfs: volume version 3.1. [ 14.565253] ntfs: (device sda1): load_system_files(): Volume is dirty. Mounting read-only. Run chkdsk and mount in Windows. [ 14.581433] ntfs: (device sda1): load_system_files(): $LogFile is not clean. Will not be able to remount read-write. Mount in Windows.
进行 usbhost 切换时, 显示为:
[ 1396.620617] android_work: did not send uevent (0 0 00000000) [ 1396.627196] hci: ERR: sunxi_ehci is null [ 1396.631626] hci: ERR: sunxi_ohci is null host_chose finished!
进行usbdevice切换时, 显示为:
[ 1381.640980] hci: ERR: sunxi_ehci is null [ 1381.645354] hci: ERR: sunxi_ohci is null [ 1381.650047] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
配置如下:
/* *usb_port_type: usb mode. 0-device, 1-host, 2-otg. *usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect. *usb_detect_mode: 0-thread scan, 1-id gpio interrupt. *usb_id_gpio: gpio for id detect. *usb_det_vbus_gpio: gpio for id detect. gpio or "axp_ctrl"; *usb_wakeup_suspend:0-SUPER_STANDBY, 1-USB_STANDBY. */ &usbc0 { device_type = "usbc0"; usb_port_type = <0x2>; usb_detect_type = <0x1>; usb_detect_mode = <0>; usb_id_gpio = <&pio PG 0 GPIO_ACTIVE_HIGH>; enable-active-high; usb_det_vbus_gpio = <&pio PG 0 GPIO_ACTIVE_HIGH>; usb_wakeup_suspend = <0>; usb_serial_unique = <1>; usb_serial_number = "1357924680"; rndis_wceis = <1>; status = "okay"; }; &ehci0 { /*drvvbus-supply = <®_usb0_vbus>;*/ status = "okay"; }; &ohci0 { /*drvvbus-supply = <®_usb0_vbus>;*/ status = "okay"; }; &usbc1 { device_type = "usbc1"; usb_port_type = <0x01>; sb_detect_type = <0x1>; usb_regulator_io = "nocare"; usb_wakeup_suspend = <0>; status = "okay"; }; &ehci1 { status = "okay"; }; &ohci1 { status = "okay"; };
上边注释掉的 reg_usb0_vbus 配置是抄的 reg_usb1_vbus, 以为是这里配置错了呢.
reg_usb0_vbus: usb0-vbus { compatible = "regulator-fixed"; regulator-name = "usb0-vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-enable-ramp-delay = <1000>; gpio = <&pio PB 3 GPIO_ACTIVE_HIGH>; enable-active-high; }; reg_usb1_vbus: usb1-vbus { compatible = "regulator-fixed"; regulator-name = "usb1-vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-enable-ramp-delay = <1000>; gpio = <&pio PB 3 GPIO_ACTIVE_HIGH>; enable-active-high; };
经过测试也不行.
把usb0 的 usb_port_type 配置为 1 时, 内核启动可以看到如下输出:
[ 1.624357] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.631732] sunxi-ehci: EHCI SUNXI driver [ 1.636644] get ehci1-controller wakeup-source is fail. [ 1.642629] sunxi ehci1-controller don't init wakeup source [ 1.648904] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0b63aa8, 0x:c8839000, irq_no:3c [ 1.660939] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator [ 1.673429] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator [ 1.685604] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller [ 1.692899] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1 [ 1.702870] sunxi-ehci 4200000.ehci1-controller: irq 60, io mem 0x04200000 [ 1.737465] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00 [ 1.746129] hub 1-0:1.0: USB hub found [ 1.750396] hub 1-0:1.0: 1 port detected [ 1.755352] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.762352] sunxi-ohci: OHCI SUNXI driver [ 1.767316] get ohci1-controller wakeup-source is fail. [ 1.773305] sunxi ohci1-controller don't init wakeup source [ 1.779575] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0b63d38 [ 1.789268] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator [ 1.801762] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator [ 1.813962] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller [ 1.821234] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2 [ 1.831133] sunxi-ohci 4200400.ohci1-controller: irq 61, io mem 0x04200400 [ 1.912244] hub 2-0:1.0: USB hub found [ 1.916488] hub 2-0:1.0: 1 port detected
插入U盘也毫无反应.
求教到底是哪里的问题.
-
-
@whycan 在 T113 USB0不能读取U盘 中说:
find / -name usb_host | xargs cat
一样的
alias usbhost="cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_host" alias usbdevice="cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_device"
-
忘记说了, 作为device模式时, 很正常, adb通信很好.
-
大佬解决了么,我最近也在用usb0挂载U盘
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号