Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b7c3b68 authored by Roland Stigge's avatar Roland Stigge Committed by Greg Kroah-Hartman
Browse files

USB: Add driver for NXP ISP1301 USB transceiver



This new driver registers the NXP ISP1301 chip via the I2C subsystem.  The chip
is the USB transceiver shared by ohci-nxp, lpc32xx_udc (gadget) and
isp1301_omap.

ISP1301 is a very low-level driver that primarily separates out the I2C client
registration of the ISP1301 chip (including instantiation via DT), used by
other drivers, and declares the chip's registers. It's only a helper driver for
some OHCI and USB device drivers.  The driver can be considered as a register
set extension of ohci-nxp, lpc32xx-udc and isp1301_omap, which in turn know
best what to do with the low level functionality (individual ISP1301 registers
and timing, see the different initialization strategies in those drivers).
Those drivers previously internally duplicated ISP1301 register definitions
which is solved by this new isp1301 driver. The ISP1301 registers exposed via
isp1301.h can be accessed by other drivers using it with standard i2c_smbus_*()
accesses.

Following patches let the respective USB host and gadget drivers use this
driver, instead of duplicating ISP1301 handling.

Signed-off-by: default avatarRoland Stigge <stigge@antcom.de>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2265efea
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
* NXP ISP1301 USB transceiver

Required properties:
- compatible: must be "nxp,isp1301"
- reg: I2C address of the ISP1301 device

Optional properties of devices using ISP1301:
- transceiver: phandle of isp1301 - this helps the ISP1301 driver to find the
               ISP1301 instance associated with the respective USB driver

Example:

	isp1301: usb-transceiver@2c {
		compatible = "nxp,isp1301";
		reg = <0x2c>;
	};

	usbd@31020000 {
		compatible = "nxp,lpc3220-udc";
		reg = <0x31020000 0x300>;
		interrupt-parent = <&mic>;
		interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>;
		transceiver = <&isp1301>;
		status = "okay";
	};
+2 −0
Original line number Diff line number Diff line
@@ -177,6 +177,8 @@ source "drivers/usb/serial/Kconfig"

source "drivers/usb/misc/Kconfig"

source "drivers/usb/phy/Kconfig"

source "drivers/usb/atm/Kconfig"

source "drivers/usb/gadget/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/
obj-$(CONFIG_USB_SERIAL)	+= serial/

obj-$(CONFIG_USB)		+= misc/
obj-$(CONFIG_USB)		+= phy/
obj-$(CONFIG_EARLY_PRINTK_DBGP)	+= early/

obj-$(CONFIG_USB_ATM)		+= atm/
+17 −0
Original line number Diff line number Diff line
#
# Physical Layer USB driver configuration
#
comment "USB Physical Layer drivers"
	depends on USB

config USB_ISP1301
	tristate "NXP ISP1301 USB transceiver support"
	depends on USB
	depends on I2C
	help
	  Say Y here to add support for the NXP ISP1301 USB transceiver driver.
	  This chip is typically used as USB transceiver for USB host, gadget
	  and OTG drivers (to be selected separately).

	  To compile this driver as a module, choose M here: the
	  module will be called isp1301.
+7 −0
Original line number Diff line number Diff line
#
# Makefile for physical layer USB drivers
#

ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG

obj-$(CONFIG_USB_ISP1301)		+= isp1301.o
Loading