static void __init mx6_evk_init_usb(void) { int ret = 0; imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp. */ ret = gpio_request(MX6_BRD_USBOTG1_PWR, "usbotg-pwr"); if (ret) { pr_err("failed to get GPIO MX6_BRD_USBOTG1_PWR:%d\n", ret); return; } gpio_direction_output(MX6_BRD_USBOTG1_PWR, 0); ret = gpio_request(MX6_BRD_USBOTG2_PWR, "usbh1-pwr"); if (ret) { pr_err("failed to get GPIO MX6_BRD_USBOTG2_PWR:%d\n", ret); return; } gpio_direction_output(MX6_BRD_USBOTG2_PWR, 1); mx6_set_otghost_vbus_func(imx6_evk_usbotg_vbus); mx6_usb_dr_init(); #ifdef CONFIG_USB_EHCI_ARC_HSIC mx6_usb_h2_init(); #endif }
static void __init imx6q_seco_q7_init_usb(void) { int ret = 0; imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp . */ ret = gpio_request(MX6_SECO_A62_USB_OTG_PWR, "usb-pwr"); if (ret) { pr_err("failed to get GPIO MX6_SECO_A62_USB_OTG_PWR: %d\n", ret); return; } gpio_direction_output(MX6_SECO_A62_USB_OTG_PWR, 0); mxc_iomux_set_gpr_register(1, 13, 1, 0); /* * Setting pad control for OTG ID pin UP because the OTG port * is used only as client */ if (cpu_is_mx6q()) mxc_iomux_v3_setup_pad(mx6qd_seco_a62_otg_id_up_pads); else if (cpu_is_mx6dl()) mxc_iomux_v3_setup_pad(mx6sdl_seco_a62_otg_id_up_pads); mx6_set_otghost_vbus_func(imx6q_seco_q7_usbotg_vbus); // mx6_usb_dr_init(); // mx6_usb_h1_init(); }
static void __init mx6_arm2_init_usb(void) { int ret = 0; imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp. */ ret = gpio_request(MX6_BRD_USBOTG1_PWR, "usbotg-pwr"); if (ret) { pr_err("failed to get GPIO MX6_BRD_USBOTG1_PWR:%d\n", ret); return; } gpio_direction_output(MX6_BRD_USBOTG1_PWR, 0); ret = gpio_request(MX6_BRD_USBOTG2_PWR, "usbh1-pwr"); if (ret) { pr_err("failed to get GPIO MX6_BRD_USBOTG2_PWR:%d\n", ret); return; } gpio_direction_output(MX6_BRD_USBOTG2_PWR, 1); mx6_set_otghost_vbus_func(imx6_arm2_usbotg_vbus); #ifdef CONFIG_USB_EHCI_ARC_HSIC mxc_iomux_set_specialbits_register(MX6SL_PAD_HSIC_DAT, PAD_CTL_DDR_SEL_DDR3, PAD_CTL_DDR_SEL_MASK); mxc_iomux_set_specialbits_register(MX6SL_PAD_HSIC_STROBE, PAD_CTL_DDR_SEL_DDR3, PAD_CTL_DDR_SEL_MASK); mx6_usb_h2_init(); #endif }
static void __init imx6q_sabreauto_init_usb(void) { int ret = 0; imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); ret = gpio_request(SABREAUTO_USB_OTG_OC, "otg-oc"); if (ret) { printk(KERN_ERR"failed to get GPIO SABREAUTO_USB_OTG_OC:" " %d\n", ret); return; } gpio_direction_input(SABREAUTO_USB_OTG_OC); ret = gpio_request(SABREAUTO_USB_HOST1_OC, "usbh1-oc"); if (ret) { printk(KERN_ERR"failed to get SABREAUTO_USB_HOST1_OC:" " %d\n", ret); return; } gpio_direction_input(SABREAUTO_USB_HOST1_OC); mxc_iomux_set_gpr_register(1, 13, 1, 0); mx6_set_otghost_vbus_func(imx6q_sabreauto_usbotg_vbus); mx6_usb_dr_init(); mx6_set_host1_vbus_func(imx6q_sabreauto_usbhost1_vbus); #ifdef CONFIG_USB_EHCI_ARC_HSIC mx6_usb_h2_init(); mx6_usb_h3_init(); #endif }
static void __init imx6q_hdmidongle_init_usb(void) { int ret = 0; imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp . */ ret = gpio_request(HDMIDONGLE_USB_OTG_PWR, "usb-pwr"); if (ret) { pr_err("failed to get GPIO HDMIDONGLE_USB_OTG_PWR: %d\n", ret); return; } gpio_direction_output(HDMIDONGLE_USB_OTG_PWR, 0); /* keep USB host1 VBUS always on */ if (board_is_mx6_reva()) { ret = gpio_request(HDMIDONGLE_USB_H1_PWR, "usb-h1-pwr"); if (ret) { pr_err("failed to get GPIO HDMIDONGLE_USB_H1_PWR: %d\n", ret); return; } gpio_direction_output(HDMIDONGLE_USB_H1_PWR, 1); } mxc_iomux_set_gpr_register(1, 13, 1, 1); mx6_set_otghost_vbus_func(imx6q_hdmidongle_usbotg_vbus); }
static void __init imx6q_seco_UDOO_init_usb(void) { imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp . */ mxc_iomux_set_gpr_register(1, 13, 1, 1); mx6_set_otghost_vbus_func(imx6q_seco_UDOO_usbotg_vbus); // mx6_usb_dr_init(); // mx6_usb_h1_init(); }
static void __init imx6_init_usb(void) { imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp . */ mxc_iomux_set_gpr_register(1, 13, 1, 1); INIT_DELAYED_WORK(&usb_modem_power_work, usb_modem_power_handler); mx6_set_otghost_vbus_func(imx6_usbotg_vbus); gpio_direction_output(GP_MODEM_RESET, 0); /* modem reset low */ mdelay(50); gpio_direction_input(GP_MODEM_RESET); /* modem reset high */ }
static __init void wand_init_usb(void) { wand_mux_pads_init_usb(); gpio_request(WAND_USB_OTG_OC, "otg oc"); gpio_direction_input(WAND_USB_OTG_OC); gpio_request(WAND_USB_OTG_PWR, "otg pwr"); gpio_direction_output(WAND_USB_OTG_PWR, 0); imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); mxc_iomux_set_gpr_register(1, 13, 1, 1); mx6_set_otghost_vbus_func(wand_usbotg_vbus); gpio_request(WAND_USB_H1_OC, "usbh1 oc"); gpio_direction_input(WAND_USB_H1_OC); }
static void __init init_usb(void) { int ret = 0; imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* disable external charger detect, * or it will affect signal quality at dp . */ ret = gpio_request(GP_USB_OTG_PWR, "usb-pwr"); if (ret) { pr_err("failed to get GPIO GP_USB_OTG_PWR: %d\n", ret); return; } gpio_direction_output(GP_USB_OTG_PWR, 0); mxc_iomux_set_gpr_register(1, 13, 1, 1); mx6_set_otghost_vbus_func(usbotg_vbus); }
static __init void wand_init_usb(void) { IMX6_SETUP_PAD( GPIO_9__GPIO_1_9 ); IMX6_SETUP_PAD( GPIO_1__USBOTG_ID ); IMX6_SETUP_PAD( EIM_D22__GPIO_3_22 ); IMX6_SETUP_PAD( EIM_D30__GPIO_3_30 ); gpio_request(WAND_USB_OTG_OC, "otg oc"); gpio_direction_input(WAND_USB_OTG_OC); gpio_request(WAND_USB_HOST_PWR_EN, "host pwr"); gpio_direction_output(WAND_USB_HOST_PWR_EN, 0); imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR); /* GPR1: bit 13 == 1 means GPIO1 is OTG_ID pin */ mxc_iomux_set_gpr_register(1, 13, 1, 1); mx6_set_otghost_vbus_func(wand_usbotg_vbus); gpio_request(WAND_USB_HOST_OC, "usbh1 oc"); gpio_direction_input(WAND_USB_HOST_OC); }