flash/stm32l4x: introduce is_max_flash_size and use it