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

Commit 530b7a3e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-ci-v4.11-rc1' of...

Merge tag 'usb-ci-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next

Peter writes:

Hi Greg,

In this series, it adds qualcomm USB2 support. The review process takes
more than half of year, thanks for Stephen Boyd's great work.

Most of patches at linux-next more than ten days, and the last two small
chipidea patches at my tree about one day, no warning is reported from
autobuild robot.

Thanks.
parents 4ab53a69 753dfd23
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
ULPI bus binding
----------------

Phys that are behind a ULPI connection can be described with the following
binding. The host controller shall have a "ulpi" named node as a child, and
that node shall have one enabled node underneath it representing the ulpi
device on the bus.

EXAMPLE
-------

usb {
	compatible = "vendor,usb-controller";

	ulpi {
		phy {
			compatible = "vendor,phy";
		};
	};
};
+25 −0
Original line number Diff line number Diff line
@@ -225,6 +225,30 @@ ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len)

	return tsize;
}
EXPORT_SYMBOL_GPL(of_device_get_modalias);

int of_device_request_module(struct device *dev)
{
	char *str;
	ssize_t size;
	int ret;

	size = of_device_get_modalias(dev, NULL, 0);
	if (size < 0)
		return size;

	str = kmalloc(size + 1, GFP_KERNEL);
	if (!str)
		return -ENOMEM;

	of_device_get_modalias(dev, str, size);
	str[size] = '\0';
	ret = request_module(str);
	kfree(str);

	return ret;
}
EXPORT_SYMBOL_GPL(of_device_request_module);

/**
 * of_device_uevent - Display OF related uevent information
@@ -287,3 +311,4 @@ int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)

	return 0;
}
EXPORT_SYMBOL_GPL(of_device_uevent_modalias);
+8 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ config USB_CHIPIDEA
	tristate "ChipIdea Highspeed Dual Role Controller"
	depends on ((USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && !USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET)) && HAS_DMA
	select EXTCON
	select RESET_CONTROLLER
	help
	  Say Y here if your system has a dual role high speed USB
	  controller based on ChipIdea silicon IP. It supports:
@@ -38,4 +39,11 @@ config USB_CHIPIDEA_HOST
	  Say Y here to enable host controller functionality of the
	  ChipIdea driver.

config USB_CHIPIDEA_ULPI
	bool "ChipIdea ULPI PHY support"
	depends on USB_ULPI_BUS=y || USB_ULPI_BUS=USB_CHIPIDEA
	help
	  Say Y here if you have a ULPI PHY attached to your ChipIdea
	  controller.

endif
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ ci_hdrc-y := core.o otg.o debug.o
ci_hdrc-$(CONFIG_USB_CHIPIDEA_UDC)	+= udc.o
ci_hdrc-$(CONFIG_USB_CHIPIDEA_HOST)	+= host.o
ci_hdrc-$(CONFIG_USB_OTG_FSM)		+= otg_fsm.o
ci_hdrc-$(CONFIG_USB_CHIPIDEA_ULPI)	+= ulpi.o

# Glue/Bridge layers go here

+20 −2
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
#include <linux/usb.h>
#include <linux/usb/gadget.h>
#include <linux/usb/otg-fsm.h>
#include <linux/usb/otg.h>
#include <linux/ulpi/interface.h>

/******************************************************************************
 * DEFINE
@@ -52,6 +54,7 @@ enum ci_hw_regs {
	OP_ENDPTLISTADDR,
	OP_TTCTRL,
	OP_BURSTSIZE,
	OP_ULPI_VIEWPORT,
	OP_PORTSC,
	OP_DEVLC,
	OP_OTGSC,
@@ -187,6 +190,8 @@ struct hw_bank {
 * @test_mode: the selected test mode
 * @platdata: platform specific information supplied by parent device
 * @vbus_active: is VBUS active
 * @ulpi: pointer to ULPI device, if any
 * @ulpi_ops: ULPI read/write ops for this device
 * @phy: pointer to PHY, if any
 * @usb_phy: pointer to USB PHY, if any and if using the USB PHY framework
 * @hcd: pointer to usb_hcd for ehci host driver
@@ -236,6 +241,10 @@ struct ci_hdrc {

	struct ci_hdrc_platform_data	*platdata;
	int				vbus_active;
#ifdef CONFIG_USB_CHIPIDEA_ULPI
	struct ulpi			*ulpi;
	struct ulpi_ops 		ulpi_ops;
#endif
	struct phy			*phy;
	/* old usb_phy interface */
	struct usb_phy			*usb_phy;
@@ -418,6 +427,16 @@ static inline bool ci_otg_is_fsm_mode(struct ci_hdrc *ci)
#endif
}

#if IS_ENABLED(CONFIG_USB_CHIPIDEA_ULPI)
int ci_ulpi_init(struct ci_hdrc *ci);
void ci_ulpi_exit(struct ci_hdrc *ci);
int ci_ulpi_resume(struct ci_hdrc *ci);
#else
static inline int ci_ulpi_init(struct ci_hdrc *ci) { return 0; }
static inline void ci_ulpi_exit(struct ci_hdrc *ci) { }
static inline int ci_ulpi_resume(struct ci_hdrc *ci) { return 0; }
#endif

u32 hw_read_intr_enable(struct ci_hdrc *ci);

u32 hw_read_intr_status(struct ci_hdrc *ci);
@@ -428,8 +447,7 @@ int hw_port_test_set(struct ci_hdrc *ci, u8 mode);

u8 hw_port_test_get(struct ci_hdrc *ci);

int hw_wait_reg(struct ci_hdrc *ci, enum ci_hw_regs reg, u32 mask,
				u32 value, unsigned int timeout_ms);
void hw_phymode_configure(struct ci_hdrc *ci);

void ci_platform_configure(struct ci_hdrc *ci);

Loading