boards: soc: arm: Set zephyr,sram chosen node for i.mx rt boards
Removes the DATA_LOCATION Kconfig symbol from the i.mx rt soc series and refactors corresponding boards to use a device tree chosen node instead. The external SDRAM is chosen on all boards that can support it; otherwise the internal DTCM is chosen. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
7bebab862c
commit
07976026a2
15 changed files with 12 additions and 68 deletions
|
@ -18,6 +18,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &dtcm;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
};
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &dtcm;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
};
|
||||
|
|
|
@ -12,10 +12,6 @@ choice CODE_LOCATION
|
|||
default CODE_FLEXSPI
|
||||
endchoice
|
||||
|
||||
choice DATA_LOCATION
|
||||
default DATA_SEMC
|
||||
endchoice
|
||||
|
||||
if NETWORKING
|
||||
|
||||
config NET_L2_ETHERNET
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sdram0;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
};
|
||||
|
|
|
@ -12,10 +12,6 @@ choice CODE_LOCATION
|
|||
default CODE_FLEXSPI
|
||||
endchoice
|
||||
|
||||
choice DATA_LOCATION
|
||||
default DATA_SEMC
|
||||
endchoice
|
||||
|
||||
config DISK_ACCESS_USDHC1
|
||||
default y
|
||||
depends on DISK_ACCESS_USDHC
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sdram0;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
};
|
||||
|
|
|
@ -13,10 +13,6 @@ choice CODE_LOCATION
|
|||
default CODE_FLEXSPI
|
||||
endchoice
|
||||
|
||||
choice DATA_LOCATION
|
||||
default DATA_SEMC
|
||||
endchoice
|
||||
|
||||
config DISK_ACCESS_USDHC1
|
||||
default y
|
||||
depends on DISK_ACCESS_USDHC
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sdram0;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
zephyr,can-primary = &flexcan2;
|
||||
|
|
|
@ -12,10 +12,6 @@ choice CODE_LOCATION
|
|||
default CODE_FLEXSPI2
|
||||
endchoice
|
||||
|
||||
choice DATA_LOCATION
|
||||
default DATA_SEMC
|
||||
endchoice
|
||||
|
||||
config DISK_ACCESS_USDHC1
|
||||
default y
|
||||
depends on DISK_ACCESS_USDHC
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sdram0;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
zephyr,can-primary = &flexcan2;
|
||||
|
|
|
@ -12,10 +12,6 @@ choice CODE_LOCATION
|
|||
default CODE_FLEXSPI
|
||||
endchoice
|
||||
|
||||
choice DATA_LOCATION
|
||||
default DATA_SEMC
|
||||
endchoice
|
||||
|
||||
config DISK_ACCESS_USDHC1
|
||||
default y
|
||||
depends on DISK_ACCESS_USDHC
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sdram0;
|
||||
zephyr,console = &lpuart1;
|
||||
zephyr,shell-uart = &lpuart1;
|
||||
};
|
||||
|
|
|
@ -98,36 +98,6 @@ config FLASH_BASE_ADDRESS
|
|||
|
||||
endif # CODE_FLEXSPI2
|
||||
|
||||
if DATA_DTCM
|
||||
|
||||
config SRAM_SIZE
|
||||
default $(dt_node_reg_size_int,/soc/flexram@400b0000/dtcm@20000000,0,K)
|
||||
|
||||
config SRAM_BASE_ADDRESS
|
||||
default $(dt_node_reg_addr_hex,/soc/flexram@400b0000/dtcm@20000000)
|
||||
|
||||
endif # DATA_DTCM
|
||||
|
||||
if DATA_SEMC
|
||||
|
||||
config SRAM_SIZE
|
||||
default $(dt_node_reg_size_int,/memory@80000000,0,K)
|
||||
|
||||
config SRAM_BASE_ADDRESS
|
||||
default $(dt_node_reg_addr_hex,/memory@80000000)
|
||||
|
||||
endif # DATA_SEMC
|
||||
|
||||
if DATA_OCRAM
|
||||
|
||||
config SRAM_SIZE
|
||||
default $(dt_node_reg_size_int,/soc/flexram@400b0000/ocram@20200000,0,K)
|
||||
|
||||
config SRAM_BASE_ADDRESS
|
||||
default $(dt_node_reg_addr_hex,/soc/flexram@400b0000/ocram@20200000)
|
||||
|
||||
endif # DATA_OCRAM
|
||||
|
||||
config USB_DC_NXP_EHCI
|
||||
default y
|
||||
depends on USB
|
||||
|
|
|
@ -413,19 +413,4 @@ config CODE_FLEXSPI2
|
|||
|
||||
endchoice
|
||||
|
||||
choice DATA_LOCATION
|
||||
prompt "Data location selection"
|
||||
default DATA_DTCM
|
||||
|
||||
config DATA_DTCM
|
||||
bool "Link data into internal data tightly coupled memory (DTCM)"
|
||||
|
||||
config DATA_SEMC
|
||||
bool "Link data into external SEMC-controlled memory"
|
||||
|
||||
config DATA_OCRAM
|
||||
bool "Link data into On-Chip RAM memory"
|
||||
|
||||
endchoice
|
||||
|
||||
endif # SOC_SERIES_IMX_RT
|
||||
|
|
|
@ -7,15 +7,17 @@
|
|||
#include <autoconf.h>
|
||||
#include <devicetree.h>
|
||||
|
||||
#define IS_CHOSEN_SRAM(x) (DT_DEP_ORD(DT_NODELABEL(x)) == DT_DEP_ORD(DT_CHOSEN(zephyr_sram)))
|
||||
|
||||
MEMORY
|
||||
{
|
||||
#if (DT_REG_SIZE(DT_NODELABEL(ocram)) > 0) && !defined(CONFIG_DATA_OCRAM)
|
||||
#if (DT_REG_SIZE(DT_NODELABEL(ocram)) > 0) && !IS_CHOSEN_SRAM(ocram)
|
||||
OCRAM (wx) : ORIGIN = DT_REG_ADDR(DT_NODELABEL(ocram)), LENGTH = DT_REG_SIZE(DT_NODELABEL(ocram))
|
||||
#endif
|
||||
#if (DT_REG_SIZE(DT_NODELABEL(sdram0)) > 0) && !defined(CONFIG_DATA_SEMC)
|
||||
#if (DT_REG_SIZE(DT_NODELABEL(sdram0)) > 0) && !IS_CHOSEN_SRAM(sdram0)
|
||||
SDRAM (wx) : ORIGIN = DT_REG_ADDR(DT_NODELABEL(sdram0)), LENGTH = DT_REG_SIZE(DT_NODELABEL(sdram0))
|
||||
#endif
|
||||
#if (DT_REG_SIZE(DT_INST(0, nxp_imx_dtcm)) > 0) && !defined(CONFIG_DATA_DTCM)
|
||||
#if (DT_REG_SIZE(DT_INST(0, nxp_imx_dtcm)) > 0) && !IS_CHOSEN_SRAM(dtcm)
|
||||
DTCM (wx) : ORIGIN = DT_REG_ADDR(DT_INST(0, nxp_imx_dtcm)), LENGTH = DT_REG_SIZE(DT_INST(0, nxp_imx_dtcm))
|
||||
#endif
|
||||
#if (DT_REG_SIZE(DT_INST(0, nxp_imx_itcm)) > 0) && !defined(CONFIG_CODE_ITCM)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue