[U-Boot] [RESEND PATCH] usb: xhci: support 1.1 or later version

2019-11-08 Thread Chunfeng Yun
The xHCI 1.1 version also need set Transfer Type field Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 119b418..6a469e1 100644 --- a/drivers/usb

[U-Boot] [PATCH 2/7] clk: fix error check for devm_clk_get_optional()

2019-11-08 Thread Chunfeng Yun
If skip all return error number, it may skip some real error cases, so only skip the error when the clock is not provided in DTS Signed-off-by: Chunfeng Yun --- drivers/clk/clk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk

[U-Boot] [PATCH 3/7] clk: check valid clock by clk_valid()

2019-11-08 Thread Chunfeng Yun
Add valid check for clk->dev, it's useful when get optional clock even when the clk point is valid, but its dev will be NULL. Signed-off-by: Chunfeng Yun --- drivers/clk/clk-uclass.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-uclass.

[U-Boot] [PATCH 5/7] clk: fixed_rate: add dummy enable() function

2019-11-08 Thread Chunfeng Yun
This is used to avoid clk_enable() return -ENOSYS. Signed-off-by: Chunfeng Yun --- drivers/clk/clk_fixed_rate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index f51126793e..2c20eddb0b 100644 --- a/drivers/clk

[U-Boot] [PATCH 1/7] clk: mediatek: mt7629: add support for ssusbsys

2019-11-08 Thread Chunfeng Yun
The SSUSB IP's clocks come from ssusbsys module on mt7629, so add its driver Signed-off-by: Chunfeng Yun --- drivers/clk/mediatek/clk-mt7629.c | 42 +++ 1 file changed, 42 insertions(+) diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk

[U-Boot] [PATCH 7/7] phy: phy-mtk-tphy: make ref clock optional

2019-11-08 Thread Chunfeng Yun
If make the ref clock optional, no need refer to fixed-clock when the ref clock is always on or comes from oscillator directly. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers

[U-Boot] [PATCH 6/7] phy: phy-mtk-tphy: remove the check of -ENOSYS

2019-11-08 Thread Chunfeng Yun
No need check -ENOSYS anymore after add dummy_enable() for fixed-clock. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index 3701481256..c4fb404f20 100644

[U-Boot] [PATCH 4/7] clk: add APIs to get (optional) clock by name without a device

2019-11-08 Thread Chunfeng Yun
Sometimes we may need get (optional) clock without a device, that means use ofnode. e.g. when the phy node has subnode, and there is no device created for subnode, in this case, we need these new APIs to get subnode's clock. Signed-off-by: Chunfeng Yun --- drivers/clk/clk-uclass.c | 28

[U-Boot] [PATCH] usb: xhci: support 1.1 or later version

2019-11-07 Thread Chunfeng Yun
The xHCI 1.1 version also need set Transfer Type field Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 119b418..6a469e1 100644 --- a/drivers/usb

[RESEND PATCH 1/7] clk: mediatek: mt7629: add support for ssusbsys

2019-12-17 Thread Chunfeng Yun
The SSUSB IP's clocks come from ssusbsys module on mt7629, so add its driver Signed-off-by: Chunfeng Yun --- drivers/clk/mediatek/clk-mt7629.c | 42 +++ 1 file changed, 42 insertions(+) diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk

[RESEND PATCH 7/7] phy: phy-mtk-tphy: make ref clock optional

2019-12-17 Thread Chunfeng Yun
If make the ref clock optional, no need refer to fixed-clock when the ref clock is always on or comes from oscillator directly. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers

[RESEND PATCH 5/7] clk: fixed_rate: add dummy enable() function

2019-12-17 Thread Chunfeng Yun
This is used to avoid clk_enable() return -ENOSYS. Signed-off-by: Chunfeng Yun --- drivers/clk/clk_fixed_rate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index f51126793e..2c20eddb0b 100644 --- a/drivers/clk

[RESEND PATCH 6/7] phy: phy-mtk-tphy: remove the check of -ENOSYS

2019-12-17 Thread Chunfeng Yun
No need check -ENOSYS anymore after add dummy_enable() for fixed-clock. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index 3701481256..c4fb404f20 100644

[RESEND PATCH 3/7] clk: check valid clock by clk_valid()

2019-12-17 Thread Chunfeng Yun
Add valid check for clk->dev, it's useful when get optional clock even when the clk point is valid, but its dev will be NULL. Signed-off-by: Chunfeng Yun --- drivers/clk/clk-uclass.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-uclass.

[RESEND PATCH 4/7] clk: add APIs to get (optional) clock by name without a device

2019-12-17 Thread Chunfeng Yun
Sometimes we may need get (optional) clock without a device, that means use ofnode. e.g. when the phy node has subnode, and there is no device created for subnode, in this case, we need these new APIs to get subnode's clock. Signed-off-by: Chunfeng Yun --- drivers/clk/clk-uclass.c | 28

[RESEND PATCH 2/7] clk: fix error check for devm_clk_get_optional()

2019-12-17 Thread Chunfeng Yun
If skip all return error number, it may skip some real error cases, so only skip the error when the clock is not provided in DTS Signed-off-by: Chunfeng Yun --- drivers/clk/clk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk

[PATCH v2 6/7] phy: phy-mtk-tphy: remove the check of -ENOSYS

2020-01-08 Thread Chunfeng Yun
No need check -ENOSYS anymore after add dummy_enable() for fixed-clock. Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/phy/phy-mtk-tphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -

[PATCH v2 1/7] clk: mediatek: mt7629: add support for ssusbsys

2020-01-08 Thread Chunfeng Yun
The SSUSB IP's clocks come from ssusbsys module on mt7629, so add its driver Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/clk/mediatek/clk-mt7629.c | 42 +++ 1 file changed

[PATCH v2 2/7] clk: fix error check for devm_clk_get_optional()

2020-01-08 Thread Chunfeng Yun
If skip all return error number, it may skip some real error cases, so only skip the error when the clock is not provided in DTS Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/clk/clk-uclass.c | 2 +- 1

[PATCH v2 4/7] clk: add APIs to get (optional) clock by name without a device

2020-01-08 Thread Chunfeng Yun
Sometimes we may need get (optional) clock without a device, that means use ofnode. e.g. when the phy node has subnode, and there is no device created for subnode, in this case, we need these new APIs to get subnode's clock. Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed

[PATCH v2 3/7] clk: check valid clock by clk_valid()

2020-01-08 Thread Chunfeng Yun
Add valid check for clk->dev, it's useful when get optional clock even when the clk point is valid, but its dev will be NULL. Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/clk/clk-uclass.c | 16

[PATCH v2 5/7] clk: fixed_rate: add dummy enable() function

2020-01-08 Thread Chunfeng Yun
This is used to avoid clk_enable() return -ENOSYS. Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/clk/clk_fixed_rate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk_fixed_rate

[PATCH v2 7/7] phy: phy-mtk-tphy: make ref clock optional

2020-01-08 Thread Chunfeng Yun
If make the ref clock optional, no need refer to fixed-clock when the ref clock is always on or comes from oscillator directly. Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/phy/phy-mtk-tphy.c | 3 ++- 1

Re: [RESEND PATCH 1/7] clk: mediatek: mt7629: add support for ssusbsys

2019-12-27 Thread Chunfeng Yun
On Fri, 2019-12-27 at 19:27 -0700, Simon Glass wrote: > On Sun, 15 Dec 2019 at 20:14, Chunfeng Yun wrote: > > > > The SSUSB IP's clocks come from ssusbsys module on mt7629, > > so add its driver > > > > Signed-off-by: Chunfeng Yun > > --- >

[PATCH 3/8] phy: phy-mtk-tphy: add a new reference clock

2020-03-11 Thread Chunfeng Yun
for digital phy. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index dd59f9a13f..86cefaa0c5 100644 --- a/drivers/phy/phy-mtk-tphy.c +++ b

[PATCH 1/8] phy: phy-mtk-tphy: add support USB phys

2020-03-11 Thread Chunfeng Yun
Support USB2 and USB3 PHY with shared banks when support multi-phys Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 224 +++-- 1 file changed, 217 insertions(+), 7 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c

[PATCH 4/8] dm: core: Add function to get child count of ofnode

2020-03-11 Thread Chunfeng Yun
This patch add a function used to get the child count of a ofnode Signed-off-by: Chunfeng Yun --- include/dm/ofnode.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index b5a50e8849..b2c0118a36 100644 --- a/include/dm/ofnode.h

[PATCH 8/8] dt-bindings: usb: mtk-xhci: Add binding for MediaTek xHCI host controller

2020-03-11 Thread Chunfeng Yun
Add dt-binding for MediaTek xHCI host controller Signed-off-by: Chunfeng Yun --- .../usb/mediatek,mtk-xhci.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt diff --git a/doc/device-tree-bindings

[PATCH 2/8] phy: phy-mtk-tphy: add support new version

2020-03-11 Thread Chunfeng Yun
The new version removes all shared banks between multi-phys Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 68 +++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index

[PATCH 0/8] Add support for MediaTek xHCI host controller

2020-03-11 Thread Chunfeng Yun
The series of patches are used to support xHCI host controller on MediaTek SoCs which has a glue layer IPPC (IP Port Control), and add USB function on T-PHY including T-PHY V1 and V2; Finally add USB related nodes for MT7629 platform. Chunfeng Yun (8): phy: phy-mtk-tphy: add support USB phys

Re: [PATCH 5/8] xhci: mediatek: Add support for MTK xHCI host controller

2020-03-11 Thread Chunfeng Yun
On Wed, 2020-03-11 at 08:11 +0100, Marek Vasut wrote: > On 3/11/20 7:50 AM, Chunfeng Yun wrote: > [...] > > + * @u3_ctrl_p[x]: ip usb3 port x control register, only low 4bytes are used > > + * @u2_ctrl_p[x]: ip usb2 port x control register, only low 4bytes are used > > +

[PATCH 7/8] dt-bindings: phy-mtk-tphy: add properties of address mapping and clocks

2020-03-11 Thread Chunfeng Yun
1. add the address mapping related properties; 2. make "ref" clock optional, and add optional clock "da_ref"; 3. add the banks layout of TPHY V1 and V2; Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 78 --- 1 file changed,

[PATCH 5/8] xhci: mediatek: Add support for MTK xHCI host controller

2020-03-11 Thread Chunfeng Yun
This patch is used to support the on-chip xHCI controller on MediaTek SoCs, currently only control/bulk transfers are supported. Signed-off-by: Chunfeng Yun --- drivers/usb/host/Kconfig| 6 + drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-mtk.c | 508

[PATCH 6/8] arm: dts: mt7629: add support usb related nodes

2020-03-11 Thread Chunfeng Yun
Add usb, phy and clock nodes Signed-off-by: Chunfeng Yun --- arch/arm/dts/mt7629-rfb.dts | 8 arch/arm/dts/mt7629.dtsi| 41 + 2 files changed, 49 insertions(+) diff --git a/arch/arm/dts/mt7629-rfb.dts b/arch/arm/dts/mt7629-rfb.dts index

Re: [PATCH 4/8] dm: core: Add function to get child count of ofnode

2020-03-12 Thread Chunfeng Yun
On Wed, 2020-03-11 at 06:17 -0600, Simon Glass wrote: > Hi Chunfeng, > > On Wed, 11 Mar 2020 at 01:01, Chunfeng Yun wrote: > > > > This patch add a function used to get the child count of > > a ofnode > > > > Signed-off-by: Chunfeng Yun

Re: [PATCH 5/8] xhci: mediatek: Add support for MTK xHCI host controller

2020-03-12 Thread Chunfeng Yun
On Wed, 2020-03-11 at 06:18 -0600, Simon Glass wrote: > Hi Chunfeng, > > On Wed, 11 Mar 2020 at 01:00, Chunfeng Yun wrote: > > > > This patch is used to support the on-chip xHCI controller on > > MediaTek SoCs, currently only control/bulk transfers are > >

[PATCH v5 14/14] MAINTAINERS: MediaTek: add USB related files

2020-04-09 Thread Chunfeng Yun
Add dt-binding files of xhci-mtk and phys, C files of phys. Signed-off-by: Chunfeng Yun --- v5: new patch --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 37ff21a037..4fe3bf949e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -243,9 +243,12

[PATCH v5 11/14] arm: dts: mt7629: add usb related nodes

2020-04-09 Thread Chunfeng Yun
Add usb, phy and clock nodes Signed-off-by: Chunfeng Yun --- v3~v5: no changes v2: 1. remove fixed clock clk20m --- arch/arm/dts/mt7629-rfb.dts | 8 arch/arm/dts/mt7629.dtsi| 41 + 2 files changed, 49 insertions(+) diff --git a/arch/arm

[PATCH v5 10/14] xhci: mediatek: Add support for MTK xHCI host controller

2020-04-09 Thread Chunfeng Yun
This patch is used to support the on-chip xHCI controller on MediaTek SoCs, currently control/bulk/interrupt transfers are supported. Signed-off-by: Chunfeng Yun --- v5: 1. print error number suggested by Marek 2. support interrupt transfer v4: 1. use phy_bulk API v3: 1. use

[PATCH v5 12/14] dt-bindings: phy-mtk-tphy: add properties of address mapping and clocks

2020-04-09 Thread Chunfeng Yun
1. add the address mapping related properties; 2. make "ref" clock optional, and add optional clock "da_ref"; 3. add the banks layout of TPHY V1 and V2; Signed-off-by: Chunfeng Yun --- v2~v5: no changes --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 78 +++

[PATCH v5 08/14] phy: phy-mtk-tphy: add support new version

2020-04-09 Thread Chunfeng Yun
The new version removes all shared banks between multi-phys Signed-off-by: Chunfeng Yun --- v2~v5: no changes --- drivers/phy/phy-mtk-tphy.c | 68 +++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy

[PATCH v5 13/14] dt-bindings: usb: mtk-xhci: Add binding for MediaTek xHCI host controller

2020-04-09 Thread Chunfeng Yun
Add dt-binding for MediaTek xHCI host controller Signed-off-by: Chunfeng Yun --- v2~v5: no changes --- .../usb/mediatek,mtk-xhci.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt diff --git

[PATCH v5 09/14] phy: phy-mtk-tphy: add a new reference clock

2020-04-09 Thread Chunfeng Yun
for digital phy. Signed-off-by: Chunfeng Yun --- v2~v5: no changes --- drivers/phy/phy-mtk-tphy.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index 20167fe7cb..81525a48b7 100644 --- a/drivers/phy/phy

[PATCH v5 03/14] phy: Add get/enable/disable for a bulk of phys

2020-04-09 Thread Chunfeng Yun
This patch adds a "bulk" API to the phy API in order to get/enable/disable a group of phys associated with a device. The bulk API will avoid adding a copy of the same code to manage a group of phys in drivers. Signed-off-by: Chunfeng Yun --- v5: no changes v4: new patch --- drive

[PATCH v5 00/14] Add support for MediaTek xHCI host controller

2020-04-09 Thread Chunfeng Yun
for ofnode_get_child_count() suggested by Simon 3. use clk_bulk to get clocks suggested by Marek 4. use clrsetbits_le32() etc suggeseted by Marek 5. get the count of phys by dev_get_child_count() 6. drop reference to fixed clock clk20m Chunfeng Yun (14): dm: core: Add function to get child count

[PATCH v5 06/14] usb: dwc2_udc_otg: use the phy bulk API to get phys

2020-04-09 Thread Chunfeng Yun
Use the phy bulk API to get a group of phys Signed-off-by: Chunfeng Yun --- v5: no changes v4: new patch --- drivers/usb/gadget/dwc2_udc_otg.c | 90 +-- 1 file changed, 12 insertions(+), 78 deletions(-) diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb

[PATCH v5 01/14] dm: core: Add function to get child count of ofnode or device

2020-04-09 Thread Chunfeng Yun
This patch add function used to get the child count of a ofnode or a device Signed-off-by: Chunfeng Yun --- v4~v5: no changes v3: 1. add non/inline function dev_get_child_count() instead of macro suggested by Simon v2: 1. move ofnode_get_child_count() into ofnode.c suggested by Simon

[PATCH v5 04/14] test: dm: phy: add a test item for the phy_bulk API

2020-04-09 Thread Chunfeng Yun
Add a test item for the phy_bulk API Signed-off-by: Chunfeng Yun --- v5: no changes v4: new patch --- arch/sandbox/dts/test.dts | 11 +++ test/dm/phy.c | 29 + 2 files changed, 40 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch

[PATCH v5 07/14] phy: phy-mtk-tphy: add support USB phys

2020-04-09 Thread Chunfeng Yun
Support USB2 and USB3 PHY with shared banks when support multi-phys Signed-off-by: Chunfeng Yun --- v3~v5: no changes v2: 1. get the count of phys by dev_get_child_count() --- drivers/phy/phy-mtk-tphy.c | 227 +++-- 1 file changed, 218 insertions(+), 9

[PATCH v5 05/14] usb: dwc3: use the phy bulk API to get phys

2020-04-09 Thread Chunfeng Yun
Get a group of phys by the phy bulk API Signed-off-by: Chunfeng Yun --- v5: no changes v4: new patch --- drivers/usb/dwc3/core.c | 83 - drivers/usb/dwc3/dwc3-generic.c | 7 ++- include/dwc3-uboot.h| 11 ++--- 3 files changed, 17 insertions

[PATCH v5 02/14] test: dm: add test item for ofnode_get_child_count()

2020-04-09 Thread Chunfeng Yun
Add a test item for ofnode_get_child_count() Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass --- v4~v5: no changes v3: 1. squash dts patch into this one suggested by Simon 2. add reviewed-by Simon v2: a new patch to test ofnode_get_child_count() suggested by Simon --- arch

Re: [PATCH v6 02/14] test: dm: add test item for ofnode_get_child_count()

2020-04-20 Thread Chunfeng Yun
On Mon, 2020-04-20 at 11:07 -0300, Fabio Estevam wrote: > On Mon, Apr 20, 2020 at 12:22 AM Chunfeng Yun > wrote: > > > + i-test { > > + compatible = "mediatek,u-boot-fdt-test"; > > + #address-cells = <

[PATCH v6 02/14] test: dm: add test item for ofnode_get_child_count()

2020-04-19 Thread Chunfeng Yun
Add a test item for ofnode_get_child_count() Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v4~v5: no changes v3: 1. squash dts patch into this one suggested by Simon 2. add reviewed-by Simon v2: a new patch to test

[PATCH v6 06/14] usb: dwc2_udc_otg: use the phy bulk API to get phys

2020-04-19 Thread Chunfeng Yun
Use the phy bulk API to get a group of phys Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v5: no changes v4: new patch --- drivers/usb/gadget/dwc2_udc_otg.c | 90 +-- 1 file changed, 12 insertions(+), 78 deletions(-) diff

[PATCH v6 07/14] phy: phy-mtk-tphy: add support USB phys

2020-04-19 Thread Chunfeng Yun
Support USB2 and USB3 PHY with shared banks when support multi-phys Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v3~v5: no changes v2: get the count of phys by dev_get_child_count() --- drivers/phy/phy-mtk-tphy.c | 227

[PATCH v6 03/14] phy: Add get/enable/disable for a bulk of phys

2020-04-19 Thread Chunfeng Yun
This patch adds a "bulk" API to the phy API in order to get/enable/disable a group of phys associated with a device. The bulk API will avoid adding a copy of the same code to manage a group of phys in drivers. Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed

[PATCH v6 01/14] dm: core: Add function to get child count of ofnode or device

2020-04-19 Thread Chunfeng Yun
This patch add function used to get the child count of a ofnode or a device Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao Reviewed-by: Simon Glass --- v6: add Reviewed-by Weijie & Simon v4~v5: no changes v3: 1. add non/inline function dev_get_child_count() instead of m

[PATCH v6 05/14] usb: dwc3: use the phy bulk API to get phys

2020-04-19 Thread Chunfeng Yun
Get a group of phys by the phy bulk API Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v5: no changes v4: new patch --- drivers/usb/dwc3/core.c | 83 - drivers/usb/dwc3/dwc3-generic.c | 7 ++- include/dwc3-uboot.h

[PATCH v6 11/14] arm: dts: mt7629: add usb related nodes

2020-04-19 Thread Chunfeng Yun
Add usb, phy and clock nodes Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v3~v5: no changes v2: 1. remove fixed clock clk20m --- arch/arm/dts/mt7629-rfb.dts | 8 arch/arm/dts/mt7629.dtsi| 41 + 2

[PATCH v6 08/14] phy: phy-mtk-tphy: add support new version

2020-04-19 Thread Chunfeng Yun
The new version removes all shared banks between multi-phys Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v2~v5: no changes --- drivers/phy/phy-mtk-tphy.c | 68 +++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff

[PATCH v6 00/14] Add support for MediaTek xHCI host controller

2020-04-19 Thread Chunfeng Yun
sted by Simon 2. add a test item for ofnode_get_child_count() suggested by Simon 3. use clk_bulk to get clocks suggested by Marek 4. use clrsetbits_le32() etc suggeseted by Marek 5. get the count of phys by dev_get_child_count() 6. drop reference to fixed clock clk20m Chunfeng Yun

[PATCH v6 04/14] test: dm: phy: add a test item for the phy_bulk API

2020-04-19 Thread Chunfeng Yun
Add a test item for the phy_bulk API Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao Reviewed-by: Simon Glass --- v6: add Reviewed-by Weijie & Simon v5: no changes v4: new patch --- arch/sandbox/dts/test.dts | 11 +++ test/dm/phy.c

[PATCH v6 12/14] dt-bindings: phy-mtk-tphy: add properties of address mapping and clocks

2020-04-19 Thread Chunfeng Yun
1. add the address mapping related properties; 2. make "ref" clock optional, and add optional clock "da_ref"; 3. add the banks layout of TPHY V1 and V2; Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v2~v5: no changes --- doc/device-t

[PATCH v6 09/14] phy: phy-mtk-tphy: add a new reference clock

2020-04-19 Thread Chunfeng Yun
for digital phy. Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v2~v5: no changes --- drivers/phy/phy-mtk-tphy.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index

[PATCH v6 10/14] xhci: mediatek: Add support for MTK xHCI host controller

2020-04-19 Thread Chunfeng Yun
This patch is used to support the on-chip xHCI controller on MediaTek SoCs, currently control/bulk/interrupt transfers are supported. Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v5: 1. print error number suggested by Marek 2. support interrupt

[PATCH v6 13/14] dt-bindings: usb: mtk-xhci: Add binding for MediaTek xHCI host controller

2020-04-19 Thread Chunfeng Yun
Add dt-binding for MediaTek xHCI host controller Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v2~v5: no changes --- .../usb/mediatek,mtk-xhci.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 doc/device

[PATCH v6 14/14] MAINTAINERS: MediaTek: add USB related files

2020-04-19 Thread Chunfeng Yun
Add dt-binding files of xhci-mtk and phys, C files of phys. Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v6: add Reviewed-by Weijie v5: new patch --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7ac7e21ba1..cbbe7091ad 100644

Re: [PATCH v4 10/13] xhci: mediatek: Add support for MTK xHCI host controller

2020-04-06 Thread Chunfeng Yun
On Fri, 2020-04-03 at 13:46 +0200, Marek Vasut wrote: > On 4/3/20 5:33 AM, Chunfeng Yun wrote: > [...] > > +static int xhci_mtk_ofdata_get(struct mtk_xhci *mtk) > > +{ > > + struct udevice *dev = mtk->dev; > > + int ret = 0; > > + > > +

[PATCH v4 05/13] usb: dwc3: use the phy bulk API to get phys

2020-04-02 Thread Chunfeng Yun
Get a group of phys by the phy bulk API Signed-off-by: Chunfeng Yun --- v4: new patch --- drivers/usb/dwc3/core.c | 83 - drivers/usb/dwc3/dwc3-generic.c | 7 ++- include/dwc3-uboot.h| 11 ++--- 3 files changed, 17 insertions(+), 84 deletions

[PATCH v4 00/13] Add support for MediaTek xHCI host controller

2020-04-02 Thread Chunfeng Yun
5. get the count of phys by dev_get_child_count() 6. drop reference to fixed clock clk20m Chunfeng Yun (13): dm: core: Add function to get child count of ofnode or device test: dm: add test item for ofnode_get_child_count() phy: Add get/enable/disable for a bulk of phys test: dm

[PATCH v4 09/13] phy: phy-mtk-tphy: add a new reference clock

2020-04-02 Thread Chunfeng Yun
for digital phy. Signed-off-by: Chunfeng Yun --- v2~v4: no changes --- drivers/phy/phy-mtk-tphy.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index 20167fe7cb..81525a48b7 100644 --- a/drivers/phy/phy

[PATCH v4 10/13] xhci: mediatek: Add support for MTK xHCI host controller

2020-04-02 Thread Chunfeng Yun
This patch is used to support the on-chip xHCI controller on MediaTek SoCs, currently only control/bulk transfers are supported. Signed-off-by: Chunfeng Yun --- v4: 1. use phy_bulk API v3: 1. use macro approach to access registers suggested by Marek v2: 1. use clk_bulk to get

[PATCH v4 04/13] test: dm: phy: add a test item for the phy_bulk API

2020-04-02 Thread Chunfeng Yun
Add a test item for the phy_bulk API Signed-off-by: Chunfeng Yun --- v4: new patch --- arch/sandbox/dts/test.dts | 11 +++ test/dm/phy.c | 29 + 2 files changed, 40 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts

[PATCH v4 07/13] phy: phy-mtk-tphy: add support USB phys

2020-04-02 Thread Chunfeng Yun
Support USB2 and USB3 PHY with shared banks when support multi-phys Signed-off-by: Chunfeng Yun --- v3~v4: no changes v2: 1. get the count of phys by dev_get_child_count() --- drivers/phy/phy-mtk-tphy.c | 227 +++-- 1 file changed, 218 insertions(+), 9

[PATCH v4 01/13] dm: core: Add function to get child count of ofnode or device

2020-04-02 Thread Chunfeng Yun
This patch add function used to get the child count of a ofnode or a device Signed-off-by: Chunfeng Yun --- v4: no changes v3: 1. add non/inline function dev_get_child_count() instead of macro suggested by Simon v2: 1. move ofnode_get_child_count() into ofnode.c suggested by Simon

[PATCH v4 06/13] usb: dwc2_udc_otg: use the phy bulk API to get phys

2020-04-02 Thread Chunfeng Yun
Use the phy bulk API to get a group of phys Signed-off-by: Chunfeng Yun --- v4: new patch --- drivers/usb/gadget/dwc2_udc_otg.c | 90 +-- 1 file changed, 12 insertions(+), 78 deletions(-) diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget

[PATCH v4 08/13] phy: phy-mtk-tphy: add support new version

2020-04-02 Thread Chunfeng Yun
The new version removes all shared banks between multi-phys Signed-off-by: Chunfeng Yun --- v2~v4: no changes --- drivers/phy/phy-mtk-tphy.c | 68 +++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy

[PATCH v4 13/13] dt-bindings: usb: mtk-xhci: Add binding for MediaTek xHCI host controller

2020-04-02 Thread Chunfeng Yun
Add dt-binding for MediaTek xHCI host controller Signed-off-by: Chunfeng Yun --- v2~v4: no changes --- .../usb/mediatek,mtk-xhci.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt diff --git

[PATCH v4 11/13] arm: dts: mt7629: add usb related nodes

2020-04-02 Thread Chunfeng Yun
Add usb, phy and clock nodes Signed-off-by: Chunfeng Yun --- v3~v4: no changes v2: 1. remove fixed clock clk20m --- arch/arm/dts/mt7629-rfb.dts | 8 arch/arm/dts/mt7629.dtsi| 41 + 2 files changed, 49 insertions(+) diff --git a/arch/arm

[PATCH v4 12/13] dt-bindings: phy-mtk-tphy: add properties of address mapping and clocks

2020-04-02 Thread Chunfeng Yun
1. add the address mapping related properties; 2. make "ref" clock optional, and add optional clock "da_ref"; 3. add the banks layout of TPHY V1 and V2; Signed-off-by: Chunfeng Yun --- v2~v4: no changes --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 78 +++

[PATCH v4 02/13] test: dm: add test item for ofnode_get_child_count()

2020-04-02 Thread Chunfeng Yun
Add a test item for ofnode_get_child_count() Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass --- v4: no changes v3: 1. squash dts patch into this one suggested by Simon 2. add reviewed-by Simon v2: a new patch to test ofnode_get_child_count() suggested by Simon --- arch

[PATCH v4 03/13] phy: Add get/enable/disable for a bulk of phys

2020-04-02 Thread Chunfeng Yun
This patch adds a "bulk" API to the phy API in order to get/enable/disable a group of phys associated with a device. The bulk API will avoid adding a copy of the same code to manage a group of phys in drivers. Signed-off-by: Chunfeng Yun --- v4: new patch --- drivers/phy/phy-ucl

[PATCH v3 6/9] xhci: mediatek: Add support for MTK xHCI host controller

2020-03-26 Thread Chunfeng Yun
This patch is used to support the on-chip xHCI controller on MediaTek SoCs, currently only control/bulk transfers are supported. Signed-off-by: Chunfeng Yun --- v3: use macro approach to access registers suggested by Marek v2: 1. use clk_bulk to get clocks suggested by Marek 2. use

[PATCH v3 8/9] dt-bindings: phy-mtk-tphy: add properties of address mapping and clocks

2020-03-26 Thread Chunfeng Yun
1. add the address mapping related properties; 2. make "ref" clock optional, and add optional clock "da_ref"; 3. add the banks layout of TPHY V1 and V2; Signed-off-by: Chunfeng Yun --- v2~v3: no changes --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 78 +++

[PATCH v3 9/9] dt-bindings: usb: mtk-xhci: Add binding for MediaTek xHCI host controller

2020-03-26 Thread Chunfeng Yun
Add dt-binding for MediaTek xHCI host controller Signed-off-by: Chunfeng Yun --- v2~v3: no changes --- .../usb/mediatek,mtk-xhci.txt | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt diff --git

[PATCH v3 4/9] phy: phy-mtk-tphy: add support new version

2020-03-26 Thread Chunfeng Yun
The new version removes all shared banks between multi-phys Signed-off-by: Chunfeng Yun --- v2~v3: no changes --- drivers/phy/phy-mtk-tphy.c | 68 +++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy

[PATCH v3 5/9] phy: phy-mtk-tphy: add a new reference clock

2020-03-26 Thread Chunfeng Yun
for digital phy. Signed-off-by: Chunfeng Yun --- v2~v3: no changes --- drivers/phy/phy-mtk-tphy.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index 20167fe7cb..81525a48b7 100644 --- a/drivers/phy/phy

[PATCH v3 0/9] Add support for MediaTek xHCI host controller

2020-03-26 Thread Chunfeng Yun
suggested by Simon 2. add a test item for ofnode_get_child_count() suggested by Simon 3. use clk_bulk to get clocks suggested by Marek 4. use clrsetbits_le32() etc suggeseted by Marek 5. get the count of phys by dev_get_child_count() 6. drop reference to fixed clock clk20m Chunfeng

[PATCH v3 7/9] arm: dts: mt7629: add usb related nodes

2020-03-26 Thread Chunfeng Yun
Add usb, phy and clock nodes Signed-off-by: Chunfeng Yun --- v3: no changes v2: 1. remove fixed clock clk20m --- arch/arm/dts/mt7629-rfb.dts | 8 arch/arm/dts/mt7629.dtsi| 41 + 2 files changed, 49 insertions(+) diff --git a/arch/arm/dts

[PATCH v3 3/9] phy: phy-mtk-tphy: add support USB phys

2020-03-26 Thread Chunfeng Yun
Support USB2 and USB3 PHY with shared banks when support multi-phys Signed-off-by: Chunfeng Yun --- v3: no changes v2: 1. get the count of phys by dev_get_child_count() --- drivers/phy/phy-mtk-tphy.c | 227 +++-- 1 file changed, 218 insertions(+), 9

[PATCH v3 1/9] dm: core: Add function to get child count of ofnode or device

2020-03-26 Thread Chunfeng Yun
This patch add function used to get the child count of a ofnode or a device Signed-off-by: Chunfeng Yun --- v3: 1. add non/inline function dev_get_child_count() instead of macro suggested by Simon v2: 1. move ofnode_get_child_count() into ofnode.c suggested by Simon 2. add a new

[PATCH v3 2/9] test: dm: add test item for ofnode_get_child_count()

2020-03-26 Thread Chunfeng Yun
Add a test item for ofnode_get_child_count() Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass --- v3: 1. squash dts patch into this one suggested by Simon 2. add reviewed-by Simon v2: a new patch to test ofnode_get_child_count() suggested by Simon --- arch/sandbox/dts/test.dts

[PATCH v7 06/14] usb: dwc2_udc_otg: use the phy bulk API to get phys

2020-04-29 Thread Chunfeng Yun
Use the phy bulk API to get a group of phys Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v7: use new API of phy bulk v6: add Reviewed-by Weijie v5: no changes v4: new patch --- drivers/usb/gadget/dwc2_udc_otg.c | 93 ++- 1 file changed, 17 insertions

[PATCH v7 04/14] test: dm: phy: add a test item for the phy_bulk API

2020-04-29 Thread Chunfeng Yun
Add a test item for the phy_bulk API Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao Reviewed-by: Simon Glass --- v7: test new API v6: add Reviewed-by Weijie & Simon v5: no changes v4: new patch --- arch/sandbox/dts/test.dts | 11 +++ test/dm/phy.c

[PATCH v7 00/14] Add support for MediaTek xHCI host controller

2020-04-29 Thread Chunfeng Yun
use clrsetbits_le32() etc suggeseted by Marek 5. get the count of phys by dev_get_child_count() 6. drop reference to fixed clock clk20m Chunfeng Yun (14): dm: core: Add function to get child count of ofnode or device test: dm: add test item for ofnode_get_child_count() phy: Add API for a bulk of

[PATCH v7 01/14] dm: core: Add function to get child count of ofnode or device

2020-04-29 Thread Chunfeng Yun
This patch add function used to get the child count of a ofnode or a device Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao Reviewed-by: Simon Glass --- v7: no changes v6: add Reviewed-by Weijie & Simon v4~v5: no changes v3: 1. add non/inline function dev_get_child_count() ins

[PATCH v7 08/14] phy: phy-mtk-tphy: add support new version

2020-04-29 Thread Chunfeng Yun
The new version removes all shared banks between multi-phys Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v7: no changes v6: add Reviewed-by Weijie v2~v5: no changes --- drivers/phy/phy-mtk-tphy.c | 68 +++--- 1 file changed, 63 insertions(+), 5

[PATCH v7 14/14] MAINTAINERS: MediaTek: add USB related files

2020-04-29 Thread Chunfeng Yun
Add dt-binding files of xhci-mtk and phys, C files of phys. Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v7: no changes v6: add Reviewed-by Weijie v5: new patch --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7ac7e21ba1

[PATCH v7 11/14] arm: dts: mt7629: add usb related nodes

2020-04-29 Thread Chunfeng Yun
Add usb, phy and clock nodes Signed-off-by: Chunfeng Yun Reviewed-by: Weijie Gao --- v7: no changes v6: add Reviewed-by Weijie v3~v5: no changes v2: 1. remove fixed clock clk20m --- arch/arm/dts/mt7629-rfb.dts | 8 arch/arm/dts/mt7629.dtsi| 41

[PATCH v7 02/14] test: dm: add test item for ofnode_get_child_count()

2020-04-29 Thread Chunfeng Yun
Add a test item for ofnode_get_child_count() Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Weijie Gao --- v7: add @index for nodes with reg property suggested by Fabio v6: add Reviewed-by Weijie v4~v5: no changes v3: 1. squash dts patch into this one suggested

  1   2   3   4   >