[PATCH RESEND 2/2] phy: phy-mtk-tphy: add properties for phy tuning

2023-12-12 Thread Chunfeng Yun
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 58 +- 1 file changed, 57 insertions(+), 1 deletion(-) diff

[PATCH RESEND 1/2] dt-bindings: phy-mtk-tphy: add properties for phy tuning

2023-12-12 Thread Chunfeng Yun
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/device-tree

[PATCH 2/2] phy: phy-mtk-tphy: add properties for phy tuning

2023-11-05 Thread Chunfeng Yun
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 58 +- 1 file changed, 57 insertions(+), 1 deletion(-) diff

[PATCH 1/2] dt-bindings: phy-mtk-tphy: add properties for phy tuning

2023-11-05 Thread Chunfeng Yun
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/device-tree

[PATCH v2 1/5] phy: phy-mtk-tphy: remove macros to prepare bitfield value

2023-02-17 Thread Chunfeng Yun
Prefer to make use of FIELD_PREP() macro to prepare bitfield value, then no need local macros anymore. Signed-off-by: Chunfeng Yun --- v2: new patch --- drivers/phy/phy-mtk-tphy.c | 122 ++--- 1 file changed, 47 insertions(+), 75 deletions(-) diff --git

[PATCH v2 4/5] dt-bindings: phy-mtk-tphy: add support mt8195

2023-02-17 Thread Chunfeng Yun
Add a new compatible for mt8195 to add a workaround for hardware issue. Signed-off-by: Chunfeng Yun --- v2: no change --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/device-tree-bindings/phy/phy-mtk-tphy.txt b/doc/device-tree-bindings

[PATCH v2 5/5] dt-bindings: usb: mtk-xhci: add support mt8195

2023-02-17 Thread Chunfeng Yun
Add a new compatible for mt8195 to add a workaround for hardware issue. Signed-off-by: Chunfeng Yun --- v2: no change --- doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt

[PATCH v2 2/5] phy: phy-mtk-tphy: add support mt8195

2023-02-17 Thread Chunfeng Yun
The T-PHY controller is designed to use use PLL integer mode, but in fact use fractional mode for some ones on mt8195 by mistake, this causes signal degradation (e.g. eye diagram test fail), fix it by switching PLL to 26Mhz from default 48Mhz to improve signal quality. Signed-off-by: Chunfeng Yun

[PATCH v2 3/5] usb: xhci-mtk: modify the SOF/ITP interval for mt8195

2023-02-17 Thread Chunfeng Yun
controllers. Note: The first controller no need set it, but if set it, shall change tphy's pll at the same time. Signed-off-by: Chunfeng Yun --- v2: use FIELD_PREP() suggested by Marek --- drivers/usb/host/xhci-mtk.c | 49 - 1 file changed, 48 insertions(+), 1

[PATCH 3/4] dt-bindings: phy-mtk-tphy: add support mt8195

2023-02-10 Thread Chunfeng Yun
Add a new compatible for mt8195 to add a workaround for hardware issue. Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/device-tree-bindings/phy/phy-mtk-tphy.txt b/doc/device-tree-bindings/phy/phy-mtk

[PATCH 2/4] usb: xhci-mtk: modify the SOF/ITP interval for mt8195

2023-02-10 Thread Chunfeng Yun
controllers. Note: The first controller no need set it, but if set it, shall change tphy's pll at the same time. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 47 + 1 file changed, 47 insertions(+) diff --git a/drivers/usb/host/xhci-mtk.c b

[PATCH 4/4] dt-bindings: usb: mtk-xhci: add support mt8195

2023-02-10 Thread Chunfeng Yun
Add a new compatible for mt8195 to add a workaround for hardware issue. Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt b/doc/device-tree

[PATCH 1/4] phy: phy-mtk-tphy: add support mt8195

2023-02-10 Thread Chunfeng Yun
The T-PHY controller is designed to use use PLL integer mode, but in fact use fractional mode for some ones on mt8195 by mistake, this causes signal degradation (e.g. eye diagram test fail), fix it by switching PLL to 26Mhz from default 48Mhz to improve signal quality. Signed-off-by: Chunfeng Yun

Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-11-12 Thread Chunfeng Yun
Hi Marek, On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote: > When allocate the GPD ring, and tell its address to the controller, > then > the driver starts or resumes the QMU, the controller will try to > access > the first GPD, so need flush the first one to avoid w

Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-11-12 Thread Chunfeng Yun
Hi Marek, On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote: > When allocate the GPD ring, and tell its address to the controller, > then > the driver starts or resumes the QMU, the controller will try to > access > the first GPD, so need flush the first one to avoid w

Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-11-12 Thread Chunfeng Yun
Hi Marek, On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote: > When allocate the GPD ring, and tell its address to the controller, > then > the driver starts or resumes the QMU, the controller will try to > access > the first GPD, so need flush the first one to avoid w

Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-11-12 Thread Chunfeng Yun
Hi Marek, On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote: > When allocate the GPD ring, and tell its address to the controller, > then > the driver starts or resumes the QMU, the controller will try to > access > the first GPD, so need flush the first one to avoid w

Re: [RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-11-02 Thread Chunfeng Yun
Hi Marek, On Thu, 2021-10-21 at 13:33 +0800, Chunfeng Yun wrote: > When allocate the GPD ring, and tell its address to the controller, > then > the driver starts or resumes the QMU, the controller will try to > access > the first GPD, so need flush the first one to avoid w

[RESEND PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-10-20 Thread Chunfeng Yun
When allocate the GPD ring, and tell its address to the controller, then the driver starts or resumes the QMU, the controller will try to access the first GPD, so need flush the first one to avoid wrong GPD status. Reported-by: Xin Lin Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3

[PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring

2021-09-22 Thread Chunfeng Yun
When allocate the GPD ring, and tell its address to the controller, then the driver starts or resumes the QMU, the controller will try to access the first GPD, so need flush the first one to avoid wrong GPD status. Reported-by: Xin Lin Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3

Re: USB 3.1 (3.2) support in U-Boot?

2021-04-26 Thread Chunfeng Yun
n these related patches: > > > > commit d92e866f6008fdd6483735c6fd1ed95c8fdc87b1 > > Author: Chunfeng Yun > > Date: Wed Oct 14 15:08:28 2020 +0800 > > > > usb: common: add define of usb_speed_string() > > > > There is only declaration of usb_speed_string(), but no de

Re: [PATCH 2/3] ARM: mediatek: Add MT8175 support

2021-03-31 Thread Chunfeng Yun
y@1000 { > + reg = <0x1000 0x400>; > + clocks = <_cg CLK_TOP_SSUSB_PHY_CK_EN>, > + <_cg CLK_TOP_USB20_48M_EN>; > + clock-names = "ref", "da_ref"; > + #phy-

Re: [PATCH 2/3] ARM: mediatek: Add MT8175 support

2021-03-29 Thread Chunfeng Yun
On Mon, 2021-03-29 at 21:27 +0200, Fabien Parent wrote: > Add MT8175 SoC support. > > Signed-off-by: Fabien Parent > --- > arch/arm/dts/mt8175.dtsi | 247 + > arch/arm/mach-mediatek/Kconfig | 9 + > arch/arm/mach-mediatek/Makefile| 1 + >

Re: [PATCH 3/3] board: Add MT8175 pumpkin board support

2021-03-29 Thread Chunfeng Yun
+CONFIG_WDT=y > +CONFIG_WDT_MTK=y > +# CONFIG_REGEX is not set > +CONFIG_OF_LIBFDT_OVERLAY=y > +# CONFIG_EFI_LOADER is not set > diff --git a/include/configs/mt8175.h b/include/configs/mt8175.h > new file mode 100644 > index ..1f7a8032a65f > --- /dev/null > +++ b/include/conf

[PATCH] usb: mtu3: flush cache for next GPD

2021-03-03 Thread Chunfeng Yun
When flush cache of the current GPD and resume QMU, the controller will try to access the next GPD after processing the current one, if not flush the next GPD, the controller may get wrong GPD status. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_qmu.c | 3 +++ 1 file changed, 3

Re: [PATCH v2 1/1] pinctrl: mediatek: correct error handling

2020-12-27 Thread Chunfeng Yun
> + ret = -ENOENT; > dev_for_each_subnode(node, parent) > if (ofnode_read_bool(node, "gpio-controller")) { > ret = 0; > -- Acked-by: Chunfeng Yun Thanks > 2.29.2 >

[RESEND PATCH 2/2] dt-bindings: usb: mtk-xhci: add optional properies to disable ports

2020-12-22 Thread Chunfeng Yun
Add optional properies to disable usb2 or usb3 ports, they are used when provided ports are not used on some special platforms. Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt | 4 1 file changed, 4 insertions(+) diff --git a/doc/device-tree-bindings/usb

[RESEND PATCH 1/2] usb: xhci-mtk: support option to disable ports

2020-12-22 Thread Chunfeng Yun
Add support to disable specific ports, it's useful for some scenarios: 1. usb3 PHY is shared whith PCIe or SATA, the corresponding usb3 port can be disabled; 2. some usb2 or usb3 ports are not used on special platforms, they should be disabled to save power. Signed-off-by: Chunfeng Yun

[PATCH 2/2] dt-bindings: usb: mtk-xhci: add optional properies to disable ports

2020-11-23 Thread Chunfeng Yun
Add optional properies to disable usb2 or usb3 ports, they are used when provided ports are not used on some special platforms. Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt | 4 1 file changed, 4 insertions(+) diff --git a/doc/device-tree-bindings/usb

[PATCH 1/2] usb: xhci-mtk: support option to disable ports

2020-11-23 Thread Chunfeng Yun
Add support to disable specific ports, it's useful for some scenarios: 1. usb3 PHY is shared whith PCIe or SATA, the corresponding usb3 port can be disabled; 2. some usb2 or usb3 ports are not used on special platforms, they should be disabled to save power. Signed-off-by: Chunfeng Yun

Re: [PATCH next] usb: mtu3: fix build error caused by dev_xxx()

2020-10-20 Thread Chunfeng Yun
On Tue, 2020-10-20 at 14:15 +0800, Bin Meng wrote: > Hi Chunfeng, > > On Tue, Oct 20, 2020 at 10:22 AM Chunfeng Yun > wrote: > > > > On Tue, 2020-10-20 at 00:15 +0200, Marek Vasut wrote: > > > On 10/19/20 2:19 PM, Chunfeng Yun wrote: > > > > Due to t

Re: [PATCH next] usb: mtu3: fix build error caused by dev_xxx()

2020-10-19 Thread Chunfeng Yun
On Tue, 2020-10-20 at 00:15 +0200, Marek Vasut wrote: > On 10/19/20 2:19 PM, Chunfeng Yun wrote: > > Due to the following to patches: > > 4a1989c0bc77 ("dm: Don't undefine dev_xxx macros") > > 69dae8902b16 ("linux/compat.h: Remove redefinition of de

Re: [PATCH next] usb: mtu3: fix build warning/error

2020-10-19 Thread Chunfeng Yun
On Mon, 2020-10-19 at 12:34 +0200, Marek Vasut wrote: > On 10/19/20 11:32 AM, Chunfeng Yun wrote: > > On Mon, 2020-10-19 at 08:07 +0200, Marek Vasut wrote: > >> On 10/19/20 5:46 AM, Chunfeng Yun wrote: > >>> Fix up the following build warning/error:

[PATCH next] usb: mtu3: fix build error caused by dev_xxx()

2020-10-19 Thread Chunfeng Yun
Due to the following to patches: 4a1989c0bc77 ("dm: Don't undefine dev_xxx macros") 69dae8902b16 ("linux/compat.h: Remove redefinition of dev_xxx macros") Need include device_compat.h and no need use __maybe_unused anymore to fix unused variable warning Signed-off-by: Chun

Re: [PATCH next] usb: mtu3: fix build warning/error

2020-10-19 Thread Chunfeng Yun
On Mon, 2020-10-19 at 08:07 +0200, Marek Vasut wrote: > On 10/19/20 5:46 AM, Chunfeng Yun wrote: > > Fix up the following build warning/error: > > 1. unused variable 'mtu' in mtu3_gadget_dequeue() and > >mtu3_gadget_ep_set_halt() > > 2. implicit declaration of f

[PATCH next] usb: mtu3: fix build warning/error

2020-10-18 Thread Chunfeng Yun
Fix up the following build warning/error: 1. unused variable 'mtu' in mtu3_gadget_dequeue() and mtu3_gadget_ep_set_halt() 2. implicit declaration of function ‘flush_dcache_range’ and ‘invalidate_dcache_range’ Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 4 ++-- drivers

Re: [PATCH next v10] usb: add MediaTek USB3 DRD driver

2020-10-18 Thread Chunfeng Yun
On Fri, 2020-10-16 at 14:08 +0200, Marek Vasut wrote: > On 10/16/20 5:38 AM, Chunfeng Yun wrote: > > This patch adds support for the MediaTek USB3 DRD controller, > > its host side is based on xHCI, this driver supports device mode > > and host mode. > > Build

Re: [PATCH v9] usb: add MediaTek USB3 DRD driver

2020-10-15 Thread Chunfeng Yun
On Thu, 2020-10-15 at 14:28 +0200, Marek Vasut wrote: > On 10/15/20 3:49 AM, Chunfeng Yun wrote: > > Hi Marek, > > Hi, > > > On Wed, 2020-10-14 at 15:03 +0200, Marek Vasut wrote: > >> On 10/14/20 2:29 PM, Chunfeng Yun wrote: > >>> On Wed,

Re: [PATCH v2] configs: mt8512: enable device mode of mtu3 explicitly

2020-10-14 Thread Chunfeng Yun
On Wed, 2020-10-14 at 15:31 +0200, Marek Vasut wrote: > On 10/14/20 3:03 PM, Chunfeng Yun wrote: > > On Wed, 2020-10-14 at 15:01 +0200, Marek Vasut wrote: > >> On 10/14/20 2:54 PM, Chunfeng Yun wrote: > >>> Set CONFIG_USB_MTU3_GADGET=y to enable device mode explic

Re: [PATCH v9] usb: add MediaTek USB3 DRD driver

2020-10-14 Thread Chunfeng Yun
Hi Marek, On Wed, 2020-10-14 at 15:03 +0200, Marek Vasut wrote: > On 10/14/20 2:29 PM, Chunfeng Yun wrote: > > On Wed, 2020-10-14 at 12:56 +0200, Marek Vasut wrote: > >> On 10/14/20 10:50 AM, Chunfeng Yun wrote: > >>> This patch adds support for the MediaTek USB3

Re: [PATCH v2] configs: mt8512: enable device mode of mtu3 explicitly

2020-10-14 Thread Chunfeng Yun
On Wed, 2020-10-14 at 15:31 +0200, Marek Vasut wrote: > On 10/14/20 3:03 PM, Chunfeng Yun wrote: > > On Wed, 2020-10-14 at 15:01 +0200, Marek Vasut wrote: > >> On 10/14/20 2:54 PM, Chunfeng Yun wrote: > >>> Set CONFIG_USB_MTU3_GADGET=y to enable device mode explic

Re: [PATCH v2] configs: mt8512: enable device mode of mtu3 explicitly

2020-10-14 Thread Chunfeng Yun
On Wed, 2020-10-14 at 15:01 +0200, Marek Vasut wrote: > On 10/14/20 2:54 PM, Chunfeng Yun wrote: > > Set CONFIG_USB_MTU3_GADGET=y to enable device mode explicitly, > > try to avoid build error: > > "undefined reference to `dm_usb_gadget_handle_interrupts'" > &g

[PATCH v2] configs: mt8512: enable device mode of mtu3 explicitly

2020-10-14 Thread Chunfeng Yun
Set CONFIG_USB_MTU3_GADGET=y to enable device mode explicitly, try to avoid build error: "undefined reference to `dm_usb_gadget_handle_interrupts'" Fixes: 764751784727 ("configs: mt8512: enable fastboot and USB host related configs") Signed-off-by: Chunfeng Yun --- v

Re: [PATCH] configs: mt8512: enable device mode of mtu3 explicitly

2020-10-14 Thread Chunfeng Yun
On Wed, 2020-10-14 at 20:33 +0800, Bin Meng wrote: > On Wed, Oct 14, 2020 at 8:24 PM Chunfeng Yun > wrote: > > > > Set CONFIG_USB_MTU3_GADGET=y to enable it explicitly, > > try to avoid build error: > > "undefined reference to `dm_usb_gadget_handle_int

Re: [PATCH v9] usb: add MediaTek USB3 DRD driver

2020-10-14 Thread Chunfeng Yun
On Wed, 2020-10-14 at 12:56 +0200, Marek Vasut wrote: > On 10/14/20 10:50 AM, Chunfeng Yun wrote: > > This patch adds support for the MediaTek USB3 DRD controller, > > its host side is based on xHCI, this driver supports device mode > > and host mode. > > This patch

[PATCH] configs: mt8512: enable device mode of mtu3 explicitly

2020-10-14 Thread Chunfeng Yun
Set CONFIG_USB_MTU3_GADGET=y to enable it explicitly, try to avoid build error: "undefined reference to `dm_usb_gadget_handle_interrupts'" fixes: 311412ead0 ("configs: mt8512: enable fastboot and USB host related configs") Signed-off-by: Chunfeng Yun --- configs/mt8512_bm

Re: [PATCH v8 5/9] usb: add MediaTek USB3 DRD driver

2020-10-14 Thread Chunfeng Yun
On Wed, 2020-10-14 at 10:22 +0200, Marek Vasut wrote: > On 10/14/20 9:08 AM, Chunfeng Yun wrote: > > This patch adds support for the MediaTek USB3 DRD controller, > > its host side is based on xHCI, this driver supports device mode > > and host mode. > > This one doe

Re: [PATCH v8 8/9] configs: mt8512: enable fastboot and USB host related configs

2020-10-14 Thread Chunfeng Yun
Hi Bin, Thank you again On Wed, 2020-10-14 at 16:05 +0800, Bin Meng wrote: > On Wed, Oct 14, 2020 at 3:08 PM Chunfeng Yun > wrote: > > > > Enable mtu3, xhci, tphy drivers. > > Device mode: enable fastboot; > > Host mode: enable USB, FAT commands, and fixed regul

[PATCH v8 8/9] configs: mt8512: enable fastboot and USB host related configs

2020-10-14 Thread Chunfeng Yun
Enable mtu3, xhci, tphy drivers. Device mode: enable fastboot; Host mode: enable USB, FAT commands, and fixed regulator, mass storage drivers; Due to device mode is enabled by default, comment out the host mode config here. Signed-off-by: Chunfeng Yun --- v8 changes: 1. add CONFIG_USB_XHCI_HCD

[PATCH v8 7/9] arm: dts: mt8512: add usb related nodes

2020-10-14 Thread Chunfeng Yun
Add usb, usb phy, and fixed regulators nodes Signed-off-by: Chunfeng Yun Acked-by: Bin Meng --- v8: add Acked-by Bin v5~v7: no changes v4: add host related properties, add subnode. v3: remove unused property mediatek,discth v2: no changes --- arch/arm/dts/mt8512-bm1-emmc.dts | 34

[PATCH v8 4/9] usb: common: add define of usb_speed_string()

2020-10-14 Thread Chunfeng Yun
There is only declaration of usb_speed_string(), but no definition, so add it to avoid build error when call it. Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v8: add Reviewed-by Bin v7: no changes v6: modify commit message suggested by Roger v5: no changes v4: new patch

[PATCH v8 6/9] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller

2020-10-14 Thread Chunfeng Yun
Add an entry in usb_gadget_controller_number() for the MTU3 gadget controller. It is used to bind the USB Ethernet driver. Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v8: add Reviewed-by Bin v4~v7: no changes v3: new patch --- drivers/usb/gadget/gadget_chips.h | 8 1 file

[PATCH v8 9/9] MAINTAINERS: add USB driver to ARM MEDIATEK

2020-10-14 Thread Chunfeng Yun
Add MediaTek USB3 Dual-Role controller driver to ARM MEDIATEK, and add myself as a maintainer for it. Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v8: add Reviewed-by Bin v6~v7: no changes v5: add mtu3/, xhci-mtk.c, and myself as maintainer for MTK USB v4: new patch --- MAINTAINERS

[PATCH v8 2/9] dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD

2020-10-14 Thread Chunfeng Yun
boot, some properties are removed or changed. Signed-off-by: Chunfeng Yun --- v8: add commit ID the binding referenced suggested by Bin v5~v7: no changes v4: Add support host mode, introduce some new properties and subnode v2~v3: no changes --- .../usb/mediatek,mtu3.txt

[PATCH v8 1/9] dt-binding: usb: add bindings for some common properties

2020-10-14 Thread Chunfeng Yun
Add bindings for common properties, include maximum-speed, dr_mode and phy_type Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v8: add Reviewed-by Bin v2~v7: no changes --- doc/device-tree-bindings/usb/generic.txt | 31 1 file changed, 31 insertions(+) create

[PATCH v8 0/9] Add support MediaTek USB3 DRD driver

2020-10-14 Thread Chunfeng Yun
v2 changes: 1. simplify QMU operations Chunfeng Yun (9): dt-binding: usb: add bindings for some common properties dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD usb: add USB_SPEED_SUPER_PLUS usb: common: add define of usb_speed_string() usb: add MediaTek USB3 DRD driver

[PATCH v8 3/9] usb: add USB_SPEED_SUPER_PLUS

2020-10-14 Thread Chunfeng Yun
Add enum USB_SPEED_SUPER_PLUS for USB3.1 Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v8: add Reviewed-by Bin v5~v7: no changes v4: also add it into speed_names array v2~v3: no changes --- drivers/usb/common/common.c | 1 + include/linux/usb/ch9.h | 1 + 2 files changed, 2

Re: [PATCH next v7 09/10] configs: mt8512: add USB host related configs

2020-10-13 Thread Chunfeng Yun
On Tue, 2020-10-13 at 22:34 +0800, Bin Meng wrote: > On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun > wrote: > > > > Add USB, FAT commands, and fixed regulator, mass storage > > drivers. > > Due to device mode is enabled by default, comment out > > the host mode

Re: [PATCH next v7 05/10] usb: add MediaTek USB3 DRD driver

2020-10-13 Thread Chunfeng Yun
On Tue, 2020-10-13 at 22:26 +0800, Bin Meng wrote: > On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun > wrote: > > > > This patch adds support for the MediaTek USB3 DRD controller, > > its host side is based on xHCI, this driver supports device mode > > and host mode. &

Re: [PATCH next v7 03/10] usb: add USB_SPEED_SUPER_PLUS

2020-10-13 Thread Chunfeng Yun
On Tue, 2020-10-13 at 22:19 +0800, Bin Meng wrote: > On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun > wrote: > > > > Add enum USB_SPEED_SUPER_PLUS for USB3.1 > > > > Signed-off-by: Chunfeng Yun > > --- > > v5~v7: no changes > > > > v4: also a

Re: [PATCH next v7 02/10] dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD

2020-10-13 Thread Chunfeng Yun
On Tue, 2020-10-13 at 22:18 +0800, Bin Meng wrote: > On Fri, Sep 18, 2020 at 5:12 PM Chunfeng Yun > wrote: > > > > Add dt-binding for MediaTek USB3 DRD Driver > > There are some differences compared to the one in the Linux kernel: Some properties are removed

Re: [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-10-13 Thread Chunfeng Yun
Hi Bin, Gentle ping... Could you help to review this series? Thanks a lot On Mon, 2020-09-28 at 04:12 +0200, Marek Vasut wrote: > On 9/28/20 4:01 AM, Chunfeng Yun wrote: > [...] > >> create mode 100644 drivers/usb/mtu3/mtu3_core.c > >> create mode 100644 dr

Re: [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-09-27 Thread Chunfeng Yun
Hi Marek, On Mon, 2020-09-28 at 04:12 +0200, Marek Vasut wrote: > On 9/28/20 4:01 AM, Chunfeng Yun wrote: > [...] > >> create mode 100644 drivers/usb/mtu3/mtu3_core.c > >> create mode 100644 drivers/usb/mtu3/mtu3_dr.h > >> create mode 100644 drivers/usb/mtu

Re: [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-09-27 Thread Chunfeng Yun
Hi Marek, Lukasz Any comments on this patch series? Thanks a lot On Fri, 2020-09-18 at 17:10 +0800, Chunfeng Yun wrote: > These patches introduce the MediaTek USB3 Dual-Role Controller > driver. > The driver can be configured as Peripheral only and Host only(xHCI) > modes, and

[PATCH next v7 07/10] arm: dts: mt8512: add usb related nodes

2020-09-18 Thread Chunfeng Yun
Add usb, usb phy, and fixed regulators nodes Signed-off-by: Chunfeng Yun --- v5~v7: no changes v4: add host related properties, add subnode. v3: remove unused property mediatek,discth v2: no changes --- arch/arm/dts/mt8512-bm1-emmc.dts | 34 arch/arm/dts/mt8512

[PATCH next v7 08/10] configs: mt8512: enable fastboot

2020-09-18 Thread Chunfeng Yun
Enable fastboot to support download image from usb, also enable usb related drivers, such as usb phy etc. Signed-off-by: Chunfeng Yun --- v2~v7: no changes --- configs/mt8512_bm1_emmc_defconfig | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configs

[PATCH next v7 09/10] configs: mt8512: add USB host related configs

2020-09-18 Thread Chunfeng Yun
Add USB, FAT commands, and fixed regulator, mass storage drivers. Due to device mode is enabled by default, comment out the host mode config here. Signed-off-by: Chunfeng Yun --- v5~v7: no changes v4: new patch --- configs/mt8512_bm1_emmc_defconfig | 7 +++ 1 file changed, 7 insertions

[PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-09-18 Thread Chunfeng Yun
for device 5. update bindings to support glue driver v3 changes: 1. add patch [5/7] 2. add udc_set_speed() 3. simplify some code flow v2 changes: 1. simplify QMU operations Chunfeng Yun (10): dt-binding: usb: add bindings for some common properties dt-bindings: usb: mtu3: add

[PATCH next v7 10/10] MAINTAINERS: add USB driver to ARM MEDIATEK

2020-09-18 Thread Chunfeng Yun
Add MediaTek USB3 Dual-Role controller driver to ARM MEDIATEK, and add myself as a maintainer for it. Signed-off-by: Chunfeng Yun --- v6~v7: no changes v5: add mtu3/, xhci-mtk.c, and myself as maintainer for MTK USB v4: new patch --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH next v7 03/10] usb: add USB_SPEED_SUPER_PLUS

2020-09-18 Thread Chunfeng Yun
Add enum USB_SPEED_SUPER_PLUS for USB3.1 Signed-off-by: Chunfeng Yun --- v5~v7: no changes v4: also add it into speed_names array v2~v3: no changes --- drivers/usb/common/common.c | 1 + include/linux/usb/ch9.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/usb/common

[PATCH next v7 06/10] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller

2020-09-18 Thread Chunfeng Yun
Add an entry in usb_gadget_controller_number() for the MTU3 gadget controller. It is used to bind the USB Ethernet driver. Signed-off-by: Chunfeng Yun --- v4~v7: no changes v3: new patch --- drivers/usb/gadget/gadget_chips.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers

[PATCH next v7 01/10] dt-binding: usb: add bindings for some common properties

2020-09-18 Thread Chunfeng Yun
Add bindings for common properties, include maximum-speed, dr_mode and phy_type Signed-off-by: Chunfeng Yun --- v2~v7: no changes --- doc/device-tree-bindings/usb/generic.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 doc/device-tree-bindings/usb

[PATCH next v7 02/10] dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD

2020-09-18 Thread Chunfeng Yun
Add dt-binding for MediaTek USB3 DRD Driver Signed-off-by: Chunfeng Yun --- v5~v7: no changes v4: Add support host mode, introduce some new properties and subnode v2~v3: no changes --- doc/device-tree-bindings/usb/mediatek,mtu3.txt | 79 ++ 1 file changed, 79

[PATCH next v7 04/10] usb: common: add define of usb_speed_string()

2020-09-18 Thread Chunfeng Yun
There is only declaration of usb_speed_string(), but no definition, so add it to avoid build error when call it. Signed-off-by: Chunfeng Yun --- v7: no changes v6: modify commit message suggested by Roger v5: no changes v4: new patch --- drivers/usb/common/common.c | 7 +++ include/linux

[PATCH v6 09/10] configs: mt8512: add USB host related configs

2020-09-14 Thread Chunfeng Yun
Add USB, FAT commands, and fixed regulator, mass storage drivers. Due to device mode is enabled by default, comment out the host mode config here. Signed-off-by: Chunfeng Yun --- v5~v6: no changes v4: new patch --- configs/mt8512_bm1_emmc_defconfig | 7 +++ 1 file changed, 7 insertions

[PATCH v6 10/10] MAINTAINERS: add USB driver to ARM MEDIATEK

2020-09-14 Thread Chunfeng Yun
Add MediaTek USB3 Dual-Role controller driver to ARM MEDIATEK, and add myself as a maintainer for it. Signed-off-by: Chunfeng Yun --- v6: no changes v5: add mtu3/, xhci-mtk.c, and myself as maintainer for MTK USB v4: new patch --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v6 07/10] arm: dts: mt8512: add usb related nodes

2020-09-14 Thread Chunfeng Yun
Add usb, usb phy, and fixed regulators nodes Signed-off-by: Chunfeng Yun --- v5~v6: no changes v4: add host related properties, add subnode. v3: remove unused property mediatek,discth v2: no changes --- arch/arm/dts/mt8512-bm1-emmc.dts | 34 arch/arm/dts/mt8512

[PATCH v6 03/10] usb: add USB_SPEED_SUPER_PLUS

2020-09-14 Thread Chunfeng Yun
Add enum USB_SPEED_SUPER_PLUS for USB3.1 Signed-off-by: Chunfeng Yun --- v5~v6: no changes v4: also add it into speed_names array v2~v3: no changes --- drivers/usb/common/common.c | 1 + include/linux/usb/ch9.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/usb/common

[PATCH v6 04/10] usb: common: add define of usb_speed_string()

2020-09-14 Thread Chunfeng Yun
There is only declaration of usb_speed_string(), but no definition, so add it to avoid build error when call it. Signed-off-by: Chunfeng Yun --- v6: modify commit message suggested by Roger v5: no changes v4: new patch --- drivers/usb/common/common.c | 7 +++ include/linux/usb/ch9.h

[PATCH v6 08/10] configs: mt8512: enable fastboot

2020-09-14 Thread Chunfeng Yun
Enable fastboot to support download image from usb, also enable usb related drivers, such as usb phy etc. Signed-off-by: Chunfeng Yun --- v2~v6: no changes --- configs/mt8512_bm1_emmc_defconfig | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configs

[PATCH v6 06/10] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller

2020-09-14 Thread Chunfeng Yun
Add an entry in usb_gadget_controller_number() for the MTU3 gadget controller. It is used to bind the USB Ethernet driver. Signed-off-by: Chunfeng Yun --- v4~v6: no changes v3: new patch --- drivers/usb/gadget/gadget_chips.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers

[PATCH v6 01/10] dt-binding: usb: add bindings for some common properties

2020-09-14 Thread Chunfeng Yun
Add bindings for common properties, include maximum-speed, dr_mode and phy_type Signed-off-by: Chunfeng Yun --- v2~v6: no changes --- doc/device-tree-bindings/usb/generic.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 doc/device-tree-bindings/usb

[PATCH v6 02/10] dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD

2020-09-14 Thread Chunfeng Yun
Add dt-binding for MediaTek USB3 DRD Driver Signed-off-by: Chunfeng Yun --- v5~v6: no changes v4: Add support host mode, introduce some new properties and subnode v2~v3: no changes --- doc/device-tree-bindings/usb/mediatek,mtu3.txt | 79 ++ 1 file changed, 79

[PATCH v6 00/10] Add support MediaTek USB3 DRD driver

2020-09-14 Thread Chunfeng Yun
v3 changes: 1. add patch [5/7] 2. add udc_set_speed() 3. simplify some code flow v2 changes: 1. simplify QMU operations Chunfeng Yun (10): dt-binding: usb: add bindings for some common properties dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD usb: add

Re: [PATCH v3 9/9] usb: xhci: convert to readx_poll_sleep_timeout()

2020-09-08 Thread Chunfeng Yun
Hi Marek, I've sent out v4; Hi Frank, Please forward this email to Marek, thanks a lot On Tue, 2020-09-08 at 13:13 +0200, Marek Vasut wrote: > On 9/8/20 3:44 AM, Bin Meng wrote: > > On Mon, Sep 7, 2020 at 3:14 PM Chunfeng Yun > > wrote: > >> > >> Use r

[PATCH v4 6/9] usb: xhci: convert to TRB_LEN() and TRB_INTR_TARGET()

2020-09-08 Thread Chunfeng Yun
For normal TRB fields: use TRB_LEN(x) instead of ((x) & TRB_LEN_MASK); and use TRB_INTR_TARGET(x) instead of (((x) & TRB_INTR_TARGET_MASK) << TRB_INTR_TARGET_SHIFT) Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: keep code alignment and add reviewed-by Bin v3: merge

[PATCH v4 5/9] usb: xhci: convert to TRB_TYPE()

2020-09-08 Thread Chunfeng Yun
Use TRB_TYPE(p) instead of ((p) << TRB_TYPE_SHIFT) Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: no changes v3: add reviewed-by Bin v2: no changes --- drivers/usb/host/xhci-mem.c | 3 +-- drivers/usb/host/xhci-ring.c | 11 +-- include/usb/xhci.h |

[PATCH v4 9/9] usb: xhci: convert to readx_poll_sleep_timeout()

2020-09-08 Thread Chunfeng Yun
Use readx_poll_sleep_timeout() to poll the register status Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: add reviewed-by Bin v3: no changes v2: fix typo of title suggested by Frank --- drivers/usb/host/xhci.c | 25 +++-- 1 file changed, 11 insertions(+), 14

[PATCH v4 7/9] usb: xhci: convert to TRB_TX_TYPE()

2020-09-08 Thread Chunfeng Yun
Use TRB_TX_TYPE() instead of (TRB_DATA_OUT/IN << TRB_TX_TYPE_SHIFT) Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: add reviewed-by Bin v2~v3: no changes --- drivers/usb/host/xhci-ring.c | 4 ++-- include/usb/xhci.h | 1 - 2 files changed, 2 insertions(+), 3 del

[PATCH v4 3/9] usb: xhci: add quirks flag to support MediaTek xHCI 0.96

2020-09-08 Thread Chunfeng Yun
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: Frank Wunderlich Reviewed-by: Bin Meng --- v4: no changes v3: fix typo, and add reviewed-by Bin v2: add Tested

[PATCH v4 8/9] usb: xhci: use macros with parameter to fill ep_info2

2020-09-08 Thread Chunfeng Yun
Use macros with parameter to fill ep_info2, then some macros for MASK and SHIFT can be removed Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: add reviewed-by Bin v3: merge patch [v2 9/11] and [v2 10/11] into one, both for ep_info2 v2: no changes --- drivers/usb/host/xhci-mem.c

[PATCH v4 1/9] usb: xhci: add a member hci_version in xhci_ctrl struct

2020-09-08 Thread Chunfeng Yun
Add a member to save xHCI version, it's used some times. Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: no changes v3: add reviewed-by Bin v2: no changes --- drivers/usb/host/xhci-ring.c | 4 ++-- drivers/usb/host/xhci.c | 1 + include/usb/xhci.h | 1 + 3 files

[PATCH v4 2/9] usb: xhci: create one unified function to calculate TRB TD remainder

2020-09-08 Thread Chunfeng Yun
o indicate last trb in td remainder calculation") Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4 changes: 1. remove the ending period in the commit title 2. use true instead of 1 3. add Reviewed-by Bin v2~v3: no changes --- drivers/usb/ho

[PATCH v4 4/9] usb: xhci: convert to HCS_MAX_PORTS()

2020-09-08 Thread Chunfeng Yun
Use HCS_MAX_PORTS(p) instead of ((p & HCS_MAX_PORTS_MASK) >> HCS_MAX_PORTS_SHIFT) Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v4: no changes v3: add reviewed-by Bin v2: no changes --- drivers/usb/host/xhci.c | 3 +-- include/usb/xhci.h | 2 -- 2 files changed, 1

Re: [PATCH v3 2/9] usb: xhci: create one unified function to calculate TRB TD remainder.

2020-09-08 Thread Chunfeng Yun
On Tue, 2020-09-08 at 13:41 +0800, Bin Meng wrote: > On Mon, Sep 7, 2020 at 3:14 PM Chunfeng Yun wrote: > > > > nits: please remove the ending period in the commit title Ok, will fix it > > > xhci versions 1.0 and later report the untransferred data remaining in a >

Re: [PATCH v3 6/9] usb: xhci: convert to TRB_LEN() and TRB_INTR_TARGET()

2020-09-08 Thread Chunfeng Yun
On Tue, 2020-09-08 at 09:30 +0800, Bin Meng wrote: > On Mon, Sep 7, 2020 at 3:14 PM Chunfeng Yun wrote: > > > > For normal TRB fields: > > use TRB_LEN(x) instead of ((x) & TRB_LEN_MASK); > > and use TRB_INTR_TARGET(x) instead of > > (((x) & TRB_I

Re: [PATCH RESEND v2 05/11] usb: xhci: convert to TRB_TYPE()

2020-09-07 Thread Chunfeng Yun
Hi Bin, On Fri, 2020-09-04 at 15:19 +0800, Bin Meng wrote: > Hi Marek, > > On Fri, Sep 4, 2020 at 3:05 PM Marek Vasut wrote: > > > > On 9/4/20 8:54 AM, Bin Meng wrote: > > > On Wed, Aug 26, 2020 at 5:31 PM Chunfeng Yun > > > wrote: >

[PATCH v3 8/9] usb: xhci: use macros with parameter to fill ep_info2

2020-09-07 Thread Chunfeng Yun
Use macros with parameter to fill ep_info2, then some macros for MASK and SHIFT can be removed Signed-off-by: Chunfeng Yun --- v3: merge patch [v2 9/11] and [v2 10/11] into one, both for ep_info2 v2: no changes --- drivers/usb/host/xhci-mem.c | 15 +-- drivers/usb/host/xhci.c

[PATCH v3 9/9] usb: xhci: convert to readx_poll_sleep_timeout()

2020-09-07 Thread Chunfeng Yun
Use readx_poll_sleep_timeout() to poll the register status Signed-off-by: Chunfeng Yun --- v3: no changes v2: fix typo of title suggested by Frank --- drivers/usb/host/xhci.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/usb/host/xhci.c

[PATCH v3 5/9] usb: xhci: convert to TRB_TYPE()

2020-09-07 Thread Chunfeng Yun
Use TRB_TYPE(p) instead of ((p) << TRB_TYPE_SHIFT) Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- v3: add reviewed-by Bin v2: no changes --- drivers/usb/host/xhci-mem.c | 3 +-- drivers/usb/host/xhci-ring.c | 11 +-- include/usb/xhci.h | 1 - 3 files chan

  1   2   3   4   >