WP# line on flash chip?

Brian Norris computersforpeace at gmail.com
Mon Jan 12 13:50:02 PST 2015


On Thu, Jan 08, 2015 at 09:59:37AM -0800, Steve deRosier wrote:
> I can't find any way to add this pin to our device tree, nor do I see
> any evidence for support in either our atmel_nand driver or in
> higher-level MTD stuff like nand_base.
> 
> Does the support for this exist and am I simply missing finding it, or
> is it not there at all (expected)?

I believe it does not exist yet.

I've seen a driver for a controller which has WP# control built directly
into its register space. This driver would just toggle WP# before/after
each PROGRAM_PAGE and ERASE operation. Not beautiful, but it works. I'd
expect this might be nicer to do with larger granularity -- i.e., only
toggle twice per mtd_write() even for larger transfers, in nand_base.c.

> Assuming it's not there, and assuming I actually add it, is this a
> feature that the MTD maintainers would allow to go upstream? I'm
> assuming it's not a unique feature to this chip and that other chips
> may have it.

We don't often get asked for permission here, but I appreciate the
sentiment :)

The idea sounds fine to me. One obstacle is that we don't have a
standardized "NAND" device tree node that nand_base can use. We have a
few standardized properties, but they're mostly handled per-driver. But
anything done to improve that is welcome.

Regards,
Brian



More information about the linux-mtd mailing list