-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards: phytec: Add support for phyCORE-i.Mx RT1170 and phyBOARD-Atlas i.Mx RT1170 #86756
Draft
FPlohl
wants to merge
2
commits into
zephyrproject-rtos:main
Choose a base branch
from
norikdoo:WIP/FPlohl/phyboard_atlas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
if(CONFIG_NXP_IMXRT_BOOT_HEADER) | ||
zephyr_library() | ||
set(RT1170_BOARD_NAME "evkmimxrt1170") | ||
set(RT1170_BOARD_DIR | ||
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/boards/${RT1170_BOARD_NAME}") | ||
if(CONFIG_BOOT_FLEXSPI_NOR) | ||
# Include flash configuration block for RT1170 EVK from NXP's HAL. | ||
# This configuration block may need modification if another flash chip is | ||
# used on your custom board. See NXP AN12238 for more information. | ||
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1) | ||
zephyr_compile_definitions(BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024) | ||
zephyr_library_sources(flexspi_nor_config.c) | ||
endif() | ||
if(CONFIG_EXTERNAL_MEM_CONFIG_DATA) | ||
# Include external memory configuration data block for RT1170 EVK from NXP's HAL. | ||
# This configuration block may need modification if another SDRAM chip | ||
# is used on your custom board. | ||
zephyr_compile_definitions(XIP_BOOT_HEADER_XMCD_ENABLE=1) | ||
zephyr_library_sources(${RT1170_BOARD_DIR}/xmcd/xmcd.c) | ||
else() | ||
if(CONFIG_SRAM_BASE_ADDRESS EQUAL 0x80000000) | ||
message(WARNING "You are using SDRAM as RAM but no external memory" | ||
"configuration data (XMCD) is included. This configuration may not boot") | ||
endif() | ||
endif() | ||
endif() | ||
|
||
if(CONFIG_MCUX_GPT_TIMER) | ||
message(WARNING "You appear to be using the GPT hardware timer. " | ||
"This timer will enable lower power modes, but at the cost of reduced " | ||
"hardware timer resolution") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# PHYBOARD-ATLAS | ||
|
||
# Copyright (c) 2025 PHYTEC America, LLC | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_PHYBOARD_ATLAS | ||
|
||
# Only use DCD when booting primary core (M7) | ||
config EXTERNAL_MEM_CONFIG_DATA | ||
default y if CPU_CORTEX_M7 | ||
|
||
config NXP_IMX_EXTERNAL_SDRAM | ||
default y if CPU_CORTEX_M7 | ||
|
||
if SECOND_CORE_MCUX && CPU_CORTEX_M4 | ||
|
||
config BUILD_OUTPUT_INFO_HEADER | ||
default y | ||
|
||
DT_CHOSEN_IMAGE_M4 = nxp,m4-partition | ||
|
||
# Adjust the offset of the output image if building for RT11xx SOC | ||
config BUILD_OUTPUT_ADJUST_LMA | ||
default "($(dt_chosen_reg_addr_hex,$(DT_CHOSEN_IMAGE_M4)) + \ | ||
$(dt_node_reg_addr_hex,/soc/spi@400cc000,1)) - \ | ||
$(dt_node_reg_addr_hex,/soc/ocram@20200000)" | ||
|
||
endif # SECOND_CORE_MCUX && CPU_CORTEX_M4 | ||
|
||
if NETWORKING | ||
|
||
config NET_L2_ETHERNET | ||
default y if CPU_CORTEX_M7 # No cache memory support is required for driver | ||
|
||
endif # NETWORKING | ||
|
||
if DISK_DRIVERS | ||
|
||
config IMX_USDHC_DAT3_PWR_TOGGLE | ||
default y | ||
|
||
endif # DISK_DRIVERS | ||
|
||
endif # BOARD_PHYBOARD_ATLAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright 2025 PHYTEC America, LLC | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_PHYBOARD_ATLAS | ||
select SOC_MIMXRT1176_CM7 if BOARD_PHYBOARD_ATLAS_MIMXRT1176_CM7 | ||
select SOC_MIMXRT1176_CM4 if BOARD_PHYBOARD_ATLAS_MIMXRT1176_CM4 | ||
select SOC_PART_NUMBER_MIMXRT1176DVMAA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if(CONFIG_SOC_MIMXRT1176_CM7 OR CONFIG_SECOND_CORE_MCUX) | ||
board_runner_args(pyocd "--target=mimxrt1170_cm7") | ||
board_runner_args(jlink "--device=MIMXRT1176xxxA_M7" "--reset-after-load") | ||
|
||
board_runner_args(linkserver "--device=MIMXRT1176xxxxx:MIMXRT1170-EVK") | ||
board_runner_args(linkserver "--core=cm7") | ||
elseif(CONFIG_SOC_MIMXRT1176_CM4) | ||
board_runner_args(pyocd "--target=mimxrt1170_cm4") | ||
# Note: Please use JLINK above V7.50 (Only support run cm4 image when debugging due to default boot core on board is cm7 core) | ||
board_runner_args(jlink "--device=MIMXRT1176xxxA_M4") | ||
|
||
board_runner_args(linkserver "--device=MIMXRT1176xxxxx:MIMXRT1170-EVK") | ||
board_runner_args(linkserver "--core=cm4") | ||
endif() | ||
|
||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: phyboard_atlas | ||
full_name: phyBOARD-Atlas i.MX RT1170 | ||
vendor: phytec | ||
socs: | ||
- name: mimxrt1176 |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright (c) 2025 PHYTEC America, LLC | ||
* All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <flexspi_nor_config.h> | ||
|
||
/* Component ID definition, used by tools. */ | ||
#ifndef FSL_COMPONENT_ID | ||
#define FSL_COMPONENT_ID "platform.drivers.xip_board" | ||
#endif | ||
|
||
/******************************************************************************* | ||
* Code | ||
******************************************************************************/ | ||
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) | ||
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) | ||
__attribute__((section(".boot_hdr.conf"), used)) | ||
#elif defined(__ICCARM__) | ||
#pragma location = ".boot_hdr.conf" | ||
#endif | ||
|
||
#define FLASH_DUMMY_CYCLES 0x06 | ||
#define FLASH_DUMMY_VALUE 0x06 | ||
|
||
const struct flexspi_nor_config_t qspiflash_config = { | ||
.memConfig = { | ||
.tag = FLEXSPI_CFG_BLK_TAG, | ||
.version = FLEXSPI_CFG_BLK_VERSION, | ||
.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad, | ||
.csHoldTime = 3u, | ||
.csSetupTime = 3u, | ||
.controllerMiscOption = 0x10, | ||
.deviceType = kFlexSpiDeviceType_SerialNOR, | ||
.sflashPadType = kSerialFlash_4Pads, | ||
.serialClkFreq = kFlexSpiSerialClk_100MHz, | ||
.sflashA1Size = 16u * 1024u * 1024u, | ||
.configCmdEnable = 1u, | ||
.configModeType[0] = kDeviceConfigCmdType_Generic, | ||
.configCmdSeqs[0] = { | ||
.seqNum = 1, | ||
.seqId = 12, | ||
.reserved = 0, | ||
}, | ||
.configCmdArgs[0] = (FLASH_DUMMY_VALUE << 3), | ||
.lookupTable = { | ||
/* Fast read quad mode - SDR */ | ||
[4 * CMD_LUT_SEQ_IDX_READ + 0] = | ||
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, | ||
RADDR_SDR, FLEXSPI_4PAD, 0x18), | ||
[4 * CMD_LUT_SEQ_IDX_READ + 1] = FLEXSPI_LUT_SEQ( | ||
DUMMY_SDR, FLEXSPI_4PAD, FLASH_DUMMY_CYCLES, | ||
READ_SDR, FLEXSPI_4PAD, 0x04), | ||
|
||
/* Read Status LUTs */ | ||
[4 * CMD_LUT_SEQ_IDX_READSTATUS + 0] = | ||
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, | ||
READ_SDR, FLEXSPI_1PAD, 0x04), | ||
|
||
/* Write Enable LUTs */ | ||
[4 * CMD_LUT_SEQ_IDX_WRITEENABLE + 0] = | ||
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, | ||
FLEXSPI_1PAD, 0x0), | ||
|
||
/* Page Program LUTs */ | ||
[4 * CMD_LUT_SEQ_IDX_WRITE + 0] = | ||
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02, | ||
RADDR_SDR, FLEXSPI_1PAD, 0x18), | ||
[4 * CMD_LUT_SEQ_IDX_WRITE + 1] = | ||
FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, | ||
FLEXSPI_1PAD, 0x0), | ||
}, | ||
}, | ||
.pageSize = 256u, | ||
.sectorSize = 4u * 1024u, | ||
.ipcmdSerialClkFreq = 0x1, | ||
.blockSize = 64u * 1024u, | ||
.isUniformBlockSize = false, | ||
}; | ||
#endif /* XIP_BOOT_HEADER_ENABLE */ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a hack? @dleach02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it's a hack