6410 Add a USB Host

Source: Internet
Author: User

Uhci (universalhostcontrollerinterface), OHCI (openhostcontrollerinterface), EHCI (enhancedhostcontrollerinterface) are both host controller specifications, OHCI is mainly non-PC system USB chip, most uhci are USB controller chips on Intel and via boards. The uhci hardware circuit is simpler than OHCI, lower cost, but the drive is complex, but they all follow the USB specification. EHCI is developed by several vendors such as Intel. It is compatible with OHCI and uhci and complies with the USB2.0 specification.
6410 supports the USB Host feature, as shown in OHCI rev 1.0 and USB rev1.1. Add a function in the mach-smdk6410.c as follows:

Void usb_host_clk_en (INT usb_host_clksrc)
{
Printk ("USB Host CLK enable! Initi_clk_src = 0x % 08x/N ", readl (initi_clk_src ));

Switch (usb_host_clksrc)
{
Case 0: // epll CLK
Writel (readl (s3c24_clk_src )&~ Initi_clksrc_uhost_mask) | initi_clksrc_epll_clksel | initi_clksrc_uhost_epll, initi_clk_src );

* (Volatile unsigned long *) initi_clk_div1 | = (0 <20 );
Break;
Case 1: // oscillator 48 m CLK/
Writel (0x0, 89c_usbotg_phypwr );
Writel (0x20, cloud_usbotg_phyclk );

Writel (readl (cloud_others) | cloud_others_usb_sig_mask, cloud_others); // enable signal.

Writel (readl (initi_clk_src )&~ Initi_clksrc_uhost_mask, initi_clk_src );
Writel (readl (initi_clk_div1 )&~ Initi6400_clkdiv1_uhost_mask, initi_clk_div1 );
Break;
Default:
Printk (kern_info "unknown USB host clock source/N ");
Bug ();
Break;

}

Writel (readl (initi_hclk_gate) | (1 <29), initi_hclk_gate); // enable the hclk USG host
Writel (readl (initi_sclk_gate) | initi_clkcon_sclk_uhost, initi_sclk_gate); // enable sclk USB Host

}

Add: usb_host_clk_en (0) at the end of smdk6410_machine_init );

Note: clk_src is the clock source setting register. Five or six of the registers are the clock source of the USB host. Therefore, it is set to enable the epll by using the initi_clksrc_epll_clksel and to enable the epll as the USB clock source.

Clk_div1 is responsible for setting the clock source frequency. Because clkuhost = clkuhostin/(uhost_ratio + 1), it is set to 0 without division. In addition, you need to change the uboot to set the epll frequency.

 

 

For more information about 6410 USB host, see this link: http://blog.csdn.net/knock/archive/2009/12/22/5057378.aspx

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.