-
Notifications
You must be signed in to change notification settings - Fork 8.1k
soc: microchip: sam: reorganize directory structure for sama7g5 series #97515
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
base: main
Are you sure you want to change the base?
Conversation
@TonyHan11, Compliance and twister are failing |
soc/microchip/sam/sama7/Kconfig
Outdated
# | ||
|
||
config SOC_SERIES_SAMA7G5 | ||
config SOC_ARCH_SAMA7 |
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.
config SOC_ARCH_SAMA7 | |
config SOC_FAMILY_MICROCHIP_SAMA7 |
zephyr_sources(soc.c) | ||
zephyr_include_directories(.) | ||
|
||
add_subdirectory(../../common ${CMAKE_BINARY_DIR}/common) |
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 common folder can be renamed to appropriate name ((e.g,) mpu-clock), since it is not common for MCU families under soc/microchip/sam.
config SOC_SERIES_SAMA7G5 | ||
bool | ||
select SOC_FAMILY_MICROCHIP_SAM | ||
select SOC_ARCH_SAMA7 |
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.
select SOC_ARCH_SAMA7 | |
select SOC_FAMILY_MICROCHIP_SAMA7 |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
family: | ||
- name: microchip_sam |
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.
Move soc.yml
under sama7
directory.
soc/microchip/sam/sama7/soc.yml
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
family: | ||
- name: microchip_sam |
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.
- name: microchip_sam | |
- name: microchip_sama7 |
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.
Updated, thanks.
zephyr_include_directories(.) | ||
|
||
add_subdirectory(../../common ${CMAKE_BINARY_DIR}/common) | ||
zephyr_include_directories(../../common) |
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.
Rename common folder
@@ -1,10 +1,12 @@ | |||
# Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries | |||
# | |||
# SPDX-License-Identifier: Apache-2.0 |
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.
Add Kconfig.soc
file under soc/microhcip/sam/sama7
directory and create symbol SOC_FAMILY_MICROCHIP_SAMA7
, Then this symbol can be selected by all sama7
series SoCs
config SOC_FAMILY_MICROCHIP_SAMA7
bool
config SOC_FAMILY
default "microchip_sama7" if SOC_FAMILY_MICROCHIP_SAMA7
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.
See changes in #97533 and fix PR
Rename soc/microchip/sam/common to soc/microchip/sam/mpu_clock Replace 'common' to 'mpu_clock' in soc/microchip/sam/CMakeLists.txt Signed-off-by: Tony Han <[email protected]>
8f6bca9
to
879db8c
Compare
Update directory structure with following hierarchy for MPU devices: Product Architecture |__ SOC Series |__ Product Group Add SAMA7G5 series System-in-Package (SiP) MPUs. Update makefiles, Kconfig symbols and header files accordingly. Signed-off-by: Tony Han <[email protected]>
879db8c
to
1ce3802
Compare
|
Hi @JarmouniA, @ArunMCHP, @nordicjm, Thank you for your comments. Commits updated with the following changes:
|
default "sama7g5" if SOC_SERIES_SAMA7G5 | ||
|
||
rsource "Kconfig.soc.sam*" | ||
rsource "*/Kconfig.soc*" |
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.
rsource "*/Kconfig.soc*" | |
config SOC_SAMA7G54 | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC_SAMA7G54D1G | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC_SAMA7G54D1GN0 | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC_SAMA7G54D1GN2 | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC_SAMA7G54D2G | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC_SAMA7G54D2GN4 | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC_SAMA7G54D4G | |
bool | |
select SOC_SERIES_SAMA7G5 | |
config SOC | |
default "sama7g54" if SOC_SAMA7G54 | |
default "sama7g54d1g" if SOC_SAMA7G54D1G | |
default "sama7g54d1gn0" if SOC_SAMA7G54D1GN0 | |
default "sama7g54d1gn2" if SOC_SAMA7G54D1GN2 | |
default "sama7g54d2g" if SOC_SAMA7G54D2G | |
default "sama7g54d2gn4" if SOC_SAMA7G54D2GN4 | |
default "sama7g54d4g" if SOC_SAMA7G54D4G |
@@ -0,0 +1,41 @@ | |||
# Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries |
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.
You can remove this file and folder by adding these contents in sama7/sama7g5/Kconfig.soc
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.
'mpu_clock' directory inside 'soc/microchip/sam' doesn't seems to be the correct approach. You should consider moving it to the clock driver. Another point is, the directory also has pinctrl files. So the name 'mpu_clock' also in incorrect. If other reviewers agree to keep this content, you can consider a new name 'mpu_common'.
Or just leave the original name, |
Update directory structure with following hierarchy for MPU devices:
Add SAMA7G5 series System-in-Package (SiP) MPUs
Update makefiles, Kconfig symbols and header files accordingly