atmel nand bindings vs. actual dts files

Miquel Raynal miquel.raynal at bootlin.com
Mon Apr 29 02:55:40 PDT 2019


Hi Alexander,

Sorry for the big delay.

Alexander Dahl <ada at thorsis.com> wrote on Thu, 07 Mar 2019 17:25:17
+0100:

> Hello,
> 
> Am Mittwoch, 6. März 2019, 15:07:52 CET schrieb Alexander Dahl:
> > So instead of "always 0x800000" that node has 0x2 as third entry for the
> > 'reg' property. Why is that?  
> 
> I didn't investigate that further yet, but I'm curious, so if anyone knows?

I suppose the bindings [1] explain the situation.

[1] https://elixir.bootlin.com/linux/v5.0/source/Documentation/devicetree/bindings/mtd/atmel-nand.txt#L32

> 
> > Bonus question: if the R/B line is not connected, how is that expressed in
> > dts? As far as I understood that is possible, if the driver polls some
> > status register instead of that line level, right?  

There is an atmel,rb property with the ready/busy GPIO line. If it is
missing, I think the driver will do a MMIO read instead.

> 
> Or just waits until a certain timeout …
> 
> For v4.19.25 (this is the currently latest base for PREEMPT RT patches) I 
> found this:
> 
> https://elixir.bootlin.com/linux/v4.19.25/source/include/linux/mtd/
> rawnand.h#L1195
> 
> It says: 
> 
>  * @dev_ready:		[BOARDSPECIFIC] hardwarespecific function for accessing
>  *			device ready/busy line. If set to NULL no access to
>  *			ready/busy is available and the ready/busy information
>  *			is read from the chip status register.
> 
> However I see no way to explicitly set this to NULL via device tree for the 
> atmel raw nand driver, or did I miss something? 
> 
> I guess that's no recommended hardware setup?

->dev_ready() is a legacy hook. Now we use ->exec_op() and the wait
periods are directly handled inside it (see atmel_nfc_wait()).

Thanks,
Miquèl



More information about the linux-mtd mailing list