Re: [PATCH v2 1/2 RESEND] usb: core: phy: add support for PHY calibration

2019-08-26 Thread Marek Szyprowski
Hi Greg On 2019-08-08 11:41, Marek Szyprowski wrote: > Some PHYs (for example Exynos5 USB3.0 DRD PHY) require calibration to be > done after every USB HCD reset. Generic PHY framework has been already > extended with phy_calibrate() function in commit 36914111e682 ("drivers: > p

Re: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Marek Szyprowski
Hi Felipe, On 2019-08-08 11:51, Felipe Balbi wrote: > Marek Szyprowski writes: >> Calls to USB2 generic PHY calibrate() method has been moved to HCD core, >> which now successfully handles generic PHYs and their calibration after >> every HCD reset. This fixes all the tim

[PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Marek Szyprowski
/resume or USB3.0 detection failure when XHCI-plat driver compiled as separate module. Signed-off-by: Marek Szyprowski Tested-by: Anand Moon Tested-by: Jochen Sprickerhof --- drivers/usb/dwc3/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3

[PATCH v2 0/2 RESEND] Fix USB3.0 DRD PHY calibration issues (DWC3/XHCI) on Exynos542x SoCs

2019-08-08 Thread Marek Szyprowski
Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M root@target:~# ->8----- Bes

[PATCH v2 1/2 RESEND] usb: core: phy: add support for PHY calibration

2019-08-08 Thread Marek Szyprowski
eneric PHY handling code in USB HCD core. Signed-off-by: Marek Szyprowski Tested-by: Anand Moon Tested-by: Jochen Sprickerhof --- drivers/usb/core/hcd.c | 7 +++ drivers/usb/core/phy.c | 21 + drivers/usb/core/phy.h | 1 + 3 files changed, 29 insertions(+) diff --git a/d

[PATCH v2 3/3] ARM: dts: exynos: Use standard arrays of generic PHYs for EHCI/OHCI devices

2019-07-26 Thread Marek Szyprowski
bindings. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi| 28 +++ .../boot/dts/exynos4210-universal_c210.dts| 8 ++ arch/arm/boot/dts/exynos4412-itop-elite.dts | 9 ++ arch/arm/boot/dts/exynos4412

[PATCH v2 1/3] dt-bindings: switch Exynos EHCI/OHCI bindings to use array of generic PHYs

2019-07-26 Thread Marek Szyprowski
rollers. To resolve it properly, lets move PHYs from the sub-nodes to a standard array under the 'phys' property. Suggested-by: Måns Rullgård Reviewed-by: Rob Herring Signed-off-by: Marek Szyprowski --- .../devicetree/bindings/usb/exynos-usb.txt| 41 +++ 1 file

[PATCH v2 2/3] usb: exynos: add support for getting PHYs from the standard dt array

2019-07-26 Thread Marek Szyprowski
controller will be removed making a place for the generic USB device bindings nodes. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- drivers/usb/host/ehci-exynos.c | 23 +++ drivers/usb/host/ohci-exynos.c | 23 +++ 2 files changed, 38

[PATCH v2 0/3] Exynos EHCI/OHCI: resolve conflict with the generic USB device bindings

2019-07-26 Thread Marek Szyprowski
on various Exynos boards with different USB host controller configurations (Odroids family: X2, U3, XU3). Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v2: - rearranged the code as suggested by Måns Rullgård, kept support for legacy bindings the E

[PATCH v2] phy: core: document phy_calibrate()

2019-07-22 Thread Marek Szyprowski
led after every host controller reset. Signed-off-by: Marek Szyprowski --- drivers/phy/phy-core.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index e3880c4a15f2..b04f4fe85ac2 100644 --- a/drivers/phy/phy-core.c +++ b/drivers

Re: [PATCH] phy: core: document calibrate() method

2019-07-22 Thread Marek Szyprowski
Hi Kishon, On 2019-07-19 14:25, Kishon Vijay Abraham I wrote: > On 19/07/19 5:51 PM, Marek Szyprowski wrote: >> On 2019-07-19 12:04, Kishon Vijay Abraham I wrote: >>> On 19/07/19 3:22 PM, Marek Szyprowski wrote: >>>> Commit 36914111e682 ("drivers: phy: a

[PATCH] phy: samsung: disable bind/unbind platform driver feature

2019-07-19 Thread Marek Szyprowski
to notify clients about PHY removal. This patch removes the possiblity to unbind Samsung Exynos PHY drivers in runtime. Signed-off-by: Marek Szyprowski --- drivers/phy/samsung/phy-exynos-dp-video.c | 1 + drivers/phy/samsung/phy-exynos-mipi-video.c | 1 + drivers/phy/samsung/phy-exynos-pcie.c

Re: [PATCH] phy: core: document calibrate() method

2019-07-19 Thread Marek Szyprowski
Hi Kishon, On 2019-07-19 12:04, Kishon Vijay Abraham I wrote: > Hi Marek, > > On 19/07/19 3:22 PM, Marek Szyprowski wrote: >> Commit 36914111e682 ("drivers: phy: add calibrate method") added support >> for generic phy_calibrate() method, but it didn't expl

[PATCH] phy: core: document calibrate() method

2019-07-19 Thread Marek Szyprowski
led after every host controller reset. Signed-off-by: Marek Szyprowski --- include/linux/phy/phy.h | 12 1 file changed, 12 insertions(+) diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 15032f145063..46775e8b0ed9 100644 --- a/include/linux/phy/phy.h +++ b/include/

[PATCH] usb: dwc3: remove generic PHYs forwarding for XHCI device

2019-07-19 Thread Marek Szyprowski
pper into the HCD core") USB HCD already handles generic PHYs acquired from the HCD's 'sysdev', which in this case is DWC3 core device. This means that creating any custom lookup entries for XHCI driver is no longer needed and can be simply removed. Signed-off-by: Mar

[PATCH] phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY

2019-07-19 Thread Marek Szyprowski
PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY. Fixes: d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800") Signed-off-by: Marek Szyprowski --- drivers/phy/s

[PATCH v2 1/2] usb: core: phy: add support for PHY calibration

2019-07-19 Thread Marek Szyprowski
eneric PHY handling code in USB HCD core. Signed-off-by: Marek Szyprowski --- drivers/usb/core/hcd.c | 7 +++ drivers/usb/core/phy.c | 21 + drivers/usb/core/phy.h | 1 + 3 files changed, 29 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 88

[PATCH v2 2/2] usb: dwc3: remove generic PHY calibrate() calls

2019-07-19 Thread Marek Szyprowski
/resume or USB3.0 detection failure when XHCI-plat driver compiled as separate module. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc3/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index c9bb93a2c81e..7dd6d419254d 100644 --- a

[PATCH v2 0/2] Fix USB3.0 DRD PHY calibration issues (DWC3/XHCI) on Exynos542x SoCs

2019-07-19 Thread Marek Szyprowski
Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M root@target:~# ->8----- Bes

Re: [PATCH 0/3] Fix USB3.0 DRD PHY calibration issues (DWC3/XHCI) on Exynos542x SoCs

2019-07-15 Thread Marek Szyprowski
Hi Anand, On 2019-06-28 17:32, Anand Moon wrote: > Hi Marek, > > On Thu, 27 Jun 2019 at 12:47, Marek Szyprowski > wrote: >> Dear All, >> >> Commit d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for >> exynos5420/5800") added support f

Re: [PATCH v2] usb: dwc2: Use generic PHY width in params setup

2019-06-06 Thread Marek Szyprowski
inst hardware >> capabilities. >> >> Fixes: 707d80f0a3c5 ("usb: dwc2: gadget: Replace phyif with >> phy_utmi_width") >> Tested-by: Marek Szyprowski >> Signed-off-by: Jules Maselbas > > Acked-by: Minas Harutyunyan Gentle reminder, Fe

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-17 Thread Marek Szyprowski
Hi Måns On 2019-05-13 12:03, Måns Rullgård wrote: > Marek Szyprowski writes: >> Hi Peter, >> >> On 2019-05-10 05:10, Peter Chen wrote: >>> >>>> Marek Szyprowski writes: >>>>> Commit 69bec7259853 ("USB: core: let USB device know devic

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-17 Thread Marek Szyprowski
Hi Måns On 2019-05-13 12:06, Måns Rullgård wrote: > Marek Szyprowski writes: > >> Hi Peter, >> >> On 2019-05-13 11:23, Peter Chen wrote: >>>> On 2019-05-13 11:00, Peter Chen wrote: >>>>>> On 2019-05-10 05:10, Peter Chen wrote: >>&g

[PATCH v4] usb: exynos: add workaround for the USB device bindings conflict

2019-05-17 Thread Marek Szyprowski
raised by the commit 01fdf179f4b0 ("usb: core: skip interfaces disabled in devicetree"), which incorrectly disabled some devices on Exynos based boards. Reported-by: Markus Reichl Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- v4: - moved workaround to Exynos

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Marek Szyprowski
Hi Peter, On 2019-05-13 11:23, Peter Chen wrote: >> On 2019-05-13 11:00, Peter Chen wrote: >>>> On 2019-05-10 05:10, Peter Chen wrote: >>>>>> Marek Szyprowski writes: >>>>>>> Commit 69bec7259853 ("USB: core: let USB device know dev

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Marek Szyprowski
Hi Peter, On 2019-05-13 11:00, Peter Chen wrote: >> On 2019-05-10 05:10, Peter Chen wrote: >>>> Marek Szyprowski writes: >>>>> Commit 69bec7259853 ("USB: core: let USB device know device node") >>>>> added support for attaching devicetre

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Marek Szyprowski
Hi Mathias, On 2019-05-09 17:10, Mathias Nyman wrote: > On 9.5.2019 14.51, Nicolas Saenz Julienne wrote: >> On Thu, 2019-05-09 at 14:40 +0300, Mathias Nyman wrote: >>> On 9.5.2019 13.32, Marek Szyprowski wrote: >>>> Dear All, >>>> >>>> On 2019

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Marek Szyprowski
t; @@ -2149,6 +2151,21 @@ static inline struct xhci_ring > *xhci_urb_to_transfer_ring(struct xhci_hcd *xhci, > urb->stream_id); > } > > +/* > + * TODO: As per spec Isochronous IDT transmissions are supported. We bypass > + * them anyways as we where unable to find a device that matches the > + * constraints. > + */ > +static inline bool xhci_urb_suitable_for_idt(struct urb *urb) > +{ > + if (!usb_endpoint_xfer_isoc(&urb->ep->desc) && usb_urb_dir_out(urb) && > + usb_endpoint_maxp(&urb->ep->desc) >= TRB_IDT_MAX_SIZE && > + urb->transfer_buffer_length <= TRB_IDT_MAX_SIZE) > + return true; > + > + return false; > +} > + > static inline char *xhci_slot_state_string(u32 state) > { > switch (state) { Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH] usb: dwc2: Use generic PHY width in params setup

2019-05-07 Thread Marek Szyprowski
ue spotten on Exynos4412 SoCs. Tested-by: Marek Szyprowski IMHO it would also make sense to add: Fixes: 707d80f0a3c5 ("usb: dwc2: gadget: Replace phyif with phy_utmi_width") > --- > drivers/usb/dwc2/params.c | 9 + > drivers/usb/dwc2/platform.c | 9 - >

[PATCH] usb: dwc2: Force 8bit UTMI width for Samsung Exynos SoCs

2019-05-06 Thread Marek Szyprowski
Samsung Exynos SoCs require to force UTMI width to 8bit, otherwise the host side of the shared USB2 PHY doesn't work. Reported-by: Krzysztof Kozlowski Fixes: 707d80f0a3c5 ("usb: dwc2: gadget: Replace phyif with phy_utmi_width") Signed-off-by: Marek Szyprowski --- drivers/usb/dw

Re: [PATCH] usb: dwc2: gadget: add scatter-gather mode

2019-03-29 Thread Marek Szyprowski
advertises scatter-gather suppport. > > Signed-off-by: Andrzej Pietrasiewicz > [mszyprow: fixed null pointer issue, rewrote commit message] > Signed-off-by: Marek Szyprowski > [andrzej.p: improved handling zlps] > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/usb/dwc

[PATCH v2] usb: dwc3: move synchronize_irq() out of the spinlock protected block

2019-03-27 Thread Marek Szyprowski
fs_write+0xa4/0x16c) [] (vfs_write) from [] (ksys_write+0x40/0x8c) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xed55ffa8 to 0xed55fff0) ... Fixes: 01c10880d242 ("usb: dwc3: gadget: synchronize_irq dwc irq in suspend") Signed-off-by: Marek Szyprowski --- v2: ad

[PATCH] usb: dwc3: move synchronize_irq() out of the spinlock protected block

2019-02-21 Thread Marek Szyprowski
fs_write+0xa4/0x16c) [] (vfs_write) from [] (ksys_write+0x40/0x8c) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xed55ffa8 to 0xed55fff0) ... Signed-off-by: Marek Szyprowski --- drivers/usb/dwc3/core.c | 2 ++ drivers/usb/dwc3/gadget.c | 2 -- 2 files changed, 2 insertions(

Re: [PATCH] usb: dwc3: Enable GBit Ethernet on Odroid XU4

2019-02-08 Thread Marek Szyprowski
asis >> where this is the default). I confirm that on Odroid XU4 USB 3.0 works only when all related drivers (dwc3, xhci and exynos5 drd phy) are compiled into the kernel. If they are compiled as modules, USB 3.0 calibration doesn't work. The mentioned patch doesn't fix anything. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH] usb: dwc3: gadget: synchronize_irq dwc irq in suspend

2019-02-08 Thread Marek Szyprowski
; Not the most elegant solution. I'm open to other suggestions. > Is there any conflict if dwc3_thread_interrupt and below three functions > execute by parallel? > > dwc3_gadget_run_stop(dwc, false, false); > dwc3_disconnect_gadget(dwc); > __dwc3_gadget_stop(dwc); > > That is means the dwc3_thread_interrupt is trying to handle pending > events but another core is trying to do dwc3 stop/suspend. Isn't that serialized by dwc->lock? It quite late in release cycle and the issue is still not fixed. Maybe it would make sense to revert that change and prepare a proper fix for the next release? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH] usb: dwc3: gadget: synchronize_irq dwc irq in suspend

2019-01-30 Thread Marek Szyprowski
_irq(dwc->lock); > synchronize_irq(dwc->irq_gadget); > + spin_lock_irq(dwc->lock); > > return 0; > } > > Not the most elegant solution. I'm open to other suggestions. Frankly this the same as the previous proposal. spinlock is being released just after dwc3_gadget_suspend() function, so I see no point in playing with spinlock at the end of dwc3_gadget_suspend(). Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH] usb: dwc3: gadget: synchronize_irq dwc irq in suspend

2019-01-28 Thread Marek Szyprowski
Hi Felipe, On 2019-01-28 14:30, Felipe Balbi wrote: > Marek Szyprowski writes: >> On 2019-01-14 09:30, Felipe Balbi wrote: >>> From: Bo He >>> >>> We see dwc3 endpoint stopped by unwanted irq during >>> suspend resume test, which is caused dwc3 ep

Re: [PATCH] usb: dwc3: gadget: synchronize_irq dwc irq in suspend

2019-01-22 Thread Marek Szyprowski
rs/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -3379,6 +3379,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) > dwc3_disconnect_gadget(dwc); > __dwc3_gadget_stop(dwc); > > + synchronize_irq(dwc->irq_gadget); > + > return 0; > } > > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH v2] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-01-22 Thread Marek Szyprowski
(linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov > Fixes: 9f2168367a0a ("usb: dwc3: exynos: Rework clock handling and prepare > for new variants") Acked-by: Marek Szyprowski > --- > v2: Add fix for the second instance in dwc3_exynos_resume() per Marek > Szy

[PATCH] usb: misc: usb3503: Add system sleep support in non-I2C mode

2019-01-21 Thread Marek Szyprowski
USB3503 chip can be used without any I2C connection, what is handled by a simple platform device driver. Add support for resetting the chip (via GPIO lines) during system suspend/resume cycle by adding calls to existing suspend/resume functions used for E2C device. Signed-off-by: Marek Szyprowski

[PATCH v3] usb: dwc2: gadget: Add scatter-gather mode

2019-01-21 Thread Marek Szyprowski
allocating requests is already implemented in functionfs and TCM USB functions and automatically used if UDC driver advertises scatter-gather suppport. Signed-off-by: Andrzej Pietrasiewicz [mszyprow: fixed null pointer issue, rewrote commit message] Signed-off-by: Marek Szyprowski --- Andrzej no

Re: [PATCH] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-01-21 Thread Marek Szyprowski
while (i-- > 0) > clk_disable_unprepare(exynos->clks[i]); > return ret; > } Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-12-06 Thread Marek Szyprowski
Hi Dan, On 2018-12-06 15:52, Dan Carpenter wrote: > Hi Marek, > > I'm surprised you don't get deadlocks when you apply this patch. Why should I get it? It is just a revert to the state before applying the mentioned incorrect patch. > On Wed, Nov 21, 2018 at 04:45:04PM +

Re: [PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-12-06 Thread Marek Szyprowski
and it fixes the issues. I'm not very happy about the unlock/lock design, but it should be safe in this case and doesn't make the code even more complex. Feel free to add a following tag to the final patch: Tested-by: Marek Szyprowski > diff --git a/drivers/usb/dwc2/gadget.c b/driver

Re: [PATCH] usb: dwc2: Disable power down feature on Samsung SoCs

2018-12-06 Thread Marek Szyprowski
Hi Artur, On 2018-12-04 15:28, Artur Petrosyan wrote: > On 11/20/2018 19:38, Marek Szyprowski wrote: >> Power down feature of DWC2 module integrated in Samsung SoCs doesn't work >> properly or needs some additional handling in PHY or SoC glue layer, so >> disable it

Re: [PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-11-23 Thread Marek Szyprowski
Hi Minas, On 2018-11-22 07:53, Minas Harutyunyan wrote: > On 11/21/2018 7:45 PM, Marek Szyprowski wrote: >> This reverts commit dccf1bad4be7eaa096c1f3697bd37883f9a08ecb. >> >> The reverted commit breaks locking in the DWC2 driver. It causes random >> crashes or memory c

[PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-11-21 Thread Marek Szyprowski
(netlink_sendmsg+0x2bc/0x348) [] (netlink_sendmsg) from [] (sock_sendmsg+0x14/0x24) [] (sock_sendmsg) from [] (___sys_sendmsg+0x22c/0x248) [] (___sys_sendmsg) from [] (__sys_sendmsg+0x40/0x6c) [] (__sys_sendmsg) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xede65fa8 to 0xede65ff0) ... Signed-off-by: Marek Sz

[PATCH] usb: dwc2: Disable power down feature on Samsung SoCs

2018-11-20 Thread Marek Szyprowski
river probe. Fixes: 03ea6d6e9e1ff1 ("usb: dwc2: Enable power down") Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/params.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 7c1b6938f212..266157ae17

[PATCH] usb: gadget: u_ether: fix unsafe list iteration

2018-11-19 Thread Marek Szyprowski
ork+0x14/0x20) Exception stack(0xee7fbfb0 to 0xee7fbff8) ... ---[ end trace 64480bc835eba7d6 ]--- Fixes: fea14e68ff5e ("usb: gadget: u_ether: use better list accessors") Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/function/u_ether.c | 11 ++- 1 file changed, 6 ins

[PATCH 2/4] usb: dwc3: exynos: Rework clock handling and prepare for new variants

2018-09-18 Thread Marek Szyprowski
Add per-variant list of clocks and manage them all together in the single array. This is a preparation for adding new variants of Exynos SoCs. No functional changes for existing Exynos SoCs. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc3/dwc3-exynos.c | 128

[PATCH 1/4] usb: dwc3: exynos: Remove dead code

2018-09-18 Thread Marek Szyprowski
All supported Exynos variants provide respective generic PHY framework based drivers for controlling USB PHYs, so there is no point creating fake USB PHYs based on platform devices. While removing useless code, remove calls to runtime PM, which have no effect. Signed-off-by: Marek Szyprowski

[PATCH 0/4] DWC3: fix system suspend/resume issues on Exynos5433

2018-09-18 Thread Marek Szyprowski
Dear all, This patchset performs a cleanup of Exynos glue code for DWC3 driver and adds proper support for Exynos5433 specific variant of it (current implementation triggered external abort issue during suspend/resume cycle). Best regards Marek Szyprowski Samsung R&D Institute Poland P

[PATCH 3/4] usb: dwc3: exynos: Add support for Exynos5433 variant with all clocks

2018-09-18 Thread Marek Szyprowski
DRD30 clocks were left enabled by bootloader and later kept enabled by the DRD PHY driver. However, if one tried to use Exnos DWC3 driver as a module or performed system suspend/resume cycle, external abort happened. This patch finally fixes this issue. Signed-off-by: Marek Szyprowski

[PATCH 4/4] arm64: dts: exynos: Update DWC3 modules on Exynos5433 SoCs

2018-09-18 Thread Marek Szyprowski
Update DWC3 hardware modules to Exynos5433 specific variant: change compatible name and add all required clocks (both to the glue node and DWC3 core node). Signed-off-by: Marek Szyprowski --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 24 -- 1 file changed, 18 insertions

Re: [PATCH] usb: gadget: dwc2: fix memory leak in gadget_init()

2018-05-24 Thread Marek Szyprowski
Hi Grigor, On 2018-05-24 16:22, Grigor Tovmasyan wrote: > Freed allocated request for ep0 to prevent memory leak in case when > dwc2_driver_probe() failed. > > Signed-off-by: Grigor Tovmasyan > Cc: Stefan Wahren > Cc: Marek Szyprowski Works fine on my Exynos SoC based test

Re: usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-05-17 Thread Marek Szyprowski
evert this patch in your -next branch. Best regards Marek Szyprowski, PhD Samsung R&D Institute Poland On 2018-04-16 12:16, Grigor Tovmasyan wrote: > In dwc2_gadget_init() we allocate EP0 request via > dwc2_hsotg_ep_alloc_request(). After that there are > usb_add_gadget_udc() call

Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-03-04 Thread Marek Szyprowski
guaranteed for some hardware. Does it mean that the fix proposed by Eric is not the proper solution? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.k

Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-02-27 Thread Marek Szyprowski
Hi Eric, On 2018-02-27 15:07, Eric Dumazet wrote: On Tue, 2018-02-27 at 08:26 +0100, Marek Szyprowski wrote: I've noticed that USBnet/ASIX AX88772B USB driver produces deplock kernel warning ("inconsistent lock state") on Chromebook2 Peach-PIT board. No special activity is need

Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-02-27 Thread Marek Szyprowski
Hi Oliver, On 2018-02-27 11:37, Oliver Neukum wrote: Am Dienstag, den 27.02.2018, 08:26 +0100 schrieb Marek Szyprowski: I've noticed that USBnet/ASIX AX88772B USB driver produces deplock kernel warning ("inconsistent lock state") on Chromebook2 Peach-PIT board. No Is that 32

inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-02-26 Thread Marek Szyprowski
  18.160704] [] (__schedule) from [] (schedule_idle+0x2c/0x78) [   18.160711] [] (schedule_idle) from [] (cpu_startup_entry+0x18/0x1c) [   18.200726] [] (cpu_startup_entry) from [] (start_kernel+0x394/0x400) Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubsc

Re: [PATCH] xhci: Set DMA parameters appropriately

2017-10-17 Thread Marek Szyprowski
Hi Robin, On 2017-10-13 12:48, Robin Murphy wrote: On 13/10/17 09:15, Marek Szyprowski wrote: On 2017-10-11 15:56, Robin Murphy wrote: xHCI requires that data buffers do not cross 64KB boundaries (and are thus at most 64KB long as well) - whilst xhci_queue_{bulk,isoc}_tx() already split their

Re: [PATCH] xhci: Set DMA parameters appropriately

2017-10-13 Thread Marek Szyprowski
ded, so there is very little value added by this patch. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] ARM: dts: Odroid XU4: fix USB3.0 ports

2017-01-25 Thread Marek Szyprowski
quirks for both DWC3 controllers, as this issue with PHY suspend seems to be a Exynos specific thing. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] usb: gadget: udc-core: Rescan pending list on driver unbind

2016-12-05 Thread Marek Szyprowski
after unbinding gadget from udc. Thanks to this, when we unload first gadget: $ rmmod g_zero.ko gadget which is pending is automatically attached to that UDC (if name matches). Signed-off-by: Krzysztof Opasiak Reviewed-by: Marek Szyprowski --- drivers/usb/gadget/

[PATCH] usb: dwc2: fix flags for DMA descriptor allocation in dwc2_hsotg_ep_enable

2016-12-01 Thread Marek Szyprowski
chain pointers to dwc2_hsotg_ep structure") Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index b95930f20d90..c55db4aa54d6 100644 --- a/drivers/usb/dwc2/gadg

Re: [RFT PATCH 0/3] usb: misc: usb3503: Fix missing device when TFTP booting

2016-05-01 Thread Marek Szyprowski
patchwork.linuxtv.org/patch/34117/ A change to media device core causes deadlock on driver registration. Anyway, after disabling that config option I was finally able to test your patch series: Tested-by: Hans Verkuil Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

[PATCH v3] usb: gadget: provide interface for legacy gadgets to get UDC name

2016-02-18 Thread Marek Szyprowski
to get UDC controller name. This patch removes this hack and replaces it by additional function in the UDC core (which is usefully only for legacy drivers, please don't use it in the new code). Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski Tested-by: Vegard Nossum --

[PATCH RESEND] usb: gadget: gadgetfs: unregister gadget only if it got successfully registered

2016-02-18 Thread Marek Szyprowski
Gadgetfs driver called usb_gadget_unregister_driver unconditionally, even if it didn't register it earlier due to other failures. This patch fixes this. Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski Tested-by: Vegard Nossum --- drivers/usb/gadget/legacy/inode.c | 7 +

[PATCH v2 RESEND] usb: gadget: provide interface for legacy gadgets to get UDC name

2016-02-17 Thread Marek Szyprowski
to get UDC controller name. This patch removes this hack and replaces it by additional function in the UDC core (which is usefully only for legacy drivers, please don't use it in the new code). Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski Tested-by: Vegard Nossum --- changelog:

[PATCH] usb: gadget: remove driver from pending list on probe error

2016-02-08 Thread Marek Szyprowski
Retry gadget probe only if the probe result is -EPROBE_DEFER, not on every probe error. Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/udc/udc-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc

Re: [PATCH] usb: gadget: provide interface for legacy gadgets to get UDC name

2016-02-08 Thread Marek Szyprowski
Hello, On 2016-02-08 12:31, Vegard Nossum wrote: On 02/08/2016 12:12 PM, Marek Szyprowski wrote: Since commit 855ed04a3758b205e84b269f92d26ab36ed8e2f7 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") gadget drivers can not assume that UDC drivers a

[PATCH v2] usb: gadget: provide interface for legacy gadgets to get UDC name

2016-02-08 Thread Marek Szyprowski
to get UDC controller name. This patch removes this hack and replaces it by additional function in the UDC core (which is usefully only for legacy drivers, please don't use it in the new code). Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski --- changelog: v2: - properly report ud

[PATCH] usb: gadget: gadgetfs: unregister gadget only if it got successfully registered

2016-02-08 Thread Marek Szyprowski
Gadgetfs driver called usb_gadget_unregister_driver unconditionally, even if it didn't register it earlier due to other failures. This patch fixes this. Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/legacy/inode.c | 7 +-- 1 file changed, 5 inser

[PATCH] usb: gadget: provide interface for legacy gadgets to get UDC name

2016-02-08 Thread Marek Szyprowski
to get UDC controller name. This patch removes this hack and replaces it by additional function in the UDC core (which is usefully only for legacy drivers, please don't use it in the new code). Signed-off-by: Marek Szyprowski --- Vegard: Could you check if this patch fixes your issue with ga

Re: gadgetfs regression (NULL ptr deref) since v4.4-rc7

2016-02-08 Thread Marek Szyprowski
proach was rejected by Alan Stern many times so final version pushed by Marek Szyprowski doesn't have it, and we have this NULL pointer dereference. But this means there is a bug in GadgetFS that was hidden previously: it tries to deregister gadget driver that was not previously registere

Re: [PATCH v7 0/4] usb/gadget: independent registration of gadgets and gadget drivers

2015-12-11 Thread Marek Szyprowski
Hello, On 2015-12-10 18:13, Felipe Balbi wrote: Felipe Balbi writes: Felipe Balbi writes: Marek Szyprowski writes: This is a resurrection of the patches initially submitted by Ruslan Bilovol in the following thread: https://lkml.org/lkml/2015/6/22/554 The changes since the original

Re: [PATCH v7 4/4] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-11-24 Thread Marek Szyprowski
Hello, On 2015-11-23 16:32, Alan Stern wrote: On Mon, 23 Nov 2015, Marek Szyprowski wrote: From: Ruslan Bilovol Change behavior during registration of gadgets and gadget drivers in udc-core. Instead of previous approach when for successful probe of usb gadget driver at least one usb gadget

[PATCH v7 3/4] usb: gadget: udc-core: remove unused usb_udc_attach_driver()

2015-11-23 Thread Marek Szyprowski
From: Ruslan Bilovol Now when last user of usb_udc_attach_driver() is switched to passing UDC name via usb_gadget_driver struct, it's safe to remove this function Tested-by: Maxime Ripard Signed-off-by: Ruslan Bilovol Signed-off-by: Marek Szyprowski Tested-by: Peter Chen --- driver

[PATCH v7 4/4] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-11-23 Thread Marek Szyprowski
bi, fixed checkpatch issues] Signed-off-by: Marek Szyprowski Tested-by: Peter Chen --- drivers/usb/gadget/udc/udc-core.c | 41 ++- include/linux/usb/gadget.h| 2 ++ 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadg

[PATCH v7 0/4] usb/gadget: independent registration of gadgets and gadget drivers

2015-11-23 Thread Marek Szyprowski
regulator drivers (for more information see https://lkml.org/lkml/2015/10/30/374 ). This patchset has been successfully tested on Odroid XU3 boards with DWC3 UDC driver being deferred by missing regulator drivers. Best regards Marek Szyprowski Samsung R&D Institute Poland Patch summary: Ru

[PATCH v7 2/4] usb: gadget: configfs: pass UDC name via usb_gadget_driver struct

2015-11-23 Thread Marek Szyprowski
From: Ruslan Bilovol Now when udc-core supports binding to specific UDC by passing its name via 'udc_name' member of usb_gadget_driver struct, switch to this generic approach. Tested-by: Maxime Ripard Signed-off-by: Ruslan Bilovol [rebased and fixed checkpatch issues] Signed-off

[PATCH v7 1/4] usb: gadget: bind UDC by name passed via usb_gadget_driver structure

2015-11-23 Thread Marek Szyprowski
lovol Signed-off-by: Marek Szyprowski Tested-by: Peter Chen --- drivers/usb/gadget/udc/udc-core.c | 24 +++- include/linux/usb/gadget.h| 4 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/

Re: [PATCH v6 4/4] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-11-20 Thread Marek Szyprowski
Hello, On 2015-11-20 10:26, Peter Chen wrote: On Fri, Nov 20, 2015 at 09:54:12AM +0100, Marek Szyprowski wrote: From: Ruslan Bilovol Change behavior during registration of gadgets and gadget drivers in udc-core. Instead of previous approach when for successful probe of usb gadget driver at

[PATCH v6 2/4] usb: gadget: configfs: pass UDC name via usb_gadget_driver struct

2015-11-20 Thread Marek Szyprowski
From: Ruslan Bilovol Now when udc-core supports binding to specific UDC by passing its name via 'udc_name' member of usb_gadget_driver struct, switch to this generic approach. Tested-by: Maxime Ripard Signed-off-by: Ruslan Bilovol Signed-off-by: Marek Szyprowski --- drivers/

[PATCH v6 0/4] usb/gadget: independent registration of gadgets and gadget drivers

2015-11-20 Thread Marek Szyprowski
information see https://lkml.org/lkml/2015/10/30/374 ). This patchset has been successfully tested on Odroid XU3 boards with DWC3 UDC driver being deferred by missing regulator drivers. Best regards Marek Szyprowski Samsung R&D Institute Poland Patch summary: Ruslan Bilovol (4): usb: gadget: bind

[PATCH v6 3/4] usb: gadget: udc-core: remove unused usb_udc_attach_driver()

2015-11-20 Thread Marek Szyprowski
From: Ruslan Bilovol Now when last user of usb_udc_attach_driver() is switched to passing UDC name via usb_gadget_driver struct, it's safe to remove this function Tested-by: Maxime Ripard Signed-off-by: Ruslan Bilovol Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/udc/udc-c

[PATCH v6 1/4] usb: gadget: bind UDC by name passed via usb_gadget_driver structure

2015-11-20 Thread Marek Szyprowski
lovol Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/udc/udc-core.c | 24 +++- include/linux/usb/gadget.h| 4 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index f660afb..

[PATCH v6 4/4] usb: gadget: udc-core: independent registration of gadgets and gadget drivers

2015-11-20 Thread Marek Szyprowski
bi] Signed-off-by: Marek Szyprowski --- drivers/usb/gadget/udc/udc-core.c | 43 +++ include/linux/usb/gadget.h| 2 ++ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-co

Re: [PATCH 0/4 V2] usb: dwc2: fix usb host support on Raspberry Pi

2015-11-13 Thread Marek Szyprowski
rom PHY usb: dwc2: make otg clk optional drivers/usb/dwc2/platform.c | 81 --- 1 file changed, 53 insertions(+), 28 deletions(-) Tested-by: Marek Szyprowski Works fine on both OdroidU3 and Trats2 boards (both Exynos4412 based). Best regards -- M

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-09 Thread Marek Szyprowski
driver probe, when bootloader left dwc2 enabled. The other way of solving it would be to add irq_set_status_flags(irq, IRQ_NOAUTOEN); before devm_request_irq() and then call enable_irq(irq) after dwc2_lowlevel_hw_enable(). Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- T

[PATCH v6 2/2] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-13 Thread Marek Szyprowski
d provides convenient wrappers for controlling them. Signed-off-by: Marek Szyprowski Acked-by: John Youn Tested-by: John Youn --- Changelog: v6: - fixed typo pointed by John Youn - added Acked-by and Tested-by tags v5: - added separate patch removing init_mutex, which is no longer needed v4: - fi

[PATCH v6 1/2] usb: dwc2: remove no longer needed init_mutex

2015-10-13 Thread Marek Szyprowski
nnect udc feature in pullup() method"), so init_muxtex can be removed now to avoid potential deadlocks with other locks. Signed-off-by: Marek Szyprowski Acked-by: John Youn Tested-by: John Youn --- drivers/usb/dwc2/core.h | 1 - drivers/usb/dwc2/gadget.c | 17 - d

Re: [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)

2015-10-08 Thread Marek Szyprowski
Hello, On 2015-10-08 11:35, Javier Martinez Canillas wrote: Hello, On 10/08/2015 08:23 AM, Marek Szyprowski wrote: Hello, On 2015-10-08 08:02, Krzysztof Kozlowski wrote: On 07.10.2015 23:26, Marek Szyprowski wrote: Hello, On 2015-10-07 02:30, Krzysztof Kozlowski wrote: Introduction

Re: [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)

2015-10-07 Thread Marek Szyprowski
Hello, On 2015-10-08 08:02, Krzysztof Kozlowski wrote: On 07.10.2015 23:26, Marek Szyprowski wrote: Hello, On 2015-10-07 02:30, Krzysztof Kozlowski wrote: Introduction This patchset tries to fix probing of usb3503 on Arndale board if the Samsung PHY driver is probed later (or

Re: [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)

2015-10-07 Thread Marek Szyprowski
ght now I didn't find any good solution for additional control for devices which are on autoprobed bus like usb. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message

[PATCH v5 2/2] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-06 Thread Marek Szyprowski
d provides convenient wrappers for controlling them. Signed-off-by: Marek Szyprowski --- Changelog: v5: - added separate patch removing init_mutex, which is no longer needed v4: - fixed broken conditional compilation and adjusted comments in dwc2_hsotg structure documentation v3: - rebased onto lates

[PATCH v5 1/2] usb: dwc2: remove no longer needed init_mutex

2015-10-06 Thread Marek Szyprowski
nnect udc feature in pullup() method"), so init_muxtex can be removed now to avoid potential deadlocks with other locks. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/core.h | 1 - drivers/usb/dwc2/gadget.c | 17 - drivers/usb/dwc2/platform.c | 1 - 3 files c

Re: [PATCH v4 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-06 Thread Marek Szyprowski
Hello, On 2015-10-06 01:27, Felipe Balbi wrote: John Youn writes: Hi, On 10/2/2015 12:45 AM, Marek Szyprowski wrote: DWC2 module on some platforms needs three additional hardware resources: phy controller, clock and power supply. All of them must be enabled/activated to properly initialize

Re: [PATCH v3 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-02 Thread Marek Szyprowski
Hello, On 2015-10-02 00:21, John Youn wrote: On 10/1/2015 3:04 PM, Felipe Balbi wrote: On Thu, Oct 01, 2015 at 09:04:59PM +, John Youn wrote: On 10/1/2015 8:50 AM, Felipe Balbi wrote: On Mon, Sep 21, 2015 at 12:16:12PM +0200, Marek Szyprowski wrote: DWC2 module on some platforms needs

[PATCH v4 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-02 Thread Marek Szyprowski
d provides convenient wrappers for controlling them. Signed-off-by: Marek Szyprowski --- Changelog: v4: - fixed broken conditional compilation and adjusted comments in dwc2_hsotg structure documentation v3: - rebased onto latest 'testing/next' from Felipe Balbi (includes s3c_hsotg -> dw

  1   2   3   >