[RESEND PATCH v6, 3/5] usb: xhci-mtk: make IPPC register optional

2016-09-20 Thread Chunfeng Yun
Make IPPC register optional to support host side of dual-role mode, due to it is moved into common glue layer for simplification. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 36 +--- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git

[RESEND PATCH v6, 2/5] dt-bindings: mt8173-mtu3: add devicetree bindings

2016-09-20 Thread Chunfeng Yun
add a DT binding doc for MediaTek USB3 DRD driver Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- .../devicetree/bindings/usb/mt8173-mtu3.txt| 87 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mt8173-mtu3.txt

[RESEND PATCH v6, 5/5] arm64: dts: mediatek: add USB3 DRD driver

2016-09-20 Thread Chunfeng Yun
USB3 DRD driver is added for MT8173-EVB, and xHCI driver becomes its subnode Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 46 +-- arch/arm64/boot/dts/mediatek/mt8173.dtsi| 29 + 2 files changed, 66 insertions(+), 9

[RESEND PATCH v6, 4/5] usb: Add MediaTek USB3 DRD Driver

2016-09-20 Thread Chunfeng Yun
This patch adds support for the MediaTek USB3 controller integrated into MT8173. It can be configured as Dual-Role Device (DRD), Peripheral Only and Host Only (xHCI) modes. Signed-off-by: Chunfeng Yun --- drivers/usb/Kconfig|2 + drivers/usb/Makefile |1

[RESEND PATCH v6, 1/5] dt-bindings: mt8173-xhci: support host side of dual-role mode

2016-09-20 Thread Chunfeng Yun
of dual-role mode. Additionally add optional properties of pinctrl for host only mode Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- .../devicetree/bindings/usb/mt8173-xhci.txt| 54 +++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a

[RESEND PATCH v6, 0/5] Add MediaTek USB3 DRD Driver

2016-09-20 Thread Chunfeng Yun
>From 99e428a1808c8ca91ff473d487b52ca5d355d875 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Mon, 5 Sep 2016 10:27:07 +0800 Subject: [PATCH v6, 0/5] Add MediaTek USB3 DRD Driver These patches introduce the MediaTek USB3 dual-role controller driver. The driver can be configured as Dual-R

Re: [RESEND PATCH, v5 4/5] usb: Add MediaTek USB3 DRD Driver

2016-08-31 Thread Chunfeng Yun
On Tue, 2016-08-30 at 19:20 +0200, Greg Kroah-Hartman wrote: > On Fri, Aug 26, 2016 at 05:38:27PM +0800, chunfeng yun wrote: > > Hi, > > > > On Thu, 2016-08-25 at 10:32 +0200, Oliver Neukum wrote: > > > On Thu, 2016-08-25 at 11:05 +0800, Chunfeng Yun wrote: > >

Re: [PATCH v3,4/5] usb: Add MediaTek USB3 DRD Driver

2016-08-09 Thread chunfeng yun
Hi, On Mon, 2016-08-08 at 15:10 +0200, Greg Kroah-Hartman wrote: > On Fri, Jun 10, 2016 at 03:32:41PM +0800, Chunfeng Yun wrote: > > --- /dev/null > > +++ b/drivers/usb/mtu3/Makefile > > @@ -0,0 +1,20 @@ > > + > > +#ifeq ($(CONFIG_USB_DEBUG),y) > > +

Re: [PATCH V5, 0/5] Add MediaTek USB3 DRD Driver

2016-08-23 Thread chunfeng yun
Dear all, Could you please help me to review the code? Thank you very much. On Tue, 2016-08-09 at 16:23 +0800, Chunfeng Yun wrote: > These patches introduce the MediaTek USB3 dual-role controller > driver. > > The driver can be configured as Dual-Role Device (DRD),

Re: [PATCH V5, 0/5] Add MediaTek USB3 DRD Driver

2016-08-24 Thread chunfeng yun
Hi, On Wed, 2016-08-24 at 13:29 +0200, Oliver Neukum wrote: > On Wed, 2016-08-24 at 14:42 +0800, chunfeng yun wrote: > > Dear all, > > > > Could you please help me to review the code? > > Is the structure > > struct qmu_gpd > > shared with the

[RESEND PATCH, v5 2/5] dt-bindings: mt8173-mtu3: add devicetree bindings

2016-08-24 Thread Chunfeng Yun
add a DT binding doc for MediaTek USB3 DRD driver Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- .../devicetree/bindings/usb/mt8173-mtu3.txt| 87 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mt8173-mtu3.txt

[RESEND PATCH V5, 0/5] Add MediaTek USB3 DRD Driver

2016-08-24 Thread Chunfeng Yun
>From e60d29d748a4e9f412c9bb08458083e97d3f523d Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Tue, 9 Aug 2016 16:12:31 +0800 Subject: [PATCH V5, 0/5] Add MediaTek USB3 DRD Driver These patches introduce the MediaTek USB3 dual-role controller driver. The driver can be configured as Dual-R

[RESEND PATCH, v5 4/5] usb: Add MediaTek USB3 DRD Driver

2016-08-24 Thread Chunfeng Yun
This patch adds support for the MediaTek USB3 controller integrated into MT8173. It can be configured as Dual-Role Device (DRD), Peripheral Only and Host Only (xHCI) modes. Signed-off-by: Chunfeng Yun --- drivers/usb/Kconfig|2 + drivers/usb/Makefile |1

[RESEND PATCH, v5 3/5] usb: xhci-mtk: make IPPC register optional

2016-08-24 Thread Chunfeng Yun
Make IPPC register optional to support host side of dual-role mode, due to it is moved into common glue layer for simplification. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 36 +--- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git

[RESEND PATCH, v5 1/5] dt-bindings: mt8173-xhci: support host side of dual-role mode

2016-08-24 Thread Chunfeng Yun
of dual-role mode. Additionally add optional properties of pinctrl for host only mode Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- .../devicetree/bindings/usb/mt8173-xhci.txt| 54 +++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a

[RESEND PATCH, v5 5/5] arm64: dts: mediatek: add USB3 DRD driver

2016-08-24 Thread Chunfeng Yun
USB3 DRD driver is added for MT8173-EVB, and xHCI driver becomes its subnode Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 46 +-- arch/arm64/boot/dts/mediatek/mt8173.dtsi| 29 + 2 files changed, 66 insertions(+), 9

Re: [RESEND PATCH, v5 4/5] usb: Add MediaTek USB3 DRD Driver

2016-08-26 Thread chunfeng yun
Hi, On Thu, 2016-08-25 at 10:32 +0200, Oliver Neukum wrote: > On Thu, 2016-08-25 at 11:05 +0800, Chunfeng Yun wrote: > > This patch adds support for the MediaTek USB3 controller > > integrated into MT8173. It can be configured as Dual-Role > > Device (DRD), Peripheral Onl

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

2017-08-15 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 --- .../usb/{mt8173-mtu3.txt => mediatek,mtu3.txt} |6 +- 1 file changed, 5 insertions(+)

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

2017-08-15 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 --- drivers/usb/host/xhci-mtk.c |1 + 1 file changed, 1 ins

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

2017-08-15 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 --- .../usb/{mt8173-xhci.txt => mediatek,mtk-xhci.txt} |

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

2017-08-15 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 --- drivers/usb/mtu3/mtu3_plat.c |1 + 1 file changed, 1 ins

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 > > --- > &g

Re: [PATCH] usb: mtu3: fix dma_addr_t printk output again

2017-11-02 Thread Chunfeng Yun
); > enq_dma = gpd_virt_to_dma(ring, enq); > dev_dbg(mep->mtu->dev, "RX-EP%d queue gpd=%p, enq=%p, qdma=%pad\n", > - mep->epnum, gpd, enq, enq_dma); > + mep->epnum, gpd, enq, &enq_dma); > > enq->flag &= ~GPD_FLAGS_HWO; > gpd->next_gpd = cpu_to_le32(lower_32_bits(enq_dma)); Thanks. Acked-by: Chunfeng Yun

Re: [PATCH] usb: xhci-mtk: fix ptr_ret.cocci warnings

2017-10-24 Thread Chunfeng Yun
b6bb72cf0df1 ("usb: xhci-mtk: add optional mcu and dma bus clocks") > CC: Chunfeng Yun > Signed-off-by: Fengguang Wu > --- > Thanks Acked-by: Chunfeng Yun > xhci-mtk.c |5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > --- a/drivers/usb/host/x

[PATCH 2/3] phy: phy-mtk-tphy: use of_device_get_match_data()

2017-10-26 Thread Chunfeng Yun
reduce the boilerplate code to get the specific data Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 54cc44b

[PATCH 3/3] phy: phy-mtk-tphy: fix alignment warning

2017-10-26 Thread Chunfeng Yun
Fix alignment warning by checkpatch.pl with --strict Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/Kconfig|8 drivers/phy/mediatek/phy-mtk-tphy.c | 24 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/phy/mediatek

[PATCH 1/3] phy: phy-mtk-tphy: use auto instead of force to bypass utmi signals

2017-10-26 Thread Chunfeng Yun
ix RX sensitivity degradation issue. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 402385f..54cc44b 1

Re: [PATCH v6 2/5] dt-bindings: Add a binding for Mediatek xHCI host controller

2015-09-01 Thread chunfeng yun
hi, On Sat, 2015-08-22 at 16:23 +0300, Sergei Shtylyov wrote: > Hello. > > On 8/22/2015 4:45 AM, Chunfeng Yun wrote: > > > add a DT binding documentation of xHCI host controller for the > > MT8173 SoC from Mediatek. > > > Signed-off-by: Chunfeng Yun > >

Re: [PATCH v6 4/5] xhci: mediatek: support MTK xHCI host controller

2015-09-01 Thread chunfeng yun
On Wed, 2015-08-26 at 22:18 +0100, Daniel Thompson wrote: > On 22/08/15 02:45, Chunfeng Yun wrote: > > MTK xhci host controller defines some extra SW scheduling > > parameters for HW to minimize the scheduling effort for > > synchronous and interrupt endpoints. The parame

[PATCH v7 0/5] Mediatek xHCI support

2015-09-07 Thread Chunfeng Yun
driver 3. seperate quirk functions into a single C file to fix up dependence issue Change in v2: 1. Rebase to 4.2-rc1 2. Remove probe phy before add usb_hcd patch from this series due to 4.2-rc1 already fix this issue 3. add xhci mac clocks 4. add suspend/resume 5. support remote wakeup Chunfen

[PATCH v7 4/5] xhci: mediatek: support MTK xHCI host controller

2015-09-07 Thread Chunfeng Yun
Interrupter Moderation register is 8 times as much as that defined in xHCI spec. 3. Its TDS in Normal TRB defines a number of packets that remains to be transferred for a TD after processing all Max packets in all previous TRBs. Signed-off-by: Chunfeng Yun --- drivers/usb/host/Kconfig

[PATCH v7 3/5] usb: phy: add usb3.0 phy driver for mt65xx SoCs

2015-09-07 Thread Chunfeng Yun
support usb3.0 phy of mt65xx SoCs Signed-off-by: Chunfeng Yun --- drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-mt65xx-usb3.c | 456 ++ 3 files changed, 466 insertions(+) create mode 100644 drivers/phy/phy

[PATCH v7 5/5] arm64: dts: mediatek: add xHCI & usb phy for mt8173

2015-09-07 Thread Chunfeng Yun
add xHCI and phy drivers for MT8173-EVB Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 16 +++ arch/arm64/boot/dts/mediatek/mt8173.dtsi| 44 + 2 files changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek

[PATCH v7 2/5] dt-bindings: Add a binding for Mediatek xHCI host controller

2015-09-07 Thread Chunfeng Yun
add a DT binding documentation of xHCI host controller for the MT8173 SoC from Mediatek. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mt8173-xhci.txt| 52 ++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb

[PATCH v7 1/5] dt-bindings: Add usb3.0 phy binding for MT65xx SoCs

2015-09-07 Thread Chunfeng Yun
add a DT binding documentation of usb3.0 phy for MT65xx SoCs from Mediatek. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/phy/phy-mt65xx-usb.txt | 69 ++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mt65xx

Re: [PATCH v9 4/5] xhci: mediatek: support MTK xHCI host controller

2015-10-17 Thread chunfeng yun
Hi, On Thu, 2015-10-15 at 17:46 +0300, Mathias Nyman wrote: > On 29.09.2015 06:01, Chunfeng Yun wrote: > > There some vendor quirks for MTK xhci host controller: > > 1. It defines some extra SW scheduling parameters for HW > >to minimize the scheduling effor

[PATCH v10 3/3] arm64: dts: mediatek: add xHCI & usb phy for mt8173

2015-10-17 Thread Chunfeng Yun
add xHCI and phy drivers for MT8173-EVB Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 16 +++ arch/arm64/boot/dts/mediatek/mt8173.dtsi| 42 + 2 files changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek

[PATCH v10 2/3] xhci: mediatek: support MTK xHCI host controller

2015-10-17 Thread Chunfeng Yun
Interrupter Moderation register is 8 times as much as that defined in xHCI spec. 3. Its TDS in Normal TRB defines a number of packets that remains to be transferred for a TD after processing all Max packets in all previous TRBs. Signed-off-by: Chunfeng Yun Tested-by: Daniel Thompson Reviewed-by

[PATCH v10 1/3] dt-bindings: Add a binding for Mediatek xHCI host controller

2015-10-17 Thread Chunfeng Yun
add a DT binding documentation of xHCI host controller for the MT8173 SoC from Mediatek. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mt8173-xhci.txt| 51 ++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb

[PATCH v10 0/3] Mediatek xHCI support

2015-10-17 Thread Chunfeng Yun
>From 66e467548861c39c52de1d3d899ddc980c6cb925 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Sun, 18 Oct 2015 11:39:45 +0800 Subject: [PATCH v10 0/3] Mediatek xHCI support The patch supports MediaTek's xHCI controller. There are some differences from xHCI spec: 1. The interval is s

Re: [PATCH v10 3/3] arm64: dts: mediatek: add xHCI & usb phy for mt8173

2015-10-18 Thread chunfeng yun
On Sun, 2015-10-18 at 14:01 +0300, Sergei Shtylyov wrote: > Hello. > > On 10/18/2015 6:51 AM, Chunfeng Yun wrote: > > > add xHCI and phy drivers for MT8173-EVB > > > > Signed-off-by: Chunfeng Yun > > [...] > > > diff --git a/arch/arm64/boot/dts/me

Re: [PATCH v10 2/3] xhci: mediatek: support MTK xHCI host controller

2015-10-18 Thread chunfeng yun
On Sun, 2015-10-18 at 11:51 +0800, Chunfeng Yun wrote: > There some vendor quirks for MTK xhci host controller: > 1. It defines some extra SW scheduling parameters for HW > to minimize the scheduling effort for synchronous and > interrupt endpoints. The parameters are put into res

[PATCH v11 2/3] xhci: mediatek: support MTK xHCI host controller

2015-10-18 Thread Chunfeng Yun
Interrupter Moderation register is 8 times as much as that defined in xHCI spec. 3. Its TDS in Normal TRB defines a number of packets that remains to be transferred for a TD after processing all Max packets in all previous TRBs. Signed-off-by: Chunfeng Yun Tested-by: Daniel Thompson Reviewed-by

[PATCH v11 3/3] arm64: dts: mediatek: add xHCI & usb phy for mt8173

2015-10-18 Thread Chunfeng Yun
add xHCI and phy drivers for MT8173-EVB Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 16 +++ arch/arm64/boot/dts/mediatek/mt8173.dtsi| 42 + 2 files changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek

[PATCH v11 0/3] Mediatek xHCI support

2015-10-18 Thread Chunfeng Yun
>From 1c6e0dd39074297ebb0714c1d44a3e0dc9af466c Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Mon, 19 Oct 2015 14:13:45 +0800 Subject: [PATCH v11 0/3] Mediatek xHCI support The patch supports MediaTek's xHCI controller. There are some differences from xHCI spec: 1. The interval is s

[PATCH v11 1/3] dt-bindings: Add a binding for Mediatek xHCI host controller

2015-10-18 Thread Chunfeng Yun
add a DT binding documentation of xHCI host controller for the MT8173 SoC from Mediatek. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mt8173-xhci.txt| 51 ++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb

Re: [PATCH v9 4/5] xhci: mediatek: support MTK xHCI host controller

2015-10-19 Thread chunfeng yun
hi, On Mon, 2015-10-19 at 14:25 +0300, Mathias Nyman wrote: > >> > >> So basically we are trying to use as many microframes as possible with as > >> few packets > >> per microframe as possible. > >> > >> Did I understand this correctly? > > Yes, you are right. > > > >> How will devices react if th

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

2018-06-21 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

Re: [PATCH] usb: mtu3: fix ssusb_wakeup_set dummy

2018-01-10 Thread Chunfeng Yun
} > > -static inline int ssusb_wakeup_enable(struct ssusb_mtk *ssusb) > -{ > - return 0; > -} > - > -static inline void ssusb_wakeup_disable(struct ssusb_mtk *ssusb) > +static inline void ssusb_wakeup_set(struct ssusb_mtk *ssusb, bool enable) > {} > > #endif Forgot to make it change, Acked-by: Chunfeng Yun Thanks a lot

Re: [PATCH] arm64: dts: add #cooling-cells to CPU nodes

2018-01-10 Thread Chunfeng Yun
gt; clock-names = "cpu", "intermediate"; > @@ -179,6 +180,7 @@ > reg = <0x100>; > enable-method = "psci"; > cpu-idle-states = <&CPU_SLEEP_0>; > + #cooling-cells = <2>; > clocks = <&infracfg CLK_INFRA_CA57SEL>, ><&apmixedsys CLK_APMIXED_MAINPLL>; > clock-names = "cpu", "intermediate"; Tested-by: Chunfeng Yun

Re: [PATCH] usb: mtu3: fix semicolon.cocci warnings

2018-01-12 Thread Chunfeng Yun
t;usb: mtu3: supports remote wakeup for mt2712 with two > SSUSB IPs") > CC: Chunfeng Yun > Signed-off-by: Fengguang Wu > --- > > mtu3_host.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/usb/mtu3/mtu3_host.c &

Re: [PATCH] usb: xhci-mtk: fix semicolon.cocci warnings

2018-01-12 Thread Chunfeng Yun
quot;usb: xhci-mtk: supports remote wakeup for mt2712 with > two xHCI IPs") > CC: Chunfeng Yun > Signed-off-by: Fengguang Wu > --- > > xhci-mtk.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/usb/host/xhci-mtk.c &g

Re: linux-next: Tree for Jan 15 (drivers/usb/mtu3/)

2018-01-15 Thread Chunfeng Yun
Hi, Arnd had sent a patch to fix this issue, please refer to : https://patchwork.kernel.org/patch/10155685 thanks On Mon, 2018-01-15 at 11:34 -0800, Randy Dunlap wrote: > On 01/14/2018 09:44 PM, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20180112: > > > > on i386: > > ../driv

[PATCH 1/3] phy: phy-mtk-tphy: keep default value of mcu_bus_ck_gate_en

2018-03-11 Thread Chunfeng Yun
The default value of mcu_bus_ck_gate_en is 1, if clear it, will prevent system to enter deep idle mode, so keep its default value and without affecting PCIe function. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH 3/3] phy: phy-mtk-tphy: add properties for U2 slew rate calibrate

2018-03-11 Thread Chunfeng Yun
Add two properties of ref_clk and coefficient used by U2 slew rate calibrate which may vary on different SoCs Signed-off-by: Chunfeng Yun --- Documentation/devicetree/bindings/phy/phy-mtk-tphy.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/phy

[PATCH 2/3] phy: phy-mtk-tphy: add configurable parameters for slew rate calibrate

2018-03-11 Thread Chunfeng Yun
There are two parameters, ref_clk and coefficient, for U2 slew rate calibrate which may vary on different SoCs, here allow them to be configurable Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions

[PATCH v2 1/3] phy: phy-mtk-tphy: keep default value of mcu_bus_ck_gate_en

2018-03-11 Thread Chunfeng Yun
The default value of mcu_bus_ck_gate_en is 1, if clear it, will prevent system to enter deep idle mode, so keep its default value and without affecting PCIe function. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH v2 2/3] phy: phy-mtk-tphy: add configurable parameters for slew rate calibrate

2018-03-11 Thread Chunfeng Yun
There are two parameters, ref_clk and coefficient, for U2 slew rate calibrate which may vary on different SoCs, here allow them to be configurable Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions

[PATCH v2 3/3] dt-bindings: phy-mtk-tphy: add properties for U2 slew rate calibrate

2018-03-11 Thread Chunfeng Yun
Add two properties of ref_clk and coefficient used by U2 slew rate calibrate which may vary on different SoCs Signed-off-by: Chunfeng Yun --- Documentation/devicetree/bindings/phy/phy-mtk-tphy.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/phy

Re: [PATCH -next] phy: phy-mtk-tphy: fix missing clk_disable_unprepare() on error in mtk_phy_init()

2018-03-20 Thread Chunfeng Yun
f_clk); > +disable_u3phya_ref: > + clk_disable_unprepare(tphy->u3phya_ref); > + return ret; > } > > static int mtk_phy_power_on(struct phy *phy) > Tested-by: Chunfeng Yun Acked-by: Chunfeng Yun Thanks a lot > >

[usb-next PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-20 Thread Chunfeng Yun
The phys has already been initialized when add primary hcd, including usb2 phys and usb3 phys also if exist, so needn't re-parse "phys" property again. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 1 + drivers/usb/host/xhci-plat.c | 1 + 2 files changed, 2 inse

Re: [usb-next PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-21 Thread Chunfeng Yun
Hi Roger, On Wed, 2018-03-21 at 11:05 +0200, Roger Quadros wrote: > Hi Chunfeng, > > On 21/03/18 08:12, Chunfeng Yun wrote: > > The phys has already been initialized when add primary hcd, > > including usb2 phys and usb3 phys also if exist, so needn't > >

Re: [usb-next PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Chunfeng Yun
hi, On Wed, 2018-03-21 at 14:27 +0200, Roger Quadros wrote: > On 21/03/18 13:50, Chunfeng Yun wrote: > > Hi Roger, > > > > On Wed, 2018-03-21 at 11:05 +0200, Roger Quadros wrote: > >> Hi Chunfeng, > >> > >> On 21/03/18 08:12, Chunfeng Yun wrote:

[usb-next, v2 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Chunfeng Yun
The phys has already been initialized when add primary hcd, including usb2 phys and usb3 phys also if exist, so needn't re-parse "phys" property again. Signed-off-by: Chunfeng Yun --- drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

Re: [usb-next, v2 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Chunfeng Yun
hi, On Thu, 2018-03-22 at 10:01 +0100, Greg Kroah-Hartman wrote: > On Thu, Mar 22, 2018 at 04:39:20PM +0800, Chunfeng Yun wrote: > > The phys has already been initialized when add primary hcd, > > including usb2 phys and usb3 phys also if exist, so needn't > > re-p

Re: [usb-next, v3 PATCH] usb: xhci: skip phys initialization of shared hcd

2018-03-22 Thread Chunfeng Yun
On Thu, 2018-03-22 at 13:53 +0100, Greg Kroah-Hartman wrote: > On Thu, Mar 22, 2018 at 08:12:50PM +0800, Chunfeng Yun wrote: > > The phys has already been initialized when add primary hcd, > > including usb2 phys and usb3 phys also if exist, so needn't > > re-parse "

[PATCH] Add Apple Carplay driver

2018-03-13 Thread Chunfeng Yun
>From bf48dcd9cb254576cfea373c9a5d2ab996408895 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Tue, 13 Mar 2018 11:47:38 +0800 Subject: [PATCH] Add Apple Carplay driver Some Apple devices which support Carplay can enter USB Host Mode from USB Device Mode after receiving a specific USB Ven

[PATCH] usb: misc: supports Apple Carplay driver

2018-03-13 Thread Chunfeng Yun
The driver is used to support Apple carplay feature by a debugfs interface which can force the driver to send a USB Vendor Request of "Apple Device to Host Mode Switch" to switch Apple Device into host mode. Signed-off-by: Chunfeng Yun --- drivers/usb/misc/Kconfig |9 ++ driver

Re: [PATCH v2 2/3] phy: phy-mtk-tphy: add configurable parameters for slew rate calibrate

2018-03-13 Thread Chunfeng Yun
On Wed, 2018-03-14 at 00:21 +0100, Matthias Brugger wrote: > > On 03/12/2018 06:25 AM, Chunfeng Yun wrote: > > There are two parameters, ref_clk and coefficient, for U2 slew rate > > calibrate which may vary on different SoCs, here allow them to be > > configurabl

Re: [PATCH v2 3/3] dt-bindings: phy-mtk-tphy: add properties for U2 slew rate calibrate

2018-03-13 Thread Chunfeng Yun
On Wed, 2018-03-14 at 00:21 +0100, Matthias Brugger wrote: > > On 03/12/2018 06:25 AM, Chunfeng Yun wrote: > > Add two properties of ref_clk and coefficient used by U2 slew rate > > calibrate which may vary on different SoCs > > > > Signed-off-by: Chunfeng Yun >

Re: [PATCH] Add Apple Carplay driver

2018-03-14 Thread Chunfeng Yun
s > > Matt > > On Tue, Mar 13, 2018 at 11:02 PM, Chunfeng Yun > wrote: > > From bf48dcd9cb254576cfea373c9a5d2ab996408895 Mon Sep 17 00:00:00 2001 > > From: Chunfeng Yun > > Date: Tue, 13 Mar 2018 11:47:38 +0800 > > Subject: [PATCH] Add Apple Carplay driver

Re: [PATCH] usb: misc: supports Apple Carplay driver

2018-03-14 Thread Chunfeng Yun
On Wed, 2018-03-14 at 07:16 +0100, Greg Kroah-Hartman wrote: > On Wed, Mar 14, 2018 at 02:02:36PM +0800, Chunfeng Yun wrote: > > The driver is used to support Apple carplay feature by a debugfs > > interface which can force the driver to send a USB Vendor Request > > of "

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] 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

[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

[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: [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 working

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 > --- /dev/

Re: [PATCH 05/16] media: cadence: csi2rx: Add external DPHY support

2021-04-08 Thread Chunfeng Yun
On Wed, 2021-04-07 at 00:24 +0530, Pratyush Yadav wrote: > On 31/03/21 05:24PM, Chunfeng Yun wrote: > > On Tue, 2021-03-30 at 23:03 +0530, Pratyush Yadav wrote: > > > Some platforms like TI's J721E can have the CSI2RX paired with an > > > external DPHY. Add support

[PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called

2021-04-08 Thread Chunfeng Yun
upt will arise, it causes resume immediately; enable wake irq after calling runtime_suspend, e.g. at (3) or (4), will works. This patch seems no side effect on edge trigger wake irq. Signed-off-by: Chunfeng Yun --- drivers/base/power/runtime.c | 5 ++--- 1 file changed, 2 insertions(+), 3 dele

[PATCH 4/6] usb: xhci-mtk: add support runtime PM

2021-04-08 Thread Chunfeng Yun
support it. users can enable it via power/control (set "auto") in sysfs. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 140 +++- 1 file changed, 124 insertions(+), 16 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb

[PATCH 3/6] dt-bindings: usb: mtk-xhci: add wakeup interrupt

2021-04-08 Thread Chunfeng Yun
Add an interrupt which is EINT usually to support runtime PM, meanwhile add "interrupt-names" property, for backward compatibility, it's optional and used when wakeup interrupt exists Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 13 ++

[PATCH 5/6] usb: xhci-mtk: use clock bulk to get clocks

2021-04-08 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks, meanwhile make sys_ck optional, then will be easier to handle clocks. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 109 +++- drivers/usb/host/xhci-mtk.h | 10 ++-- 2 files changed, 24

[PATCH 6/6] usb: xhci-mtk: remove unused members

2021-04-08 Thread Chunfeng Yun
Now some members about phys and wakeup are not used anymore, remove them. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h index 11996edc1967..7940593a3445 100644 --- a

[PATCH 2/6] usb: xhci-mtk: check return value in suspend/resume hooks

2021-04-08 Thread Chunfeng Yun
Return error number if encounter errors during suspend and resume. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c

Re: [PATCH 4/6] usb: xhci-mtk: add support runtime PM

2021-04-08 Thread Chunfeng Yun
Hi Ikjoon, On Thu, 2021-04-08 at 17:35 +0800, Chunfeng Yun wrote: > A dedicated wakeup irq will be used to handle runtime suspend/resume, > we use dev_pm_set_dedicated_wake_irq API to take care of requesting > and attaching wakeup irq, then the suspend/resume framework will help &g

Re: [PATCH v2 -next] phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe()

2021-04-08 Thread Chunfeng Yun
hdmi_phy->regs = devm_ioremap_resource(dev, mem); > if (IS_ERR(hdmi_phy->regs)) { > - ret = PTR_ERR(hdmi_phy->regs); > - dev_err(dev, "Failed to get memory resource: %d\n", ret); > - return ret; > + return PTR_ERR(hdmi_phy->regs); > } Reviewed-by: Chunfeng Yun Thanks a lot > > ref_clk = devm_clk_get(dev, "pll_ref");

Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called

2021-04-08 Thread Chunfeng Yun
On Thu, 2021-04-08 at 19:41 +0200, Rafael J. Wysocki wrote: > On Thu, Apr 8, 2021 at 11:35 AM Chunfeng Yun > wrote: > > > > When the dedicated wake irq is level trigger, enable it before > > calling runtime_suspend, will trigger an interrupt. > > > > e.g. &g

[RFC PATCH] usb: core: reduce power-on-good delay time of root hub

2021-04-08 Thread Chunfeng Yun
Return the exactly delay time given by root hub descriptor, this helps to reduce resume time etc. Due to the root hub descriptor is usually provided by the host controller driver, if there is compatibility for a root hub, we can fix it easily without affect other root hub Signed-off-by: Chunfeng

[PATCH] irqchip: gic-pm: remove redundant error log of clock bulk

2021-04-08 Thread Chunfeng Yun
There is error log in clk_bulk_prepare/enable() Signed-off-by: Chunfeng Yun --- drivers/irqchip/irq-gic-pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c index 1337cec..b60e185 100644 --- a/drivers/irqchip/irq

[PATCH] phy: qcom-qmp: remove redundant error of clock bulk

2021-04-08 Thread Chunfeng Yun
There is error log in clk_bulk_prepare/enable() Signed-off-by: Chunfeng Yun --- drivers/phy/qualcomm/phy-qcom-qmp.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 9cdebe7..f14b8be

Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called

2021-04-09 Thread Chunfeng Yun
On Fri, 2021-04-09 at 08:39 +0300, Tony Lindgren wrote: > * Chunfeng Yun [210409 01:54]: > > On Thu, 2021-04-08 at 19:41 +0200, Rafael J. Wysocki wrote: > > > On Thu, Apr 8, 2021 at 11:35 AM Chunfeng Yun > > > wrote: > > > > > > > > When the de

Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called

2021-04-09 Thread Chunfeng Yun
On Fri, 2021-04-09 at 13:32 +0800, Ikjoon Jang wrote: > Hi Chunfeng, > > On Thu, Apr 8, 2021 at 5:35 PM Chunfeng Yun wrote: > > > > When the dedicated wake irq is level trigger, enable it before > > calling runtime_suspend, will trigger an interrupt. > > > >

Re: [PATCH 4/6] usb: xhci-mtk: add support runtime PM

2021-04-09 Thread Chunfeng Yun
On Fri, 2021-04-09 at 13:45 +0800, Ikjoon Jang wrote: > On Thu, Apr 8, 2021 at 5:35 PM Chunfeng Yun wrote: > > > > A dedicated wakeup irq will be used to handle runtime suspend/resume, > > we use dev_pm_set_dedicated_wake_irq API to take care of requesting > > and att

[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 a

[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 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 inser

[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 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

  1   2   3   4   5   6   7   8   9   10   >