External flash Write Protect and Hold pins

Hello!  The only Zephyr flash driver I see that uses the wp_gpios pin is spi_flash_at45.c.  It seems that none of them use hold_gpios.

Presently, for jedec,spi-nor compatible, we are using spi_nor.c.

It seems that in the simple case, spi_nor.c should be patched to set both pins as GPIO_OUTPUT_INACTIVE (typically high for these wp and hold pins).

Next, it's reasonable to initialize WP active and only de-assert during flash writes.  Could still be done with spi_nor.c simply following the model from spi_flash_at45.c.

For now, I'd like to initialize hold as inactive and not use it within the driver.

Finally, if the external flash is on a power domain, both of these pins should be set to DISCONNECTED when the power domain goes OFF.

Does this sound like a reasonable patch to spi_nor.c?

Cheers,
J.P.

Parents
  • Hi James,

    Thank you for contacting DevZone at NordicSemi.

    Yes, only atmel flash driver is using write protect gpios, and maybe their eeprom driver as well.

    I am not sure what could be a good way to update / modify / patch the concerned driver. However, I think it is reasonable to adopt from existing driver (in this case spi_flash_at45). I also think that Zephyr community (discord / github) might be in better position to provide feedback.

    Regards,
    Naeem

Reply
  • Hi James,

    Thank you for contacting DevZone at NordicSemi.

    Yes, only atmel flash driver is using write protect gpios, and maybe their eeprom driver as well.

    I am not sure what could be a good way to update / modify / patch the concerned driver. However, I think it is reasonable to adopt from existing driver (in this case spi_flash_at45). I also think that Zephyr community (discord / github) might be in better position to provide feedback.

    Regards,
    Naeem

Children
No Data
Related