RE: [PATCH 4/5] spi: spi-nxp-fspi: add function to select sample clock source for flash reading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Michael Walle <mwalle@xxxxxxxxxx>
> Sent: 2023年12月14日 1:21
> To: Bough Chen <haibo.chen@xxxxxxx>
> Cc: broonie@xxxxxxxxxx; Han Xu <han.xu@xxxxxxx>; dl-linux-imx
> <linux-imx@xxxxxxx>; linux-spi@xxxxxxxxxxxxxxx; yogeshgaur.83@xxxxxxxxx;
> Michael Walle <mwalle@xxxxxxxxxx>
> Subject: Re: [PATCH 4/5] spi: spi-nxp-fspi: add function to select sample clock
> source for flash reading
> 
> > From: Haibo Chen <haibo.chen@xxxxxxx>
> >
> > fspi define four mode for sample clock source selection.
> >
> > Here is the list of modes:
> > mode 0: Dummy Read strobe generated by FlexSPI Controller and loopback
> > internally mode 1: Dummy Read strobe generated by FlexSPI Controller
> > and loopback from DQS pad mode 2: Reserved mode 3: Flash provided Read
> > strobe and input from DQS pad
> >
> > In default, fspi use mode 0 after reset.
> > For 8-8-8-DTR mode, need to use mode 3, otherwise 8-8-8-DTR read
> > always get incorrect data.
> 
> I'd say this is board dependant, right? If you now hardcode 8d8d8d to always use
> mode 3. I'm not sure how a board which doesn't have the DQS connected to the
> flash can change this to another mode again. Looks like we'd need a (DT)
> property which tells you if there is actually a DQS line connected to the flash.

Currently we distinguish through SoC chip, not board. Like patch5.
If SoC contain the DQS, but the board do not connect it to flash device, then this is a real issue.
But I think if user use one octal flash device which support dtr mode, they should connect this DQS pad if want to work in DTR mode.
If forget to connect the DQS pad, they can limit the tx/rx buswidth to 4 or 1 in dts.

Anyway, add a DT property seems better. DQS is a must requirement for octal dtr mode, if detect no DQS, we can also disable the DTR mode support.
Will add in next version.


>
> Btw you don't check buswidth, so you'll enable that mode for any DTR mode.

Seems current spi-nor code only support one DTR mode, that is 8d-8d-8d.

Best Regards
Haibo Chen

> 
> -michael




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux