Allow SPI flash to be configurable per board
I'm using a SPI flash chip* on a custom board that turns out to have a slightly different process to enable Quad-SPI mode than drivers/memory/spiflash.c - in my case, the two bytes of the status register need to be written as two separate operations, rather than a single operation with two bytes. More generally, other SPI flash chips may have different opcodes again. So it would be useful to have the chip initialisation either configurable in mpconfigboard.h, or alternatively, having different spiflash driver files for different chips, and be able to specify which driver in the board config. Any thoughts about the best approach here?
* The AT25SF321, which, on the surface seems much the same as the AT25SF641 on the PYBD (including the SR write operation), and the datasheets says this as well, but turns out the AT25SF321B (note the B on the end) has the split SR write operation.
mimxrt: A set of small extensions and a bug fix.
This is another service type pull request. The commits cover:
- support gaps in the I2C and SPI device numbers, allowing e.g. to define SPI(1) and SPI(2) instead of SPI(0) and SPI(1). Then, the SPI (I2C) numbers can match a boards Pin-out document.
- Allow for board-specific flash config files instead of the common ones.
- Compensate for a bug in the NXP lib SPI driver, which fails when short read/write commands alternate.
- Remove two obsolete files from the Seeed Arch Mix file set.
- Replace numeric constants for the Pin configuration by a function call, preparing for MCU's with different Pin config bit definitions, like the MIMXRT 117x series.
- Allow to specify the CS signal used for SPI, using the keyword options cs=nn. The default is 0, the only other value implemented is 1. Only a few boards have the CS1 pins exposed to the board connector. Required e.g. for the upcoming Olimex board.
- Allow configuring USB ID Elements Manufacturer, Board name, Unique-ID, Vendor ID and Product ID. Replaces #8094.
- Adding support for the Olimex RT1010 board
- Simplify Makefile a little bit.