RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-06 Thread Pawel Laszczak
Hi, >Pawel, > >On 14/02/2019 21:45, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi >> can be instantiated as Dual-Role Device (DRD), Perip

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-03-06 Thread Pawel Laszczak
Hi, >Hi, > >On 21/02/2019 09:14, Felipe Balbi wrote: >> >> Hi, >> >> (please break your emails at 80-columns) >> >> Pawel Laszczak writes: >>>>> One more thing. Workaround has implemented algorithm that decide for which >>>&g

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-15 Thread Pawel Laszczak
Hi Felipe > >Hi, > >Pawel Laszczak writes: >> +static void cdns3_gadget_config(struct cdns3_device *priv_dev) >> +{ >> +struct cdns3_usb_regs __iomem *regs = priv_dev->regs; >> +u32 reg; >> + >> +cdns3_ep0_config(priv_dev); >>

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-21 Thread Pawel Laszczak
Hi, >>Pawel Laszczak writes: >>>>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >>>>> index 69f1b6328532..c156817672c4 100644 >>>>> --- a/include/linux/usb/otg.h >>>>> +++ b/include/linux/usb/otg.h >>&

[PATCH v10 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-07-21 Thread Pawel Laszczak
ned-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 338 - drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 349 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 291f08be56fe..a42e832b3c6a 10

[PATCH v10 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-07-21 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

[PATCH v10 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-07-21 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v10 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-07-21 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 1 + drivers/usb/common/debug.c

[PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-21 Thread Pawel Laszczak
ved ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add binding for USBSS-DRD controller. usb:common Separated decoding functions from dwc3 driver. usb:common Patch simplify usb_decode_set_clear_fea

[PATCH v10 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-07-21 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/cdns-usb3.txt | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-22 Thread Pawel Laszczak
Hi, > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> Host Only (XHCI)configurations. > >I see you are using debugfs to sele

RE: [PATCH v10 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-07-22 Thread Pawel Laszczak
Hi, > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >[] >> diff --git a/drivers/usb/common/debug.c b

RE: [PATCH v10 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-07-22 Thread Pawel Laszczak
> > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: >> Patch adds usb_decode_test_mode and usb_decode_device_feature functions, >> which allow to make more readable and simplify the >> usb_decode_set_clear_feature function. > > I need to read entire pat

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-22 Thread Pawel Laszczak
> >Hi! > >> > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> > >> >> > >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> > >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> > >> Host Only (XHCI)configurations. >> > > >> >

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-22 Thread Pawel Laszczak
Hi, >On Mon 2019-07-22 13:56:44, Pavel Machek wrote: >> Hi! >> >> > > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> > > >> >> > > >> The Cadence USBSS DRD Controller is a highly configurable IP Core >> > > >> which >> > > >> can be instantiated as Dual-Role Device (DRD

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-30 Thread Pawel Laszczak
Hi Felipe, What about this patch. I just noticed that prefix is incorrect "1/3". Can it stay or should I send it again ? Cheers, Pawel >>>Pawel Laszczak writes: >>>>>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >>>>>&g

RE: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-08-07 Thread Pawel Laszczak
Hi, > >Roger Quadros writes: > +extern const char *usb_decode_ctrl(char *str, size_t size, __u8 > bRequestType, > +__u8 bRequest, __u16 wValue, __u16 wIndex, > +__u16 wLength); > + where's the stub when !TRACIN

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-07 Thread Pawel Laszczak
Hi Roger, > > >On 23/07/2019 07:32, Pawel Laszczak wrote: > >> Hi, > >> > >>> On Mon 2019-07-22 13:56:44, Pavel Machek wrote: > >>>> Hi! > >>>> > >>>>>>>> This patch introduce new Cadence USBS

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-10 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >>>> +static int cdns3_gadget_start(struct cdns3 *cdns) >>>> +{ >>>> + struct cdns3_device *priv_dev; >>>> + u32 max_speed; >>>> + int ret; >>>> + >>>> + priv_dev = kza

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-11 Thread Pawel Laszczak
Hi, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-11 Thread Pawel Laszczak
> >> >> Yes, driver frees not used buffers here. >> I think that it's the safest place for this purpose. >> >> > >> + dma_free_coherent(priv_dev->sysdev, buf- >> >size, >> + buf->buf, >> +

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >Hi, > >Pawel Laszczak writes: > >> Hi, >> >>> >>>Pawel Laszczak writes: >>>>>> +static int cdns3_gadget_start(struct cdns3 *cdns) >>>>>> +{ >>>>>> +struct cdns3_device *priv_dev;

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >>>> I have such situation in which one interrupt line is shared with ehci and >>>> cdns3 driver. >>>> In such case this function returns error code. >>> >>>which function returns error code? >

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >On 11/08/2019 14:59, Pawel Laszczak wrote: >> Hi, >> >>> >>> On 21/07/2019 21:32, Pawel Laszczak wrote: >>>> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >>>> >>>> The Cadence USBSS DRD Controller

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
> >Hi, > >Pawel Laszczak writes: >>>>>>>Quick question, then: these ISTS registers, are they masked interrupt >>>>>>>status or raw interrupt status? >>>>>> >>>>>> Yes it's masked, but after masking th

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
> >On 11/08/2019 14:59, Pawel Laszczak wrote: >> Hi, >> >>> >>> On 21/07/2019 21:32, Pawel Laszczak wrote: >>>> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >>>> >>>> The Cadence USBSS DRD Controller is a

RE: [PATCH 02/31] usb: usbssp: Added some decoding functions.

2018-09-11 Thread Pawel Laszczak
Hi, >> >> Greg Kroah-Hartman writes: >> > On Thu, Jul 19, 2018 at 06:57:35PM +0100, Pawel Laszczak wrote: >> >> This patch add additional functions that converts some fields to string. >> >> >> >> For example function usbssp_trb_comp_code_string

[RFC PATCH v1 12/14] usb:cdns3: Adds transfer related function.

2018-11-03 Thread Pawel Laszczak
called transfer descriptors (TD). Each endpoint has own array of trbs that make up a transfer ring. The last element on ring is reserved and is set as Link TRB that point to the first TRB. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 235 - 1 file

[RFC PATCH v1 13/14] usb:cdns3: Adds debugging function.

2018-11-03 Thread Pawel Laszczak
Patch implements some function used for debugging driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/debug.c | 128 + drivers/usb/cdns3/ep0.c| 3 + drivers/usb/cdns3/gadget.c | 12 drivers/usb/cdns3

[RFC PATCH v1 14/14] usb:cdns3: Feature for changing role

2018-11-03 Thread Pawel Laszczak
Patch adds feature that allow to change role from user space. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/core.c| 2 + drivers/usb/cdns3/debugfs.c | 94 + drivers/usb/cdns3/drd.h | 3 ++ 4 files changed

[RFC PATCH v1 11/14] usb:cdns3: Adds enumeration related function.

2018-11-03 Thread Pawel Laszczak
Patch implements a set of function related to enumeration process. Some standard requests are handled on controller driver level and other are delegated to gadget core driver. All class requests are delegated to gadget core driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c

[RFC PATCH v1 03/14] usb:cdns3: Driver initialization code.

2018-11-03 Thread Pawel Laszczak
during initialization. The implementation will be added in next patches. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Kconfig | 20 ++ drivers/usb/cdns3/Makefile| 4 + drivers/usb/cdns3/core.c | 373 ++ drivers/usb/cdns3/core.h

[RFC PATCH v1 05/14] usb:cdns3: Added Wrapper to XCHI driver

2018-11-03 Thread Pawel Laszczak
Patch implements functions that allow to initialize, start and stop XHCI host driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/host.c | 230 ++- 1 file changed, 227 insertions(+), 3 deletions(-) diff --git a/drivers/usb/cdns3/host.c b/drivers/usb

[RFC PATCH v1 02/14] usb:cdns3: Device side header file.

2018-11-03 Thread Pawel Laszczak
Patch defines macros used by device side of controller, structures holding registers, and some other object used by device controller. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.h | 1067 1 file changed, 1067 insertions(+) create mode 100644

[RFC PATCH v1 08/14] usb:cdns3: EpX operations part of the API

2018-11-03 Thread Pawel Laszczak
Patch implements callback functions for non-default endpoints defined in usb_ep_ops object. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 18 ++ drivers/usb/cdns3/gadget.c | 430 - drivers/usb/cdns3/gadget.h | 3 + 3 files changed, 449

[RFC PATCH v1 06/14] usb:cdns3: Initialization code for Device side

2018-11-03 Thread Pawel Laszczak
Patch implements a set of functions responsible for initialization, configuration, starting and stopping device mode. This patch also adds new ep0.c that holds all functions related to endpoint 0. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/ep0.c

[RFC PATCH v1 09/14] usb:cdns3: Ep0 operations part of the API

2018-11-03 Thread Pawel Laszczak
Patch implements related to default endpoint callback functions defined in usb_ep_ops object Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 188 - drivers/usb/cdns3/gadget.c | 8 ++ drivers/usb/cdns3/gadget.h | 10 ++ 3 files changed, 204

[RFC PATCH v1 10/14] usb:cdns3: Implements ISR functionality.

2018-11-03 Thread Pawel Laszczak
group is not related to endpoints interrupts and is placed in gadget.c. All groups have common entry point in cdns3_irq_handler_thread function. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 63 +++ drivers/usb/cdns3/gadget.c | 224

[RFC PATCH v1 07/14] usb:cdns3: Implements device operations part of the API

2018-11-03 Thread Pawel Laszczak
Patch adds implementation callback function defined in usb_gadget_ops object. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 244 - 1 file changed, 242 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3

[RFC PATCH v1 04/14] usb:cdns3: Added DRD support

2018-11-03 Thread Pawel Laszczak
Patch adds supports for detecting Host/Device mode. Controller has additional OTG register that allow implement even whole OTG functionality. At this moment patch adds support only for detecting the appropriate mode based on strap pins and ID pin. Signed-off-by: Pawel Laszczak --- drivers/usb

[RFC PATCH v1 00/14] Introduced new Cadence USBSS DRD Driver

2018-11-03 Thread Pawel Laszczak
have support for PCIe bus, which is used on FPGA prototyping. The host site of USBSS controller is compliance with XHCI specification, so it works with standard XHCI linux driver. --- Pawel Laszczak (14): usb:cdns3: add pci to platform driver wrapper. usb:cdns3: Device side header file

[RFC PATCH v1 01/14] usb:cdns3: add pci to platform driver wrapper.

2018-11-03 Thread Pawel Laszczak
Patch adds PCI specific glue drivier that creaties and registers in system cdns-usb3 platform device. Thanks to that we will be able to use the cdns-usb3 platform driver for USBSS-DEV controller build on PCI board Signed-off-by: Pawel Laszczak --- drivers/usb/Kconfig| 2

RE: [RFC PATCH v1 13/14] usb:cdns3: Adds debugging function.

2018-11-04 Thread Pawel Laszczak
>> Patch implements some function used for debugging driver. >[] >> +static inline char *cdns3_decode_ep_irq(u32 ep_sts, const char *ep_name) >> +{ >> +static char str[256]; >> +int ret; >> + >> +ret = sprintf(str, "IRQ for %s: %08x ", ep_name, ep_sts); >> + >> +if (ep_sts & EP_STS_

RE: [RFC PATCH v1 01/14] usb:cdns3: add pci to platform driver wrapper.

2018-11-07 Thread Pawel Laszczak
Hi Roger, > >Hi Pawel, > >On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds PCI specific glue drivier that creaties and registers in > >s/drivier/driver >s/creaties/creates >s/in system/in-system > >> system cdns-usb3 platform device. Thanks to that

RE: [RFC PATCH v1 03/14] usb:cdns3: Driver initialization code.

2018-11-07 Thread Pawel Laszczak
>On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds core.c and core.h file that implements initialization >> of platform driver and adds function responsible for selecting, >> switching and running appropriate Device/Host mode. >> >> Patch also adds gadget

RE: [RFC PATCH v1 04/14] usb:cdns3: Added DRD support

2018-11-08 Thread Pawel Laszczak
Hi Roger, >On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds supports for detecting Host/Device mode. >> Controller has additional OTG register that allow >> implement even whole OTG functionality. >> At this moment patch adds support only for detecting >> th

RE: [RFC PATCH v1 03/14] usb:cdns3: Driver initialization code.

2018-11-08 Thread Pawel Laszczak
>On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds core.c and core.h file that implements initialization >> of platform driver and adds function responsible for selecting, >> switching and running appropriate Device/Host mode. >> >> Patch also adds gadget

RE: [RFC PATCH v1 14/14] usb:cdns3: Feature for changing role

2018-11-08 Thread Pawel Laszczak
>On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds feature that allow to change role from user space. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/usb/cdns3/Makefile | 2 +- >> drivers/usb/cdns3/core.c| 2

RE: [RFC PATCH v1 13/14] usb:cdns3: Adds debugging function.

2018-11-08 Thread Pawel Laszczak
>Hi, > >On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch implements some function used for debugging driver. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/usb/cdns3/Makefile | 2 +- >> drivers/usb/cdns3/debug.c | 128

[RFC PATCH v2 09/15] usb:cdns3: EpX operations part of the API

2018-11-18 Thread Pawel Laszczak
Patch implements callback functions for non-default endpoints defined in usb_ep_ops object. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 18 ++ drivers/usb/cdns3/gadget.c | 442 - drivers/usb/cdns3/gadget.h | 3 + 3 files changed, 461

[RFC PATCH v2 00/15] Introduced new Cadence USBSS DRD Driver

2018-11-18 Thread Pawel Laszczak
changes related to readability. TODO: - Test isochronous transfer with some class or tester. - Test changing role according to ID pin. - Resolve issue related with shared on-chip buffer for OUT direction. - Add tracepoint. - Implement suspend/resume functionality. --- Pawel Laszczak (15

[RFC PATCH v2 14/15] usb:cdns3: Adds debugging function.

2018-11-18 Thread Pawel Laszczak
Patch implements some function used for debugging driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 4 +- drivers/usb/cdns3/debug.c | 128 + drivers/usb/cdns3/ep0.c| 3 + drivers/usb/cdns3/gadget.c | 12 drivers/usb/cdns3

[RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-11-18 Thread Pawel Laszczak
Patch adds supports for detecting Host/Device mode. Controller has additional OTG register that allow implement even whole OTG functionality. At this moment patch adds support only for detecting the appropriate mode based on strap pins and ID pin. Signed-off-by: Pawel Laszczak --- drivers/usb

[RFC PATCH v2 12/15] usb:cdns3: Adds enumeration related function.

2018-11-18 Thread Pawel Laszczak
Patch implements a set of function related to enumeration process. Some standard requests are handled on controller driver level and other are delegated to gadget core driver. All class requests are delegated to gadget core driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c

[RFC PATCH v2 15/15] usb:cdns3: Feature for changing role

2018-11-18 Thread Pawel Laszczak
Patch adds feature that allow to change role from user space. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/core.c| 2 + drivers/usb/cdns3/debugfs.c | 93 + drivers/usb/cdns3/drd.h | 3 ++ 4 files changed

[RFC PATCH v2 10/15] usb:cdns3: Ep0 operations part of the API

2018-11-18 Thread Pawel Laszczak
Patch implements related to default endpoint callback functions defined in usb_ep_ops object Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 191 - drivers/usb/cdns3/gadget.c | 8 ++ drivers/usb/cdns3/gadget.h | 10 ++ 3 files changed, 207

[RFC PATCH v2 13/15] usb:cdns3: Adds transfer related function.

2018-11-18 Thread Pawel Laszczak
called transfer descriptors (TD). Each endpoint has own array of trbs that make up a transfer ring. The last element on ring is reserved and is set as Link TRB that point to the first TRB. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 235 - 1 file

[RFC PATCH v2 07/15] usb:cdns3: Adds Device mode support - initialization.

2018-11-18 Thread Pawel Laszczak
Patch implements a set of functions responsible for initialization, configuration, starting and stopping device mode. This patch also adds new ep0.c that holds all functions related to endpoint 0. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Kconfig | 10 + drivers/usb/cdns3

[RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller.

2018-11-18 Thread Pawel Laszczak
Thsi patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3

[RFC PATCH v2 01/15] usb:cdns3: add pci to platform driver wrapper.

2018-11-18 Thread Pawel Laszczak
Patch adds PCI specific glue driver that creates and registers in-system cdns-usb3 platform device. Thanks to that we will be able to use the cdns-usb3 platform driver for USBSS-DEV controller build on PCI board Signed-off-by: Pawel Laszczak --- drivers/usb/Kconfig| 2

[RFC PATCH v2 11/15] usb:cdns3: Implements ISR functionality.

2018-11-18 Thread Pawel Laszczak
group is not related to endpoints interrupts and is placed in gadget.c. All groups have common entry point in cdns3_irq_handler_thread function. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 63 +++ drivers/usb/cdns3/gadget.c | 224

[RFC PATCH v2 06/15] usb:cdns3: Adds Host support

2018-11-18 Thread Pawel Laszczak
Patch adds host-export.h and host.c file and mplements functions that allow to initialize, start and stop XHCI host driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Kconfig | 10 ++ drivers/usb/cdns3/Makefile | 1 + drivers/usb/cdns3/core.c| 7 +- drivers/usb

[RFC PATCH v2 02/15] usb:cdns3: Device side header file.

2018-11-18 Thread Pawel Laszczak
Patch defines macros used by device side of controller, structures holding registers, and some other object used by device controller. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.h | 1071 1 file changed, 1071 insertions(+) create mode 100644

[RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-11-18 Thread Pawel Laszczak
Patch adds implementation callback function defined in usb_gadget_ops object. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 249 - 1 file changed, 247 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3

[RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-11-18 Thread Pawel Laszczak
Patch adds core.c and core.h file that implements initialization of platform driver and adds function responsible for selecting, switching and running appropriate Device/Host mode. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 + drivers/usb/cdns3/core.c | 413

RE: [RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller.

2018-11-24 Thread Pawel Laszczak
Hi Roger >On 18/11/18 12:08, Pawel Laszczak wrote: >> Thsi patch aim at documenting USB related dt-bindings for the > >s/Thsi/This > >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../devicetree/bindings/usb/cdns3

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-11-25 Thread Pawel Laszczak
Hi Roger >On 18/11/18 12:09, Pawel Laszczak wrote: >> Patch adds core.c and core.h file that implements initialization >> of platform driver and adds function responsible for selecting, >> switching and running appropriate Device/Host mode. >> >> Signed-off-by: P

RE: [RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-11-25 Thread Pawel Laszczak
Hi Roger, >On 18/11/18 12:09, Pawel Laszczak wrote: >> Patch adds supports for detecting Host/Device mode. >> Controller has additional OTG register that allow >> implement even whole OTG functionality. >> At this moment patch adds support only for detecting >> th

RE: [RFC PATCH v2 06/15] usb:cdns3: Adds Host support

2018-11-26 Thread Pawel Laszczak
>EXTERNAL MAIL > > >On 18/11/18 12:09, Pawel Laszczak wrote: >> Patch adds host-export.h and host.c file and mplements functions that >> allow to initialize, start and stop XHCI host driver. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/

RE: [RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-11-26 Thread Pawel Laszczak
> >Pawel, > >On 26/11/18 09:23, Pawel Laszczak wrote: >> Hi Roger, >> >>> On 18/11/18 12:09, Pawel Laszczak wrote: >>>> Patch adds supports for detecting Host/Device mode. >>>> Controller has additional OTG register that allow >>>&

RE: [RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-11-26 Thread Pawel Laszczak
>>> >>> Pawel, >>> >>> On 26/11/18 09:23, Pawel Laszczak wrote: >>>> Hi Roger, >>>> >>>>> On 18/11/18 12:09, Pawel Laszczak wrote: >>>>>> Patch adds supports for detecting Host/Device mode. >>&

RE: [RFC PATCH v2 06/15] usb:cdns3: Adds Host support

2018-11-26 Thread Pawel Laszczak
> >Hi, > >On 26/11/18 10:24, Pawel Laszczak wrote: >>> EXTERNAL MAIL >>> >>> >>> On 18/11/18 12:09, Pawel Laszczak wrote: >>>> Patch adds host-export.h and host.c file and mplements functions that >>>> allow to initialize,

RE: [RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-11-27 Thread Pawel Laszczak
Hi Roger >>> Patch adds supports for detecting Host/Device mode. >>> + >>> +static int cdns3_otg_get_id(struct cdns3 *cdns) >>> +{ >>> + int id; >>> + >>> + id = readl(&cdns->otg_regs->sts) & OTGSTS_ID_VALUE; >>> + dev_dbg(cdns->dev, "OTG ID: %d", id); >>> + return id; >>> +} >>> + >>> +in

RE: [RFC PATCH v2 07/15] usb:cdns3: Adds Device mode support - initialization.

2018-11-29 Thread Pawel Laszczak
Hi, >> Roger Quadros writes: >> >> +static void cdns3_gadget_config(struct cdns3_device *priv_dev) { >> >> + struct cdns3_usb_regs __iomem *regs = priv_dev->regs; >> >> + >> >> + cdns3_ep0_config(priv_dev); >> >> + >> >> + /* enable interrupts for endpoint 0 (in and out) */ >> >> + writel(EP_IEN_

RE: [RFC PATCH v2 07/15] usb:cdns3: Adds Device mode support - initialization.

2018-11-30 Thread Pawel Laszczak
Hi, > >+Felipe. > >Pawel, > >Please copy Felipe Balbi as he maintains the USB gadget stack. > >On 18/11/18 12:09, Pawel Laszczak wrote: >> Patch implements a set of functions responsible for initialization, >> configuration, starting and stopping device mod

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-01 Thread Pawel Laszczak
Hi, >> Patch adds implementation callback function defined in >> usb_gadget_ops object. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/usb/cdns3/gadget.c | 249 - >> 1 file changed, 247 insertions(+), 2 deletio

RE: [RFC PATCH v2 09/15] usb:cdns3: EpX operations part of the API

2018-12-01 Thread Pawel Laszczak
Hi >> Patch implements callback functions for non-default endpoints >> defined in usb_ep_ops object. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/usb/cdns3/ep0.c| 18 ++ >> drivers/usb/cdns3/gadget.c | 442

RE: [RFC PATCH v2 10/15] usb:cdns3: Ep0 operations part of the API

2018-12-02 Thread Pawel Laszczak
>> Patch implements related to default endpoint callback functions >> defined in usb_ep_ops object >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/usb/cdns3/ep0.c| 191 - >> drivers/usb/cdns3/gadget.c |

RE: [RFC PATCH v2 11/15] usb:cdns3: Implements ISR functionality.

2018-12-02 Thread Pawel Laszczak
and is >> implemented in gadget.c file. The last group is not related to >> endpoints interrupts and is placed in gadget.c. >> All groups have common entry point in cdns3_irq_handler_thread function. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/u

RE: [RFC PATCH v2 11/15] usb:cdns3: Implements ISR functionality.

2018-12-02 Thread Pawel Laszczak
n-default endpoints and is >>> implemented in gadget.c file. The last group is not related to >>> endpoints interrupts and is placed in gadget.c. >>> All groups have common entry point in cdns3_irq_handler_thread function. >>> >>> Signed-off-by: Pawel Las

RE: [RFC PATCH v2 12/15] usb:cdns3: Adds enumeration related function.

2018-12-02 Thread Pawel Laszczak
>On 18/11/18 12:09, Pawel Laszczak wrote: >> Patch implements a set of function related to enumeration process. >> Some standard requests are handled on controller driver level and >> other are delegated to gadget core driver. >> All class requests are delegated to gadge

RE: [RFC PATCH v2 02/15] usb:cdns3: Device side header file.

2018-12-02 Thread Pawel Laszczak
Hi Peter >> + >> +/* >> + * USBSS-DEV register interface. >> + * This corresponds to the USBSS Device Controller Interface */ >> +/** >> + * struct xhci_cap_regs - xHCI Host Controller Capability Registers. > >struct cdns3_usb_regs - device controller registers thanks, I had this from beginning

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-02 Thread Pawel Laszczak
>> >> Patch adds core.c and core.h file that implements initialization >> of platform driver and adds function responsible for selecting, >> switching and running appropriate Device/Host mode. >> >> Signed-off-by: Pawel Laszczak >> --- >> drivers/

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-03 Thread Pawel Laszczak
Hi >>> + >>> +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, >>> + struct usb_endpoint_descriptor >>> *desc, >>> + struct usb_ss_ep_comp_descriptor >>> *comp_desc) >>> +{ >>> + struct cdns3_devic

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-04 Thread Pawel Laszczak
Hi, >> >> >> >> Patch adds core.c and core.h file that implements initialization >> >> of platform driver and adds function responsible for selecting, >> >> switching and running appropriate Device/Host mode. >> >> >> >> Si

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-05 Thread Pawel Laszczak
Hi + Tomek >> > + * Cadence USBSS DRD Driver. >> > + * >> > + * Copyright (C) 2018 Cadence. >> > + * >> > + * Author: Peter Chen >> > + * Pawel Laszczak >> > + */ >> > + >> > +#includ

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-05 Thread Pawel Laszczak
+ Tomek Klimek >> > + >> > +static inline void cdns3_role_stop(struct cdns3 *cdns) >> > +{ >> > + enum cdns3_roles role = cdns->role; >> > + >> > + if (role == CDNS3_ROLE_END) >> >> WARN_ON(role >= CNDS3_ROLE_END) ? >> >> > + return; >> > + >> > + mutex_lock(&cdns->mutex);

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-05 Thread Pawel Laszczak
> >> Hi Roger >> >> >On 18/11/18 12:09, Pawel Laszczak wrote: >> >> Patch adds core.c and core.h file that implements initialization >> >> of platform driver and adds function responsible for selecting, >> >> switching and running ap

RE: [RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-12-05 Thread Pawel Laszczak
>> Patch adds supports for detecting Host/Device mode. >> Controller has additional OTG register that allow >> implement even whole OTG functionality. >> At this moment patch adds support only for detecting >> the appropriate mode based on strap pins and ID pin. >&

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-06 Thread Pawel Laszczak
Hi, >On 04/12/18 10:50, Peter Chen wrote: >>>> + * Cadence USBSS DRD Driver. >>>> + * >>>> + * Copyright (C) 2018 Cadence. >>>> + * >>>> + * Author: Peter Chen >>>> + * Pawel Laszczak >>>> + *

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-06 Thread Pawel Laszczak
Hi, >>> > + >>> > +static inline void cdns3_role_stop(struct cdns3 *cdns) >>> > +{ >>> > + enum cdns3_roles role = cdns->role; >>> > + >>> > + if (role == CDNS3_ROLE_END) >>> >>> WARN_ON(role >= CNDS3_ROLE_END) ? >>> >>> > + return; >>> > + >>> > + mutex_lock(&cdns->mutex);

RE: [RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller.

2018-12-06 Thread Pawel Laszczak
Hi, >On Sun, Nov 18, 2018 at 10:08:59AM +0000, Pawel Laszczak wrote: >> Thsi patch aim at documenting USB related dt-bindings for the > >typo > >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../

[PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-10 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3

[PATCH v1 0/2] Introduced new Cadence USBSS DRD Driver.

2018-12-10 Thread Pawel Laszczak
have support for PCIe bus, which is used on FPGA prototyping. The host site of USBSS controller is compliance with XHCI specification, so it works with standard XHCI linux driver. --- Pawel Laszczak (2): dt-bindings: add binding for USBSS-DRD controller. usb:cdns3 Add Cadence USB3 DRD Driver

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 14:39, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD),

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >> +static int cdns3_probe(struct platform_device *pdev) >> +{ >> +struct device *dev = &pdev->dev; >> +struct resource *res; >> +struct cdns3 *cdns; >> +void __iomem *regs; >> +int

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 7:42 AM, Peter Chen wrote: +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, + struct usb_endpoint_descriptor *desc, + struct usb_ss_ep_comp_descriptor

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-13 Thread Pawel Laszczak
Hi, >On Tue, Dec 11, 2018 at 6:19 PM Roger Quadros wrote: >> >> Pawel, >> >> On 10/12/18 14:39, Pawel Laszczak wrote: >> > This patch aim at documenting USB related dt-bindings for the >> > Cadence USBSS-DRD controller. >> > >> &g

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-13 Thread Pawel Laszczak
Hi, > >On Wed, Dec 12, 2018 at 3:49 AM Pawel Laszczak wrote: >> >> Hi, >> >> >On 10/12/18 7:42 AM, Peter Chen wrote: >> >>>> +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, >> >>>> +

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi Peter >On Mon, Dec 10, 2018 at 8:55 PM Pawel Laszczak wrote: >> >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-R

  1   2   >