FROMLIST: mtd: spi-nor: support dual, quad, and WP for Gigadevice

Gigadevice flash support BP{0,1,2,3,4} bits, where BP3 means the same as
the existing supported TB (Top/Bottom), and BP4 means the same as the
not-yet-supported 4K bit used on other flash (e.g., Winbond). Let's
support lock/unlock with the same feature flags as w25q32dw/w25q64dw.

Tested on gd25lq64c, but I checked datasheets for the other 3, to make
sure.

While I was at it, I noticed that these all support dual and quad as
well. I noted them, but can't test them at the moment, since my test
system only supports standard 1x SPI.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(am from https://patchwork.kernel.org/patch/9210551/)

BUG=chrome-os-partner:54040, chrome-os-partner:55509
TEST=`flashrom --wp-XXX` commands; also mtdinfo, flash_lock, flash_unlock

Change-Id: I800e81c2493ab16d5c0ffc1d68c7351df650bd68
Original-Change-Id: Ia09ce538e4c312e7e93aaee691636eeba70585df
Signed-off-by: Brian Norris <briannorris@chromium.org>
Originally-Reviewed-on: https://chromium-review.googlesource.com/358136
Reviewed-on: https://chromium-review.googlesource.com/362127
Tested-by: Douglas Anderson <dianders@chromium.org>
1 file changed