mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 22:03:14 +00:00
Microchip AT91 SoC updates for v6.12
It contains: - support for the Microchip SAM9X7 SoC: -- power management -- SoC identification -- sysreg documentation updates -- necessary Kconfig updates -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCZtMiTwAKCRCejrg/N2X7 /W78AP9+to1Ma9E6F97THV3DE1qUQltEY+G0Ms2ZJNXy61lX0AEAgUk7u7tIpxfL 6aMRYhAWG/lUMAKFt3AWZSWLxhUzKAY= =vq3+ -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbZvHoACgkQYKtH/8kJ Uiemzw//Y2DRc8xF8cFX6ZudKwSFykIs6MghUwYsoGGUDikFzl/mgBTqQ3qOCb3N iS1I5EVEuI4IKgTk11PCU7tDXg6NHXbiFS7vMJhh0MtrZk+b6EO+GVJKbaLGi53P /OKOYe3ZZec37ZfHb8jRr1sZ380bcGHLLxfepQN8luP8b/+Nc7+fjWp7BKcg2H6g O4d86lt60jRFI4DMNNPJsWatalfMCAEficqzrOiv/tbZ324ab0IhbS92EWef+lAC 0zq4jMffG5d4RVyHJSB45lij3JWxpaioNPYZBdv+h5U4c8CmfknFwcBqiwZa7mqT B75DO+QHa+Mofbu+tjOpmPeamIuf262d5lHHDzSAqzxy5VCzoXdslbtQCd7qT1UQ Zf6t4PlCylSo/IJ3w2dxMARviDfF4ebujsQ1coXYEd+mXjrO9EvqVaBRRLvsefPg 4Irsf0zaOU4rSCdrTWkKaNh6gJRHhZ1sP2OOdJ4F+Gd5/mcyGe9gNjWdFjGqFcjb /SnO9TOtoH+DZjibe9beJu1cjpO13TXgQ2RjcfeKtcXq4gdV3SVsl9oaOUqZFDtC VtKQHRWm9PYHWi2qfAsVzPbVoBECys7m7HVOadBGD5Ayo11Yv2+jduW8x4qVK/QH l9iqiLFRYdRnVhIsFfOrGxBTmG4bdG8BdGHxXlvkje15SDYh3Cs= =FOWc -----END PGP SIGNATURE----- Merge tag 'at91-soc-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/drivers Microchip AT91 SoC updates for v6.12 It contains: - support for the Microchip SAM9X7 SoC: -- power management -- SoC identification -- sysreg documentation updates -- necessary Kconfig updates * tag 'at91-soc-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: Kconfig: add config flag for SAM9X7 SoC ARM: at91: add support in SoC driver for new sam9x7 ARM: at91: pm: add sam9x7 SoC init config ARM: at91: pm: add support for sam9x7 SoC family dt-bindings: atmel-sysreg: add sam9x7 Link: https://lore.kernel.org/r/20240901133110.2038675-3-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
3b42530638
@ -11,7 +11,8 @@ PIT Timer required properties:
|
||||
shared across all System Controller members.
|
||||
|
||||
PIT64B Timer required properties:
|
||||
- compatible: Should be "microchip,sam9x60-pit64b"
|
||||
- compatible: Should be "microchip,sam9x60-pit64b" or
|
||||
"microchip,sam9x7-pit64b", "microchip,sam9x60-pit64b"
|
||||
- reg: Should contain registers location and length
|
||||
- interrupts: Should contain interrupt for PIT64B timer
|
||||
- clocks: Should contain the available clock sources for PIT64B timer.
|
||||
@ -31,7 +32,8 @@ RAMC SDRAM/DDR Controller required properties:
|
||||
"atmel,at91sam9g45-ddramc",
|
||||
"atmel,sama5d3-ddramc",
|
||||
"microchip,sam9x60-ddramc",
|
||||
"microchip,sama7g5-uddrc"
|
||||
"microchip,sama7g5-uddrc",
|
||||
"microchip,sam9x7-ddramc", "atmel,sama5d3-ddramc".
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
Examples:
|
||||
|
@ -141,11 +141,27 @@ config SOC_SAM9X60
|
||||
help
|
||||
Select this if you are using Microchip's SAM9X60 SoC
|
||||
|
||||
config SOC_SAM9X7
|
||||
bool "SAM9X7"
|
||||
depends on ARCH_MULTI_V5
|
||||
select ATMEL_AIC5_IRQ
|
||||
select ATMEL_PM if PM
|
||||
select CPU_ARM926T
|
||||
select HAVE_AT91_USB_CLK
|
||||
select HAVE_AT91_GENERATED_CLK
|
||||
select HAVE_AT91_SAM9X60_PLL
|
||||
select MEMORY
|
||||
select PINCTRL_AT91
|
||||
select SOC_SAM_V4_V5
|
||||
select SRAM if PM
|
||||
help
|
||||
Select this if you are using Microchip's SAM9X7 SoC
|
||||
|
||||
comment "Clocksource driver selection"
|
||||
|
||||
config ATMEL_CLOCKSOURCE_PIT
|
||||
bool "Periodic Interval Timer (PIT) support"
|
||||
depends on SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5
|
||||
depends on SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAM9X7 || SOC_SAMA5
|
||||
default SOC_AT91SAM9 || SOC_SAMA5
|
||||
select ATMEL_PIT
|
||||
help
|
||||
@ -155,7 +171,7 @@ config ATMEL_CLOCKSOURCE_PIT
|
||||
|
||||
config ATMEL_CLOCKSOURCE_TCB
|
||||
bool "Timer Counter Blocks (TCB) support"
|
||||
default SOC_AT91RM9200 || SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAMA5
|
||||
default SOC_AT91RM9200 || SOC_AT91SAM9 || SOC_SAM9X60 || SOC_SAM9X7 || SOC_SAMA5
|
||||
select ATMEL_TCB_CLKSRC
|
||||
help
|
||||
Select this to get a high precision clocksource based on a
|
||||
@ -166,7 +182,7 @@ config ATMEL_CLOCKSOURCE_TCB
|
||||
|
||||
config MICROCHIP_CLOCKSOURCE_PIT64B
|
||||
bool "64-bit Periodic Interval Timer (PIT64B) support"
|
||||
default SOC_SAM9X60 || SOC_SAMA7
|
||||
default SOC_SAM9X60 || SOC_SAM9X7 || SOC_SAMA7
|
||||
select MICROCHIP_PIT64B
|
||||
help
|
||||
Select this to get a high resolution clockevent (SAM9X60) or
|
||||
|
@ -7,6 +7,7 @@
|
||||
obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o
|
||||
obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o
|
||||
obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o
|
||||
obj-$(CONFIG_SOC_SAM9X7) += sam9x7.o
|
||||
obj-$(CONFIG_SOC_SAMA5) += sama5.o sam_secure.o
|
||||
obj-$(CONFIG_SOC_SAMA7) += sama7.o
|
||||
obj-$(CONFIG_SOC_SAMV7) += samv7.o
|
||||
|
@ -12,6 +12,7 @@
|
||||
extern void __init at91rm9200_pm_init(void);
|
||||
extern void __init at91sam9_pm_init(void);
|
||||
extern void __init sam9x60_pm_init(void);
|
||||
extern void __init sam9x7_pm_init(void);
|
||||
extern void __init sama5_pm_init(void);
|
||||
extern void __init sama5d2_pm_init(void);
|
||||
extern void __init sama7_pm_init(void);
|
||||
@ -19,6 +20,7 @@ extern void __init sama7_pm_init(void);
|
||||
static inline void __init at91rm9200_pm_init(void) { }
|
||||
static inline void __init at91sam9_pm_init(void) { }
|
||||
static inline void __init sam9x60_pm_init(void) { }
|
||||
static inline void __init sam9x7_pm_init(void) { }
|
||||
static inline void __init sama5_pm_init(void) { }
|
||||
static inline void __init sama5d2_pm_init(void) { }
|
||||
static inline void __init sama7_pm_init(void) { }
|
||||
|
@ -233,6 +233,13 @@ static const struct of_device_id sama7g5_ws_ids[] = {
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static const struct of_device_id sam9x7_ws_ids[] = {
|
||||
{ .compatible = "microchip,sam9x7-rtc", .data = &ws_info[1] },
|
||||
{ .compatible = "microchip,sam9x7-rtt", .data = &ws_info[4] },
|
||||
{ .compatible = "microchip,sam9x7-gem", .data = &ws_info[5] },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int at91_pm_config_ws(unsigned int pm_mode, bool set)
|
||||
{
|
||||
const struct wakeup_source_info *wsi;
|
||||
@ -1361,6 +1368,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
|
||||
{ .compatible = "atmel,sama5d4-pmc", .data = &pmc_infos[1] },
|
||||
{ .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] },
|
||||
{ .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] },
|
||||
{ .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] },
|
||||
{ .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
@ -1499,6 +1507,27 @@ void __init sam9x60_pm_init(void)
|
||||
soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
|
||||
}
|
||||
|
||||
void __init sam9x7_pm_init(void)
|
||||
{
|
||||
static const int modes[] __initconst = {
|
||||
AT91_PM_STANDBY, AT91_PM_ULP0,
|
||||
};
|
||||
int ret;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SOC_SAM9X7))
|
||||
return;
|
||||
|
||||
at91_pm_modes_validate(modes, ARRAY_SIZE(modes));
|
||||
ret = at91_dt_ramc(false);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
at91_pm_init(NULL);
|
||||
|
||||
soc_pm.ws_ids = sam9x7_ws_ids;
|
||||
soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
|
||||
}
|
||||
|
||||
void __init at91sam9_pm_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
33
arch/arm/mach-at91/sam9x7.c
Normal file
33
arch/arm/mach-at91/sam9x7.c
Normal file
@ -0,0 +1,33 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Setup code for SAM9X7.
|
||||
*
|
||||
* Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries
|
||||
*
|
||||
* Author: Varshini Rajendran <varshini.rajendran@microchip.com>
|
||||
*/
|
||||
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
static void __init sam9x7_init(void)
|
||||
{
|
||||
of_platform_default_populate(NULL, NULL, NULL);
|
||||
|
||||
sam9x7_pm_init();
|
||||
}
|
||||
|
||||
static const char * const sam9x7_dt_board_compat[] __initconst = {
|
||||
"microchip,sam9x7",
|
||||
NULL
|
||||
};
|
||||
|
||||
DT_MACHINE_START(sam9x7_dt, "Microchip SAM9X7")
|
||||
/* Maintainer: Microchip */
|
||||
.init_machine = sam9x7_init,
|
||||
.dt_compat = sam9x7_dt_board_compat,
|
||||
MACHINE_END
|
@ -101,6 +101,29 @@ static const struct at91_soc socs[] __initconst = {
|
||||
AT91_CIDR_VERSION_MASK, SAM9X60_D6K_EXID_MATCH,
|
||||
"sam9x60 8MiB SDRAM SiP", "sam9x60"),
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SAM9X7
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, AT91_CIDR_MATCH_MASK,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X70_EXID_MATCH,
|
||||
"sam9x70", "sam9x7"),
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, AT91_CIDR_MATCH_MASK,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X72_EXID_MATCH,
|
||||
"sam9x72", "sam9x7"),
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, AT91_CIDR_MATCH_MASK,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X75_EXID_MATCH,
|
||||
"sam9x75", "sam9x7"),
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, SAM9X75_D1M_EXID_MATCH,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X75_EXID_MATCH,
|
||||
"sam9x75 16MB DDR2 SiP", "sam9x7"),
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, SAM9X75_D5M_EXID_MATCH,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X75_EXID_MATCH,
|
||||
"sam9x75 64MB DDR2 SiP", "sam9x7"),
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, SAM9X75_D1G_EXID_MATCH,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X75_EXID_MATCH,
|
||||
"sam9x75 125MB DDR3L SiP ", "sam9x7"),
|
||||
AT91_SOC(SAM9X7_CIDR_MATCH, SAM9X75_D2G_EXID_MATCH,
|
||||
AT91_CIDR_VERSION_MASK, SAM9X75_EXID_MATCH,
|
||||
"sam9x75 250MB DDR3L SiP", "sam9x7"),
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SAMA5
|
||||
AT91_SOC(SAMA5D2_CIDR_MATCH, AT91_CIDR_MATCH_MASK,
|
||||
AT91_CIDR_VERSION_MASK, SAMA5D21CU_EXID_MATCH,
|
||||
|
@ -44,6 +44,7 @@ at91_soc_init(const struct at91_soc *socs);
|
||||
#define AT91SAM9X5_CIDR_MATCH 0x019a05a0
|
||||
#define AT91SAM9N12_CIDR_MATCH 0x019a07a0
|
||||
#define SAM9X60_CIDR_MATCH 0x019b35a0
|
||||
#define SAM9X7_CIDR_MATCH 0x09750020
|
||||
#define SAMA7G5_CIDR_MATCH 0x00162100
|
||||
|
||||
#define AT91SAM9M11_EXID_MATCH 0x00000001
|
||||
@ -66,6 +67,14 @@ at91_soc_init(const struct at91_soc *socs);
|
||||
#define SAM9X60_D1G_EXID_MATCH 0x00000010
|
||||
#define SAM9X60_D6K_EXID_MATCH 0x00000011
|
||||
|
||||
#define SAM9X70_EXID_MATCH 0x00000005
|
||||
#define SAM9X72_EXID_MATCH 0x00000004
|
||||
#define SAM9X75_D1G_EXID_MATCH 0x00000018
|
||||
#define SAM9X75_D2G_EXID_MATCH 0x00000020
|
||||
#define SAM9X75_D1M_EXID_MATCH 0x00000003
|
||||
#define SAM9X75_D5M_EXID_MATCH 0x00000010
|
||||
#define SAM9X75_EXID_MATCH 0x00000000
|
||||
|
||||
#define SAMA7G51_EXID_MATCH 0x3
|
||||
#define SAMA7G52_EXID_MATCH 0x2
|
||||
#define SAMA7G53_EXID_MATCH 0x1
|
||||
|
Loading…
Reference in New Issue
Block a user