drivers: flash: soc_flash_lpc: enable support for lpc54xxx IAP

Add support for LPC54xxx IAP flash driver to soc_flash_lpc.c
Driver is tested on M4 core only, and is therefore disabled on the M0 core.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-08-18 13:13:54 -05:00 committed by Kumar Gala
commit d70db21760
4 changed files with 9 additions and 1 deletions

View file

@ -4,7 +4,8 @@
config SOC_FLASH_LPC config SOC_FLASH_LPC
bool "LPC flash shim driver" bool "LPC flash shim driver"
default y default y
depends on DT_HAS_NXP_IAP_FMC11_ENABLED depends on DT_HAS_NXP_IAP_FMC11_ENABLED || \
DT_HAS_NXP_IAP_FMC54_ENABLED
select FLASH_HAS_PAGE_LAYOUT select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED select FLASH_HAS_DRIVER_ENABLED
help help

View file

@ -19,6 +19,8 @@
#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc11), okay) #if DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc11), okay)
#define DT_DRV_COMPAT nxp_iap_fmc11 #define DT_DRV_COMPAT nxp_iap_fmc11
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc54), okay)
#define DT_DRV_COMPAT nxp_iap_fmc54
#else #else
#error No matching compatible for soc_flash_lpc.c #error No matching compatible for soc_flash_lpc.c
#endif #endif

View file

@ -89,6 +89,7 @@
reg = <0x4009c000 0x18>; reg = <0x4009c000 0x18>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
status = "disabled";
flash0: flash@0 { flash0: flash@0 {
compatible = "soc-nv-flash"; compatible = "soc-nv-flash";
reg = <0 DT_SIZE_K(256)>; reg = <0 DT_SIZE_K(256)>;

View file

@ -20,3 +20,7 @@
&nvic { &nvic {
arm,num-irq-priority-bits = <3>; arm,num-irq-priority-bits = <3>;
}; };
&iap {
status = "okay";
};