zoukankan      html  css  js  c++  java
  • am335x usb host patch设计

    USB直接作为host时省掉一个5V的DCDC,直接连接到5V的输入上面。对于Linux SDK,需要一个patch去确保这个设计能够正常工作,patch内容请参考:

    static struct omap_musb_board_data musb_board_data = {
        .interface_type = MUSB_INTERFACE_UTMI, /* EVM: MUSB_INTERFACE_ULPI */
        /*
         * mode[0:3] = USB0PORT's mode
         * mode[4:7] = USB1PORT's mode
         * AM335X beta EVM has USB0 in OTG mode and USB1 in host mode.
         */
    /* Note: USB0 is for hub host, and USB1 should be connected with B or mini-B connector */
        .mode           = (MUSB_PERIPHERAL << 4) | MUSB_HOST,  /* EVM: (MUSB_HOST << 4) | MUSB_OTG */
        .power      = 100, /* EVM: 500 */
    #endif
        .instances  = 1,
    };

    diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
    index 13bfef3..e41b224 100644
    --- a/arch/arm/mach-omap2/omap_phy_internal.c
    +++ b/arch/arm/mach-omap2/omap_phy_internal.c
    @@ -288,8 +288,17 @@ void ti81xx_musb_phy_power(u8 id, u8 on , bool wkup)
                                                    TI816X_USBPHY0_NORMAL_MODE;
                            usbphycfg &= ~TI816X_USBPHY_REFCLK_OSC;
                    } else if (cpu_is_am33xx()) {
    -                       usbphycfg &= ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN);
    -                       usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN);
    +                       usbphycfg &= ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN | USBPHY_OTGVDET_EN);
    +
    +                       /* HACK: If USB0 port is in host-only mode, clear its
    +                        * USBPHY_OTGVDET_EN bit to ignore first VBUS sensing.
    +                        * Change 0 to 1 if USB1 port is in host-only mode.
    +                        */
    +                       if (id == 0)
    +                               usbphycfg |= USBPHY_OTGSESSEND_EN;
    +                       else
    +                               usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN);
    +
                            usbwkupctrl = AM33XX_USB_WKUP_CTRL_DISABLE;
                    }
            } else {
  • 相关阅读:
    node eventLoop
    apply call bind
    crm项目-业务实现
    crm项目-stark组件分析
    OA项目-需求分析
    OA项目-表结构
    OA项目-xadmin使用
    路飞学城项目-表结构
    路飞学城项目-支付相关-支付宝第三方支付
    路飞学城项目-支付相关-支付接口
  • 原文地址:https://www.cnblogs.com/zym0805/p/4349132.html
Copyright © 2011-2022 走看看