I. MX6Q (TQIMX6Q/TQE9) Study Notes-USB HOST transplantation for the new BSP version, tqimx6qtqe9

Source: Internet
Author: User

I. MX6Q (TQIMX6Q/TQE9) Study Notes-USB HOST transplantation for the new BSP version, tqimx6qtqe9

Generally, the usb host driver is maintained by the chip manufacturer. Therefore, you only need to configure DTS to port the usb host driver.

DTS Configuration

Refer to the data transmission related to sabresd and add the following content to our data transmission:

/ {...regulators {compatible = "simple-bus";reg_usb_otg_vbus: usb_otg_vbus {compatible = "regulator-fixed";regulator-name = "usb_otg_vbus";regulator-min-microvolt = <5000000>;regulator-max-microvolt = <5000000>;gpio = <&gpio7 1 0>;enable-active-high;};};...};...&usbh1 {status = "okay";};&usbotg {vbus-supply = <&reg_usb_otg_vbus>;pinctrl-names = "default";pinctrl-0 = <&pinctrl_usbotg_2>;disable-over-current;status = "okay";};...

Because the vbus of the usb host on the tqimx6q Development Board is directly powered, regulator control is not required. The vbus of usb otg is powered by the control switch chip SY6280AAC of GPIO7_1. Therefore, you need to add the corresponding regulator control. Add the above content, re-compile DTB, and burn it to SD.

Test Method

After the usb host is transplanted, you can use a USB disk for testing. Use the modified DTB to start the kernel, and then insert the USB flash disk to the USB port of tqimx6q, in the serial port tracing of the Development Board, you will see the Log information of the driver enumeration to the USB device. The Log information I see here is as follows:

usb 1-1.2: new high-speed USB device number 3 using ci_hdrcusb-storage 1-1.2:1.0: USB Mass Storage device detectedscsi0 : usb-storage 1-1.2:1.0scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 4sd 0:0:0:0: [sda] 30233588 512-byte logical blocks: (15.4 GB/14.4 GiB)sd 0:0:0:0: [sda] Write Protect is offsd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA sda: sda4sd 0:0:0:0: [sda] Attached SCSI removable disk

The corresponding device nodes are generally started with sd in the/dev directory. the USB flash drive device node in this article is sda and the corresponding partition node is sda4. Although the kernel driver has recognized the USB flash drive, but it does not automatically mount the USB flash drive, you need to manually mount the USB flash drive:

mount /dev/sda4 /mnt
You can mount the USB flash drive to the mnt directory. Then run the cd command to switch to the/mnt directory, and then run the ls command to view the files in the USB flash drive:

@tqimx6q #mount /dev/sda4 mnt/FAT-fs (sda4): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.@tqimx6q #cd mnt/@tqimx6q mnt#lsDDR??M.txtL3.0.35_4.1.0_130816_source.tar.gzalsa-wm8960.tar.bz2archimx6_corec_q1g_cd1.isoimx6_corec_q1g_cd2.isoimx6qjdk-6u45-linux-x64.binlinux-2.6-imx.tar(1).bz2linux-3.12.10-ti2013.12.01.tgzlinux-3.17.2.tgzrootfsrootfs.tgzstunnel.rarsynergy-master.ziptestti-sdk-am335x-evm-07.00.00.00-Linux-x86-Install.bin
Some drivers of the official default kernel are not configured, such as USB serial port drivers. If necessary, you can use the kernel menuconfig option for configuration. So far, the tqimx6q usb host driver has been transplanted. If you have any questions, leave a message to discuss it.




Author: girlkoo

Link: http://blog.csdn.net/girlkoo/article/details/45652209

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.