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

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

Merge tag 'usb-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:

usb: changes for v4.12

With 51 non-merge commits, this is one of the smallest USB Gadget pull
requests. Apart from your expected set of non-critical fixes, and
other miscellaneous items, we have most of the changes in dwc3 (52.5%)
with all other UDCs following with 34.8%.

As for the actual changes, the most important of them are all the
recent changes to reduce memory footprint of dwc3, bare minimum
dual-role support on dwc3 and reworked endpoint count and
initialization routines.
parents a6308d70 48eab1f2
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
What:		/sys/devices/platform/<renesas_usb3's name>/role
Date:		March 2017
KernelVersion:	4.13
Contact:	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Description:
		This file can be read and write.
		The file can show/change the drd mode of usb.

		Write the following string to change the mode:
		 "host" - switching mode from peripheral to host.
		 "peripheral" - switching mode from host to peripheral.

		Read the file, then it shows the following strings:
		 "host" - The mode is host now.
		 "peripheral" - The mode is peripheral now.
+7 −0
Original line number Diff line number Diff line
@@ -31,6 +31,13 @@
#include <linux/usb/otg.h>
#include <linux/usb/otg-fsm.h>

#ifdef VERBOSE
#define VDBG(fmt, args...) pr_debug("[%s]  " fmt, \
				 __func__, ## args)
#else
#define VDBG(stuff...)	do {} while (0)
#endif

/* Change USB protocol when there is a protocol change */
static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
{
+5 −0
Original line number Diff line number Diff line
@@ -423,6 +423,10 @@ enum dwc2_ep0_state {
 *			needed.
 *			0 - No (default)
 *			1 - Yes
 * @activate_stm_fs_transceiver: Activate internal transceiver using GGPIO
 *			register.
 *			0 - Deactivate the transceiver (default)
 *			1 - Activate the transceiver
 * @g_dma:              Enables gadget dma usage (default: autodetect).
 * @g_dma_desc:         Enables gadget descriptor DMA (default: autodetect).
 * @g_rx_fifo_size:	The periodic rx fifo size for the device, in
@@ -477,6 +481,7 @@ struct dwc2_core_params {
	bool uframe_sched;
	bool external_id_pin_ctl;
	bool hibernation;
	bool activate_stm_fs_transceiver;
	u16 max_packet_count;
	u32 max_transfer_size;
	u32 ahbcfg;
+15 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ static void dwc2_init_fs_ls_pclk_sel(struct dwc2_hsotg *hsotg)

static int dwc2_fs_phy_init(struct dwc2_hsotg *hsotg, bool select_phy)
{
	u32 usbcfg, i2cctl;
	u32 usbcfg, ggpio, i2cctl;
	int retval = 0;

	/*
@@ -145,6 +145,19 @@ static int dwc2_fs_phy_init(struct dwc2_hsotg *hsotg, bool select_phy)
				return retval;
			}
		}

		if (hsotg->params.activate_stm_fs_transceiver) {
			ggpio = dwc2_readl(hsotg->regs + GGPIO);
			if (!(ggpio & GGPIO_STM32_OTG_GCCFG_PWRDWN)) {
				dev_dbg(hsotg->dev, "Activating transceiver\n");
				/*
				 * STM32F4x9 uses the GGPIO register as general
				 * core configuration register.
				 */
				ggpio |= GGPIO_STM32_OTG_GCCFG_PWRDWN;
				dwc2_writel(ggpio, hsotg->regs + GGPIO);
			}
		}
	}

	/*
@@ -3264,6 +3277,7 @@ static void dwc2_conn_id_status_change(struct work_struct *work)
		dwc2_core_init(hsotg, false);
		dwc2_enable_global_interrupts(hsotg);
		spin_lock_irqsave(&hsotg->lock, flags);
		dwc2_hsotg_disconnect(hsotg);
		dwc2_hsotg_core_init_disconnected(hsotg, false);
		spin_unlock_irqrestore(&hsotg->lock, flags);
		dwc2_hsotg_core_connect(hsotg);
+2 −0
Original line number Diff line number Diff line
@@ -225,6 +225,8 @@

#define GPVNDCTL			HSOTG_REG(0x0034)
#define GGPIO				HSOTG_REG(0x0038)
#define GGPIO_STM32_OTG_GCCFG_PWRDWN	BIT(16)

#define GUID				HSOTG_REG(0x003c)
#define GSNPSID				HSOTG_REG(0x0040)
#define GHWCFG1				HSOTG_REG(0x0044)
Loading