spiflash: Add utility to convert capacity to bytes