SPI Flash: Half the bits are zero
Did you erase the affected memory pages first? For flash memory, you can change only 1's to 0's (the M25P data sheet from above states this explicitly on page 22, in the N25Q its on page 12). So if the M25P was filled with 0x0f's before, you would get exactly that result.
When you use the same write command (0x02) for both, you should be fine. Using dual or quad mode would result in in 2 (or 4) bits wrong, but not half a byte. Since I suppose you program a whole page, I think this can't be stuck address bits.
Other sources for the problem might be: missing blocking capacitor for the flash IC, or wrong SPI mode (which can cause strange results since then normally you read data exactly the moment it is changing). The latter one can be checked with a logic analyzer or a scope.