2017-11-03 10:28:30 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2020-07-02 14:46:03 +00:00
|
|
|
/*
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
* dwc3-omap.c - OMAP Specific Glue layer
|
|
|
|
*
|
2020-07-11 13:58:04 +00:00
|
|
|
* Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
*
|
|
|
|
* Authors: Felipe Balbi <balbi@ti.com>,
|
|
|
|
* Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
*/
|
|
|
|
|
2011-09-05 10:37:28 +00:00
|
|
|
#include <linux/module.h>
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/slab.h>
|
2016-12-12 19:37:52 +00:00
|
|
|
#include <linux/irq.h>
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/platform_device.h>
|
2013-01-25 03:00:47 +00:00
|
|
|
#include <linux/pm_runtime.h>
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
#include <linux/dma-mapping.h>
|
|
|
|
#include <linux/ioport.h>
|
|
|
|
#include <linux/io.h>
|
2012-01-25 09:07:03 +00:00
|
|
|
#include <linux/of.h>
|
2013-01-25 03:00:46 +00:00
|
|
|
#include <linux/of_platform.h>
|
2013-07-08 00:54:43 +00:00
|
|
|
#include <linux/extcon.h>
|
|
|
|
#include <linux/regulator/consumer.h>
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2012-07-19 10:56:07 +00:00
|
|
|
#include <linux/usb/otg.h>
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
/*
|
|
|
|
* All these registers belong to OMAP's Wrapper around the
|
|
|
|
* DesignWare USB3 Core.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define USBOTGSS_REVISION 0x0000
|
|
|
|
#define USBOTGSS_SYSCONFIG 0x0010
|
|
|
|
#define USBOTGSS_IRQ_EOI 0x0020
|
2013-06-12 09:23:46 +00:00
|
|
|
#define USBOTGSS_EOI_OFFSET 0x0008
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
#define USBOTGSS_IRQSTATUS_RAW_0 0x0024
|
|
|
|
#define USBOTGSS_IRQSTATUS_0 0x0028
|
|
|
|
#define USBOTGSS_IRQENABLE_SET_0 0x002c
|
|
|
|
#define USBOTGSS_IRQENABLE_CLR_0 0x0030
|
2013-06-12 09:23:46 +00:00
|
|
|
#define USBOTGSS_IRQ0_OFFSET 0x0004
|
2013-06-12 09:23:47 +00:00
|
|
|
#define USBOTGSS_IRQSTATUS_RAW_1 0x0030
|
|
|
|
#define USBOTGSS_IRQSTATUS_1 0x0034
|
|
|
|
#define USBOTGSS_IRQENABLE_SET_1 0x0038
|
|
|
|
#define USBOTGSS_IRQENABLE_CLR_1 0x003c
|
|
|
|
#define USBOTGSS_IRQSTATUS_RAW_2 0x0040
|
|
|
|
#define USBOTGSS_IRQSTATUS_2 0x0044
|
|
|
|
#define USBOTGSS_IRQENABLE_SET_2 0x0048
|
|
|
|
#define USBOTGSS_IRQENABLE_CLR_2 0x004c
|
|
|
|
#define USBOTGSS_IRQSTATUS_RAW_3 0x0050
|
|
|
|
#define USBOTGSS_IRQSTATUS_3 0x0054
|
|
|
|
#define USBOTGSS_IRQENABLE_SET_3 0x0058
|
|
|
|
#define USBOTGSS_IRQENABLE_CLR_3 0x005c
|
2013-06-12 09:23:46 +00:00
|
|
|
#define USBOTGSS_IRQSTATUS_EOI_MISC 0x0030
|
|
|
|
#define USBOTGSS_IRQSTATUS_RAW_MISC 0x0034
|
|
|
|
#define USBOTGSS_IRQSTATUS_MISC 0x0038
|
|
|
|
#define USBOTGSS_IRQENABLE_SET_MISC 0x003c
|
|
|
|
#define USBOTGSS_IRQENABLE_CLR_MISC 0x0040
|
|
|
|
#define USBOTGSS_IRQMISC_OFFSET 0x03fc
|
2015-03-24 20:08:49 +00:00
|
|
|
#define USBOTGSS_UTMI_OTG_STATUS 0x0080
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL 0x0084
|
2013-06-12 09:23:46 +00:00
|
|
|
#define USBOTGSS_UTMI_OTG_OFFSET 0x0480
|
|
|
|
#define USBOTGSS_TXFIFO_DEPTH 0x0508
|
|
|
|
#define USBOTGSS_RXFIFO_DEPTH 0x050c
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
#define USBOTGSS_MMRAM_OFFSET 0x0100
|
|
|
|
#define USBOTGSS_FLADJ 0x0104
|
|
|
|
#define USBOTGSS_DEBUG_CFG 0x0108
|
|
|
|
#define USBOTGSS_DEBUG_DATA 0x010c
|
2013-06-12 09:23:46 +00:00
|
|
|
#define USBOTGSS_DEV_EBC_EN 0x0110
|
|
|
|
#define USBOTGSS_DEBUG_OFFSET 0x0600
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
|
|
|
/* SYSCONFIG REGISTER */
|
2017-03-30 06:46:40 +00:00
|
|
|
#define USBOTGSS_SYSCONFIG_DMADISABLE BIT(16)
|
2011-09-06 07:56:51 +00:00
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
/* IRQ_EOI REGISTER */
|
2017-03-30 06:46:40 +00:00
|
|
|
#define USBOTGSS_IRQ_EOI_LINE_NUMBER BIT(0)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
|
|
|
/* IRQS0 BITS */
|
2017-03-30 06:46:40 +00:00
|
|
|
#define USBOTGSS_IRQO_COREIRQ_ST BIT(0)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2013-06-12 09:23:47 +00:00
|
|
|
/* IRQMISC BITS */
|
2017-03-30 06:46:40 +00:00
|
|
|
#define USBOTGSS_IRQMISC_DMADISABLECLR BIT(17)
|
|
|
|
#define USBOTGSS_IRQMISC_OEVT BIT(16)
|
|
|
|
#define USBOTGSS_IRQMISC_DRVVBUS_RISE BIT(13)
|
|
|
|
#define USBOTGSS_IRQMISC_CHRGVBUS_RISE BIT(12)
|
|
|
|
#define USBOTGSS_IRQMISC_DISCHRGVBUS_RISE BIT(11)
|
|
|
|
#define USBOTGSS_IRQMISC_IDPULLUP_RISE BIT(8)
|
|
|
|
#define USBOTGSS_IRQMISC_DRVVBUS_FALL BIT(5)
|
|
|
|
#define USBOTGSS_IRQMISC_CHRGVBUS_FALL BIT(4)
|
|
|
|
#define USBOTGSS_IRQMISC_DISCHRGVBUS_FALL BIT(3)
|
|
|
|
#define USBOTGSS_IRQMISC_IDPULLUP_FALL BIT(0)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
|
|
|
/* UTMI_OTG_STATUS REGISTER */
|
2017-03-30 06:46:40 +00:00
|
|
|
#define USBOTGSS_UTMI_OTG_STATUS_DRVVBUS BIT(5)
|
|
|
|
#define USBOTGSS_UTMI_OTG_STATUS_CHRGVBUS BIT(4)
|
|
|
|
#define USBOTGSS_UTMI_OTG_STATUS_DISCHRGVBUS BIT(3)
|
|
|
|
#define USBOTGSS_UTMI_OTG_STATUS_IDPULLUP BIT(0)
|
2015-03-24 20:08:49 +00:00
|
|
|
|
|
|
|
/* UTMI_OTG_CTRL REGISTER */
|
2017-03-30 06:46:40 +00:00
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_SW_MODE BIT(31)
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_POWERPRESENT BIT(9)
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_TXBITSTUFFENABLE BIT(8)
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_IDDIG BIT(4)
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_SESSEND BIT(3)
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_SESSVALID BIT(2)
|
|
|
|
#define USBOTGSS_UTMI_OTG_CTRL_VBUSVALID BIT(1)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2019-07-21 07:36:49 +00:00
|
|
|
enum dwc3_omap_utmi_mode {
|
|
|
|
DWC3_OMAP_UTMI_MODE_UNKNOWN = 0,
|
|
|
|
DWC3_OMAP_UTMI_MODE_HW,
|
|
|
|
DWC3_OMAP_UTMI_MODE_SW,
|
|
|
|
};
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
struct dwc3_omap {
|
|
|
|
struct device *dev;
|
|
|
|
|
|
|
|
int irq;
|
|
|
|
void __iomem *base;
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
u32 utmi_otg_ctrl;
|
2013-06-12 09:23:45 +00:00
|
|
|
u32 utmi_otg_offset;
|
|
|
|
u32 irqmisc_offset;
|
|
|
|
u32 irq_eoi_offset;
|
|
|
|
u32 debug_offset;
|
|
|
|
u32 irq0_offset;
|
2013-02-11 09:12:02 +00:00
|
|
|
|
2015-07-01 04:11:30 +00:00
|
|
|
struct extcon_dev *edev;
|
2013-07-08 00:54:43 +00:00
|
|
|
struct notifier_block vbus_nb;
|
|
|
|
struct notifier_block id_nb;
|
|
|
|
|
|
|
|
struct regulator *vbus_reg;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
};
|
|
|
|
|
2013-07-08 00:54:43 +00:00
|
|
|
enum omap_dwc3_vbus_id_status {
|
|
|
|
OMAP_DWC3_ID_FLOAT,
|
|
|
|
OMAP_DWC3_ID_GROUND,
|
|
|
|
OMAP_DWC3_VBUS_OFF,
|
|
|
|
OMAP_DWC3_VBUS_VALID,
|
|
|
|
};
|
2013-01-25 03:00:49 +00:00
|
|
|
|
2012-04-24 11:18:38 +00:00
|
|
|
static inline u32 dwc3_omap_readl(void __iomem *base, u32 offset)
|
|
|
|
{
|
|
|
|
return readl(base + offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void dwc3_omap_writel(void __iomem *base, u32 offset, u32 value)
|
|
|
|
{
|
|
|
|
writel(value, base + offset);
|
|
|
|
}
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
static u32 dwc3_omap_read_utmi_ctrl(struct dwc3_omap *omap)
|
2013-06-12 09:23:47 +00:00
|
|
|
{
|
2015-03-24 20:08:49 +00:00
|
|
|
return dwc3_omap_readl(omap->base, USBOTGSS_UTMI_OTG_CTRL +
|
2013-06-12 09:23:47 +00:00
|
|
|
omap->utmi_otg_offset);
|
|
|
|
}
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
static void dwc3_omap_write_utmi_ctrl(struct dwc3_omap *omap, u32 value)
|
2013-06-12 09:23:47 +00:00
|
|
|
{
|
2015-03-24 20:08:49 +00:00
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_UTMI_OTG_CTRL +
|
2013-06-12 09:23:47 +00:00
|
|
|
omap->utmi_otg_offset, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static u32 dwc3_omap_read_irq0_status(struct dwc3_omap *omap)
|
|
|
|
{
|
2016-05-11 14:36:42 +00:00
|
|
|
return dwc3_omap_readl(omap->base, USBOTGSS_IRQSTATUS_RAW_0 -
|
2013-06-12 09:23:47 +00:00
|
|
|
omap->irq0_offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dwc3_omap_write_irq0_status(struct dwc3_omap *omap, u32 value)
|
|
|
|
{
|
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_IRQSTATUS_0 -
|
|
|
|
omap->irq0_offset, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static u32 dwc3_omap_read_irqmisc_status(struct dwc3_omap *omap)
|
|
|
|
{
|
2016-05-11 14:36:42 +00:00
|
|
|
return dwc3_omap_readl(omap->base, USBOTGSS_IRQSTATUS_RAW_MISC +
|
2013-06-12 09:23:47 +00:00
|
|
|
omap->irqmisc_offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dwc3_omap_write_irqmisc_status(struct dwc3_omap *omap, u32 value)
|
|
|
|
{
|
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_IRQSTATUS_MISC +
|
|
|
|
omap->irqmisc_offset, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dwc3_omap_write_irqmisc_set(struct dwc3_omap *omap, u32 value)
|
|
|
|
{
|
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_SET_MISC +
|
|
|
|
omap->irqmisc_offset, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dwc3_omap_write_irq0_set(struct dwc3_omap *omap, u32 value)
|
|
|
|
{
|
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_SET_0 -
|
|
|
|
omap->irq0_offset, value);
|
|
|
|
}
|
|
|
|
|
2015-02-13 04:43:24 +00:00
|
|
|
static void dwc3_omap_write_irqmisc_clr(struct dwc3_omap *omap, u32 value)
|
|
|
|
{
|
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_MISC +
|
|
|
|
omap->irqmisc_offset, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dwc3_omap_write_irq0_clr(struct dwc3_omap *omap, u32 value)
|
|
|
|
{
|
|
|
|
dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_0 -
|
|
|
|
omap->irq0_offset, value);
|
|
|
|
}
|
|
|
|
|
2013-07-08 00:54:43 +00:00
|
|
|
static void dwc3_omap_set_mailbox(struct dwc3_omap *omap,
|
|
|
|
enum omap_dwc3_vbus_id_status status)
|
2013-01-25 03:00:49 +00:00
|
|
|
{
|
2013-07-08 00:54:43 +00:00
|
|
|
int ret;
|
|
|
|
u32 val;
|
2013-03-07 13:21:44 +00:00
|
|
|
|
2013-01-25 03:00:49 +00:00
|
|
|
switch (status) {
|
|
|
|
case OMAP_DWC3_ID_GROUND:
|
2013-07-08 00:54:43 +00:00
|
|
|
if (omap->vbus_reg) {
|
|
|
|
ret = regulator_enable(omap->vbus_reg);
|
|
|
|
if (ret) {
|
2015-06-30 17:46:07 +00:00
|
|
|
dev_err(omap->dev, "regulator enable failed\n");
|
2013-07-08 00:54:43 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
val = dwc3_omap_read_utmi_ctrl(omap);
|
2016-05-11 14:36:45 +00:00
|
|
|
val &= ~USBOTGSS_UTMI_OTG_CTRL_IDDIG;
|
2015-03-24 20:08:49 +00:00
|
|
|
dwc3_omap_write_utmi_ctrl(omap, val);
|
2013-01-25 03:00:49 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case OMAP_DWC3_VBUS_VALID:
|
2015-03-24 20:08:49 +00:00
|
|
|
val = dwc3_omap_read_utmi_ctrl(omap);
|
|
|
|
val &= ~USBOTGSS_UTMI_OTG_CTRL_SESSEND;
|
2016-05-11 14:36:45 +00:00
|
|
|
val |= USBOTGSS_UTMI_OTG_CTRL_VBUSVALID
|
2016-05-11 14:36:44 +00:00
|
|
|
| USBOTGSS_UTMI_OTG_CTRL_SESSVALID;
|
2015-03-24 20:08:49 +00:00
|
|
|
dwc3_omap_write_utmi_ctrl(omap, val);
|
2013-01-25 03:00:49 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case OMAP_DWC3_ID_FLOAT:
|
2022-03-08 13:03:37 +00:00
|
|
|
if (omap->vbus_reg && regulator_is_enabled(omap->vbus_reg))
|
2013-07-08 00:54:43 +00:00
|
|
|
regulator_disable(omap->vbus_reg);
|
2016-05-11 14:36:45 +00:00
|
|
|
val = dwc3_omap_read_utmi_ctrl(omap);
|
|
|
|
val |= USBOTGSS_UTMI_OTG_CTRL_IDDIG;
|
|
|
|
dwc3_omap_write_utmi_ctrl(omap, val);
|
2017-02-15 11:38:22 +00:00
|
|
|
break;
|
2013-07-08 00:54:43 +00:00
|
|
|
|
2013-01-25 03:00:49 +00:00
|
|
|
case OMAP_DWC3_VBUS_OFF:
|
2015-03-24 20:08:49 +00:00
|
|
|
val = dwc3_omap_read_utmi_ctrl(omap);
|
|
|
|
val &= ~(USBOTGSS_UTMI_OTG_CTRL_SESSVALID
|
2016-05-11 14:36:44 +00:00
|
|
|
| USBOTGSS_UTMI_OTG_CTRL_VBUSVALID);
|
2016-05-11 14:36:45 +00:00
|
|
|
val |= USBOTGSS_UTMI_OTG_CTRL_SESSEND;
|
2015-03-24 20:08:49 +00:00
|
|
|
dwc3_omap_write_utmi_ctrl(omap, val);
|
2013-01-25 03:00:49 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2015-06-30 17:46:07 +00:00
|
|
|
dev_WARN(omap->dev, "invalid state\n");
|
2013-01-25 03:00:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-11 14:36:42 +00:00
|
|
|
static void dwc3_omap_enable_irqs(struct dwc3_omap *omap);
|
|
|
|
static void dwc3_omap_disable_irqs(struct dwc3_omap *omap);
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
|
2016-05-11 14:36:42 +00:00
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = _omap;
|
|
|
|
|
|
|
|
if (dwc3_omap_read_irqmisc_status(omap) ||
|
|
|
|
dwc3_omap_read_irq0_status(omap)) {
|
|
|
|
/* mask irqs */
|
|
|
|
dwc3_omap_disable_irqs(omap);
|
|
|
|
return IRQ_WAKE_THREAD;
|
|
|
|
}
|
|
|
|
|
|
|
|
return IRQ_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static irqreturn_t dwc3_omap_interrupt_thread(int irq, void *_omap)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = _omap;
|
|
|
|
u32 reg;
|
|
|
|
|
2016-05-11 14:36:42 +00:00
|
|
|
/* clear irq status flags */
|
2013-06-12 09:23:47 +00:00
|
|
|
reg = dwc3_omap_read_irqmisc_status(omap);
|
|
|
|
dwc3_omap_write_irqmisc_status(omap, reg);
|
|
|
|
|
|
|
|
reg = dwc3_omap_read_irq0_status(omap);
|
|
|
|
dwc3_omap_write_irq0_status(omap, reg);
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2016-05-11 14:36:42 +00:00
|
|
|
/* unmask irqs */
|
|
|
|
dwc3_omap_enable_irqs(omap);
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
return IRQ_HANDLED;
|
|
|
|
}
|
|
|
|
|
2013-02-11 09:03:59 +00:00
|
|
|
static void dwc3_omap_enable_irqs(struct dwc3_omap *omap)
|
|
|
|
{
|
|
|
|
u32 reg;
|
|
|
|
|
|
|
|
/* enable all IRQs */
|
|
|
|
reg = USBOTGSS_IRQO_COREIRQ_ST;
|
2013-06-12 09:23:47 +00:00
|
|
|
dwc3_omap_write_irq0_set(omap, reg);
|
|
|
|
|
|
|
|
reg = (USBOTGSS_IRQMISC_OEVT |
|
|
|
|
USBOTGSS_IRQMISC_DRVVBUS_RISE |
|
|
|
|
USBOTGSS_IRQMISC_CHRGVBUS_RISE |
|
|
|
|
USBOTGSS_IRQMISC_DISCHRGVBUS_RISE |
|
|
|
|
USBOTGSS_IRQMISC_IDPULLUP_RISE |
|
|
|
|
USBOTGSS_IRQMISC_DRVVBUS_FALL |
|
|
|
|
USBOTGSS_IRQMISC_CHRGVBUS_FALL |
|
|
|
|
USBOTGSS_IRQMISC_DISCHRGVBUS_FALL |
|
|
|
|
USBOTGSS_IRQMISC_IDPULLUP_FALL);
|
|
|
|
|
|
|
|
dwc3_omap_write_irqmisc_set(omap, reg);
|
2013-02-11 09:03:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void dwc3_omap_disable_irqs(struct dwc3_omap *omap)
|
|
|
|
{
|
2015-02-13 04:43:24 +00:00
|
|
|
u32 reg;
|
|
|
|
|
2013-02-11 09:03:59 +00:00
|
|
|
/* disable all IRQs */
|
2015-02-13 04:43:24 +00:00
|
|
|
reg = USBOTGSS_IRQO_COREIRQ_ST;
|
|
|
|
dwc3_omap_write_irq0_clr(omap, reg);
|
|
|
|
|
|
|
|
reg = (USBOTGSS_IRQMISC_OEVT |
|
|
|
|
USBOTGSS_IRQMISC_DRVVBUS_RISE |
|
|
|
|
USBOTGSS_IRQMISC_CHRGVBUS_RISE |
|
|
|
|
USBOTGSS_IRQMISC_DISCHRGVBUS_RISE |
|
|
|
|
USBOTGSS_IRQMISC_IDPULLUP_RISE |
|
|
|
|
USBOTGSS_IRQMISC_DRVVBUS_FALL |
|
|
|
|
USBOTGSS_IRQMISC_CHRGVBUS_FALL |
|
|
|
|
USBOTGSS_IRQMISC_DISCHRGVBUS_FALL |
|
|
|
|
USBOTGSS_IRQMISC_IDPULLUP_FALL);
|
|
|
|
|
|
|
|
dwc3_omap_write_irqmisc_clr(omap, reg);
|
2013-02-11 09:03:59 +00:00
|
|
|
}
|
|
|
|
|
2013-07-08 00:54:43 +00:00
|
|
|
static int dwc3_omap_id_notifier(struct notifier_block *nb,
|
|
|
|
unsigned long event, void *ptr)
|
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = container_of(nb, struct dwc3_omap, id_nb);
|
|
|
|
|
|
|
|
if (event)
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_GROUND);
|
|
|
|
else
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_FLOAT);
|
|
|
|
|
|
|
|
return NOTIFY_DONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int dwc3_omap_vbus_notifier(struct notifier_block *nb,
|
|
|
|
unsigned long event, void *ptr)
|
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = container_of(nb, struct dwc3_omap, vbus_nb);
|
|
|
|
|
|
|
|
if (event)
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID);
|
|
|
|
else
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_OFF);
|
|
|
|
|
|
|
|
return NOTIFY_DONE;
|
|
|
|
}
|
|
|
|
|
2014-07-16 13:07:06 +00:00
|
|
|
static void dwc3_omap_map_offset(struct dwc3_omap *omap)
|
|
|
|
{
|
|
|
|
struct device_node *node = omap->dev->of_node;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Differentiate between OMAP5 and AM437x.
|
|
|
|
*
|
|
|
|
* For OMAP5(ES2.0) and AM437x wrapper revision is same, even
|
|
|
|
* though there are changes in wrapper register offsets.
|
|
|
|
*
|
|
|
|
* Using dt compatible to differentiate AM437x.
|
|
|
|
*/
|
|
|
|
if (of_device_is_compatible(node, "ti,am437x-dwc3")) {
|
|
|
|
omap->irq_eoi_offset = USBOTGSS_EOI_OFFSET;
|
|
|
|
omap->irq0_offset = USBOTGSS_IRQ0_OFFSET;
|
|
|
|
omap->irqmisc_offset = USBOTGSS_IRQMISC_OFFSET;
|
|
|
|
omap->utmi_otg_offset = USBOTGSS_UTMI_OTG_OFFSET;
|
|
|
|
omap->debug_offset = USBOTGSS_DEBUG_OFFSET;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-16 13:07:07 +00:00
|
|
|
static void dwc3_omap_set_utmi_mode(struct dwc3_omap *omap)
|
|
|
|
{
|
|
|
|
u32 reg;
|
|
|
|
struct device_node *node = omap->dev->of_node;
|
2017-02-27 10:52:46 +00:00
|
|
|
u32 utmi_mode = 0;
|
2014-07-16 13:07:07 +00:00
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
reg = dwc3_omap_read_utmi_ctrl(omap);
|
2014-07-16 13:07:07 +00:00
|
|
|
|
|
|
|
of_property_read_u32(node, "utmi-mode", &utmi_mode);
|
|
|
|
|
|
|
|
switch (utmi_mode) {
|
|
|
|
case DWC3_OMAP_UTMI_MODE_SW:
|
2015-03-24 20:08:49 +00:00
|
|
|
reg |= USBOTGSS_UTMI_OTG_CTRL_SW_MODE;
|
2014-07-16 13:07:07 +00:00
|
|
|
break;
|
|
|
|
case DWC3_OMAP_UTMI_MODE_HW:
|
2015-03-24 20:08:49 +00:00
|
|
|
reg &= ~USBOTGSS_UTMI_OTG_CTRL_SW_MODE;
|
2014-07-16 13:07:07 +00:00
|
|
|
break;
|
|
|
|
default:
|
2015-06-30 17:46:07 +00:00
|
|
|
dev_WARN(omap->dev, "UNKNOWN utmi mode %d\n", utmi_mode);
|
2014-07-16 13:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
dwc3_omap_write_utmi_ctrl(omap, reg);
|
2014-07-16 13:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-16 13:07:08 +00:00
|
|
|
static int dwc3_omap_extcon_register(struct dwc3_omap *omap)
|
|
|
|
{
|
2014-07-31 15:30:51 +00:00
|
|
|
int ret;
|
2014-07-16 13:07:08 +00:00
|
|
|
struct device_node *node = omap->dev->of_node;
|
|
|
|
struct extcon_dev *edev;
|
|
|
|
|
|
|
|
if (of_property_read_bool(node, "extcon")) {
|
|
|
|
edev = extcon_get_edev_by_phandle(omap->dev, 0);
|
|
|
|
if (IS_ERR(edev)) {
|
|
|
|
dev_vdbg(omap->dev, "couldn't get extcon device\n");
|
|
|
|
return -EPROBE_DEFER;
|
|
|
|
}
|
|
|
|
|
|
|
|
omap->vbus_nb.notifier_call = dwc3_omap_vbus_notifier;
|
2017-01-16 12:36:57 +00:00
|
|
|
ret = devm_extcon_register_notifier(omap->dev, edev,
|
|
|
|
EXTCON_USB, &omap->vbus_nb);
|
2014-07-16 13:07:08 +00:00
|
|
|
if (ret < 0)
|
|
|
|
dev_vdbg(omap->dev, "failed to register notifier for USB\n");
|
|
|
|
|
|
|
|
omap->id_nb.notifier_call = dwc3_omap_id_notifier;
|
2017-01-16 12:36:57 +00:00
|
|
|
ret = devm_extcon_register_notifier(omap->dev, edev,
|
|
|
|
EXTCON_USB_HOST, &omap->id_nb);
|
2014-07-16 13:07:08 +00:00
|
|
|
if (ret < 0)
|
|
|
|
dev_vdbg(omap->dev, "failed to register notifier for USB-HOST\n");
|
|
|
|
|
2017-01-16 12:36:57 +00:00
|
|
|
if (extcon_get_state(edev, EXTCON_USB) == true)
|
2014-07-16 13:07:08 +00:00
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID);
|
2021-04-27 12:21:18 +00:00
|
|
|
else
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_OFF);
|
|
|
|
|
2017-01-16 12:36:57 +00:00
|
|
|
if (extcon_get_state(edev, EXTCON_USB_HOST) == true)
|
2014-07-16 13:07:08 +00:00
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_GROUND);
|
2021-04-27 12:21:18 +00:00
|
|
|
else
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_FLOAT);
|
2015-07-01 04:11:30 +00:00
|
|
|
|
|
|
|
omap->edev = edev;
|
2014-07-16 13:07:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-11-19 18:21:48 +00:00
|
|
|
static int dwc3_omap_probe(struct platform_device *pdev)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
{
|
2012-01-25 09:07:03 +00:00
|
|
|
struct device_node *node = pdev->dev.of_node;
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
struct dwc3_omap *omap;
|
2012-02-15 09:27:55 +00:00
|
|
|
struct device *dev = &pdev->dev;
|
2013-07-08 00:54:43 +00:00
|
|
|
struct regulator *vbus_reg = NULL;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2014-05-15 12:53:32 +00:00
|
|
|
int ret;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
int irq;
|
|
|
|
|
|
|
|
void __iomem *base;
|
|
|
|
|
2013-02-26 14:33:28 +00:00
|
|
|
if (!node) {
|
|
|
|
dev_err(dev, "device node not found\n");
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
2012-02-15 09:27:55 +00:00
|
|
|
omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
|
2014-07-17 03:45:11 +00:00
|
|
|
if (!omap)
|
2012-02-15 09:27:55 +00:00
|
|
|
return -ENOMEM;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
|
|
|
platform_set_drvdata(pdev, omap);
|
|
|
|
|
2013-02-26 14:33:27 +00:00
|
|
|
irq = platform_get_irq(pdev, 0);
|
2019-07-30 18:15:46 +00:00
|
|
|
if (irq < 0)
|
2017-08-08 04:25:34 +00:00
|
|
|
return irq;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2019-08-02 13:06:16 +00:00
|
|
|
base = devm_platform_ioremap_resource(pdev, 0);
|
2013-07-12 12:33:35 +00:00
|
|
|
if (IS_ERR(base))
|
|
|
|
return PTR_ERR(base);
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2013-07-08 00:54:43 +00:00
|
|
|
if (of_property_read_bool(node, "vbus-supply")) {
|
|
|
|
vbus_reg = devm_regulator_get(dev, "vbus");
|
|
|
|
if (IS_ERR(vbus_reg)) {
|
|
|
|
dev_err(dev, "vbus init failed\n");
|
|
|
|
return PTR_ERR(vbus_reg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-15 09:27:55 +00:00
|
|
|
omap->dev = dev;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
omap->irq = irq;
|
|
|
|
omap->base = base;
|
2013-07-08 00:54:43 +00:00
|
|
|
omap->vbus_reg = vbus_reg;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2013-01-25 03:00:47 +00:00
|
|
|
pm_runtime_enable(dev);
|
|
|
|
ret = pm_runtime_get_sync(dev);
|
|
|
|
if (ret < 0) {
|
|
|
|
dev_err(dev, "get_sync failed with err %d\n", ret);
|
2016-04-11 14:12:33 +00:00
|
|
|
goto err1;
|
2013-01-25 03:00:47 +00:00
|
|
|
}
|
|
|
|
|
2014-07-16 13:07:06 +00:00
|
|
|
dwc3_omap_map_offset(omap);
|
2014-07-16 13:07:07 +00:00
|
|
|
dwc3_omap_set_utmi_mode(omap);
|
2011-09-01 19:26:25 +00:00
|
|
|
|
2014-07-16 13:07:08 +00:00
|
|
|
ret = dwc3_omap_extcon_register(omap);
|
|
|
|
if (ret < 0)
|
2016-04-11 14:12:33 +00:00
|
|
|
goto err1;
|
2013-07-08 00:54:43 +00:00
|
|
|
|
2013-02-26 14:33:28 +00:00
|
|
|
ret = of_platform_populate(node, NULL, NULL, dev);
|
|
|
|
if (ret) {
|
|
|
|
dev_err(&pdev->dev, "failed to create dwc3 core\n");
|
2017-01-16 12:36:57 +00:00
|
|
|
goto err1;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
}
|
|
|
|
|
2017-07-07 06:22:52 +00:00
|
|
|
ret = devm_request_threaded_irq(dev, omap->irq, dwc3_omap_interrupt,
|
|
|
|
dwc3_omap_interrupt_thread, IRQF_SHARED,
|
|
|
|
"dwc3-omap", omap);
|
|
|
|
if (ret) {
|
|
|
|
dev_err(dev, "failed to request IRQ #%d --> %d\n",
|
|
|
|
omap->irq, ret);
|
|
|
|
goto err1;
|
|
|
|
}
|
2015-08-25 17:07:45 +00:00
|
|
|
dwc3_omap_enable_irqs(omap);
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
return 0;
|
2013-06-03 16:13:39 +00:00
|
|
|
|
|
|
|
err1:
|
|
|
|
pm_runtime_put_sync(dev);
|
|
|
|
pm_runtime_disable(dev);
|
|
|
|
|
|
|
|
return ret;
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
}
|
|
|
|
|
2012-11-19 18:26:20 +00:00
|
|
|
static int dwc3_omap_remove(struct platform_device *pdev)
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
{
|
2013-02-11 09:03:59 +00:00
|
|
|
struct dwc3_omap *omap = platform_get_drvdata(pdev);
|
|
|
|
|
|
|
|
dwc3_omap_disable_irqs(omap);
|
2016-12-12 19:37:52 +00:00
|
|
|
disable_irq(omap->irq);
|
2014-09-02 19:12:26 +00:00
|
|
|
of_platform_depopulate(omap->dev);
|
2013-01-25 03:00:47 +00:00
|
|
|
pm_runtime_put_sync(&pdev->dev);
|
|
|
|
pm_runtime_disable(&pdev->dev);
|
2013-01-25 03:00:45 +00:00
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-02-11 08:31:15 +00:00
|
|
|
static const struct of_device_id of_dwc3_match[] = {
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
{
|
2013-02-26 14:33:27 +00:00
|
|
|
.compatible = "ti,dwc3"
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
},
|
2013-06-12 09:23:46 +00:00
|
|
|
{
|
|
|
|
.compatible = "ti,am437x-dwc3"
|
|
|
|
},
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
{ },
|
|
|
|
};
|
2013-02-11 08:31:15 +00:00
|
|
|
MODULE_DEVICE_TABLE(of, of_dwc3_match);
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
|
2013-03-26 01:52:48 +00:00
|
|
|
#ifdef CONFIG_PM_SLEEP
|
2013-02-11 09:12:02 +00:00
|
|
|
static int dwc3_omap_suspend(struct device *dev)
|
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = dev_get_drvdata(dev);
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
omap->utmi_otg_ctrl = dwc3_omap_read_utmi_ctrl(omap);
|
2013-12-17 13:17:54 +00:00
|
|
|
dwc3_omap_disable_irqs(omap);
|
2013-02-11 09:12:02 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int dwc3_omap_resume(struct device *dev)
|
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = dev_get_drvdata(dev);
|
|
|
|
|
2015-03-24 20:08:49 +00:00
|
|
|
dwc3_omap_write_utmi_ctrl(omap, omap->utmi_otg_ctrl);
|
2013-12-17 13:17:54 +00:00
|
|
|
dwc3_omap_enable_irqs(omap);
|
2013-02-11 09:12:02 +00:00
|
|
|
|
|
|
|
pm_runtime_disable(dev);
|
|
|
|
pm_runtime_set_active(dev);
|
|
|
|
pm_runtime_enable(dev);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-01-22 13:01:42 +00:00
|
|
|
static void dwc3_omap_complete(struct device *dev)
|
|
|
|
{
|
|
|
|
struct dwc3_omap *omap = dev_get_drvdata(dev);
|
|
|
|
|
|
|
|
if (extcon_get_state(omap->edev, EXTCON_USB))
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID);
|
|
|
|
else
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_OFF);
|
|
|
|
|
|
|
|
if (extcon_get_state(omap->edev, EXTCON_USB_HOST))
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_GROUND);
|
|
|
|
else
|
|
|
|
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_FLOAT);
|
|
|
|
}
|
|
|
|
|
2013-02-11 09:12:02 +00:00
|
|
|
static const struct dev_pm_ops dwc3_omap_dev_pm_ops = {
|
|
|
|
|
|
|
|
SET_SYSTEM_SLEEP_PM_OPS(dwc3_omap_suspend, dwc3_omap_resume)
|
2018-01-22 13:01:42 +00:00
|
|
|
.complete = dwc3_omap_complete,
|
2013-02-11 09:12:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define DEV_PM_OPS (&dwc3_omap_dev_pm_ops)
|
|
|
|
#else
|
|
|
|
#define DEV_PM_OPS NULL
|
2013-03-26 01:52:48 +00:00
|
|
|
#endif /* CONFIG_PM_SLEEP */
|
2013-02-11 09:12:02 +00:00
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
static struct platform_driver dwc3_omap_driver = {
|
|
|
|
.probe = dwc3_omap_probe,
|
2012-11-19 18:21:08 +00:00
|
|
|
.remove = dwc3_omap_remove,
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
.driver = {
|
|
|
|
.name = "omap-dwc3",
|
2013-02-11 08:31:15 +00:00
|
|
|
.of_match_table = of_dwc3_match,
|
2013-02-11 09:12:02 +00:00
|
|
|
.pm = DEV_PM_OPS,
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2011-11-27 12:16:27 +00:00
|
|
|
module_platform_driver(dwc3_omap_driver);
|
|
|
|
|
2011-10-19 17:39:50 +00:00
|
|
|
MODULE_ALIAS("platform:omap-dwc3");
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
|
2013-06-30 11:15:11 +00:00
|
|
|
MODULE_LICENSE("GPL v2");
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 15:10:58 +00:00
|
|
|
MODULE_DESCRIPTION("DesignWare USB3 OMAP Glue Layer");
|