Skip to content

Conversation

TonyHan11
Copy link
Contributor

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

@zephyrbot zephyrbot added platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) area: Boards/SoCs labels Oct 14, 2025
@NhMchp NhMchp requested review from ArunMCHP and NhMchp October 14, 2025 07:08
@NhMchp NhMchp added this to the v4.3.0 milestone Oct 14, 2025
@NhMchp
Copy link
Contributor

NhMchp commented Oct 14, 2025

@TonyHan11, Compliance and twister are failing

@JarmouniA JarmouniA requested a review from nordicjm October 14, 2025 09:19
#

config SOC_SERIES_SAMA7G5
config SOC_ARCH_SAMA7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config SOC_ARCH_SAMA7
config SOC_FAMILY_MICROCHIP_SAMA7

zephyr_sources(soc.c)
zephyr_include_directories(.)

add_subdirectory(../../common ${CMAKE_BINARY_DIR}/common)
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
select SOC_ARCH_SAMA7
select SOC_FAMILY_MICROCHIP_SAMA7

# SPDX-License-Identifier: Apache-2.0

family:
- name: microchip_sam
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: microchip_sam
- name: microchip_sama7

Copy link
Contributor Author

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)
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

@nordicjm nordicjm left a 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]>
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]>
Copy link

@TonyHan11
Copy link
Contributor Author

Hi @JarmouniA, @ArunMCHP, @nordicjm,

Thank you for your comments. Commits updated with the following changes:

  • replace SOC_ARCH_SAMA7 with SOC_FAMILY_MICROCHIP_SAMA7
  • rename the folder soc/microchip/sam/common with soc/microchip/sam/mpu_clock
  • move soc.yml from soc/microchip/sam/sama7/sama7g5 to soc/microchip/sam/sama7
  • update the Kconfig and makefiles accordingly

default "sama7g5" if SOC_SERIES_SAMA7G5

rsource "Kconfig.soc.sam*"
rsource "*/Kconfig.soc*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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

Copy link
Contributor

@NhMchp NhMchp left a 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'.

@JarmouniA
Copy link
Contributor

you can consider a new name 'mpu_common'.

Or just leave the original name, common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants