drivers/flash: stm32l4: Handle pages_per_bank for all variants
drivers/flash: stm32l4: Handle pages_per_bank for all variants

Variable pages_per_bank has been introduced to ease page erase
in dual bank configurations. This has been implemented using
FLASH_OPTR_DUALBANK definition.
It happen that this was not taking into account L4+ series that
use FLASH_OPTR_DBANK instead of FLASH_OPTR_DUALBANK. This lead
to compilation issue for this driver in case of L4+ series.
So, this patch is adding the support of FLASH_OPTR_DBANK definition.

Besides, FLASH_OPTR_DUALBANK (as FLASH_OPTR_DBANK) are actually
defining availability of an option byte to configure use of Dual
Bank. So besides of its definition, its value in flash OPTR register
should be checked to ensure Dual Bank configuration is used.
This patch is taking this into account by adding the check of this
byte. Error -ENOTSUP is returned in case Single Bank is configured
since it has not be validated yet (in case Dual Bank is possible but
not configured).

Fixes #18246 for nucleo_l4r5zi

Signed-off-by: Erwan Gouriou <de4d967452b83bb0e37525652734e7d9163b6a4c@linaro.org>

Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,nashif/zephyr,finikorg/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr