Re: [PATCH v2 8/8] usb: dwc3: Add Amlogic G12A DWC3 glue

2019-03-07 Thread Chunfeng Yun
On Thu, 2019-03-07 at 10:45 +0100, Neil Armstrong wrote: > On 07/03/2019 03:02, Chunfeng Yun wrote: > > Hi, > > On Mon, 2019-03-04 at 11:38 +0100, Neil Armstrong wrote: > >> Adds support for Amlogic G12A USB Control Glue HW. > >> > >> The Amlogi

Re: [PATCH v2 8/8] usb: dwc3: Add Amlogic G12A DWC3 glue

2019-03-06 Thread Chunfeng Yun
Hi, On Mon, 2019-03-04 at 11:38 +0100, Neil Armstrong wrote: > Adds support for Amlogic G12A USB Control Glue HW. > > The Amlogic G12A SoC Family embeds 2 USB Controllers : > - a DWC3 IP configured as Host for USB2 and USB3 > - a DWC2 IP configured as Peripheral USB2 Only > > A glue connects

[PATCH 05/11] usb: mtu3: fix transfer error of USB3 Gen2 isoc

2019-03-06 Thread Chunfeng Yun
To support USB3 Gen2 ISOC, the registers of TXCSR1 and RXCSR1 are adjusted to support greater maxpkt and mult value, this patch fix this issue Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h | 11 ++ drivers/usb/mtu3/mtu3_core.c| 14 +++-- drivers/usb/mtu3

[PATCH 00/11] add debugfs consumers, tracepoints and rebuild QMU

2019-03-06 Thread Chunfeng Yun
are fixed. Chunfeng Yun (11): usb: mtu3: check return value of devm_extcon_register_notifier() usb: mtu3: print useful information also for device and host modes usb: mtu3: remove unnecessary local variable @req usb: mtu3: rebuild the code of getting vbus regulator usb: mtu3: fix transfer error

[PATCH 02/11] usb: mtu3: print useful information also for device and host modes

2019-03-06 Thread Chunfeng Yun
Print useful information not only dual-role mode but also device mode and host mode. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_plat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index

[PATCH 07/11] usb: mtu3: supports new QMU format

2019-03-06 Thread Chunfeng Yun
In order to support U3gen2 ISOC transfer upto 96DPs, extend the data buffer length. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h | 11 +++--- drivers/usb/mtu3/mtu3_core.c| 5 +++ drivers/usb/mtu3/mtu3_gadget.c | 6 ++-- drivers/usb/mtu3/mtu3_hw_regs.h | 1 + drivers

[PATCH 10/11] usb: mtu3: add tracepoints to help debug

2019-03-06 Thread Chunfeng Yun
This patch implements a few initial tracepoints for the mtu3 driver. More traces can be added as necessary in order to ease the task of debugging. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/Makefile | 7 + drivers/usb/mtu3/mtu3_core.c | 5 + drivers/usb/mtu3

[PATCH 11/11] usb: mtu3: add a function to switch mailbox state to string

2019-03-06 Thread Chunfeng Yun
By introducing mailbox_state_string(), allow to make debug log more readable Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_dr.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c index

[PATCH 01/11] usb: mtu3: check return value of devm_extcon_register_notifier()

2019-03-06 Thread Chunfeng Yun
Check the return value of devm_extcon_register_notifier() and add error handling. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_dr.c | 13 + drivers/usb/mtu3/mtu3_plat.c | 8 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/usb/mtu3

[PATCH 04/11] usb: mtu3: rebuild the code of getting vbus regulator

2019-03-06 Thread Chunfeng Yun
Remove local variable @vbus and use @dev instead of @pdev->dev Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_plat.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index 3a4a80f15957..a326b1d60

[PATCH 03/11] usb: mtu3: remove unnecessary local variable @req

2019-03-06 Thread Chunfeng Yun
The local variable @req is unnecessary in qmu_tx_zlp_error_handler, so remove it. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_qmu.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c index 09f19f70fe8f

[PATCH 09/11] usb: mtu3: move vbus and mode debugfs interfaces into mtu3_debugfs.c

2019-03-06 Thread Chunfeng Yun
Due to the separated debugfs files are added, move vbus and mode debugfs interfaces related with dual-role switch from mtu3_dr.c into mtu3_debugfs.c Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_debug.h | 2 + drivers/usb/mtu3/mtu3_debugfs.c | 101

[PATCH 06/11] usb: mtu3: rebuild qmu_gpd struct to prepare to support new QMU format

2019-03-06 Thread Chunfeng Yun
To support USB3 Gen2 ISOC, the data buffer length need be extended, it's hard to make the current qmu_gpd struct compatible, so here rebuild qmu_gpd struct and make easy to support new QMU format Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h | 45

[PATCH 08/11] usb: mtu3: add debugfs interface files

2019-03-06 Thread Chunfeng Yun
This adds more debugfs consumers. The debugfs entries read some important registers, fifo status, QMU ring, endpoint status, and IPPC probe interface to get internal status. With these entries, users can check the registers, endpoint and GPD used during run time. Signed-off-by: Chunfeng Yun

Re: [PATCH] usb: introduce usb_ep_type_string() function

2019-03-04 Thread Chunfeng Yun
Hi, On Fri, 2019-03-01 at 17:21 +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 01, 2019 at 02:58:23PM +0800, Chunfeng Yun wrote: > > In some places, the code prints a human-readable USB endpoint > > transfer type (e.g. "bulk"). This involves a switch statement >

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Chunfeng Yun
Hi, On Mon, 2019-03-04 at 11:01 +, Pawel Laszczak wrote: > Hi, > > > >hi, > >On Thu, 2019-02-14 at 19:45 +, Pawel Laszczak wrote: > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. > >> > >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi > >> can

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chunfeng Yun
hi, On Mon, 2019-03-04 at 08:50 +0200, Andy Shevchenko wrote: > On Mon, Mar 4, 2019 at 3:47 AM Chunfeng Yun wrote: > > On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote: > > > > + hisi_hikey_usb->role_sw = usb_role_switch_get(dev); > > > +

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

2019-03-03 Thread Chunfeng Yun
hi, On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote: > This driver handles usb hub power on and typeC port event of HiKey960 board: > 1)DP switching between usb hub and typeC port base on typeC port > state > 2)Control power of usb hub on Hikey960 > 3)Control vbus of typeC port &g

[PATCH] usb: introduce usb_ep_type_string() function

2019-02-28 Thread Chunfeng Yun
ns a human-readable name of provided endpoint type. It also changes a few places switch was used to use this new function. Signed-off-by: Chunfeng Yun --- drivers/usb/common/common.c | 16 drivers/usb/core/endpoint.c | 18 ++ drivers/usb/

Re: [PATCH v2 08/10] hikey960: Support usb functionality of Hikey960

2019-02-21 Thread Chunfeng Yun
On Tue, 2019-02-19 at 11:20 +0800, Chen Yu wrote: > Hi, > > On 2019/2/19 10:50, Chunfeng Yun wrote: > >> + if (ret) > >> + hisi_hikey_usb->typec_vbus_enable_val = 1; > >> + > >> + hisi_hikey_usb->typec_vbus = devm_gpiod_get(dev, &

Re: [PATCH v2 01/10] dt-bindings: phy: Add support for HiSilicon's hi3660 USB PHY

2019-02-18 Thread Chunfeng Yun
Hi, On Tue, 2019-02-19 at 09:50 +0800, Chen Yu wrote: > Hi, > > On 2019/2/19 4:18, Rob Herring wrote: > > On Mon, Feb 18, 2019 at 07:23:01PM +0800, Yu Chen wrote: > >> This patch adds binding documentation for supporting the hi3660 usb > >> phy on boards like the HiKey960. > >> > >> Cc: Rob

Re: [PATCH v2 08/10] hikey960: Support usb functionality of Hikey960

2019-02-18 Thread Chunfeng Yun
Hi, On Mon, 2019-02-18 at 19:23 +0800, Yu Chen wrote: > This driver handles usb hub power on and typeC port event of HiKey960 board: > 1)DP switching between usb hub and typeC port base on typeC port > state > 2)Control power of usb hub on Hikey960 > 3)Control vbus of typeC port > > Cc: Andy

Re: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-02-15 Thread Chunfeng Yun
hi, On Thu, 2019-02-14 at 19:45 +, Pawel Laszczak wrote: > This patch introduce new Cadence USBSS DRD driver to linux kernel. > > The Cadence USBSS DRD Driver is a highly configurable IP Core whichi > can be instantiated as Dual-Role Device (DRD), Peripheral Only and > Host Only

[PATCH v2] usb: xhci: remove unused member 'parent' in xhci_regset struct

2019-01-30 Thread Chunfeng Yun
The member @parent of xhci_regset struct is not used in fact, so remove it Signed-off-by: Chunfeng Yun --- v2: remove Change-Id --- drivers/usb/host/xhci-debugfs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/xhci-debugfs.h b/drivers/usb/host/xhci-debugfs.h index

Re: [PATCH] usb: xhci: remove unused member 'parent' in xhci_regset struct

2019-01-30 Thread Chunfeng Yun
On Wed, 2019-01-30 at 08:12 +0100, Greg Kroah-Hartman wrote: > On Wed, Jan 30, 2019 at 10:12:21AM +0800, Chunfeng Yun wrote: > > The member @parent of xhci_regset struct is not used in fact, > > so remove it > > > > Change-Id: Ic6727c28f7200782fe4516bcb41c789b427318a2

[PATCH] usb: xhci: remove unused member 'parent' in xhci_regset struct

2019-01-29 Thread Chunfeng Yun
The member @parent of xhci_regset struct is not used in fact, so remove it Change-Id: Ic6727c28f7200782fe4516bcb41c789b427318a2 Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-debugfs.h |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/xhci-debugfs.h b/drivers/usb

[PATCH v2] usb: devio: update max count of DPs per interval for ISOC

2019-01-01 Thread Chunfeng Yun
The failure happened when I tried to send up to 96DPs per an interval for SSP ISOC transations by libusb, this is used to verify SSP ISOC function of USB3 GEN2 controller, so update it as 96DPs. (refer usb3.1r1.0 section 8.12.6 Isochronous Transactions) Signed-off-by: Chunfeng Yun --- v2: update

Re: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-28 Thread Chunfeng Yun
hi, On Sun, 2018-12-23 at 15:13 +, Pawel Laszczak wrote: > This patch introduce new Cadence USBSS DRD driver > to linux kernel. <...> > diff --git a/drivers/usb/cdns3/cdns3-pci-wrap.c > b/drivers/usb/cdns3/cdns3-pci-wrap.c > new file mode 100644 > index ..e93179c45ece > ---

Re: [PATCH] usb: devio: update max count of DPs per interval for ISOC

2018-12-28 Thread Chunfeng Yun
Hi, On Fri, 2018-12-28 at 11:51 +0100, Greg Kroah-Hartman wrote: > On Fri, Dec 28, 2018 at 06:27:44PM +0800, Chunfeng Yun wrote: > > The host shall be able to accept and send up to 96 DPs for > > devices operating at Gen 2 speed. > > Why? What is this keeping from w

[PATCH] usb: devio: update max count of DPs per interval for ISOC

2018-12-28 Thread Chunfeng Yun
The host shall be able to accept and send up to 96 DPs for devices operating at Gen 2 speed. Signed-off-by: Chunfeng Yun --- drivers/usb/core/devio.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index

Re: [V2] usb/mtu3: power down device ip at setup

2018-11-28 Thread Chunfeng Yun
Hi Hsin-Yi, On Wed, 2018-11-28 at 17:29 +0800, Hsin-Yi, Wang wrote: > Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, > so host ip sleep will fail at ssusb_host_disable. > > Power down device ip at ssusb_host_setup. need modify it, not in ssusb_host_setup now > >

Re: [V2] usb/mtu3: power down device ip at setup

2018-11-28 Thread Chunfeng Yun
Hi Hsin-Yi, On Wed, 2018-11-28 at 17:29 +0800, Hsin-Yi, Wang wrote: > Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, > so host ip sleep will fail at ssusb_host_disable. > > Power down device ip at ssusb_host_setup. need modify it, not in ssusb_host_setup now > >

[PATCH 1/2] usb: gadget: composite: fix delayed_status race condition when set_interface

2018-06-22 Thread Chunfeng Yun
It happens when enable debug log, if set_alt() returns USB_GADGET_DELAYED_STATUS and usb_composite_setup_continue() is called before increasing count of @delayed_status, so fix it by using spinlock of @cdev->lock. Signed-off-by: Chunfeng Yun Tested-by: Jay Hsu --- drivers/usb/gad

[PATCH 1/2] usb: gadget: composite: fix delayed_status race condition when set_interface

2018-06-22 Thread Chunfeng Yun
It happens when enable debug log, if set_alt() returns USB_GADGET_DELAYED_STATUS and usb_composite_setup_continue() is called before increasing count of @delayed_status, so fix it by using spinlock of @cdev->lock. Signed-off-by: Chunfeng Yun Tested-by: Jay Hsu --- drivers/usb/gad

[PATCH] usb: gadget: composite: fix delayed_status race condition when set_interface

2018-05-25 Thread Chunfeng Yun
It happens when enable debug log, if set_alt() returns USB_GADGET_DELAYED_STATUS and usb_composite_setup_continue() is called before increasing count of @delayed_status, so fix it by using spinlock of @cdev->lock. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> Tested-by: Jay

[PATCH] usb: gadget: composite: fix delayed_status race condition when set_interface

2018-05-25 Thread Chunfeng Yun
It happens when enable debug log, if set_alt() returns USB_GADGET_DELAYED_STATUS and usb_composite_setup_continue() is called before increasing count of @delayed_status, so fix it by using spinlock of @cdev->lock. Signed-off-by: Chunfeng Yun Tested-by: Jay Hsu --- drivers/usb/gad

[next, PATCH 3/6] usb: mtu3: clear test_mode flag when reset

2018-05-23 Thread Chunfeng Yun
Clear test_mode flag when the gadget is reset by host, otherwise will affect the next test item. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/us

[next, PATCH 4/6] usb: mtu3: avoid sleep in atomic context when enter test mode

2018-05-23 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() instead of readl_poll_timeout() in atomic context Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drive

[next, PATCH 4/6] usb: mtu3: avoid sleep in atomic context when enter test mode

2018-05-23 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() instead of readl_poll_timeout() in atomic context Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c index

[next, PATCH 3/6] usb: mtu3: clear test_mode flag when reset

2018-05-23 Thread Chunfeng Yun
Clear test_mode flag when the gadget is reset by host, otherwise will affect the next test item. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c index de0de01

[next, PATCH 1/6] usb: mtu3: re-enable controller to accept LPM request after LPM resume

2018-05-23 Thread Chunfeng Yun
After the controller receives a LPM request, it will reject the LPM request, and need software to re-enable it after LPM resume if the controller doesn't remote wakeup from L1 automatically Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_core.c | 8 +

[next, PATCH 6/6] usb: mtu3: fix warning of sleep in atomic context in notifier callback

2018-05-23 Thread Chunfeng Yun
The notifier callbacks of extcon are called in atomic context, but the callbacks will call regulator_enable()/regulator_disable() which may sleep caused by mutex, so use work queue to call the sleep functions. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/

[next, PATCH 1/6] usb: mtu3: re-enable controller to accept LPM request after LPM resume

2018-05-23 Thread Chunfeng Yun
After the controller receives a LPM request, it will reject the LPM request, and need software to re-enable it after LPM resume if the controller doesn't remote wakeup from L1 automatically Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 8 +++- 1 file changed, 7 insertions

[next, PATCH 6/6] usb: mtu3: fix warning of sleep in atomic context in notifier callback

2018-05-23 Thread Chunfeng Yun
The notifier callbacks of extcon are called in atomic context, but the callbacks will call regulator_enable()/regulator_disable() which may sleep caused by mutex, so use work queue to call the sleep functions. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h| 11 ++- drivers

[next, PATCH 5/6] usb: mtu3: reset gadget when VBUS_FALL interrupt arises

2018-05-23 Thread Chunfeng Yun
When VBUS_FALL interrupt arises, it means U3 device is disconnected with host, so need reset status of gadget Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/us

[next, PATCH 5/6] usb: mtu3: reset gadget when VBUS_FALL interrupt arises

2018-05-23 Thread Chunfeng Yun
When VBUS_FALL interrupt arises, it means U3 device is disconnected with host, so need reset status of gadget Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3

[next, PATCH 2/6] usb: mtu3: fix uncontinuous SeqN issue after disable EP

2018-05-23 Thread Chunfeng Yun
Reset EP when disable it to reset data toggle for U2 EP, and SeqN, flow control status etc for U3 EP, this can avoid issue of uncontinuous SeqN Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_core.c | 14 -- 1 file changed, 12 insertions

[next, PATCH 2/6] usb: mtu3: fix uncontinuous SeqN issue after disable EP

2018-05-23 Thread Chunfeng Yun
Reset EP when disable it to reset data toggle for U2 EP, and SeqN, flow control status etc for U3 EP, this can avoid issue of uncontinuous SeqN Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git

Add MediaTek XS-PHY driver

2018-05-10 Thread Chunfeng Yun
>From 2ca1243f228633ca9dd96d3e4068af9e2936cd51 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun <chunfeng@mediatek.com> Date: Thu, 10 May 2018 13:55:52 +0800 Subject: [PATCH v3 0/2] Add MediaTek XS-PHY driver This patch series support the SuperSpeedPlus XS-PHY transceiver for US

Add MediaTek XS-PHY driver

2018-05-10 Thread Chunfeng Yun
>From 2ca1243f228633ca9dd96d3e4068af9e2936cd51 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Thu, 10 May 2018 13:55:52 +0800 Subject: [PATCH v3 0/2] Add MediaTek XS-PHY driver This patch series support the SuperSpeedPlus XS-PHY transceiver for USB3.1 GEN2 controller on MediaTek ch

[PATCH v3 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-10 Thread Chunfeng Yun
Add a DT binding documentation of XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/phy/phy-mtk-xsphy.txt | 110 1 file changed, 110 insertions(+) create mode 100644 Documen

[PATCH v3 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-10 Thread Chunfeng Yun
Add a DT binding documentation of XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/phy/phy-mtk-xsphy.txt | 110 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy

[PATCH v3 2/2] phy: mediatek: add XS-PHY driver

2018-05-10 Thread Chunfeng Yun
Support XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/mediatek/Kconfig |9 + drivers/phy/mediatek/Makefile|1 + drivers/phy/mediatek/phy-mtk-xsphy.c | 600 +++

[PATCH v3 2/2] phy: mediatek: add XS-PHY driver

2018-05-10 Thread Chunfeng Yun
Support XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/Kconfig |9 + drivers/phy/mediatek/Makefile|1 + drivers/phy/mediatek/phy-mtk-xsphy.c | 600 ++ 3 files changed, 610

[PATCH v2 5/7] usb: mtu3: make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3

2018-05-09 Thread Chunfeng Yun
In fact the driver depends on EXTCON only when it's configed as USB_MTU3_DUAL_ROLE, so make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v2 5/7] usb: mtu3: make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3

2018-05-09 Thread Chunfeng Yun
In fact the driver depends on EXTCON only when it's configed as USB_MTU3_DUAL_ROLE, so make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/mtu3

[PATCH v2 4/7] usb: mtu3: fix operation failure when test TEST_J/K

2018-05-09 Thread Chunfeng Yun
There is an error dialog popped up in PC when test TEST_J/K by EHSETT tool, due to not waiting for the completion of control transfer. Here fix it by entering test mode after Status Stage finish. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- v2: 1. reset test_mode as d

[PATCH v2 3/7] usb: mtu3: fix an unrecognized issue when connected with PC

2018-05-09 Thread Chunfeng Yun
N register to speed up mode switch. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h| 4 drivers/usb/mtu3/mtu3_dr.c | 25 +++-- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h b/drivers

[PATCH v2 3/7] usb: mtu3: fix an unrecognized issue when connected with PC

2018-05-09 Thread Chunfeng Yun
N register to speed up mode switch. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h| 4 drivers/usb/mtu3/mtu3_dr.c | 25 +++-- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h index 2cd00a

[PATCH v2 4/7] usb: mtu3: fix operation failure when test TEST_J/K

2018-05-09 Thread Chunfeng Yun
There is an error dialog popped up in PC when test TEST_J/K by EHSETT tool, due to not waiting for the completion of control transfer. Here fix it by entering test mode after Status Stage finish. Signed-off-by: Chunfeng Yun --- v2: 1. reset test_mode as default value when controller is reset

[PATCH v2 7/7] usb: mtu3: fix uncontinuous SeqN issue after disable EP

2018-05-09 Thread Chunfeng Yun
Reset EP when disable it to reset data toggle for U2 EP, and SeqN, flow control status etc for U3 EP, this can avoid issue of uncontinuous SeqN Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- v2: add this patch --- drivers/usb/mtu3/mtu3_core.c | 4 1 file chan

[PATCH v2 7/7] usb: mtu3: fix uncontinuous SeqN issue after disable EP

2018-05-09 Thread Chunfeng Yun
Reset EP when disable it to reset data toggle for U2 EP, and SeqN, flow control status etc for U3 EP, this can avoid issue of uncontinuous SeqN Signed-off-by: Chunfeng Yun --- v2: add this patch --- drivers/usb/mtu3/mtu3_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers

[PATCH v2 6/7] usb: mtu3: re-enable controller to accept LPM request after LPM resume

2018-05-09 Thread Chunfeng Yun
After the controller receives a LPM request, it will reject the LPM request, and need software to re-enable it after LPM resume if the controller doesn't remote wakeup from L1 automatically Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- v2: add this patch --- drivers/us

[PATCH v2 1/7] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-09 Thread Chunfeng Yun
The variable of 'count' is declared as u8, this will cause an issue due to value truncated when works in SS or SSP mode and data length is greater than 255, so change it as u32. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file c

[PATCH v2 2/7] usb: mtu3: remove repeated setting of gadget state

2018-05-09 Thread Chunfeng Yun
The usb_add_gadget_udc() will set the gadget state as USB_STATE_NOTATTACHED, so we needn't set it again. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/us

[PATCH v2 1/7] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-09 Thread Chunfeng Yun
The variable of 'count' is declared as u8, this will cause an issue due to value truncated when works in SS or SSP mode and data length is greater than 255, so change it as u32. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 2/7] usb: mtu3: remove repeated setting of gadget state

2018-05-09 Thread Chunfeng Yun
The usb_add_gadget_udc() will set the gadget state as USB_STATE_NOTATTACHED, so we needn't set it again. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3

[PATCH v2 6/7] usb: mtu3: re-enable controller to accept LPM request after LPM resume

2018-05-09 Thread Chunfeng Yun
After the controller receives a LPM request, it will reject the LPM request, and need software to re-enable it after LPM resume if the controller doesn't remote wakeup from L1 automatically Signed-off-by: Chunfeng Yun --- v2: add this patch --- drivers/usb/mtu3/mtu3_core.c | 8 +++- 1

Re: [RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-09 Thread Chunfeng Yun
Hi, Greg On Thu, 2018-05-10 at 10:16 +0800, Chunfeng Yun wrote: > Hi, Greg > >Could you please pick up the series of patches, thanks a lot Please ignore it, I find a problem in [RESEND PATCH 4/5], and need send a new version. Very sorry > > On Sat, 2018-05-05 at 10:21 +080

Re: [RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-09 Thread Chunfeng Yun
Hi, Greg On Thu, 2018-05-10 at 10:16 +0800, Chunfeng Yun wrote: > Hi, Greg > >Could you please pick up the series of patches, thanks a lot Please ignore it, I find a problem in [RESEND PATCH 4/5], and need send a new version. Very sorry > > On Sat, 2018-05-05 at 10:21 +080

Re: [RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-09 Thread Chunfeng Yun
Hi, Greg Could you please pick up the series of patches, thanks a lot On Sat, 2018-05-05 at 10:21 +0800, Chunfeng Yun wrote: > The variable of 'count' is declared as u8, this will cause an issue > due to value truncated when works in SS or SSP mode and data length > is greater tha

Re: [RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-09 Thread Chunfeng Yun
Hi, Greg Could you please pick up the series of patches, thanks a lot On Sat, 2018-05-05 at 10:21 +0800, Chunfeng Yun wrote: > The variable of 'count' is declared as u8, this will cause an issue > due to value truncated when works in SS or SSP mode and data length > is greater tha

Re: [PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-09 Thread Chunfeng Yun
Hi, On Wed, 2018-05-09 at 14:33 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun <chunfeng@mediatek.com> writes: > > The USB3CV version 2.1.80 (March 26, 2018) requires all devices > > ( gen1, gen2, single lane, dual lane) to return the value of 0x0

Re: [PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-09 Thread Chunfeng Yun
Hi, On Wed, 2018-05-09 at 14:33 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > > The USB3CV version 2.1.80 (March 26, 2018) requires all devices > > ( gen1, gen2, single lane, dual lane) to return the value of 0x0320 > > in the bcdUSB field > > thi

[PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-09 Thread Chunfeng Yun
The USB3CV version 2.1.80 (March 26, 2018) requires all devices ( gen1, gen2, single lane, dual lane) to return the value of 0x0320 in the bcdUSB field Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-09 Thread Chunfeng Yun
The USB3CV version 2.1.80 (March 26, 2018) requires all devices ( gen1, gen2, single lane, dual lane) to return the value of 0x0320 in the bcdUSB field Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb

Re: [PATCH v2 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-07 Thread Chunfeng Yun
On Mon, 2018-05-07 at 12:04 -0500, Rob Herring wrote: > On Sat, May 05, 2018 at 10:15:05AM +0800, Chunfeng Yun wrote: > > Add a DT binding documentation of XS-PHY for MediaTek SoCs > > with USB3.1 GEN2 controller > > > > Signed-off-by: Chunfeng Yun

Re: [PATCH v2 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-07 Thread Chunfeng Yun
On Mon, 2018-05-07 at 12:04 -0500, Rob Herring wrote: > On Sat, May 05, 2018 at 10:15:05AM +0800, Chunfeng Yun wrote: > > Add a DT binding documentation of XS-PHY for MediaTek SoCs > > with USB3.1 GEN2 controller > > > > Signed-off-by: Chunfeng Yun > > --- >

[RESEND PATCH 5/5] usb: mtu3: make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3

2018-05-04 Thread Chunfeng Yun
In fact the driver depends on EXTCON only when it's configed as USB_MTU3_DUAL_ROLE, so make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-04 Thread Chunfeng Yun
The variable of 'count' is declared as u8, this will cause an issue due to value truncated when works in SS or SSP mode and data length is greater than 255, so change it as u32. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file c

[RESEND PATCH 4/5] usb: mtu3: fix operation failure when test TEST_J/K

2018-05-04 Thread Chunfeng Yun
There is an error dialog popped up in PC when test TEST_J/K by EHSETT tool, due to not waiting for the completion of control transfer. Here fix it by entering test mode after Status Stage finish. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget_ep0.

[RESEND PATCH 5/5] usb: mtu3: make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3

2018-05-04 Thread Chunfeng Yun
In fact the driver depends on EXTCON only when it's configed as USB_MTU3_DUAL_ROLE, so make USB_MTU3_DUAL_ROLE depend on EXTCON but not USB_MTU3. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/mtu3

[RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode

2018-05-04 Thread Chunfeng Yun
The variable of 'count' is declared as u8, this will cause an issue due to value truncated when works in SS or SSP mode and data length is greater than 255, so change it as u32. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[RESEND PATCH 4/5] usb: mtu3: fix operation failure when test TEST_J/K

2018-05-04 Thread Chunfeng Yun
There is an error dialog popped up in PC when test TEST_J/K by EHSETT tool, due to not waiting for the completion of control transfer. Here fix it by entering test mode after Status Stage finish. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 10 ++ 1 file changed

[RESEND PATCH 3/5] usb: mtu3: fix an unrecognized issue when connected with PC

2018-05-04 Thread Chunfeng Yun
N register to speed up mode switch. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h| 4 drivers/usb/mtu3/mtu3_dr.c | 25 +++-- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h b/drivers

[RESEND PATCH 3/5] usb: mtu3: fix an unrecognized issue when connected with PC

2018-05-04 Thread Chunfeng Yun
N register to speed up mode switch. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h| 4 drivers/usb/mtu3/mtu3_dr.c | 25 +++-- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h index 2cd00a

[RESEND PATCH 2/5] usb: mtu3: remove repeated setting of gadget state

2018-05-04 Thread Chunfeng Yun
The usb_add_gadget_udc() will set the gadget state as USB_STATE_NOTATTACHED, so we needn't set it again. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/us

[RESEND PATCH 2/5] usb: mtu3: remove repeated setting of gadget state

2018-05-04 Thread Chunfeng Yun
The usb_add_gadget_udc() will set the gadget state as USB_STATE_NOTATTACHED, so we needn't set it again. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3

[PATCH v2 2/2] phy: mediatek: add XS-PHY driver

2018-05-04 Thread Chunfeng Yun
Support XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/mediatek/Kconfig |9 + drivers/phy/mediatek/Makefile|1 + drivers/phy/mediatek/phy-mtk-xsphy.c | 600 +++

[PATCH v2 2/2] phy: mediatek: add XS-PHY driver

2018-05-04 Thread Chunfeng Yun
Support XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/Kconfig |9 + drivers/phy/mediatek/Makefile|1 + drivers/phy/mediatek/phy-mtk-xsphy.c | 600 ++ 3 files changed, 610

[PATCH v2 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-04 Thread Chunfeng Yun
Add a DT binding documentation of XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/phy/phy-mtk-xsphy.txt | 110 1 file changed, 110 insertions(+) create mode 100644 Documen

[PATCH v2 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-04 Thread Chunfeng Yun
Add a DT binding documentation of XS-PHY for MediaTek SoCs with USB3.1 GEN2 controller Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/phy/phy-mtk-xsphy.txt | 110 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy

[PATCH v2 0/2] Add MediaTek XS-PHY driver

2018-05-04 Thread Chunfeng Yun
>From a0814ad7725587a06d273997e0fdf5161f916fd8 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun <chunfeng@mediatek.com> Date: Sat, 5 May 2018 09:56:59 +0800 Subject: [PATCH v2 0/2] Add MediaTek XS-PHY driver This patch series support the SuperSpeedPlus XS-PHY transceiver for USB3.1 GEN2 c

[PATCH v2 0/2] Add MediaTek XS-PHY driver

2018-05-04 Thread Chunfeng Yun
>From a0814ad7725587a06d273997e0fdf5161f916fd8 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Sat, 5 May 2018 09:56:59 +0800 Subject: [PATCH v2 0/2] Add MediaTek XS-PHY driver This patch series support the SuperSpeedPlus XS-PHY transceiver for USB3.1 GEN2 controller on MediaTek ch

[PATCH v2] phy: phy-mtk-tphy: use SPDX license tag

2018-05-04 Thread Chunfeng Yun
Use SPDX-License-Identifier tag instead of the GPL license text Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- v2: change subject line to fix checkpatch warning: "A patch subject line should describe the change not the tool that found it" --- drivers/phy/m

[PATCH v2] phy: phy-mtk-tphy: use SPDX license tag

2018-05-04 Thread Chunfeng Yun
Use SPDX-License-Identifier tag instead of the GPL license text Signed-off-by: Chunfeng Yun --- v2: change subject line to fix checkpatch warning: "A patch subject line should describe the change not the tool that found it" --- drivers/phy/mediatek/Makefile | 1 + d

Re: [PATCH 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-02 Thread Chunfeng Yun
On Wed, 2018-05-02 at 07:41 -0500, Rob Herring wrote: > On Wed, May 2, 2018 at 2:04 AM, Chunfeng Yun <chunfeng@mediatek.com> > wrote: > > Hi Rob, > > On Tue, 2018-05-01 at 09:24 -0500, Rob Herring wrote: > >> On Wed, Apr 25, 2018 at 03:45:28PM +0800, Ch

Re: [PATCH 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-02 Thread Chunfeng Yun
On Wed, 2018-05-02 at 07:41 -0500, Rob Herring wrote: > On Wed, May 2, 2018 at 2:04 AM, Chunfeng Yun > wrote: > > Hi Rob, > > On Tue, 2018-05-01 at 09:24 -0500, Rob Herring wrote: > >> On Wed, Apr 25, 2018 at 03:45:28PM +0800, Chunfeng Yun wrote: > >> > A

Re: [PATCH 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-02 Thread Chunfeng Yun
Hi Rob, On Tue, 2018-05-01 at 09:24 -0500, Rob Herring wrote: > On Wed, Apr 25, 2018 at 03:45:28PM +0800, Chunfeng Yun wrote: > > Add a DT binding documentation of XS-PHY for MediaTek SoCs > > with USB3.1 GEN2 controller > > > > Signed-off-by: Chunfeng Yun

Re: [PATCH 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-02 Thread Chunfeng Yun
Hi Rob, On Tue, 2018-05-01 at 09:24 -0500, Rob Herring wrote: > On Wed, Apr 25, 2018 at 03:45:28PM +0800, Chunfeng Yun wrote: > > Add a DT binding documentation of XS-PHY for MediaTek SoCs > > with USB3.1 GEN2 controller > > > > Signed-off-by: Chunfeng Yun > >

<    4   5   6   7   8   9   10   11   12   13   >