Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# SPDX-License-Identifier: Apache-2.0
#

zephyr_sources(soc.c)
zephyr_include_directories(.)
add_subdirectory(${SOC_SERIES})

add_subdirectory(../mpu_clock ${CMAKE_BINARY_DIR}/mpu_clock)

set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_a_r/scripts/linker.ld CACHE INTERNAL "")
6 changes: 3 additions & 3 deletions soc/microchip/sam/Kconfig → soc/microchip/sam/sama7/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# 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

#

config SOC_SERIES_SAMA7G5
select ARM
config SOC_FAMILY_MICROCHIP_SAMA7
select MICROCHIP_SAM
select ARM
select CPU_CORTEX_A7
select SOC_EARLY_INIT_HOOK
select MMU
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
# SPDX-License-Identifier: Apache-2.0
#

if SOC_FAMILY_MICROCHIP_SAM
if SOC_FAMILY_MICROCHIP_SAMA7

rsource "*/Kconfig.defconfig"

config CLOCK_CONTROL
configdefault SOC_EARLY_INIT_HOOK
default y

config MFD
configdefault CLOCK_CONTROL
default y
depends on DT_HAS_MICROCHIP_SAM_FLEXCOM_ENABLED

endif # SOC_FAMILY_MICROCHIP_SAM
endif # SOC_FAMILY_MICROCHIP_SAMA7

rsource "*/Kconfig.defconfig"
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# SPDX-License-Identifier: Apache-2.0
#

config SOC_FAMILY_MICROCHIP_SAM
config SOC_FAMILY_MICROCHIP_SAMA7
bool
help
Enable support for Microchip SAMA7 Cortex-A Microprocessors.

config SOC_FAMILY
default "microchip_sam" if SOC_FAMILY_MICROCHIP_SAM
default "microchip_sama7" if SOC_FAMILY_MICROCHIP_SAMA7

rsource "*/Kconfig.soc"
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# SPDX-License-Identifier: Apache-2.0
#

add_subdirectory(common)
add_subdirectory(${SOC_SERIES})
zephyr_sources(soc.c)
zephyr_include_directories(.)
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@

if SOC_SERIES_SAMA7G5

config NUM_IRQS
configdefault NUM_IRQS
default 187

config SYS_CLOCK_HW_CYCLES_PER_SEC
configdefault SYS_CLOCK_HW_CYCLES_PER_SEC
default $(dt_node_int_prop_int,/soc/timer@e1800000,clock-frequency)

config MMU
default y

endif # SOC_SERIES_SAMA7G5
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

config SOC_SERIES_SAMA7G5
bool
select SOC_FAMILY_MICROCHIP_SAM
select SOC_FAMILY_MICROCHIP_SAMA7
help
Enable support for Microchip SAM Microprocessors.
Enable support for Microchip SAMA7G5 Cortex-A Microprocessors.

config SOC_SERIES
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

41 changes: 41 additions & 0 deletions soc/microchip/sam/sama7/sama7g5/sama7g54/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -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

#
# SPDX-License-Identifier: Apache-2.0
#

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
File renamed without changes.
34 changes: 34 additions & 0 deletions soc/microchip/sam/sama7/sama7g5/soc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2025 Microchip Technology Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef SOC_MICROCHIP_SAMA7G5_SOC_H_
#define SOC_MICROCHIP_SAMA7G5_SOC_H_

#ifndef _ASMLANGUAGE

#include <zephyr/types.h>

#if defined(CONFIG_SOC_SAMA7G54)
#include <sama7g54.h>
#elif defined(CONFIG_SOC_SAMA7G54D1G)
#include <sama7g54d1g.h>
#elif defined(CONFIG_SOC_SAMA7G54D1GN0)
#include <sama7g54d1gn0.h>
#elif defined(CONFIG_SOC_SAMA7G54D1GN2)
#include <sama7g54d1gn2.h>
#elif defined(CONFIG_SOC_SAMA7G54D2G)
#include <sama7g54d2g.h>
#elif defined(CONFIG_SOC_SAMA7G54D2GN4)
#include <sama7g54d2gn4.h>
#elif defined(CONFIG_SOC_SAMA7G54D4G)
#include <sama7g54d4g.h>
#else
#error Library does not support the specified device
#endif

#endif /* _ASMLANGUAGE */

#endif /* SOC_MICROCHIP_SAMA7G5_SOC_H_ */
15 changes: 15 additions & 0 deletions soc/microchip/sam/sama7/soc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

family:
- name: microchip_sama7
series:
- name: sama7g5
socs:
- name: sama7g54
- name: sama7g54d1g
- name: sama7g54d1gn0
- name: sama7g54d1gn2
- name: sama7g54d2g
- name: sama7g54d2gn4
- name: sama7g54d4g
11 changes: 0 additions & 11 deletions soc/microchip/sam/sama7g5/Kconfig.soc.sama7g54

This file was deleted.

16 changes: 0 additions & 16 deletions soc/microchip/sam/sama7g5/soc.h

This file was deleted.

6 changes: 0 additions & 6 deletions soc/microchip/sam/soc.yml

This file was deleted.