[PATCH 2/2] MAINTAINERS: add entry for mediatek usb3 DRD IP driver

2017-08-03 Thread Chunfeng Yun
Add myself as maintainer of MediaTek USB3 DRD IP driver Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- MAINTAINERS |7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 205d397..0f0bcc7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -

[PATCH 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-03 Thread Chunfeng Yun
add support for PCIe and SATA, also add some new compatibles. due to phy-mt65xx-usb.txt holds the bindings for all mediatek SoCs with T-PHY controller, change the name to phy-mtk-tphy.txt to reflect that. Change-Id: I2d9200d4c8768dc301a4c116fe0e9b8179d5911c Signed-off-by: Chunfeng Yun <chunf

[PATCH 1/4] phy: phy-mt65xx-usb3: add PCIe PHY support

2017-08-03 Thread Chunfeng Yun
From: Ryder Lee <ryder@mediatek.com> This patch adds PCIe PHY setting part. Signed-off-by: Ryder Lee <ryder@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/phy-mt65xx-usb3.c | 220 + 1

[PATCH 3/4] phy: phy-mt65xx-usb3: add mediatek directory and rename file

2017-08-03 Thread Chunfeng Yun
functions and also enhance readability. And also update MAINTAINERS file to reflect the correct driver Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- MAINTAINERS|2 +- drivers/phy/Kconfig|9 +- d

[PATCH 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-03 Thread Chunfeng Yun
add support for PCIe and SATA, also add some new compatibles. due to phy-mt65xx-usb.txt holds the bindings for all mediatek SoCs with T-PHY controller, change the name to phy-mtk-tphy.txt to reflect that. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../phy/{phy-mt65xx-u

[PATCH 2/4] phy: phy-mt65xx-usb3: add SATA PHY support

2017-08-03 Thread Chunfeng Yun
From: Ryder Lee <ryder@mediatek.com> This patch adds SATA setting part. Signed-off-by: Ryder Lee <ryder@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/phy-mt65xx-usb3.c | 133 +++-- 1

Re: [PATCH 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-03 Thread Chunfeng Yun
hi, I made a mistake, please ignore the patches with Change-Id, very sorry On Thu, 2017-08-03 at 18:01 +0800, Chunfeng Yun wrote: > add support for PCIe and SATA, also add some new compatibles. > > due to phy-mt65xx-usb.txt holds the bindings for all mediatek SoCs > with T-PH

Re: [PATCH 2/2] MAINTAINERS: add entry for mediatek usb3 DRD IP driver

2017-08-03 Thread Chunfeng Yun
On Thu, 2017-08-03 at 12:23 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun <chunfeng@mediatek.com> writes: > > Add myself as maintainer of MediaTek USB3 DRD IP driver > > > > Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> > > --- > &

[PATCH 3/4] phy: phy-mt65xx-usb3: add mediatek directory and rename file

2017-08-03 Thread Chunfeng Yun
functions and also enhance readability. And also update MAINTAINERS file to reflect the correct driver Change-Id: I7ee75bde25306d017436099c59cf9088df4ea37f Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- MAINTAINERS |2 +- drivers/phy/K

[PATCH 1/4] phy: phy-mt65xx-usb3: add PCIe PHY support

2017-08-03 Thread Chunfeng Yun
From: Ryder Lee <ryder@mediatek.com> This patch adds PCIe PHY setting part. Change-Id: I112cbcdafd3deecf2c0ad17bafc8c784e1730ec4 Signed-off-by: Ryder Lee <ryder@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/phy-mt

[PATCH 2/4] phy: phy-mt65xx-usb3: add SATA PHY support

2017-08-03 Thread Chunfeng Yun
From: Ryder Lee <ryder@mediatek.com> This patch adds SATA setting part. Change-Id: Icb1fc15ebe9f6172c56a46d40c359c7cff922976 Signed-off-by: Ryder Lee <ryder@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/phy-mt

Re: [PATCH 1/2] usb: mtu3: add a vbus debugfs interface

2017-08-03 Thread Chunfeng Yun
On Thu, 2017-08-03 at 09:01 -0700, Greg Kroah-Hartman wrote: > On Thu, Aug 03, 2017 at 09:00:57AM -0700, Greg Kroah-Hartman wrote: > > On Thu, Aug 03, 2017 at 04:37:18PM +0800, Chunfeng Yun wrote: > > > +static ssize_t ssusb_vbus_write(struct file *file, > > > + cons

[PATCH v2 2/2] MAINTAINERS: add entry for mediatek usb3 DRD IP driver

2017-08-03 Thread Chunfeng Yun
Add myself as maintainer of MediaTek USB3 DRD IP driver Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- MAINTAINERS |8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 205d397..0cf5e31 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -

[PATCH v2 1/2] usb: mtu3: add a vbus debugfs interface

2017-08-03 Thread Chunfeng Yun
Provides a new vbus debugfs interface used to turn on/off vbus regulator, it also can be used to get/put reference count of vbus, due to sometimes we need keep it alive when manually switch mtu3 to device mode. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/us

[PATCH v2 4/4] dt-bindings: mt8173-xhci: add generic compatible and rename file

2017-08-16 Thread Chunfeng Yun
The mt8173-xhci.txt actually holds the bindings for all mediatek SoCs with xHCI controller, so add a generic compatible and change the name to mediatek,mtk-xhci.txt to reflect that. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../usb/{mt8173-xhci.txt => mediatek,mtk

[PATCH v2 3/4] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-16 Thread Chunfeng Yun
The mt8173-mtu3.txt actually holds the bindings for all mediatek SoCs with usb3 DRD IP, so add a generic compatible and change the name to mediatek,mtu3.txt. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../usb/{mt8173-mtu3.txt => mediatek,mtu3.txt} |6 +

[PATCH v2 2/4] usb: xhci-mtk: add generic compatible string

2017-08-16 Thread Chunfeng Yun
The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |1 +

[PATCH v2 1/4] usb: mtu3: add generic compatible string

2017-08-16 Thread Chunfeng Yun
The mtu3 driver is a generic driver for MediaTek usb3 DRD IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_plat.c

Re: [PATCH 3/4] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-14 Thread Chunfeng Yun
On Mon, 2017-08-14 at 13:23 +0200, Matthias Brugger wrote: > > On 08/11/2017 09:00 AM, Chunfeng Yun wrote: > > On Thu, 2017-08-10 at 21:54 -0500, Rob Herring wrote: > >> On Tue, Aug 08, 2017 at 01:42:51PM +0800, Chunfeng Yun wrote: > >>> The mt8173-mtu3.txt ac

Re: [PATCH 4/4] dt-bindings: mt8173-xhci: add generic compatible and rename file

2017-08-11 Thread Chunfeng Yun
On Thu, 2017-08-10 at 21:56 -0500, Rob Herring wrote: > On Tue, Aug 08, 2017 at 01:42:52PM +0800, Chunfeng Yun wrote: > > The mt8173-xhci.txt actually holds the bindings for all mediatek > > SoCs with xHCI controller, so add a generic compatible and change > > the name to xh

Re: [PATCH 3/4] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-11 Thread Chunfeng Yun
On Thu, 2017-08-10 at 21:54 -0500, Rob Herring wrote: > On Tue, Aug 08, 2017 at 01:42:51PM +0800, Chunfeng Yun wrote: > > The mt8173-mtu3.txt actually holds the bindings for all mediatek > > SoCs with usb3 DRD IP, so add a generic compatible and change the > > name to mtu3.txt

Re: [RFCv2 usb-next 0/3] initialize (multiple) PHYs in xhci-plat

2017-07-17 Thread Chunfeng Yun
Hi, On Sat, 2017-07-15 at 14:11 +0200, Martin Blumenstingl wrote: > Hi, > > On Sat, Jul 15, 2017 at 11:33 AM, Chunfeng Yun > <chunfeng@mediatek.com> wrote: > > Hi Martin, > > > > On Thu, 2017-07-13 at 12:59 +0200, Martin Blumenstingl wrote: > >&g

Re: [RFCv2 usb-next 0/3] initialize (multiple) PHYs in xhci-plat

2017-07-15 Thread Chunfeng Yun
Hi Martin, On Thu, 2017-07-13 at 12:59 +0200, Martin Blumenstingl wrote: > This series is the outcome of a discussion with Felipe Balbi, > see [0] and [1]. > The quick-summary of this is: > - dwc3 already takes one USB2 and one USB3 PHY and initializes these > correct > - some other HCI

Re: [RFCv2 usb-next 0/3] initialize (multiple) PHYs in xhci-plat

2017-07-17 Thread Chunfeng Yun
Hi, On Mon, 2017-07-17 at 11:27 +0200, Martin Blumenstingl wrote: > Hi, > > On Mon, Jul 17, 2017 at 9:21 AM, Chunfeng Yun <chunfeng@mediatek.com> > wrote: > > Hi, > > On Sat, 2017-07-15 at 14:11 +0200, Martin Blumenstingl wrote: > >> Hi, > >>

Re: [RFCv2 usb-next 0/3] initialize (multiple) PHYs in xhci-plat

2017-07-18 Thread Chunfeng Yun
On Tue, 2017-07-18 at 10:19 +0200, Martin Blumenstingl wrote: > Hi, > > On Tue, Jul 18, 2017 at 3:40 AM, Chunfeng Yun <chunfeng@mediatek.com> > wrote: > > Hi, > > On Mon, 2017-07-17 at 11:27 +0200, Martin Blumenstingl wrote: > >> Hi, > >> &g

[PATCH 1/3] usb: mtu3: handle delayed status of the control transfer

2017-07-25 Thread Chunfeng Yun
with very low cpu frequency. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h|2 ++ drivers/usb/mtu3/mtu3_gadget.c |2 ++ drivers/usb/mtu3/mtu3_gadget_ep0.c | 23 --- 3 files changed, 24 insertions(+), 3 del

[PATCH 2/3] usb: mtu3: clear u1/u2_enable to 0 in mtu3_gadget_reset

2017-07-25 Thread Chunfeng Yun
when the device is reset by host, the status of u1_enable and u2_enable should also be restored to default value. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_gadget.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/mtu3/mtu3_gadg

[PATCH 3/3] usb: mtu3: fix ip sleep auto-exit issue when enable DRD mode

2017-07-25 Thread Chunfeng Yun
Ip sleep will auto exit if vbus comparison circuit of u2 phy is disabled when system tries to enter suspend mode, so get vbus-valid status from mac but not from u2 phy when enable DRD mode to fix the issue. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/us

Re: [RFCv2 usb-next 2/3] usb: host: add a generic platform USB roothub driver

2017-07-25 Thread Chunfeng Yun
On Thu, 2017-07-13 at 12:59 +0200, Martin Blumenstingl wrote: > Many SoC platforms have separate devices for the USB PHY which are > registered through the generic PHY framework. These PHYs have to be > enabled to make the USB controller actually work. They also have to be > disabled again on

Re: usb usb4-port2: cannot disable (err = -32)

2017-04-27 Thread Chunfeng Yun
Hi, This is introduced by patch in core/hub.c: "3bc02bc usb: hub: Move hub_port_disable() to fix warning if PM is disabled" When plug out a device, it try to set port to U3 state, but the port is disabled before. But I don't know how to fix it properly On Thu, 2017-04-27 at 18:13 -0300,

[PATCH 2/4] usb: xhci-mtk: add generic compatible string

2017-08-07 Thread Chunfeng Yun
The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |1 +

[PATCH 3/4] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-07 Thread Chunfeng Yun
The mt8173-mtu3.txt actually holds the bindings for all mediatek SoCs with usb3 DRD IP, so add a generic compatible and change the name to mtu3.txt. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../bindings/usb/{mt8173-mtu3.txt => mtu3.txt} |6 -- 1 file c

[PATCH 4/4] dt-bindings: mt8173-xhci: add generic compatible and rename file

2017-08-07 Thread Chunfeng Yun
The mt8173-xhci.txt actually holds the bindings for all mediatek SoCs with xHCI controller, so add a generic compatible and change the name to xhci-mtk.txt to reflect that. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../bindings/usb/{mt8173-xhci.txt => xhci-mtk.tx

[PATCH 1/4] usb: mtu3: add generic compatible string

2017-08-07 Thread Chunfeng Yun
The mtu3 driver is a generic driver for MediaTek usb3 DRD IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_plat.c

[PATCH v2 3/4] phy: phy-mt65xx-usb3: add mediatek directory and rename file

2017-08-08 Thread Chunfeng Yun
functions and also enhance readability. And also update MAINTAINERS file to reflect the correct driver Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- MAINTAINERS| 2 +- drivers/phy/Kconfig| 9 +- drive

[PATCH v2 2/4] phy: phy-mt65xx-usb3: add SATA PHY support

2017-08-08 Thread Chunfeng Yun
From: Ryder Lee <ryder@mediatek.com> This patch adds SATA setting part. Signed-off-by: Ryder Lee <ryder@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/phy-mt65xx-usb3.c | 133 -- 1

[PATCH v2 1/4] phy: phy-mt65xx-usb3: add PCIe PHY support

2017-08-08 Thread Chunfeng Yun
From: Ryder Lee <ryder@mediatek.com> This patch adds PCIe PHY setting part. Signed-off-by: Ryder Lee <ryder@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/phy-mt65xx-usb3.c | 228 ++ 1

[PATCH v2 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-08 Thread Chunfeng Yun
add support for PCIe and SATA, also add some new compatibles. due to phy-mt65xx-usb.txt holds the bindings for all mediatek SoCs with T-PHY controller, change the name to phy-mtk-tphy.txt to reflect that. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../phy/{phy-mt65xx-u

Re: [PATCH 4/4] dt-bindings: phy-mt65xx-usb: supports PCIe, SATA and rename file

2017-08-08 Thread Chunfeng Yun
On Tue, 2017-08-08 at 17:44 +0530, Kishon Vijay Abraham I wrote: > Chunfeng > > On Thursday 03 August 2017 03:50 PM, Chunfeng Yun wrote: > > hi, > > > > I made a mistake, please ignore the patches with Change-Id, very sorry > > No problem. However can you r

Re: [RFCv3 usb-next 2/3] usb: host: add a generic platform USB roothub driver

2017-08-17 Thread Chunfeng Yun
+++ > drivers/usb/host/platform-roothub.h | 12 +++ > 4 files changed, 197 insertions(+) > create mode 100644 drivers/usb/host/platform-roothub.c > create mode 100644 drivers/usb/host/platform-roothub.h > Tested-by: Chunfeng Yun<chunfeng@mediatek.com

Re: [PATCH v2 2/4] usb: xhci-mtk: add generic compatible string

2017-08-22 Thread Chunfeng Yun
Hi, Mathias On Wed, 2017-08-16 at 14:08 +0800, Chunfeng Yun wrote: > The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add > a generic compatible to avoid confusion when support new SoCs but > use a compatible with specific SoC's name "mt8173". > > Si

Re: [PATCH] usb: mtu3: cleanup with list_first_entry_or_null()

2017-05-21 Thread Chunfeng Yun
Hi, On Sat, 2017-05-20 at 21:19 +0200, Greg Kroah-Hartman wrote: > On Sun, May 21, 2017 at 02:05:31AM +0900, Masahiro Yamada wrote: > > The combo of list_empty() and list_first_entry() can be replaced with > > list_first_entry_or_null(). > > > > Signed-off-by: Masahiro Yamada

[PATCH RESEND 2/2] phy: phy-mtk-tphy: add set_mode callback

2017-09-21 Thread Chunfeng Yun
This is used to force PHY with USB OTG function to enter a specific mode, and override OTG IDPIN(or IDDIG) signal. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++ 1 file changed, 39 insertions(+)

[PATCH RESEND 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank

2017-09-21 Thread Chunfeng Yun
Chip bank of version-1 is initialized as NULL, but it's used by pcie_phy_instance_power_on/off(), so assign it a right address. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/mediatek/phy-mtk-tphy.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [PATCH RESEND 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank

2017-09-21 Thread Chunfeng Yun
On Thu, 2017-09-21 at 16:23 +0530, Kishon Vijay Abraham I wrote: > > On Thursday 21 September 2017 04:01 PM, Chunfeng Yun wrote: > > Chip bank of version-1 is initialized as NULL, but it's used > > by pcie_phy_instance_power_on/off(), so assign it a right > > a

Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config

2017-10-15 Thread Chunfeng Yun
On Fri, 2017-10-13 at 13:32 +0300, Mathias Nyman wrote: > On 13.10.2017 11:26, Chunfeng Yun wrote: > > Due to all MediaTek SoCs with xHCI host controller use this > > driver, remove limitation for specific SoCs > > > > Signed-off-by: Chunfeng Yun <chunfeng@mediate

Re: [balbi-usb:testing/next 34/43] drivers/usb/mtu3/mtu3_qmu.c:261:2: note: in expansion of macro 'dev_dbg'

2017-10-17 Thread Chunfeng Yun
On Tue, 2017-10-17 at 12:37 +0300, Felipe Balbi wrote: > Hi, > > kbuild test robot writes: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git > > testing/next > > head: 39325b9a22301178ef684effade7c8bce04b5246 > > commit:

Re: [balbi-usb:testing/next 34/43] drivers/usb/mtu3/mtu3_qmu.c:261:2: note: in expansion of macro 'dev_dbg'

2017-10-17 Thread Chunfeng Yun
On Tue, 2017-10-17 at 12:37 +0300, Felipe Balbi wrote: > Hi, > > kbuild test robot writes: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git > > testing/next > > head: 39325b9a22301178ef684effade7c8bce04b5246 > > commit:

[PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks

2017-10-13 Thread Chunfeng Yun
There are mcu_bus and dma_bus clocks needed to be controlled by driver on some SoCs, so add them as optional ones Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c | 79 --- drivers/usb/host/xhci-mtk.h |2

[PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function

2017-10-13 Thread Chunfeng Yun
This patch uses the simpler dma_set_mask_and_coherent() instead of doing these as separate steps Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-m

[PATCH v2 3/9] usb: xhci-mtk: check clock stability of U3_MAC

2017-10-13 Thread Chunfeng Yun
This is useful to find out the root cause when the Super Speed doesn't work. Such as when the T-PHY is switched to PCIe or SATA, and affects Super Speed function, the check will fail. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |4

[PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones

2017-10-13 Thread Chunfeng Yun
Remove dummy clocks for usb wakeup and add optional ones for MCU_BUS_CK and DMA_BUS_CK. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 -- 1 file changed,

[PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks

2017-10-13 Thread Chunfeng Yun
The wakeup debounce clocks for each ports in fact are not needed, so remove them. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c | 33 - drivers/usb/host/xhci-mtk.h |2 -- 2 files changed, 35 deletions(-) diff

[PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init()

2017-10-13 Thread Chunfeng Yun
Make use of ports count from xhci but not from ippc in xhci_mtk_sch_init() Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk-sch.c |3 ++- drivers/usb/host/xhci-mtk.c |3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/d

[PATCH v2 4/9] usb: xhci-mtk: support option to disable usb3 ports

2017-10-13 Thread Chunfeng Yun
Add support to disable specific usb3 ports, it's useful when usb3 phy is shared with PCIe or SATA, because we should disable the corresponding usb3 port if the phy is used by PCIe or SATA. Sometimes it's helpful to analyse and solve problems. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.

[PATCH v2 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports

2017-10-13 Thread Chunfeng Yun
Add a new optional property to disable u3ports Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtk-xhci.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documen

[PATCH v2 7/9] usb: host: modify description for MTK xHCI config

2017-10-13 Thread Chunfeng Yun
Due to all MediaTek SoCs with xHCI host controller use this driver, remove limitation for specific SoCs Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/Kconfig |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/Kco

[PATCH v2 12/13] dt-bindings: usb: mtu3: remove dummy clocks and add optional ones

2017-10-13 Thread Chunfeng Yun
Remove dummy clocks for usb wakeup and add optional ones for mcu_bus and dma_bus bus. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtu3.txt | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Documen

[PATCH v2 11/13] dt-bindings: usb: mtu3: add a optional property to disable u3ports

2017-10-13 Thread Chunfeng Yun
Add a new optional property to disable u3ports Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtu3.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documen

[PATCH v2 05/13] usb: mtu3: support 36-bit DMA address

2017-10-13 Thread Chunfeng Yun
add support for 36-bit DMA address Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h | 17 ++- drivers/usb/mtu3/mtu3_core.c| 34 - drivers/usb/mtu3/mtu3_hw_regs.h | 10 drivers/usb/mtu3/mtu3_qmu.c

[PATCH v2 06/13] usb: mtu3: use FORCE/RG_IDDIG to implement manual DRD switch

2017-10-13 Thread Chunfeng Yun
In order to keep manual DRD switch independent on IDDIG interrupt, make use of FORCE/RG_IDDIG instead of IDDIG EINT interrupt to implement manual DRD switch function. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h | 18 drivers/us

[PATCH v2 10/13] usb: mtu3: set otg_sel for u2port only if works as dual-role mode

2017-10-13 Thread Chunfeng Yun
of detection by host. So set it only for dual-role mode. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_core.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c index 67f7a30..7

[PATCH v2 07/13] usb: mtu3: add support for usb3.1 IP

2017-10-13 Thread Chunfeng Yun
Support SuperSpeedPlus for usb3.1 device IP Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h|1 + drivers/usb/mtu3/mtu3_core.c | 14 +++--- drivers/usb/mtu3/mtu3_gadget.c |3 ++- drivers/usb/mtu3/mtu3_gadget_ep0.c

[PATCH v2 13/13] dt-bindings: usb: mtu3: remove optional pinctrls

2017-10-13 Thread Chunfeng Yun
Remove optional pinctrls due to using FORCE/RG_IDDIG to implement manual switch function. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtu3.txt |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documen

[PATCH v2 09/13] usb: mtu3: set invalid dr_mode as dual-role mode

2017-10-13 Thread Chunfeng Yun
Treat dr_mode of USB_DR_MODE_UNKNOWN as USB_DR_MODE_OTG to enhance functional robustness. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_plat.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_plat.c b/d

[PATCH v2 08/13] usb: mtu3: get optional vbus for host only mode

2017-10-13 Thread Chunfeng Yun
When dr_mode is set as USB_DR_MODE_HOST, it's better to try to get optional vbus, this can increase flexibility, although we can set vbus as always on for regulator or put it in host driver to turn it on. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_

[PATCH v2 01/13] usb: mtu3: fix error return code in ssusb_gadget_init()

2017-10-13 Thread Chunfeng Yun
When failing to get IRQ number, platform_get_irq() may return -EPROBE_DEFER, but we ignore it and always return -ENODEV, so fix it. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2 04/13] usb: mtu3: add optional mcu and dma bus clocks

2017-10-13 Thread Chunfeng Yun
There are mcu_bus and dma_bus clocks needed to be turned on/off by driver on some SoCs, so add them as optional ones Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h |5 ++ drivers/usb/mtu3/mtu3_plat.c

[PATCH v2 02/13] usb: mtu3: support option to disable usb3 ports

2017-10-13 Thread Chunfeng Yun
Add support to disable specific usb3 ports, it's useful when usb3 phy is shared with PCIe or SATA, because we should disable the corresponding usb3 port if the phy is used by PCIe or SATA. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h

[PATCH v2 03/13] usb: mtu3: remove dummy wakeup debounce clocks

2017-10-13 Thread Chunfeng Yun
The wakeup debounce clocks for each ports in fact are not needed, so remove them. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h |4 --- drivers/usb/mtu3/mtu3_host.c | 57 +++--- 2 files changed, 4 inse

Re: [PATCH 07/12] usb: mtu3: add support for usb3.1 IP

2017-09-29 Thread Chunfeng Yun
On Thu, 2017-09-28 at 08:17 +0800, Chunfeng Yun wrote: > Support SuperSpeedPlus for usb3.1 device IP > > Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> > --- > drivers/usb/mtu3/mtu3.h|1 + > drivers/usb/mtu3/mtu3_core.c | 14 ++

[PATCH 11/12] dt-bindings: usb: mtu3: remove dummy clocks and add optional ones

2017-09-27 Thread Chunfeng Yun
Remove dummy clocks for usb wakeup and add optional ones for mcu_bus and dma_bus bus. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtu3.txt | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Documen

[PATCH 12/12] dt-bindings: usb: mtu3: remove optional pinctrls

2017-09-27 Thread Chunfeng Yun
Remove optional pinctrls due to using FORCE/RG_IDDIG to implement manual switch function. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtu3.txt |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documen

[PATCH 10/12] dt-bindings: usb: mtu3: add a optional property to disable u3ports

2017-09-27 Thread Chunfeng Yun
Add a new optional property to disable u3ports Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtu3.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documen

[PATCH next 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank

2017-08-22 Thread Chunfeng Yun
Chip bank of version-1 is initialized as NULL, but it's used by pcie_phy_instance_power_on/off(), so assign it a right address. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/mediatek/phy-mtk-tphy.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH next 2/2] phy: phy-mtk-tphy: add set_mode callback

2017-08-22 Thread Chunfeng Yun
This is used to force PHY with USB OTG function to enter a specific mode, and override OTG VBUS and ID signals. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++ 1 file changed, 39 insertions(+) diff

[PATCH RESEND v2 1/3] usb: xhci-mtk: add generic compatible string

2017-08-29 Thread Chunfeng Yun
The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |1 +

[PATCH RESEND v2 2/3] dt-bindings: mt8173-xhci: add generic compatible and rename file

2017-08-29 Thread Chunfeng Yun
The mt8173-xhci.txt actually holds the bindings for all mediatek SoCs with xHCI controller, so add a generic compatible and change the name to mediatek,mtk-xhci.txt to reflect that. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../usb/{mt8173-xhci.txt => mediatek,mtk

[PATCH RESEND v2 3/3] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-29 Thread Chunfeng Yun
The mt8173-mtu3.txt actually holds the bindings for all mediatek SoCs with usb3 DRD IP, so add a generic compatible and change the name to mediatek,mtu3.txt. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> Acked-by: Rob Herring <r...@kernel.org> --- .../usb/{mt8173-mtu3.txt

[PATCH v3 1/3] usb: xhci-mtk: add generic compatible string

2017-08-30 Thread Chunfeng Yun
The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |1 +

[PATCH v3 2/3] dt-bindings: mt8173-xhci: add generic compatible and rename file

2017-08-30 Thread Chunfeng Yun
The mt8173-xhci.txt actually holds the bindings for all mediatek SoCs with xHCI controller, so add a generic compatible and change the name to mediatek,mtk-xhci.txt to reflect that. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../usb/{mt8173-xhci.txt => mediatek,mtk

[PATCH v3 3/3] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-30 Thread Chunfeng Yun
The mt8173-mtu3.txt actually holds the bindings for all mediatek SoCs with usb3 DRD IP, so add a generic compatible and change the name to mediatek,mtu3.txt. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> Acked-by: Rob Herring <r...@kernel.org> --- .../usb/{mt8173-mtu3.txt

Re: [PATCH RESEND v2 3/3] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-29 Thread Chunfeng Yun
On Tue, 2017-08-29 at 13:08 +0300, Sergei Shtylyov wrote: > Hello! > > On 8/29/2017 12:20 PM, Chunfeng Yun wrote: > > > The mt8173-mtu3.txt actually holds the bindings for all mediatek > > SoCs with usb3 DRD IP, so add a generic compatible and change the >

Re: [PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init()

2017-10-08 Thread Chunfeng Yun
On Sat, 2017-09-30 at 16:00 +0300, Sergei Shtylyov wrote: > Hello! > > On 9/28/2017 3:17 AM, Chunfeng Yun wrote: > > > When fail to get irq number, platform_get_irq() may return > > Failing. IRQ. :-) I'll modify it, thank you > > > -EPROBE_DEFER, but we ig

Re: [PATCH 10/12] dt-bindings: usb: mtu3: add a optional property to disable u3ports

2017-10-08 Thread Chunfeng Yun
On Thu, 2017-10-05 at 17:31 -0500, Rob Herring wrote: > On Thu, Sep 28, 2017 at 08:17:18AM +0800, Chunfeng Yun wrote: > > Add a new optional property to disable u3ports > > > > Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> > > --- > > .../de

Re: [PATCH 12/12] dt-bindings: usb: mtu3: remove optional pinctrls

2017-10-08 Thread Chunfeng Yun
On Thu, 2017-10-05 at 17:33 -0500, Rob Herring wrote: > On Thu, Sep 28, 2017 at 08:17:20AM +0800, Chunfeng Yun wrote: > > Remove optional pinctrls due to using FORCE/RG_IDDIG to implement > > manual switch function. > > Another not backwards compatible change. Please explai

Re: [PATCH 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports

2017-10-08 Thread Chunfeng Yun
On Thu, 2017-10-05 at 17:16 -0500, Rob Herring wrote: > On Wed, Sep 27, 2017 at 05:23:04PM +0800, Chunfeng Yun wrote: > > Add a new optional property to disable u3ports > > > > Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> > > --- > > .../device

[PATCH 3/9] usb: xhci-mtk: check clock stability of U3_MAC

2017-09-27 Thread Chunfeng Yun
This is useful to find out the root cause when the Super Speed doesn't work. Such as when the T-PHY is switched to PCIe or SATA, and affects Super Speed function, the check will fail. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |4

[PATCH 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks

2017-09-27 Thread Chunfeng Yun
There are mcu_bus and dma_bus clocks needed to be controlled by driver on some SoCs, so add them as optional ones Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c | 79 --- drivers/usb/host/xhci-mtk.h |2

[PATCH 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports

2017-09-27 Thread Chunfeng Yun
Add a new optional property to disable u3ports Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtk-xhci.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documen

[PATCH 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones

2017-09-27 Thread Chunfeng Yun
Remove dummy clocks for usb wakeup and add optional ones for MCU_BUS_CK and DMA_BUS_CK. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff

[PATCH 7/9] usb: host: modify description for MTK xHCI config

2017-09-27 Thread Chunfeng Yun
Due to all MediaTek SoCs with xHCI host controller use this driver, remove limitation for specific SoCs Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/Kconfig |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/Kco

[PATCH 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks

2017-09-27 Thread Chunfeng Yun
The wakeup debounce clocks for each ports in fact are not needed, so remove them. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c | 33 - drivers/usb/host/xhci-mtk.h |2 -- 2 files changed, 35 deletions(-) diff

[PATCH 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function

2017-09-27 Thread Chunfeng Yun
This patch uses the simpler dma_set_mask_and_coherent() instead of doing these as separate steps Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-m

[PATCH 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init()

2017-09-27 Thread Chunfeng Yun
Make use of ports count from xhci but not from ippc in xhci_mtk_sch_init() Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/host/xhci-mtk-sch.c |3 ++- drivers/usb/host/xhci-mtk.c |3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/d

[PATCH 4/9] usb: xhci-mtk: support option to disable usb3 ports

2017-09-27 Thread Chunfeng Yun
Add support to disable specific usb3 ports, it's useful when usb3 phy is shared with PCIe or SATA, because we should disable the corresponding usb3 port if the phy is used by PCIe or SATA. Sometimes it's helpful to analyse and solve problems. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.

[PATCH 08/12] usb: mtu3: get optional vbus for host only mode

2017-09-27 Thread Chunfeng Yun
When dr_mode is set as USB_DR_MODE_HOST, it's better to try to get optional vbus, this can increase flexibility, although we can set vbus as always on for regulator or put it in host driver to turn it on. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_

[PATCH 09/12] usb: mtu3: set invalid dr_mode as dual-role mode

2017-09-27 Thread Chunfeng Yun
Treat dr_mode of USB_DR_MODE_UNKNOWN as USB_DR_MODE_OTG to enhance functional robustness. Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3_plat.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_plat.c b/d

[PATCH 05/12] usb: mtu3: support 36-bit DMA address

2017-09-27 Thread Chunfeng Yun
add support for 36-bit DMA address Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h | 17 ++- drivers/usb/mtu3/mtu3_core.c| 34 - drivers/usb/mtu3/mtu3_hw_regs.h | 10 drivers/usb/mtu3/mtu3_qmu.c

[PATCH 04/12] usb: mtu3: add optional mcu and dma bus clocks

2017-09-27 Thread Chunfeng Yun
There are mcu_bus and dma_bus clocks needed to be turned on/off by driver on some SoCs, so add them as optional ones Signed-off-by: Chunfeng Yun <chunfeng@mediatek.com> --- drivers/usb/mtu3/mtu3.h |5 ++ drivers/usb/mtu3/mtu3_plat.c

<    1   2   3   4   5   6   >