Skip to content

Commit

Permalink
boards: mimxrt{1020,1050,1060,1064}_evk remove CONFIG_ from dts files
Browse files Browse the repository at this point in the history
The dts files on these boards had some CONFIG_ defines related to which
memory should be used to hold code.  We move this choice out of DTS and
back into Kconfig.

As such, we removed the default setting of 'zephyr,flash' and just
map

CONFIG_CODE_ITCM to:
	DT_NXP_IMX_RT_ITCM_0_SIZE
	DT_NXP_IMX_RT_ITCM_0_BASE_ADDRESS

CONFIG_CODE_{QSPI,HYPERFLASH} to:
	DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1
	DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDDRESS_1

for the mimxrt1050_evk, we remove the default setting of 'zephyr,sram'
and just map:

CONFIG_DATA_DTCM to:
	DT_NXP_IMX_DTCM_0_SIZE
	DT_NXP_IMX_DTCM_0_BASE_ADDRESS

CONFIG_DATA_SDRAM to:
	DT_MMIO_SRAM_80000000_SIZE
	DT_MMIO_SRAM_80000000_BASE_ADDRESS

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak committed Jan 31, 2019
1 parent d8a9fb8 commit ee63a78
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 45 deletions.
20 changes: 20 additions & 0 deletions boards/arm/mimxrt1020_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,24 @@ config ETH_MCUX_0

endif # NETWORKING

if CODE_ITCM

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS)

endif # CODE_ITCM

if CODE_QSPI

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1)

endif

endif # BOARD_MIMXRT1020_EVK
5 changes: 0 additions & 5 deletions boards/arm/mimxrt1020_evk/mimxrt1020_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
};

chosen {
#if defined(CONFIG_CODE_ITCM)
zephyr,flash = &itcm0;
#elif defined(CONFIG_CODE_QSPI)
zephyr,flash = &is25wp064;
#endif
zephyr,sram = &dtcm0;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
Expand Down
38 changes: 38 additions & 0 deletions boards/arm/mimxrt1050_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,44 @@ config UART_MCUX_LPUART_3

endif # UART_MCUX_LPUART

if CODE_ITCM

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS)

endif # CODE_ITCM

if CODE_HYPERFLASH || CODE_QSPI

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1)

endif

if DATA_DTCM

config SRAM_SIZE
default $(dt_int_val,DT_NXP_IMX_DTCM_0_SIZE,K)

config SRAM_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_DTCM_0_BASE_ADDRESS)
endif

if DATA_SDRAM

config SRAM_SIZE
default $(dt_int_val,DT_MMIO_SRAM_80000000_SIZE,K)

config SRAM_BASE_ADDRESS
default $(dt_hex_val,DT_MMIO_SRAM_80000000_BASE_ADDRESS)
endif

if NETWORKING

config NET_L2_ETHERNET
Expand Down
10 changes: 0 additions & 10 deletions boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
};

chosen {
#if defined(CONFIG_CODE_ITCM)
zephyr,flash = &itcm0;
#elif defined(CONFIG_CODE_HYPERFLASH)
zephyr,flash = &hyperflash0;
#endif
#if defined(CONFIG_DATA_SDRAM)
zephyr,sram = &sdram0;
#else
zephyr,sram = &dtcm0;
#endif
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
};
Expand Down
10 changes: 0 additions & 10 deletions boards/arm/mimxrt1050_evk/mimxrt1050_evk_qspi.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@

#include "mimxrt1050_evk.dts"

/ {
chosen {
#if defined(CONFIG_CODE_ITCM)
zephyr,flash = &itcm0;
#elif defined(CONFIG_CODE_QSPI)
zephyr,flash = &is25wp064;
#endif
};
};

/delete-node/ &hyperflash0;

&flexspi0 {
Expand Down
20 changes: 20 additions & 0 deletions boards/arm/mimxrt1060_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,24 @@ config UART_MCUX_LPUART_3

endif # UART_MCUX_LPUART

if CODE_ITCM

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS)

endif # CODE_ITCM

if CODE_HYPERFLASH || CODE_QSPI

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1)

endif

endif # BOARD_MIMXRT1060_EVK || BOARD_MIMXRT1060_EVK_HYPERFLASH
5 changes: 0 additions & 5 deletions boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
};

chosen {
#if defined(CONFIG_CODE_ITCM)
zephyr,flash = &itcm0;
#elif defined(CONFIG_CODE_QSPI)
zephyr,flash = &is25wp064;
#endif
zephyr,sram = &dtcm0;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
Expand Down
10 changes: 0 additions & 10 deletions boards/arm/mimxrt1060_evk/mimxrt1060_evk_hyperflash.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@

#include "mimxrt1060_evk.dts"

/ {
chosen {
#if defined(CONFIG_CODE_ITCM)
zephyr,flash = &itcm0;
#elif defined(CONFIG_CODE_HYPERFLASH)
zephyr,flash = &hyperflash0;
#endif
};
};

/delete-node/ &is25wp064;
&flexspi0 {
reg = <0x402a8000 0x4000>, <0x60000000 0x4000000>;
Expand Down
20 changes: 20 additions & 0 deletions boards/arm/mimxrt1064_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ if BOARD_MIMXRT1064_EVK
config BOARD
default "mimxrt1064_evk"

if CODE_ITCM

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS)

endif # CODE_ITCM

if CODE_INTERNAL_QSPI

config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K)

config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1)

endif

if GPIO_MCUX_IGPIO

config GPIO_MCUX_IGPIO_1
Expand Down
5 changes: 0 additions & 5 deletions boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
};

chosen {
#if defined(CONFIG_CODE_ITCM)
zephyr,flash = &itcm0;
#elif defined(CONFIG_CODE_INTERNAL_QSPI)
zephyr,flash = &w25q32jvwj0;
#endif
zephyr,sram = &dtcm0;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
Expand Down

0 comments on commit ee63a78

Please sign in to comment.