Re: [RFC] usb: phy: generic: get rid of VBUS handling

2016-07-28 Thread Zhangfei Gao
Hi, Balbi & Robert Have one question about commit 7acc9973e3c4 ("usb: phy: generic: add vbus support"). Sorry asking here. Commit 7acc9973e3c4 ("usb: phy: generic: add vbus support") is adding GPIO-based VBUS handling for phy-generic.c And now we are uploading usb phy to drivers/phy/, as Balbi

[PATCH] phy: add phy-hi6220-usb

2015-11-17 Thread Zhangfei Gao
Support hi6220 use phy for HiKey board Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/phy/phy-hi6220-usb.txt | 16 ++ drivers/phy/Kconfig| 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-hi6220-usb.c

[PATCH] usb: dwc2: add support of hi6220

2015-11-17 Thread Zhangfei Gao
Support hisilicon,hi6220-usb for HiKey board Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/platform.c| 32 ++ 2 files changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH] usb: dwc2: add support of hi6220

2015-11-17 Thread Zhangfei Gao
Support hisilicon,hi6220-usb for HiKey board Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/platform.c| 32 ++ 2 files changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH v2] phy: add phy-hi6220-usb

2015-11-22 Thread Zhangfei Gao
Support hi6220 use phy for HiKey board Acked-by: Rob Herring Signed-off-by: Zhangfei Gao --- Rebase to Linux 4.4-rc1 .../devicetree/bindings/phy/phy-hi6220-usb.txt | 16 ++ drivers/phy/Kconfig| 9 ++ drivers/phy/Makefile

usb dwc2 too much sof in host mode

2015-02-02 Thread Zhangfei Gao
Thanks to Yousaf, the latest dwc2 code from latest testing/next works well for both gadget and host. When remove the usb, it will switch to host mode by default. However, at this time, I found too much sof generating in our platform, if no device attached. 1, usb gadget, 2, remove usb, 3, cat /pro

[PATCH 1/2] usb: phy: load usb phy earlier

2015-02-04 Thread Zhangfei Gao
Since phy is definitely used usb controller, load the phy earlier rather than using defer probe to make boot time shorter. Signed-off-by: Zhangfei Gao --- drivers/usb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index

[PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-04 Thread Zhangfei Gao
Gadget directly set GAHBCFG_HBSTLEN_INCR4, reuse ahbcfg if assigned from platform Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/gadget.c | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2

[PATCH 0/2] misc change

2015-02-04 Thread Zhangfei Gao
two misc changes, no function impact Zhangfei Gao (2): usb: phy: load usb phy earlier usb: dwc2: gadget reuse ahbcfg assigned from platform drivers/usb/Makefile | 2 +- drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/gadget.c | 8 ++-- 3 files changed, 8 insertions(+), 4

Re: [PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-04 Thread Zhangfei Gao
On 4 February 2015 at 21:51, Sergei Shtylyov wrote: >> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c >> index 15aa578..20085de 100644 >> --- a/drivers/usb/dwc2/gadget.c >> +++ b/drivers/usb/dwc2/gadget.c >> @@ -2314,9 +2314,13 @@ void s3c_hsotg_core_init_disconnected(struct >>

Re: [PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-04 Thread Zhangfei Gao
Hi Yousaf On 4 February 2015 at 17:41, Kaukab, Yousaf wrote: >> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index >> d5197d4..8d388cc 100644 >> --- a/drivers/usb/dwc2/core.c >> +++ b/drivers/usb/dwc2/core.c >> @@ -2563,7 +2563,7 @@ void dwc2_set_param_reload_ctl(struct dwc2_hso

[PATCH v2 1/2] usb: phy: load usb phy earlier

2015-02-05 Thread Zhangfei Gao
Since phy is definitely used in usb controller, load the phy earlier to make boot time shorter. Signed-off-by: Zhangfei Gao --- drivers/usb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 2f1e2aa..d8926c6 100644

[PATCH v2 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-05 Thread Zhangfei Gao
Gadget directly set GAHBCFG_HBSTLEN_INCR4, reuse ahbcfg if assigned from platform Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/gadget.c | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2

[PATCH v2 0/2] misc change

2015-02-05 Thread Zhangfei Gao
v2: remove parentheses mentioned by Sergei assume @ahbcfg is used for dma case Zhangfei Gao (2): usb: phy: load usb phy earlier usb: dwc2: gadget reuse ahbcfg assigned from platform drivers/usb/Makefile | 2 +- drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/gadget.c | 8

[PATCH 0/4] add usb support for hi6220

2015-02-05 Thread Zhangfei Gao
hi6220 usb controller is inherited from dwc2 add phy accordingly support otg gadget/host Zhangfei Gao (4): Documentation: dt-bindings: add dt binding info for hi6220 dwc2 Documentation: dt-bindings: add dt binding info for hi6220 usb: dwc2: platform: add hi6220 support usb: phy: add phy

[PATCH 1/4] Documentation: dt-bindings: add dt binding info for hi6220 dwc2

2015-02-05 Thread Zhangfei Gao
Add necessary dwc2 binding documentation for Hisilicon soc: hi6220 Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt

[PATCH 2/4] Documentation: dt-bindings: add dt binding info for hi6220

2015-02-05 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/usb/hi6220-usb.txt | 50 ++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt b

[PATCH 3/4] usb: dwc2: platform: add hi6220 support

2015-02-05 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..ceee385 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2

[PATCH 4/4] usb: phy: add phy-hi6220

2015-02-05 Thread Zhangfei Gao
Add usb phy controller for hi6220 platform Signed-off-by: Zhangfei Gao --- drivers/usb/phy/Kconfig | 9 ++ drivers/usb/phy/Makefile | 1 + drivers/usb/phy/phy-hi6220.c | 290 +++ 3 files changed, 300 insertions(+) create mode 100644 drivers

Re: [PATCH 2/4] Documentation: dt-bindings: add dt binding info for hi6220

2015-02-05 Thread Zhangfei Gao
On 6 February 2015 at 02:24, Sergei Shtylyov wrote: >> diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt >> b/Documentation/devicetree/bindings/usb/hi6220-usb.txt >> new file mode 100644 >> index 000..e926364 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/usb/hi622

Re: [PATCH 4/4] usb: phy: add phy-hi6220

2015-02-06 Thread Zhangfei Gao
On 6 February 2015 at 16:41, Peter Chen wrote: > On Thu, Feb 05, 2015 at 10:47:00PM +0800, Zhangfei Gao wrote: >> @@ -18,6 +18,7 @@ obj-$(CONFIG_SAMSUNG_USBPHY)+= >> phy-samsung-usb.o >> obj-$(CONFIG_TWL6030_USB)+= phy-twl6030-usb.o >>

Re: [PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-06 Thread Zhangfei Gao
On 6 February 2015 at 16:07, Kaukab, Yousaf wrote: >> >> GAHBCFG_HBSTLEN_INCR4 << diff --git a/drivers/usb/dwc2/gadget.c >> >> b/drivers/usb/dwc2/gadget.c index 15aa578..20085de 100644 >> >> --- a/drivers/usb/dwc2/gadget.c >> >> +++ b/drivers/usb/dwc2/gadget.c >> >> @@ -2314,9 +2314,13 @@ void s3c

[PATCH v2 2/4] Documentation: dt-bindings: add dt binding info for hi6220

2015-02-06 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/usb/hi6220-usb.txt | 49 ++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt b

[PATCH v2 0/4] add usb support for hi6220

2015-02-06 Thread Zhangfei Gao
v2: address comments from Sergei and Peter add hi6220_phy_setup(false) code v1: hi6220 usb controller is inherited from dwc2 add phy accordingly support otg gadget/host Zhangfei Gao (4): Documentation: dt-bindings: add dt binding info for hi6220 dwc2 Documentation: dt-bindings: add dt

[PATCH v2 1/4] Documentation: dt-bindings: add dt binding info for hi6220 dwc2

2015-02-06 Thread Zhangfei Gao
Add necessary dwc2 binding documentation for Hisilicon soc: hi6220 Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt

[PATCH v2 3/4] usb: dwc2: platform: add hi6220 support

2015-02-06 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..f7c67db 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2

[PATCH v2 4/4] usb: phy: add phy-hi6220-usb

2015-02-06 Thread Zhangfei Gao
Add usb phy controller for hi6220 platform Signed-off-by: Zhangfei Gao --- drivers/usb/phy/Kconfig | 9 ++ drivers/usb/phy/Makefile | 1 + drivers/usb/phy/phy-hi6220-usb.c | 297 +++ 3 files changed, 307 insertions(+) create mode 100644

Re: [PATCH 4/4] usb: phy: add phy-hi6220

2015-02-08 Thread Zhangfei Gao
On 9 February 2015 at 09:57, Peter Chen wrote: >> >> +static int hi6220_phy_probe(struct platform_device *pdev) >> >> +{ >> >> + struct hi6220_priv *priv; >> >> + struct usb_otg *otg; >> >> + struct device_node *np = pdev->dev.of_node; >> >> + int ret, irq; >> >> + >> >> + priv

Re: [PATCH v2 4/4] usb: phy: add phy-hi6220-usb

2015-02-09 Thread Zhangfei Gao
On 9 February 2015 at 22:26, zhangfei wrote: > > > On 02/09/2015 10:11 AM, Peter Chen wrote: > >>> +static void hi6220_detect_work(struct work_struct *work) >>> +{ >>> + struct hi6220_priv *priv = >>> + container_of(work, struct hi6220_priv, work.work); >>> + int gpio_id,

[PATCH v3 1/5] Documentation: dt-bindings: add dt binding info for hi6220 dwc2

2015-02-09 Thread Zhangfei Gao
Add necessary dwc2 binding documentation for Hisilicon soc: hi6220 Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt

[PATCH v3 0/5] add usb support for hi6220

2015-02-09 Thread Zhangfei Gao
v3: fix typo and add -EPROBE_DEFER of regulator, pointed by Peter v2: address comments from Sergei and Peter add hi6220_phy_setup(false) code v1: hi6220 usb controller is inherited from dwc2 add phy accordingly support otg gadget/host Zhangfei Gao (5): Documentation: dt-bindings: add dt

[PATCH v3 2/5] Documentation: dt-bindings: add dt binding info for hi6220

2015-02-09 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/usb/hi6220-usb.txt | 49 ++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt b

[PATCH v3 5/5] usb: phy: add phy-hi6220-usb

2015-02-09 Thread Zhangfei Gao
Add usb phy controller for hi6220 platform Signed-off-by: Zhangfei Gao --- drivers/usb/phy/Kconfig | 9 ++ drivers/usb/phy/Makefile | 1 + drivers/usb/phy/phy-hi6220-usb.c | 308 +++ 3 files changed, 318 insertions(+) create mode 100644

[PATCH v3 4/5] usb: phy: load usb phy earlier

2015-02-09 Thread Zhangfei Gao
Since phy is definitely used in usb controller, load the phy earlier to make boot time shorter. Signed-off-by: Zhangfei Gao Acked-by: Peter Chen --- drivers/usb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index

[PATCH v3 3/5] usb: dwc2: platform: add hi6220 support

2015-02-09 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..f7c67db 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2

[resend PATCH v3 4/4] usb: phy: add phy-hi6220-usb

2015-02-10 Thread Zhangfei Gao
Add usb phy controller for hi6220 platform Signed-off-by: Zhangfei Gao --- drivers/usb/phy/Kconfig | 9 ++ drivers/usb/phy/Makefile | 1 + drivers/usb/phy/phy-hi6220-usb.c | 306 +++ 3 files changed, 316 insertions(+) create mode 100644

[resend PATCH v3 0/4] add usb support for hi6220

2015-02-10 Thread Zhangfei Gao
v3: fix typo and add -EPROBE_DEFER of regulator, pointed by Peter v2: address comments from Sergei and Peter add hi6220_phy_setup(false) code v1: hi6220 usb controller is inherited from dwc2 add phy accordingly support otg gadget/host Zhangfei Gao (4): Documentation: dt-bindings: add dt

[resend PATCH v3 2/4] Documentation: dt-bindings: add dt binding info for hi6220

2015-02-10 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/usb/hi6220-usb.txt | 49 ++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt b

[resend PATCH v3 3/4] usb: dwc2: platform: add hi6220 support

2015-02-10 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..f7c67db 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2

[resend PATCH v3 1/4] Documentation: dt-bindings: add dt binding info for hi6220 dwc2

2015-02-10 Thread Zhangfei Gao
Add necessary dwc2 binding documentation for Hisilicon soc: hi6220 Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt

[PATCH] usb: load usb phy earlier

2015-02-10 Thread Zhangfei Gao
Since phy is definitely used in usb controller, load the phy earlier to make boot time shorter. Signed-off-by: Zhangfei Gao Acked-by: Peter Chen --- drivers/usb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index

[PATCH v4 2/4] Documentation: dt-bindings: add dt binding info for hi6220

2015-02-11 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/usb/hi6220-usb.txt | 49 ++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt b

[PATCH v4 4/4] phy: add phy-hi6220-usb

2015-02-11 Thread Zhangfei Gao
Add usb phy controller for hi6220 platform Signed-off-by: Zhangfei Gao --- drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-hi6220-usb.c | 306 +++ 3 files changed, 316 insertions(+) create mode 100644 drivers

[PATCH v4 0/4] add usb support for hi6220

2015-02-11 Thread Zhangfei Gao
: hi6220 usb controller is inherited from dwc2 add phy accordingly support otg gadget/host Zhangfei Gao (4): Documentation: dt-bindings: add dt binding info for hi6220 dwc2 Documentation: dt-bindings: add dt binding info for hi6220 usb: dwc2: platform: add hi6220 support phy: add phy-hi6220

[PATCH v4 3/4] usb: dwc2: platform: add hi6220 support

2015-02-11 Thread Zhangfei Gao
Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..f7c67db 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2

[PATCH v4 1/4] Documentation: dt-bindings: add dt binding info for hi6220 dwc2

2015-02-11 Thread Zhangfei Gao
Add necessary dwc2 binding documentation for Hisilicon soc: hi6220 Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt

[PATCH v2] usb: load usb phy earlier

2015-02-12 Thread Zhangfei Gao
USB PHY works proper is the base for the coming USB controller operation. With this patch, it can avoid the controller drivers which are linked earlier than USB PHY always being probed deferral. Look at drivers/Makefile, it links phy first with the similar method. Signed-off-by: Zhangfei Gao

[PATCH v3] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-15 Thread Zhangfei Gao
Reuse ahbcfg if assigned from platform Input from John: AHB_SINGLE, NOTI_ALL_DMA_WRIT, REM_MEM_SUPP, HBSTLEN, and INV_DESC_ENDIANNESS only apply in DMA mode and are ignored in slave mode operation. Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/gadget.c | 11 --- 1 file changed, 8