Re: [PATCH v3 02/14] usb: dwc2: Add host controller driver

2020-07-21 Thread Ahmad Fatoum
On 7/21/20 2:05 PM, Jules Maselbas wrote: > The host driver is taken from U-Boot and mix with some part from Linux. > > Signed-off-by: Jules Maselbas > --- > drivers/usb/Kconfig | 2 + > drivers/usb/Makefile | 1 + > drivers/usb/dwc2/Kconfig | 14 + > drivers/usb/dwc2/Makefil

[PATCH v3 02/14] usb: dwc2: Add host controller driver

2020-07-21 Thread Jules Maselbas
The host driver is taken from U-Boot and mix with some part from Linux. Signed-off-by: Jules Maselbas --- drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 1 + drivers/usb/dwc2/Kconfig | 14 + drivers/usb/dwc2/Makefile | 1 + drivers/usb/dwc2/core.c | 614 ++

[PATCH v3 12/14] usb: dwc2: Add gadget driver

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/Kconfig |7 + drivers/usb/dwc2/Makefile |1 + drivers/usb/dwc2/core.c | 64 + drivers/usb/dwc2/core.h |7 + drivers/usb/dwc2/dwc2.c |2 + drivers/usb/dwc2/dwc2.h |7 + drivers/usb/dwc2/gadget.c | 2736 ++

[PATCH v3 13/14] usb: dwc2: Use register_otg_device

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/dwc2.c | 29 ++--- drivers/usb/dwc2/dwc2.h | 4 ++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/dwc2.c b/drivers/usb/dwc2/dwc2.c index 2d14b218a..7a8ba6c4f 100644 --- a/drivers/usb/dw

[PATCH v3 09/14] usb: dwc2: host: Rewrite dwc2_hc_init

2020-07-21 Thread Jules Maselbas
Removed the uses of a table to convert the usb endpoint type for the controller. Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/host.c | 47 +++-- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/ho

[PATCH v3 01/14] Revert "usb: Add dwc2 host driver"

2020-07-21 Thread Jules Maselbas
This reverts commit 69f8b20cc016dc3680d5acc20f43a3e52c0bff7e. Signed-off-by: Jules Maselbas --- drivers/usb/host/Kconfig |3 - drivers/usb/host/Makefile |1 - drivers/usb/host/dwc2.c | 1132 - drivers/usb/host/dwc2.h | 778 ---

[PATCH v3 07/14] usb: dwc2: host: Dynamic fifo size support from Linux

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/host.c | 146 ++-- drivers/usb/dwc2/regs.h | 8 --- 2 files changed, 124 insertions(+), 30 deletions(-) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c index 40fc84599..28759a801 100644 --- a/

[PATCH v3 11/14] usb: dwc2: Add structure for gadget driver

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.h | 55 + 1 file changed, 55 insertions(+) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index a2ec3ff68..b188990a0 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h

[PATCH v3 05/14] usb: dwc2: Rework timeout

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.h | 22 -- drivers/usb/dwc2/host.c | 16 +++- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 94f992cb1..a2ec3ff68 100644 --- a/drivers/

[PATCH v3 04/14] usb: dwc2: Rework roothub interface

2020-07-21 Thread Jules Maselbas
Roothub requests are now decoded in one place. Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/dwc2.h | 2 +- drivers/usb/dwc2/host.c | 4 +- drivers/usb/dwc2/rhub.c | 519 +++- 3 files changed, 245 insertions(+), 280 deletions(-) diff --git a/drivers/

[PATCH v3 10/14] usb: dwc2: Add function to flush tx fifo

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.c | 33 + drivers/usb/dwc2/dwc2.h | 1 + 2 files changed, 34 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 6e8d30c22..a8693097d 100644 --- a/drivers/usb/dwc2/core.c +++ b

[PATCH v3 03/14] usb: dwc2: host: Read dr_mode from device tree

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.c | 95 + drivers/usb/dwc2/dwc2.c | 2 + drivers/usb/dwc2/dwc2.h | 1 + 3 files changed, 98 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 0046e955f..6e8d30c22 10

[PATCH v3 06/14] usb: dwc2: host: Handle dma mapping errors

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/host.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c index b32b47867..40fc84599 100644 --- a/drivers/usb/dwc2/host.c +++ b/drivers/usb/dwc2/host.c @@ -157,6 +157,11 @@ static int transf

[PATCH v3 14/14] usb: dwc2: Add ulpi phy function

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.c | 33 + drivers/usb/dwc2/dwc2.h | 3 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index c4a3cc789..f83788d51 100644 --- a/drivers/usb/dwc2/core.c +++

[PATCH v3 00/14] usb: dwc2: Add host and gadget driver

2020-07-21 Thread Jules Maselbas
This patchset add USB host and gadget support for the DWC2 controller The host driver is ported from the U-Boot driver, some part are taken taken from Linux. The gadget driver is ported from Linux and only support direct dma (not descriptor based) and does not support direct buffer although this c

[PATCH v3 08/14] usb: dwc2: host: Fix toggle reset

2020-07-21 Thread Jules Maselbas
>From USB 2.0 specification, section 9.4.5: ClearFeature(ENDPOINT_HALT) request always results in the data toggle being reinitialized to DATA0. The hacky solution for now is to reset the toggle bit to DATA0 when the host controller send a ClearFeature request on an endpoint. Signed-off-by: Ju

[PATCH 1/2] ratp: Abort console_countdown when activated

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- common/ratp/ratp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c index e84ad2216..d06a7ca96 100644 --- a/common/ratp/ratp.c +++ b/common/ratp/ratp.c @@ -30,6 +30,7 @@ #include #include #include +#include

[PATCH 2/2] ratp: Remove duplicated includes

2020-07-21 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- common/ratp/ratp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c index d06a7ca96..1f9271c99 100644 --- a/common/ratp/ratp.c +++ b/common/ratp/ratp.c @@ -18,11 +18,9 @@ #include #include -#include #include #