Follow the below steps to add custom SPI flash in the Diamond Programmer:
-Open the Lattice Diamond Programmer.
-Go to Edit-->Custom devices.
-Click "Add" to customize your actual device according to the datasheet of the flash.
For more information on step by step procedure, refer to Lattice Diamond Help under "Adding a Custom SPI Flash Device".