|
@@ -191,3 +191,199 @@ static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
|
|
|
case OMAP_USBHS_PORT_MODE_UNUSED:
|
|
|
/* FALLTHROUGH */
|
|
|
default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
+static
|
|
|
+void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
|
|
|
+{
|
|
|
+ switch (port_mode[0]) {
|
|
|
+ case OMAP_EHCI_PORT_MODE_PHY:
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_stp",
|
|
|
+ OMAP_PIN_OUTPUT);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_clk",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dir",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_nxt",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat0",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat1",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat2",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat3",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat4",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat5",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat6",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpiphy_dat7",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ break;
|
|
|
+ case OMAP_EHCI_PORT_MODE_TLL:
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_stp",
|
|
|
+ OMAP_PIN_INPUT_PULLUP);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_clk",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dir",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_nxt",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat0",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat1",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat2",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat3",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat4",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat5",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat6",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb1_ulpitll_dat7",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ break;
|
|
|
+ case OMAP_USBHS_PORT_MODE_UNUSED:
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (port_mode[1]) {
|
|
|
+ case OMAP_EHCI_PORT_MODE_PHY:
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_stp",
|
|
|
+ OMAP_PIN_OUTPUT);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_clk",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dir",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_nxt",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat0",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat1",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat2",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat3",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat4",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat5",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat6",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpiphy_dat7",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ break;
|
|
|
+ case OMAP_EHCI_PORT_MODE_TLL:
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_stp",
|
|
|
+ OMAP_PIN_INPUT_PULLUP);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_clk",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dir",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_nxt",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat0",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat1",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat2",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat3",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat4",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat5",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat6",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("usbb2_ulpitll_dat7",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ break;
|
|
|
+ case OMAP_USBHS_PORT_MODE_UNUSED:
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
|
|
|
+{
|
|
|
+ switch (port_mode[0]) {
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm1_rxdp",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("mm1_rxdm",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm1_rxrcv",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0:
|
|
|
+ omap_mux_init_signal("mm1_txen_n", OMAP_PIN_OUTPUT);
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm1_txse0",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("mm1_txdat",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ break;
|
|
|
+ case OMAP_USBHS_PORT_MODE_UNUSED:
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (port_mode[1]) {
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm2_rxdp",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("mm2_rxdm",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm2_rxrcv",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0:
|
|
|
+ omap_mux_init_signal("mm2_txen_n", OMAP_PIN_OUTPUT);
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm2_txse0",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ omap_mux_init_signal("mm2_txdat",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|
|
|
+ break;
|
|
|
+ case OMAP_USBHS_PORT_MODE_UNUSED:
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (port_mode[2]) {
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
|
|
|
+ case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
|
|
|
+ omap_mux_init_signal("mm3_rxdp",
|
|
|
+ OMAP_PIN_INPUT_PULLDOWN);
|