162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_cimenuconfig ARCH_AT91
362306a36Sopenharmony_ci	bool "AT91/Microchip SoCs"
462306a36Sopenharmony_ci	depends on (CPU_LITTLE_ENDIAN && (ARCH_MULTI_V4T || ARCH_MULTI_V5)) || \
562306a36Sopenharmony_ci		ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
662306a36Sopenharmony_ci	select ARM_CPU_SUSPEND if PM && ARCH_MULTI_V7
762306a36Sopenharmony_ci	select COMMON_CLK_AT91
862306a36Sopenharmony_ci	select GPIOLIB
962306a36Sopenharmony_ci	select PINCTRL
1062306a36Sopenharmony_ci	select SOC_BUS
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciif ARCH_AT91
1362306a36Sopenharmony_ciconfig SOC_SAMV7
1462306a36Sopenharmony_ci	bool "SAM Cortex-M7 family" if ARM_SINGLE_ARMV7M
1562306a36Sopenharmony_ci	select COMMON_CLK_AT91
1662306a36Sopenharmony_ci	select PINCTRL_AT91
1762306a36Sopenharmony_ci	help
1862306a36Sopenharmony_ci	  Select this if you are using an SoC from Microchip's SAME7, SAMS7 or SAMV7
1962306a36Sopenharmony_ci	  families.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciconfig SOC_SAMA5D2
2262306a36Sopenharmony_ci	bool "SAMA5D2 family"
2362306a36Sopenharmony_ci	depends on ARCH_MULTI_V7
2462306a36Sopenharmony_ci	select SOC_SAMA5
2562306a36Sopenharmony_ci	select CACHE_L2X0
2662306a36Sopenharmony_ci	select HAVE_AT91_UTMI
2762306a36Sopenharmony_ci	select HAVE_AT91_USB_CLK
2862306a36Sopenharmony_ci	select HAVE_AT91_H32MX
2962306a36Sopenharmony_ci	select HAVE_AT91_GENERATED_CLK
3062306a36Sopenharmony_ci	select HAVE_AT91_AUDIO_PLL
3162306a36Sopenharmony_ci	select HAVE_AT91_I2S_MUX_CLK
3262306a36Sopenharmony_ci	select PINCTRL_AT91PIO4
3362306a36Sopenharmony_ci	help
3462306a36Sopenharmony_ci	  Select this if ou are using one of Microchip's SAMA5D2 family SoC.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ciconfig SOC_SAMA5D3
3762306a36Sopenharmony_ci	bool "SAMA5D3 family"
3862306a36Sopenharmony_ci	depends on ARCH_MULTI_V7
3962306a36Sopenharmony_ci	select SOC_SAMA5
4062306a36Sopenharmony_ci	select HAVE_AT91_UTMI
4162306a36Sopenharmony_ci	select HAVE_AT91_SMD
4262306a36Sopenharmony_ci	select HAVE_AT91_USB_CLK
4362306a36Sopenharmony_ci	select PINCTRL_AT91
4462306a36Sopenharmony_ci	help
4562306a36Sopenharmony_ci	  Select this if you are using one of Microchip's SAMA5D3 family SoC.
4662306a36Sopenharmony_ci	  This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciconfig SOC_SAMA5D4
4962306a36Sopenharmony_ci	bool "SAMA5D4 family"
5062306a36Sopenharmony_ci	depends on ARCH_MULTI_V7
5162306a36Sopenharmony_ci	select SOC_SAMA5
5262306a36Sopenharmony_ci	select CACHE_L2X0
5362306a36Sopenharmony_ci	select HAVE_AT91_UTMI
5462306a36Sopenharmony_ci	select HAVE_AT91_SMD
5562306a36Sopenharmony_ci	select HAVE_AT91_USB_CLK
5662306a36Sopenharmony_ci	select HAVE_AT91_H32MX
5762306a36Sopenharmony_ci	select PINCTRL_AT91
5862306a36Sopenharmony_ci	help
5962306a36Sopenharmony_ci	  Select this if you are using one of Microchip's SAMA5D4 family SoC.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ciconfig SOC_SAMA7G5
6262306a36Sopenharmony_ci	bool "SAMA7G5 family"
6362306a36Sopenharmony_ci	depends on ARCH_MULTI_V7
6462306a36Sopenharmony_ci	select HAVE_AT91_GENERATED_CLK
6562306a36Sopenharmony_ci	select HAVE_AT91_SAM9X60_PLL
6662306a36Sopenharmony_ci	select HAVE_AT91_UTMI
6762306a36Sopenharmony_ci	select PM_OPP
6862306a36Sopenharmony_ci	select SOC_SAMA7
6962306a36Sopenharmony_ci	help
7062306a36Sopenharmony_ci	  Select this if you are using one of Microchip's SAMA7G5 family SoC.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciconfig SOC_LAN966
7362306a36Sopenharmony_ci	bool "ARMv7 based Microchip LAN966 SoC family"
7462306a36Sopenharmony_ci	depends on ARCH_MULTI_V7
7562306a36Sopenharmony_ci	select DW_APB_TIMER_OF
7662306a36Sopenharmony_ci	select ARM_GIC
7762306a36Sopenharmony_ci	select MEMORY
7862306a36Sopenharmony_ci	help
7962306a36Sopenharmony_ci	  This enables support for ARMv7 based Microchip LAN966 SoC family.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciconfig SOC_AT91RM9200
8262306a36Sopenharmony_ci	bool "AT91RM9200"
8362306a36Sopenharmony_ci	depends on ARCH_MULTI_V4T
8462306a36Sopenharmony_ci	select ATMEL_AIC_IRQ
8562306a36Sopenharmony_ci	select ATMEL_PM if PM
8662306a36Sopenharmony_ci	select ATMEL_ST
8762306a36Sopenharmony_ci	select CPU_ARM920T
8862306a36Sopenharmony_ci	select HAVE_AT91_USB_CLK
8962306a36Sopenharmony_ci	select PINCTRL_AT91
9062306a36Sopenharmony_ci	select SOC_SAM_V4_V5
9162306a36Sopenharmony_ci	select SRAM if PM
9262306a36Sopenharmony_ci	help
9362306a36Sopenharmony_ci	  Select this if you are using Microchip's AT91RM9200 SoC.
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ciconfig SOC_AT91SAM9
9662306a36Sopenharmony_ci	bool "AT91SAM9"
9762306a36Sopenharmony_ci	depends on ARCH_MULTI_V5
9862306a36Sopenharmony_ci	select ATMEL_AIC_IRQ
9962306a36Sopenharmony_ci	select ATMEL_PM if PM
10062306a36Sopenharmony_ci	select CPU_ARM926T
10162306a36Sopenharmony_ci	select HAVE_AT91_SMD
10262306a36Sopenharmony_ci	select HAVE_AT91_USB_CLK
10362306a36Sopenharmony_ci	select HAVE_AT91_UTMI
10462306a36Sopenharmony_ci	select HAVE_FB_ATMEL
10562306a36Sopenharmony_ci	select MEMORY
10662306a36Sopenharmony_ci	select PINCTRL_AT91
10762306a36Sopenharmony_ci	select SOC_SAM_V4_V5
10862306a36Sopenharmony_ci	select SRAM if PM
10962306a36Sopenharmony_ci	help
11062306a36Sopenharmony_ci	  Select this if you are using one of those Microchip SoC:
11162306a36Sopenharmony_ci	    AT91SAM9260
11262306a36Sopenharmony_ci	    AT91SAM9261
11362306a36Sopenharmony_ci	    AT91SAM9263
11462306a36Sopenharmony_ci	    AT91SAM9G15
11562306a36Sopenharmony_ci	    AT91SAM9G20
11662306a36Sopenharmony_ci	    AT91SAM9G25
11762306a36Sopenharmony_ci	    AT91SAM9G35
11862306a36Sopenharmony_ci	    AT91SAM9G45
11962306a36Sopenharmony_ci	    AT91SAM9G46
12062306a36Sopenharmony_ci	    AT91SAM9M10
12162306a36Sopenharmony_ci	    AT91SAM9M11
12262306a36Sopenharmony_ci	    AT91SAM9N12
12362306a36Sopenharmony_ci	    AT91SAM9RL
12462306a36Sopenharmony_ci	    AT91SAM9X25
12562306a36Sopenharmony_ci	    AT91SAM9X35
12662306a36Sopenharmony_ci	    AT91SAM9XE
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciconfig SOC_SAM9X60
12962306a36Sopenharmony_ci	bool "SAM9X60"
13062306a36Sopenharmony_ci	depends on ARCH_MULTI_V5
13162306a36Sopenharmony_ci	select ATMEL_AIC5_IRQ
13262306a36Sopenharmony_ci	select ATMEL_PM if PM
13362306a36Sopenharmony_ci	select CPU_ARM926T
13462306a36Sopenharmony_ci	select HAVE_AT91_USB_CLK
13562306a36Sopenharmony_ci	select HAVE_AT91_GENERATED_CLK
13662306a36Sopenharmony_ci	select HAVE_AT91_SAM9X60_PLL
13762306a36Sopenharmony_ci	select MEMORY
13862306a36Sopenharmony_ci	select PINCTRL_AT91
13962306a36Sopenharmony_ci	select SOC_SAM_V4_V5
14062306a36Sopenharmony_ci	select SRAM if PM
14162306a36Sopenharmony_ci	help
14262306a36Sopenharmony_ci	  Select this if you are using Microchip's SAM9X60 SoC
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_cicomment "Clocksource driver selection"
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ciconfig ATMEL_CLOCKSOURCE_PIT
14762306a36Sopenharmony_ci	bool "Periodic Interval Timer (PIT) support"
14862306a36Sopenharmony_ci	depends on SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5
14962306a36Sopenharmony_ci	default SOC_AT91SAM9 || SOC_SAMA5
15062306a36Sopenharmony_ci	select ATMEL_PIT
15162306a36Sopenharmony_ci	help
15262306a36Sopenharmony_ci	  Select this to get a clocksource based on the Atmel Periodic Interval
15362306a36Sopenharmony_ci	  Timer. It has a relatively low resolution and the TC Block clocksource
15462306a36Sopenharmony_ci	  should be preferred.
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ciconfig ATMEL_CLOCKSOURCE_TCB
15762306a36Sopenharmony_ci	bool "Timer Counter Blocks (TCB) support"
15862306a36Sopenharmony_ci	default SOC_AT91RM9200 || SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5
15962306a36Sopenharmony_ci	select ATMEL_TCB_CLKSRC
16062306a36Sopenharmony_ci	help
16162306a36Sopenharmony_ci	  Select this to get a high precision clocksource based on a
16262306a36Sopenharmony_ci	  TC block with a 5+ MHz base clock rate.
16362306a36Sopenharmony_ci	  On platforms with 16-bit counters, two timer channels are combined
16462306a36Sopenharmony_ci	  to make a single 32-bit timer.
16562306a36Sopenharmony_ci	  It can also be used as a clock event device supporting oneshot mode.
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ciconfig MICROCHIP_CLOCKSOURCE_PIT64B
16862306a36Sopenharmony_ci	bool "64-bit Periodic Interval Timer (PIT64B) support"
16962306a36Sopenharmony_ci	default SOC_SAM9X60 || SOC_SAMA7
17062306a36Sopenharmony_ci	select MICROCHIP_PIT64B
17162306a36Sopenharmony_ci	help
17262306a36Sopenharmony_ci	  Select this to get a high resolution clockevent (SAM9X60) or
17362306a36Sopenharmony_ci	  clocksource and clockevent (SAMA7G5) based on Microchip 64-bit
17462306a36Sopenharmony_ci	  Periodic Interval Timer.
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ciconfig HAVE_AT91_UTMI
17762306a36Sopenharmony_ci	bool
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ciconfig HAVE_AT91_USB_CLK
18062306a36Sopenharmony_ci	bool
18162306a36Sopenharmony_ci
18262306a36Sopenharmony_ciconfig COMMON_CLK_AT91
18362306a36Sopenharmony_ci	bool
18462306a36Sopenharmony_ci	select MFD_SYSCON
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ciconfig HAVE_AT91_SMD
18762306a36Sopenharmony_ci	bool
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ciconfig HAVE_AT91_H32MX
19062306a36Sopenharmony_ci	bool
19162306a36Sopenharmony_ci
19262306a36Sopenharmony_ciconfig HAVE_AT91_GENERATED_CLK
19362306a36Sopenharmony_ci	bool
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ciconfig HAVE_AT91_AUDIO_PLL
19662306a36Sopenharmony_ci	bool
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ciconfig HAVE_AT91_I2S_MUX_CLK
19962306a36Sopenharmony_ci	bool
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ciconfig HAVE_AT91_SAM9X60_PLL
20262306a36Sopenharmony_ci	bool
20362306a36Sopenharmony_ci
20462306a36Sopenharmony_ciconfig SOC_SAM_V4_V5
20562306a36Sopenharmony_ci	bool
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ciconfig SOC_SAM_V7
20862306a36Sopenharmony_ci	bool
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ciconfig SOC_SAMA5
21162306a36Sopenharmony_ci	bool
21262306a36Sopenharmony_ci	select ATMEL_AIC5_IRQ
21362306a36Sopenharmony_ci	select ATMEL_PM if PM
21462306a36Sopenharmony_ci	select MEMORY
21562306a36Sopenharmony_ci	select SOC_SAM_V7
21662306a36Sopenharmony_ci	select SRAM if PM
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ciconfig ATMEL_PM
21962306a36Sopenharmony_ci	bool
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ciconfig ATMEL_SECURE_PM
22262306a36Sopenharmony_ci	bool "Atmel Secure PM support"
22362306a36Sopenharmony_ci	depends on SOC_SAMA5D2 && ATMEL_PM
22462306a36Sopenharmony_ci	select ARM_PSCI
22562306a36Sopenharmony_ci	help
22662306a36Sopenharmony_ci	  When running under a TEE, the suspend mode must be requested to be set
22762306a36Sopenharmony_ci	  at TEE level. When enable, this option will use secure monitor calls
22862306a36Sopenharmony_ci	  to set the suspend level. PSCI is then used to enter suspend.
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ciconfig SOC_SAMA7
23162306a36Sopenharmony_ci	bool
23262306a36Sopenharmony_ci	select ARM_GIC
23362306a36Sopenharmony_ci	select ATMEL_PM if PM
23462306a36Sopenharmony_ci	select MEMORY
23562306a36Sopenharmony_ci	select SOC_SAM_V7
23662306a36Sopenharmony_ci	select SRAM if PM
23762306a36Sopenharmony_ciendif
238