[PATCH] ARM: dts: bcm283x: Fix fifo size for EP 6,7
Stefan Wahren
stefan.wahren at i2se.com
Thu Nov 23 10:29:24 PST 2017
Hi Minas,
> Minas Harutyunyan <Minas.Harutyunyan at synopsys.com> hat am 23. November 2017 um 11:00 geschrieben:
>
>
> Hi Stefan,
>
> ...
>
> In addition to above patches please apply this one:
>
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index 42ac47f85bb4..7db50c27c061 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -433,6 +433,14 @@ void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool
> host)
> dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG);
>
> dwc2_wait_for_mode(hsotg, host);
> +
> + /* Reset after mode changed. Required to restore
> + * 'power on reset' values for chosen mode
> + */
> + if (dwc2_core_reset(hsotg, true))
> + dev_err(hsotg->dev,
> + "%s: Reset failed, aborting", __func__);
> +
> return;
> }
>
now i get this output in the unconnected case:
[ 2.203265] dwc2 20980000.usb: dwc2_check_params: Invalid parameter host_perio_tx_fifo_size=0
[ 2.223595] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[ 2.237313] dwc2 20980000.usb: DCFG=0x00200000, DCTL=0x00000000, DIEPMSK=00000000
[ 2.251241] dwc2 20980000.usb: GAHBCFG=0x00000000, GHWCFG1=0x00000000
[ 2.264092] dwc2 20980000.usb: GRXFSIZ=0x00001000, GNPTXFSIZ=0x00201000
[ 2.276997] dwc2 20980000.usb: DPTx[1] FSize=512, StAddr=0x00001020
[ 2.289533] dwc2 20980000.usb: DPTx[2] FSize=512, StAddr=0x00001220
[ 2.301811] dwc2 20980000.usb: DPTx[3] FSize=512, StAddr=0x00001420
[ 2.313895] dwc2 20980000.usb: DPTx[4] FSize=512, StAddr=0x00001620
[ 2.325905] dwc2 20980000.usb: DPTx[5] FSize=512, StAddr=0x00001820
[ 2.337737] dwc2 20980000.usb: DPTx[6] FSize=768, StAddr=0x00001a20
[ 2.349314] dwc2 20980000.usb: DPTx[7] FSize=768, StAddr=0x00001d20
[ 2.360658] dwc2 20980000.usb: ep0-in: EPCTL=0x00008800, SIZ=0x00000000, DMA=0xc7cc399d
[ 2.373898] dwc2 20980000.usb: ep0-out: EPCTL=0x00008000, SIZ=0x00000000, DMA=0x4369542a
[ 2.391729] dwc2 20980000.usb: ep1-in: EPCTL=0x00001000, SIZ=0x00000000, DMA=0x3cf1e8ff
[ 2.405310] dwc2 20980000.usb: ep1-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xfee68e5b
[ 2.424087] dwc2 20980000.usb: ep2-in: EPCTL=0x00001800, SIZ=0x00000000, DMA=0x250c46a5
[ 2.438198] dwc2 20980000.usb: ep2-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x09126d05
[ 2.458271] dwc2 20980000.usb: ep3-in: EPCTL=0x00002000, SIZ=0x00000000, DMA=0xad3adfdb
[ 2.472553] dwc2 20980000.usb: ep3-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x975be477
[ 2.492567] dwc2 20980000.usb: ep4-in: EPCTL=0x00002800, SIZ=0x00000000, DMA=0x4b1c0566
[ 2.506976] dwc2 20980000.usb: ep4-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x1790a498
[ 2.527472] dwc2 20980000.usb: ep5-in: EPCTL=0x00003000, SIZ=0x00000000, DMA=0xd73f7ded
[ 2.541993] dwc2 20980000.usb: ep5-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x37bc32ff
[ 2.562397] dwc2 20980000.usb: ep6-in: EPCTL=0x00003800, SIZ=0x00000000, DMA=0xc6ac6b1e
[ 2.576850] dwc2 20980000.usb: ep6-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xdd2f97d1
[ 2.597308] dwc2 20980000.usb: ep7-in: EPCTL=0x00004000, SIZ=0x00000000, DMA=0xeb84b4fb
[ 2.612023] dwc2 20980000.usb: ep7-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xfadeb4e6
[ 2.633447] dwc2 20980000.usb: DVBUSDIS=0x000017d7, DVBUSPULSE=000005b8
[ 2.647954] dwc2 20980000.usb: DWC OTG Controller
[ 2.660187] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[ 2.674855] dwc2 20980000.usb: irq 33, io mem 0x20980000
[ 2.689352] hub 1-0:1.0: USB hub found
[ 2.700837] hub 1-0:1.0: 1 port detected
[ 2.716013] dwc2 20980000.usb: Mode Mismatch Interrupt: currently in Device mode
and this in connected case:
[ 2.203259] dwc2 20980000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[6]=768
[ 2.224317] dwc2 20980000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[7]=768
[ 2.245984] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[ 2.260139] dwc2 20980000.usb: DCFG=0x00000000, DCTL=0x00000000, DIEPMSK=00000000
[ 2.274290] dwc2 20980000.usb: GAHBCFG=0x00000000, GHWCFG1=0x00000000
[ 2.287245] dwc2 20980000.usb: GRXFSIZ=0x00001000, GNPTXFSIZ=0x01001000
[ 2.300289] dwc2 20980000.usb: DPTx[1] FSize=512, StAddr=0x00002000
[ 2.313124] dwc2 20980000.usb: DPTx[2] FSize=512, StAddr=0x00002000
[ 2.325661] dwc2 20980000.usb: DPTx[3] FSize=512, StAddr=0x00002000
[ 2.338103] dwc2 20980000.usb: DPTx[4] FSize=512, StAddr=0x00002000
[ 2.350176] dwc2 20980000.usb: DPTx[5] FSize=512, StAddr=0x00002000
[ 2.361982] dwc2 20980000.usb: DPTx[6] FSize=512, StAddr=0x00002000
[ 2.373877] dwc2 20980000.usb: DPTx[7] FSize=512, StAddr=0x00002000
[ 2.385304] dwc2 20980000.usb: ep0-in: EPCTL=0x00000800, SIZ=0x00000000, DMA=0xc7cc3f81
[ 2.398589] dwc2 20980000.usb: ep0-out: EPCTL=0x00000800, SIZ=0x00000000, DMA=0xc7cc3f81
[ 2.417158] dwc2 20980000.usb: ep1-in: EPCTL=0x00001000, SIZ=0x00000000, DMA=0x3cf1e8ff
[ 2.430986] dwc2 20980000.usb: ep1-out: EPCTL=0x00001000, SIZ=0x00000000, DMA=0x3cf1e8ff
[ 2.450726] dwc2 20980000.usb: ep2-in: EPCTL=0x00001800, SIZ=0x00000000, DMA=0x200c4625
[ 2.464986] dwc2 20980000.usb: ep2-out: EPCTL=0x00001800, SIZ=0x00000000, DMA=0x200c4625
[ 2.485186] dwc2 20980000.usb: ep3-in: EPCTL=0x00002000, SIZ=0x00000000, DMA=0xad1adfdb
[ 2.499834] dwc2 20980000.usb: ep3-out: EPCTL=0x00002000, SIZ=0x00000000, DMA=0xad1adfdb
[ 2.520314] dwc2 20980000.usb: ep4-in: EPCTL=0x00002800, SIZ=0x00000000, DMA=0x4b1c0466
[ 2.534866] dwc2 20980000.usb: ep4-out: EPCTL=0x00002800, SIZ=0x00000000, DMA=0x4b1c0466
[ 2.555389] dwc2 20980000.usb: ep5-in: EPCTL=0x00003000, SIZ=0x00000000, DMA=0xd73f3dac
[ 2.570072] dwc2 20980000.usb: ep5-out: EPCTL=0x00003000, SIZ=0x00000000, DMA=0xd73f3dac
[ 2.590527] dwc2 20980000.usb: ep6-in: EPCTL=0x00003800, SIZ=0x00000000, DMA=0xe4ac4b9e
[ 2.604888] dwc2 20980000.usb: ep6-out: EPCTL=0x00003800, SIZ=0x00000000, DMA=0xe4ac4b9e
[ 2.625322] dwc2 20980000.usb: ep7-in: EPCTL=0x00004000, SIZ=0x00000000, DMA=0xeba4b4fa
[ 2.639961] dwc2 20980000.usb: ep7-out: EPCTL=0x00004000, SIZ=0x00000000, DMA=0xeba4b4fa
[ 2.661274] dwc2 20980000.usb: DVBUSDIS=0x0000ea60, DVBUSPULSE=000005b8
[ 2.675659] dwc2 20980000.usb: DWC OTG Controller
[ 2.687646] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[ 2.702170] dwc2 20980000.usb: irq 33, io mem 0x20980000
[ 2.716838] hub 1-0:1.0: USB hub found
[ 2.728318] hub 1-0:1.0: 1 port detected
>
> Core reset required after mode forcing to get power on reset values for
> chosen mode.
>
> One question. This debug print:
>
> EPs: 8, dedicated fifos, 4080 entries in SPRAM
>
> Assume that you didn't apply second patch c6f7e1c.diff. Am I right?
No, but its possible that the 2nd patch doesn't have the effect on top of 4.14.
> By
> applying mentioned patch SPRAM entries should changed to 4096.
>
> BTW, your update of first patch is correct. Sorry for sending wrong
> patch, that patch assume that applied another series of patches which
> not in mainline Kernel yet.
Btw your patch above doesn't apply cleanly. dwc2_force_mode() have a result code in mainline.
Regards
Stefan
>
> Thanks,
> Minas
>
More information about the linux-rpi-kernel
mailing list