Thomas Petazzoni | 19 Mar 15:01 2015

[PATCH v2] usb: ehci-orion: add more constants for register values

This commit adds new register values for the USB_CMD and USB_MODE
registers, which allows to avoid the usage of a number of magic values
in orion_usb_phy_v1_setup().

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@...>
---
Changes since v1: use tabs instead of spaces for alignment.

drivers/usb/host/ehci-orion.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index f6eafec..bfcbb9a 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
 <at>  <at>  -29,7 +29,13  <at>  <at> 
 #define wrl(off, val)	writel_relaxed((val), hcd->regs + (off))

 #define USB_CMD			0x140
+#define   USB_CMD_RUN		BIT(0)
+#define   USB_CMD_RESET		BIT(1)
 #define USB_MODE		0x1a8
+#define   USB_MODE_MASK		GENMASK(1, 0)
+#define   USB_MODE_DEVICE	0x2
+#define   USB_MODE_HOST		0x3
+#define   USB_MODE_SDIS		BIT(4)
 #define USB_CAUSE		0x310
 #define USB_MASK		0x314
 #define USB_WINDOW_CTRL(i)	(0x320 + ((i) << 4))
 <at>  <at>  -69,8 +75,8  <at>  <at>  static void orion_usb_phy_v1_setup(struct usb_hcd *hcd)
(Continue reading)

Andy Shevchenko | 19 Mar 12:39 2015
Picon

[PATCH v1 1/2] chipidea: introduce specific Kconfig options for glue drivers

This patch introduces USB_CHIPIDEA_PCI and USB_CHIPIDEA_OF Kconfig options, one
per each specific glue driver. This is needed to provide different dependencies
they have.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...>
---
 drivers/usb/chipidea/Kconfig  | 10 ++++++++++
 drivers/usb/chipidea/Makefile |  9 ++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
index 77b47d8..8b0edb9 100644
--- a/drivers/usb/chipidea/Kconfig
+++ b/drivers/usb/chipidea/Kconfig
 <at>  <at>  -10,6 +10,16  <at>  <at>  config USB_CHIPIDEA

 if USB_CHIPIDEA

+config USB_CHIPIDEA_OF
+	tristate
+	depends on OF
+	default USB_CHIPIDEA
+
+config USB_CHIPIDEA_PCI
+	tristate
+	depends on PCI
+	default USB_CHIPIDEA
+
 config USB_CHIPIDEA_UDC
 	bool "ChipIdea device controller"
(Continue reading)

Thomas Petazzoni | 19 Mar 11:32 2015

[PATCH] usb: ehci-orion: add more constants for register values

This commit adds new register values for the USB_CMD and USB_MODE
registers, which allows to avoid the usage of a number of magic values
in orion_usb_phy_v1_setup().

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@...>
---
 drivers/usb/host/ehci-orion.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index f6eafec..0feca8a 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
 <at>  <at>  -29,7 +29,13  <at>  <at> 
 #define wrl(off, val)	writel_relaxed((val), hcd->regs + (off))

 #define USB_CMD			0x140
+#define   USB_CMD_RUN           BIT(0)
+#define   USB_CMD_RESET         BIT(1)
 #define USB_MODE		0x1a8
+#define   USB_MODE_MASK         GENMASK(1, 0)
+#define   USB_MODE_DEVICE       0x2
+#define   USB_MODE_HOST         0x3
+#define   USB_MODE_SDIS         BIT(4)
 #define USB_CAUSE		0x310
 #define USB_MASK		0x314
 #define USB_WINDOW_CTRL(i)	(0x320 + ((i) << 4))
 <at>  <at>  -69,8 +75,8  <at>  <at>  static void orion_usb_phy_v1_setup(struct usb_hcd *hcd)
 	/*
 	 * Reset controller
(Continue reading)

Keith Packard | 19 Mar 11:07 2015

[PATCH] usb: Add driver for Altus Metrum ChaosKey device

This is a hardware random number generator. The driver provides both a
/dev/chaoskeyX entry and hooks the entropy source up to the kernel
hwrng interface. More information about the device can be found at
http://chaoskey.org

The USB ID for ChaosKey was allocated from the OpenMoko USB vendor
space and is visible as 'USBtrng' here:

http://wiki.openmoko.org/wiki/USB_Product_IDs

Signed-off-by: Keith Packard <keithp@...>
---
 drivers/usb/misc/Kconfig    |  12 +
 drivers/usb/misc/Makefile   |   1 +
 drivers/usb/misc/chaoskey.c | 550 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 563 insertions(+)
 create mode 100644 drivers/usb/misc/chaoskey.c

diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index 76d7720..8c331f1 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
 <at>  <at>  -255,3 +255,15  <at>  <at>  config USB_LINK_LAYER_TEST
 	  This driver is for generating specific traffic for Super Speed Link
 	  Layer Test Device. Say Y only when you want to conduct USB Super Speed
 	  Link Layer Test for host controllers.
+
+config USB_CHAOSKEY
+	tristate "ChaosKey random number generator driver support"
+	help
(Continue reading)

Krzysztof Opasiak | 19 Mar 09:17 2015

[PATCH] Documentation: ABI: Fix documentation for mass_storage function

Luns in mass storage function are identified using their id.
While creating lun's directory user cannot choose any arbitrary
name other than arabic numeral from 1 to FSG_MAX_LUNS.

Signed-off-by: Krzysztof Opasiak <k.opasiak@...>
---
 .../ABI/testing/configfs-usb-gadget-mass-storage   |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/configfs-usb-gadget-mass-storage b/Documentation/ABI/testing/configfs-usb-gadget-mass-storage
index 9931fb0..847d63b 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget-mass-storage
+++ b/Documentation/ABI/testing/configfs-usb-gadget-mass-storage
 <at>  <at>  -11,10 +11,15  <at>  <at>  Description:
 				are 2..4. Available only if
 				CONFIG_USB_GADGET_DEBUG_FILES is set.

-What:		/config/usb-gadget/gadget/functions/mass_storage.name/lun.name
+What:		/config/usb-gadget/gadget/functions/mass_storage.name/lun.id
 Date:		Oct 2013
 KernelVersion:	3.13
 Description:
+		id - arabic numeral from 1 to FSG_MAX_LUNS
+		(which is 8 by default) - 1.
+		lun.0 is reserved for default lun which appears while creating
+		mass_storage.name directory and cannot be removed by the user.
+
 		The attributes:

 		file		- The path to the backing file for the LUN.
(Continue reading)

Picon

Occasionally a USB mouse and keyboard connected to a USB hub stop working. Helps recover only reconnect USB hub.

Occasionally a USB mouse and keyboard connected to a USB hub stop
working. Helps recover only reconnect USB hub.

kernel 4.0.0-0.rc4

--
Best Regards,
Mike Gavrilov.
Attachment (kernel.log): text/x-log, 232 KiB
Li Jun | 19 Mar 04:11 2015

[PATCH v4 0/8] add HNP polling support for usb otg fsm

HNP polling is a mechanism which allows the OTG device currently acting as host
to determine when the other attached OTG device wishes to take the host role.
When an OTG host, which supports HNP, is connected to an OTG peripheral which
also supports HNP it shall poll the peripheral regularly to determine whether
it requires a role-swap and grant this at the earliest opportunity.

changes for v4:
- Add OTG HNP capable check for connected device before sending HNP polling
  in patch 3/8.
- Add comment to explain HNP test update in chipidea.txt in patch 8/8.
- Fix some typo.
- Add Peter's Ack in patch 1,2,4,5,6,7/8 of the series.

changes for v3:
- Move otg status selector definition from otg-fsm.h to ch9.h
- Use delayed_work instead of timer work to avoid a workstruct
- Add a new flag hnp_polling_support in usb_gadget to indicate if HNP polling
  is supported, which should be set by controller driver.
- Add a new patch to enable hnp_polling_support for chipidea otg fsm drier.
- Move otg status selector hanlding from chipidea udc driver to composite.c
- Add a new patch to bypass otg status selector hanlding.

changes for v2:
- Move HNP polling timer from chipidea controller driver to usb-otg-fsm.c to
  make it more generically, then HNP polling can be fully handled by otg fsm
  driver.
- Add comments for host_request_flag in patch:
  usb: gadget: add host_requestf_flag in usb_gadget for OTG HNP

Li Jun (8):
(Continue reading)

Peter Chen | 19 Mar 02:19 2015

[PATCH 00/12] USB: chipidea: patchset for performance improvement

Hi all,

In this patch set, I add some interfaces for tuning the performance
of chipidea usb driver. With this set, the USB performance can be improved
at some user cases with suitable parameters. The main changes:

- Interface to tune interrupt threshold control, and set
'Immediate' for default value
- The glue layer can disable stream mode according to USB role
- Interface to tune AHB burst configuration at SBUSCFG
- Interface to tune tx/rx burst size
- i.mx changes for achieving better performance, it can reduce
  the latecy between bus and USB FIFO, and reduce the overrun
  and underrun occurrences, it is useful for the system bus is busy.
  we see great improvement for ISO transfer, eg, high resolution
  USB camera when the bus is busy.

Below are some test results at imx6sx sdb board
(set ehci_hcd.park=3 at bootargs), the tests are done
at v4.0 kernel, no other bus loading during the tests,
so we have not seen performance change for some use cases.

USB Mass Storage (Host mode)
With Patch Set		Without Patch Set
R: 26.9 MB/s		27 MB/s
W: 25.2 MB/s		24.5 MB/s

1G USB Ethernet Card
With Patch Set		Without Patch Set
TX: 186 Mb/s		185 Mb/s
(Continue reading)

Ben Gamari | 18 Mar 19:37 2015

[PATCH v2] USB3503: Always respect refclk-frequency

My apologies for the double-post; the previous patch lacked an Acked-by and
several important recipients. Keep me on the CC list as I'm not subscribed to
the linux-usb list.

The USB3503 driver exposes the refclk-frequency DT property to allow users to
specify the rate of the clock provided on the device's REFCLK. This is
necessary for the driver to correctly configure the REF_SEL and INT_N pins.
Currently the driver only pays attention to refclk-frequency if the refclk
property is also provided. The binding documentation stipulates that the user
should omit refclk if the clock can be assumed to be always available.

This patch reworks the initialization codepath such that the driver always
respects the refclk-frequency property, even if refclk is omitted.

Cheers,

 - Ben

[1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/usb/misc/usb3503.c?id=657d898a9320a7cdb9b94565d75ecf75c25cbf0a

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Ben Gamari | 18 Mar 19:22 2015

[PATCH] USB3503: Always respect refclk-frequency

The USB3503 driver exposes the refclk-frequency DT property to allow users to
specify the rate of the clock provided on the device's REFCLK. This is
necessary for the driver to correctly configure the REF_SEL and INT_N pins.
Currently the driver only pays attention to refclk-frequency if the refclk
property is also provided. The binding documentation stipulates that the user
should omit refclk if the clock can be assumed to be always available.

This patch reworks this codepath such that the driver always respects the
refclk-frequency property, even if refclk is omitted.

Cheers,

 - Ben

[1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/usb/misc/usb3503.c?id=657d898a9320a7cdb9b94565d75ecf75c25cbf0a

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Li Jun | 18 Mar 10:08 2015

[PATCH v4 3/8] usb: common: otg-fsm: add HNP polling support

Adds HNP polling timer when transits to host state, the OTG status request
will be sent to peripheral after timeout, if host request flag is set, it will
switch to peripheral state, otherwise it will repeat HNP polling every 1.5s and
maintain the current session.

Signed-off-by: Li Jun <jun.li@...>

Change for v4:
Add check if the connected device is a HNP capable OTG device before sending
HNP polling request.

---
 drivers/usb/common/usb-otg-fsm.c |   92 ++++++++++++++++++++++++++++++++++++++
 include/linux/usb/otg-fsm.h      |   13 ++++++
 2 files changed, 105 insertions(+)

diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
index 61d538a..6f0d40b 100644
--- a/drivers/usb/common/usb-otg-fsm.c
+++ b/drivers/usb/common/usb-otg-fsm.c
 <at>  <at>  -78,6 +78,8  <at>  <at>  static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
 		fsm->b_srp_done = 0;
 		break;
 	case OTG_STATE_B_PERIPHERAL:
+		if (fsm->otg->gadget)
+			fsm->otg->gadget->host_request_flag = 0;
 		break;
 	case OTG_STATE_B_WAIT_ACON:
 		otg_del_timer(fsm, B_ASE0_BRST);
 <at>  <at>  -107,6 +109,8  <at>  <at>  static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
(Continue reading)


Gmane