From b07a02296461952c7e409f8895388ca5c093e72e Mon Sep 17 00:00:00 2001 From: Durai Manickam KR Date: Mon, 4 Apr 2022 11:23:18 +0530 Subject: [PATCH 01/15] board: Add sam9x60_curiosity support Add board files, Kconfig, Makefile and MAINTAINERS. Signed-off-by: Durai Manickam KR --- arch/arm/mach-at91/Kconfig | 7 ++ board/atmel/sam9x60_curiosity/Kconfig | 15 ++++ board/atmel/sam9x60_curiosity/MAINTAINERS | 6 ++ board/atmel/sam9x60_curiosity/Makefile | 7 ++ .../sam9x60_curiosity/sam9x60_curiosity.c | 75 +++++++++++++++++++ include/configs/sam9x60_curiosity.h | 31 ++++++++ 6 files changed, 141 insertions(+) create mode 100644 board/atmel/sam9x60_curiosity/Kconfig create mode 100644 board/atmel/sam9x60_curiosity/MAINTAINERS create mode 100644 board/atmel/sam9x60_curiosity/Makefile create mode 100644 board/atmel/sam9x60_curiosity/sam9x60_curiosity.c create mode 100644 include/configs/sam9x60_curiosity.h diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 488a43ad4f..b87639f8c0 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -165,6 +165,12 @@ config TARGET_SAM9X60EK select BOARD_EARLY_INIT_F select BOARD_LATE_INIT +config TARGET_SAM9X60_CURIOSITY + bool "SAM9X60 CURIOSITY board" + select SAM9X60 + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + config TARGET_SAMA5D2_PTC_EK bool "SAMA5D2 PTC EK board" select BOARD_EARLY_INIT_F @@ -339,6 +345,7 @@ source "board/atmel/at91sam9n12ek/Kconfig" source "board/atmel/at91sam9rlek/Kconfig" source "board/atmel/at91sam9x5ek/Kconfig" source "board/atmel/sam9x60ek/Kconfig" +source "board/atmel/sam9x60_curiosity/Kconfig" source "board/atmel/sama7g5ek/Kconfig" source "board/atmel/sama5d2_ptc_ek/Kconfig" source "board/atmel/sama5d2_xplained/Kconfig" diff --git a/board/atmel/sam9x60_curiosity/Kconfig b/board/atmel/sam9x60_curiosity/Kconfig new file mode 100644 index 0000000000..ae84e0f32c --- /dev/null +++ b/board/atmel/sam9x60_curiosity/Kconfig @@ -0,0 +1,15 @@ +if TARGET_SAM9X60_CURIOSITY + +config SYS_BOARD + default "sam9x60_curiosity" + +config SYS_VENDOR + default "atmel" + +config SYS_SOC + default "at91" + +config SYS_CONFIG_NAME + default "sam9x60_curiosity" + +endif diff --git a/board/atmel/sam9x60_curiosity/MAINTAINERS b/board/atmel/sam9x60_curiosity/MAINTAINERS new file mode 100644 index 0000000000..84a3a9f186 --- /dev/null +++ b/board/atmel/sam9x60_curiosity/MAINTAINERS @@ -0,0 +1,6 @@ +SAM9X60 CURIOSITY BOARD +M: Durai Manickam KR +M: Eugen Hristev +S: Maintained +F: board/atmel/sam9x60_curiosity/ +F: include/configs/sam9x60_curiosity.h diff --git a/board/atmel/sam9x60_curiosity/Makefile b/board/atmel/sam9x60_curiosity/Makefile new file mode 100644 index 0000000000..c4d17e66d4 --- /dev/null +++ b/board/atmel/sam9x60_curiosity/Makefile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries +# +# Author: Durai Manickam KR + +obj-y += sam9x60_curiosity.o diff --git a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c new file mode 100644 index 0000000000..00de277812 --- /dev/null +++ b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries + * + * Author: Durai Manickam KR + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +void at91_prepare_cpu_var(void); + +int board_late_init(void) +{ + at91_prepare_cpu_var(); + + return 0; +} + +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) +{ + at91_seriald_hw_init(); +} +#endif + +int board_early_init_f(void) +{ +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#endif + return 0; +} + +#define MAC24AA_MAC_OFFSET 0xfa + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ +#ifdef CONFIG_I2C_EEPROM + at91_set_ethaddr(MAC24AA_MAC_OFFSET); +#endif + return 0; +} +#endif + +int board_init(void) +{ + /* address of boot parameters */ + gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; + return 0; +} + +int dram_init_banksize(void) +{ + return fdtdec_setup_memory_banksize(); +} + +int dram_init(void) +{ + return fdtdec_setup_mem_size_base(); +} diff --git a/include/configs/sam9x60_curiosity.h b/include/configs/sam9x60_curiosity.h new file mode 100644 index 0000000000..2708711a4e --- /dev/null +++ b/include/configs/sam9x60_curiosity.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration settings for the SAM9X60 CURIOSITY board. + * + * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries + * + * Author: Durai Manickam KR + */ + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 +#define CONFIG_SYS_AT91_MAIN_CLOCK 24000000 /* 24 MHz crystal */ + +#define CONFIG_USART_BASE ATMEL_BASE_DBGU +#define CONFIG_USART_ID 0 /* ignored in arm */ + +/* SDRAM */ +#define CONFIG_SYS_SDRAM_BASE 0x20000000 +#define CONFIG_SYS_SDRAM_SIZE 0x8000000 /* 128 MB */ + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_INIT_SP_ADDR 0x218000 +#else +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 16 * 1024 + CONFIG_SYS_MALLOC_F_LEN - \ + GENERATED_GBL_DATA_SIZE) +#endif + +#endif From 03eaa705a98784fa4afcb884987bc9dac01d6f6e Mon Sep 17 00:00:00 2001 From: Durai Manickam KR Date: Mon, 4 Apr 2022 11:23:19 +0530 Subject: [PATCH 02/15] ARM: dts: Add device tree files for sam9x60_curiosity Add dts and dtsi files. Signed-off-by: Durai Manickam KR --- arch/arm/dts/Makefile | 2 + .../dts/at91-sam9x60_curiosity-u-boot.dtsi | 79 +++++++++++++++++++ arch/arm/dts/at91-sam9x60_curiosity.dts | 74 +++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi create mode 100644 arch/arm/dts/at91-sam9x60_curiosity.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 1032ce4c85..ab2d0da192 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1021,6 +1021,8 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ dtb-$(CONFIG_TARGET_SAM9X60EK) += sam9x60ek.dtb +dtb-$(CONFIG_TARGET_SAM9X60_CURIOSITY) += at91-sam9x60_curiosity.dtb + dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb dtb-$(CONFIG_TARGET_GARDENA_SMART_GATEWAY_AT91SAM) += \ diff --git a/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi b/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi new file mode 100644 index 0000000000..d176e20f28 --- /dev/null +++ b/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * at91-sam9x60_curiosity-u-boot.dtsi - Device Tree Include file for SAM9X60 + * CURIOSITY. + * + * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries + * + * Author: Durai Manickam KR + */ + +/ { + ahb { + u-boot,dm-pre-reloc; + + apb { + u-boot,dm-pre-reloc; + + pinctrl { + u-boot,dm-pre-reloc; + }; + }; + }; + + chosen { + u-boot,dm-pre-reloc; + }; +}; + +&clk32 { + u-boot,dm-pre-reloc; +}; + +&dbgu { + u-boot,dm-pre-reloc; +}; + +&main_rc { + u-boot,dm-pre-reloc; +}; + +&main_xtal { + u-boot,dm-pre-reloc; +}; + +&pinctrl_dbgu { + u-boot,dm-pre-reloc; +}; + +&pinctrl_sdhci0 { + u-boot,dm-pre-reloc; +}; + +&pioA { + u-boot,dm-pre-reloc; +}; + +&pioB { + u-boot,dm-pre-reloc; +}; + +&pit64b0 { + u-boot,dm-pre-reloc; +}; + +&pmc { + u-boot,dm-pre-reloc; +}; + +&sdhci0 { + u-boot,dm-pre-reloc; +}; + +&slow_rc_osc { + u-boot,dm-pre-reloc; +}; + +&slow_xtal { + u-boot,dm-pre-reloc; +}; diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts b/arch/arm/dts/at91-sam9x60_curiosity.dts new file mode 100644 index 0000000000..2e7ccb0ffb --- /dev/null +++ b/arch/arm/dts/at91-sam9x60_curiosity.dts @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * at91-sam9x60_curiosity.dts - Device Tree file for SAM9X60 CURIOSITY board + * + * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries + * + * Author: Durai Manickam KR + */ +/dts-v1/; +#include +#include "sam9x60.dtsi" + +/ { + model = "Microchip SAM9X60 CURIOSITY"; + compatible = "microchip,sam9x60-curiosity", "microchip,sam9x60", "atmel,at91sam9"; + + ahb { + apb { + flx0: flexcom@f801c600 { + atmel,flexcom-mode = ; + status = "okay"; + + i2c@600 { + compatible = "atmel,sama5d2-i2c"; + reg = <0x600 0x200>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flx0>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; + status = "okay"; + + eeprom@53 { + compatible = "atmel,24c32"; + reg = <0x53>; + pagesize = <16>; + }; + }; + }; + + pinctrl { + pinctrl_flx0: flx0_default { + atmel,pins = + ; + }; + }; + }; + }; + + chosen { + stdout-path = &dbgu; + i2c0 = &flx0; + }; + + clocks { + slow_xtal: slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal: main_xtal { + clock-frequency = <24000000>; + }; + }; + + memory { + reg = <0x20000000 0x8000000>; + }; +}; + +&macb0 { + phy-mode = "rmii"; + status = "okay"; +}; From c8532d3f9eb8c69f41a73c734d1874d9a0d2b8df Mon Sep 17 00:00:00 2001 From: Durai Manickam KR Date: Mon, 4 Apr 2022 11:23:20 +0530 Subject: [PATCH 03/15] configs: Add sam9x60_curiosity_mmc_defconfig Add boot from SDMMC (sdcard) support for sam9x60_curiosity. Signed-off-by: Durai Manickam KR --- board/atmel/sam9x60_curiosity/MAINTAINERS | 1 + configs/sam9x60_curiosity_mmc_defconfig | 74 +++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 configs/sam9x60_curiosity_mmc_defconfig diff --git a/board/atmel/sam9x60_curiosity/MAINTAINERS b/board/atmel/sam9x60_curiosity/MAINTAINERS index 84a3a9f186..3e1dce2980 100644 --- a/board/atmel/sam9x60_curiosity/MAINTAINERS +++ b/board/atmel/sam9x60_curiosity/MAINTAINERS @@ -4,3 +4,4 @@ M: Eugen Hristev S: Maintained F: board/atmel/sam9x60_curiosity/ F: include/configs/sam9x60_curiosity.h +F: configs/sam9x60_curiosity_mmc_defconfig diff --git a/configs/sam9x60_curiosity_mmc_defconfig b/configs/sam9x60_curiosity_mmc_defconfig new file mode 100644 index 0000000000..06db619270 --- /dev/null +++ b/configs/sam9x60_curiosity_mmc_defconfig @@ -0,0 +1,74 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_ARCH_AT91=y +CONFIG_SYS_TEXT_BASE=0x23f00000 +CONFIG_SYS_MALLOC_LEN=0x81000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_TARGET_SAM9X60_CURIOSITY=y +CONFIG_ATMEL_LEGACY=y +CONFIG_NR_DRAM_BANKS=8 +CONFIG_ENV_SIZE=0x4000 +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="at91-sam9x60_curiosity" +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_BASE=0xfffff200 +CONFIG_DEBUG_UART_CLOCK=200000000 +CONFIG_DEBUG_UART=y +CONFIG_SYS_LOAD_ADDR=0x22000000 +CONFIG_FIT=y +CONFIG_SD_BOOT=y +CONFIG_BOOTDELAY=3 +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="mem=128M console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait" +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="fatload mmc 0:1 0x21000000 at91-sam9x60_curiosity.dtb; fatload mmc 0:1 0x22000000 zImage; bootz 0x22000000 - 0x21000000" +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_MISC_INIT_R=y +CONFIG_HUSH_PARSER=y +CONFIG_SYS_PROMPT="U-Boot> " +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_CLK=y +CONFIG_CMD_DM=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_BOOTP_BOOTFILESIZE=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_HASH=y +CONFIG_HASH_VERIFY=y +CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_ENV_IS_IN_FAT=y +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_DM=y +CONFIG_CLK=y +CONFIG_CLK_CCF=y +CONFIG_CLK_AT91=y +CONFIG_AT91_GENERIC_CLK=y +CONFIG_AT91_SAM9X60_PLL=y +CONFIG_CPU=y +CONFIG_AT91_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_AT91=y +CONFIG_I2C_EEPROM=y +CONFIG_MICROCHIP_FLEXCOM=y +CONFIG_DM_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ATMEL=y +CONFIG_PHY_MICREL=y +CONFIG_DM_ETH=y +CONFIG_MACB=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_ATMEL_USART=y +CONFIG_TIMER=y +CONFIG_MCHP_PIT64B_TIMER=y +CONFIG_OF_LIBFDT_OVERLAY=y From 2016585c3a9486ea438145f47a28ee7fa8f7060c Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 1 Apr 2022 12:27:23 +0300 Subject: [PATCH 04/15] ARM: dts: at91: Add RSTC node Add node for RSTC. Signed-off-by: Sergiu Moga --- arch/arm/dts/sam9x60.dtsi | 6 ++++++ arch/arm/dts/sama7g5.dtsi | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/arch/arm/dts/sam9x60.dtsi b/arch/arm/dts/sam9x60.dtsi index be44519934..733cc5cec9 100644 --- a/arch/arm/dts/sam9x60.dtsi +++ b/arch/arm/dts/sam9x60.dtsi @@ -223,6 +223,12 @@ status = "okay"; }; + reset_controller: rstc@fffffe00 { + compatible = "microchip,sam9x60-rstc"; + reg = <0xfffffe00 0x10>; + clocks = <&clk32 0>; + }; + pit: timer@fffffe40 { compatible = "atmel,at91sam9260-pit"; reg = <0xfffffe40 0x10>; diff --git a/arch/arm/dts/sama7g5.dtsi b/arch/arm/dts/sama7g5.dtsi index b7c261ebe9..7015bd7f6d 100644 --- a/arch/arm/dts/sama7g5.dtsi +++ b/arch/arm/dts/sama7g5.dtsi @@ -232,6 +232,13 @@ clocks = <&clk32k 0>; }; + reset_controller: rstc@e001d000 { + compatible = "microchip,sama7g5-rstc", "microchip,sam9x60-rstc"; + reg = <0xe001d000 0xc>, <0xe001d0e4 0x4>; + #reset-cells = <1>; + clocks = <&clk32k 0>; + }; + clk32k: clock-controller@e001d050 { compatible = "microchip,sama7g5-sckc", "microchip,sam9x60-sckc"; reg = <0xe001d050 0x4>; From 71d4393f846f5ae86ac35c0fd0987719b660c9ba Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 1 Apr 2022 12:27:24 +0300 Subject: [PATCH 05/15] sysreset: Add Atmel/Microchip sysreset driver This patch adds a sysreset driver for Atmel/Microchip platforms. Signed-off-by: Sergiu Moga Reviewed-by: Claudiu Beznea --- drivers/sysreset/Kconfig | 15 +++++++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_at91.c | 71 ++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 drivers/sysreset/sysreset_at91.c diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig index f6d60038b8..25dd02c704 100644 --- a/drivers/sysreset/Kconfig +++ b/drivers/sysreset/Kconfig @@ -77,6 +77,21 @@ config SYSRESET_OCTEON This enables the system reset driver support for Marvell Octeon SoCs. +config SYSRESET_AT91 + bool "Enable support for Microchip/Atmel reset driver" + depends on ARCH_AT91 + select SYSRESET_SPL_AT91 if SPL && SPL_SYSRESET + help + This enables the system reset driver support for Microchip/Atmel + SoCs. + +config SYSRESET_SPL_AT91 + bool "Enable support for Microchip/Atmel reset driver in SPL" + depends on ARCH_AT91 + help + This enables the system reset driver support for Microchip/Atmel + SoCs in SPL. + config SYSRESET_PSCI bool "Enable support for PSCI System Reset" depends on ARM_PSCI_FW diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile index 8e00be0779..0ed3bbf356 100644 --- a/drivers/sysreset/Makefile +++ b/drivers/sysreset/Makefile @@ -20,5 +20,6 @@ obj-$(CONFIG_SYSRESET_TI_SCI) += sysreset-ti-sci.o obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o obj-$(CONFIG_SYSRESET_RESETCTL) += sysreset_resetctl.o +obj-$(CONFIG_SYSRESET_$(SPL_TPL_)AT91) += sysreset_at91.o obj-$(CONFIG_$(SPL_TPL_)SYSRESET_X86) += sysreset_x86.o obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o diff --git a/drivers/sysreset/sysreset_at91.c b/drivers/sysreset/sysreset_at91.c new file mode 100644 index 0000000000..24b87ee987 --- /dev/null +++ b/drivers/sysreset/sysreset_at91.c @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int at91_sysreset_request(struct udevice *dev, enum sysreset_t type) +{ + at91_rstc_t *rstc = (at91_rstc_t *)dev_get_priv(dev); + + writel(AT91_RSTC_KEY + | AT91_RSTC_CR_PROCRST /* Processor Reset */ + | AT91_RSTC_CR_PERRST /* Peripheral Reset */ +#ifdef CONFIG_AT91RESET_EXTRST + | AT91_RSTC_CR_EXTRST /* External Reset (assert nRST pin) */ +#endif + , &rstc->cr); + + return -EINPROGRESS; +} + +static int at91_sysreset_probe(struct udevice *dev) +{ + struct clk slck; + void *priv; + int ret; + + priv = dev_remap_addr(dev); + if (!priv) + return -EINVAL; + + dev_set_priv(dev, priv); + + ret = clk_get_by_index(dev, 0, &slck); + if (ret) + return ret; + + ret = clk_prepare_enable(&slck); + if (ret) + return ret; + + return 0; +} + +static struct sysreset_ops at91_sysreset = { + .request = at91_sysreset_request, +}; + +static const struct udevice_id a91_sysreset_ids[] = { + { .compatible = "atmel,sama5d3-rstc" }, + { .compatible = "microchip,sam9x60-rstc" }, + { } +}; + +U_BOOT_DRIVER(sysreset_at91) = { + .id = UCLASS_SYSRESET, + .name = "at91_reset", + .ops = &at91_sysreset, + .probe = at91_sysreset_probe, + .of_match = a91_sysreset_ids, +}; From 085f7378e3e8939faab604f8cfe7a223716bc967 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 1 Apr 2022 12:27:25 +0300 Subject: [PATCH 06/15] configs: at91: Enable SYSRESET for Atmel/Microchip's platforms This commit enables SYSRESET in the defconfigs for the Atmel/Microchip platforms. Signed-off-by: Sergiu Moga --- configs/sam9x60ek_mmc_defconfig | 3 +++ configs/sam9x60ek_nandflash_defconfig | 3 +++ configs/sam9x60ek_qspiflash_defconfig | 3 +++ configs/sama5d27_giantboard_defconfig | 4 ++++ configs/sama5d27_som1_ek_mmc1_defconfig | 4 ++++ configs/sama5d27_som1_ek_mmc_defconfig | 4 ++++ configs/sama5d27_som1_ek_qspiflash_defconfig | 4 ++++ configs/sama5d27_wlsom1_ek_mmc_defconfig | 4 ++++ configs/sama5d27_wlsom1_ek_qspiflash_defconfig | 4 ++++ configs/sama5d2_icp_mmc_defconfig | 4 ++++ configs/sama5d2_icp_qspiflash_defconfig | 3 +++ configs/sama5d2_ptc_ek_mmc_defconfig | 3 +++ configs/sama5d2_ptc_ek_nandflash_defconfig | 3 +++ configs/sama5d2_xplained_emmc_defconfig | 4 ++++ configs/sama5d2_xplained_mmc_defconfig | 4 ++++ configs/sama5d2_xplained_qspiflash_defconfig | 4 ++++ configs/sama5d2_xplained_spiflash_defconfig | 4 ++++ configs/sama5d36ek_cmp_mmc_defconfig | 3 +++ configs/sama5d36ek_cmp_nandflash_defconfig | 3 +++ configs/sama5d36ek_cmp_spiflash_defconfig | 3 +++ configs/sama5d3_xplained_mmc_defconfig | 4 ++++ configs/sama5d3_xplained_nandflash_defconfig | 4 ++++ configs/sama5d3xek_mmc_defconfig | 4 ++++ configs/sama5d3xek_nandflash_defconfig | 4 ++++ configs/sama5d3xek_spiflash_defconfig | 4 ++++ configs/sama5d4_xplained_mmc_defconfig | 4 ++++ configs/sama5d4_xplained_nandflash_defconfig | 4 ++++ configs/sama5d4_xplained_spiflash_defconfig | 4 ++++ configs/sama5d4ek_mmc_defconfig | 4 ++++ configs/sama5d4ek_nandflash_defconfig | 4 ++++ configs/sama5d4ek_spiflash_defconfig | 4 ++++ configs/sama7g5ek_mmc1_defconfig | 3 +++ configs/sama7g5ek_mmc_defconfig | 3 +++ configs/vinco_defconfig | 3 +++ 34 files changed, 124 insertions(+) diff --git a/configs/sam9x60ek_mmc_defconfig b/configs/sam9x60ek_mmc_defconfig index 17ba0905f8..dee112ab67 100644 --- a/configs/sam9x60ek_mmc_defconfig +++ b/configs/sam9x60ek_mmc_defconfig @@ -76,6 +76,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_W1=y CONFIG_W1_GPIO=y diff --git a/configs/sam9x60ek_nandflash_defconfig b/configs/sam9x60ek_nandflash_defconfig index 225ae65436..ca848e1aa8 100644 --- a/configs/sam9x60ek_nandflash_defconfig +++ b/configs/sam9x60ek_nandflash_defconfig @@ -78,6 +78,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y diff --git a/configs/sam9x60ek_qspiflash_defconfig b/configs/sam9x60ek_qspiflash_defconfig index fb20216e15..b8cacaff75 100644 --- a/configs/sam9x60ek_qspiflash_defconfig +++ b/configs/sam9x60ek_qspiflash_defconfig @@ -90,6 +90,9 @@ CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig index 34358c5328..83646853a2 100644 --- a/configs/sama5d27_giantboard_defconfig +++ b/configs/sama5d27_giantboard_defconfig @@ -83,3 +83,7 @@ CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y diff --git a/configs/sama5d27_som1_ek_mmc1_defconfig b/configs/sama5d27_som1_ek_mmc1_defconfig index 2914e0636d..cee060b916 100644 --- a/configs/sama5d27_som1_ek_mmc1_defconfig +++ b/configs/sama5d27_som1_ek_mmc1_defconfig @@ -89,6 +89,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig index e9c4c3f966..3a7b338deb 100644 --- a/configs/sama5d27_som1_ek_mmc_defconfig +++ b/configs/sama5d27_som1_ek_mmc_defconfig @@ -89,6 +89,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d27_som1_ek_qspiflash_defconfig b/configs/sama5d27_som1_ek_qspiflash_defconfig index e6105b1e58..acc0dc116e 100644 --- a/configs/sama5d27_som1_ek_qspiflash_defconfig +++ b/configs/sama5d27_som1_ek_qspiflash_defconfig @@ -88,6 +88,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d27_wlsom1_ek_mmc_defconfig b/configs/sama5d27_wlsom1_ek_mmc_defconfig index f61e2c33b7..d86974341b 100644 --- a/configs/sama5d27_wlsom1_ek_mmc_defconfig +++ b/configs/sama5d27_wlsom1_ek_mmc_defconfig @@ -94,6 +94,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d27_wlsom1_ek_qspiflash_defconfig b/configs/sama5d27_wlsom1_ek_qspiflash_defconfig index 9ffe162f81..c029fd5192 100644 --- a/configs/sama5d27_wlsom1_ek_qspiflash_defconfig +++ b/configs/sama5d27_wlsom1_ek_qspiflash_defconfig @@ -98,6 +98,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig index 1a95946d6d..e839d1710a 100644 --- a/configs/sama5d2_icp_mmc_defconfig +++ b/configs/sama5d2_icp_mmc_defconfig @@ -80,6 +80,10 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d2_icp_qspiflash_defconfig b/configs/sama5d2_icp_qspiflash_defconfig index a70532cf14..cac96e638c 100644 --- a/configs/sama5d2_icp_qspiflash_defconfig +++ b/configs/sama5d2_icp_qspiflash_defconfig @@ -87,6 +87,9 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig index 7d1578be0b..27618bbefe 100644 --- a/configs/sama5d2_ptc_ek_mmc_defconfig +++ b/configs/sama5d2_ptc_ek_mmc_defconfig @@ -70,6 +70,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/sama5d2_ptc_ek_nandflash_defconfig b/configs/sama5d2_ptc_ek_nandflash_defconfig index 941683b3cd..cd66b60586 100644 --- a/configs/sama5d2_ptc_ek_nandflash_defconfig +++ b/configs/sama5d2_ptc_ek_nandflash_defconfig @@ -70,6 +70,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/sama5d2_xplained_emmc_defconfig b/configs/sama5d2_xplained_emmc_defconfig index 53aece8569..478a3cfc8b 100644 --- a/configs/sama5d2_xplained_emmc_defconfig +++ b/configs/sama5d2_xplained_emmc_defconfig @@ -88,6 +88,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 74491d6331..071758fe00 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -90,6 +90,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d2_xplained_qspiflash_defconfig b/configs/sama5d2_xplained_qspiflash_defconfig index b2e78c63f6..bf7368b512 100644 --- a/configs/sama5d2_xplained_qspiflash_defconfig +++ b/configs/sama5d2_xplained_qspiflash_defconfig @@ -90,6 +90,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index 83092e91ae..e1d01b43fa 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -94,6 +94,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig index 911916199a..7c31b75ace 100644 --- a/configs/sama5d36ek_cmp_mmc_defconfig +++ b/configs/sama5d36ek_cmp_mmc_defconfig @@ -65,6 +65,9 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig index 1c1d20cbf5..00f5b2bd80 100644 --- a/configs/sama5d36ek_cmp_nandflash_defconfig +++ b/configs/sama5d36ek_cmp_nandflash_defconfig @@ -67,6 +67,9 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig index 2e39207c4f..1a6e47b3f9 100644 --- a/configs/sama5d36ek_cmp_spiflash_defconfig +++ b/configs/sama5d36ek_cmp_spiflash_defconfig @@ -67,6 +67,9 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index 668f61321e..04d6214817 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -84,6 +84,10 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index 8364d7e704..9a1a6376fd 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -87,6 +87,10 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig index 2345aa4843..71c2caec38 100644 --- a/configs/sama5d3xek_mmc_defconfig +++ b/configs/sama5d3xek_mmc_defconfig @@ -92,6 +92,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig index 7aecb1a3fb..dd7713a8a9 100644 --- a/configs/sama5d3xek_nandflash_defconfig +++ b/configs/sama5d3xek_nandflash_defconfig @@ -94,6 +94,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig index ef579203bd..838cff6d2d 100644 --- a/configs/sama5d3xek_spiflash_defconfig +++ b/configs/sama5d3xek_spiflash_defconfig @@ -93,6 +93,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index a77fb89d37..060beb75d0 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -85,6 +85,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index 74e56d7b3d..ac662c95f7 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -89,6 +89,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index ff46f43dd8..6035105d02 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -91,6 +91,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index 81b96d04fb..02a3955cc0 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -83,6 +83,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index 1edfc25644..e76fe59c90 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -87,6 +87,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index 2045a655c9..4472b66ab0 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -86,6 +86,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig index 75b24b380d..31db8c1d5e 100644 --- a/configs/sama7g5ek_mmc1_defconfig +++ b/configs/sama7g5ek_mmc1_defconfig @@ -71,6 +71,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_MCHP_PIT64B_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig index 9d4da95677..2e5e78e7b6 100644 --- a/configs/sama7g5ek_mmc_defconfig +++ b/configs/sama7g5ek_mmc_defconfig @@ -71,6 +71,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_MCHP_PIT64B_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set diff --git a/configs/vinco_defconfig b/configs/vinco_defconfig index 23883d5de8..1394a1925e 100644 --- a/configs/vinco_defconfig +++ b/configs/vinco_defconfig @@ -56,3 +56,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="L+G VInCo" CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_USB_ETHER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y From 34a28bdd618369af9abe04a6d9adfa2559c80348 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 1 Apr 2022 12:27:26 +0300 Subject: [PATCH 07/15] ARM: mach-at91: arm926ejs: Add SYSRESET conditional This commit adds a condition to the Makefile so that whenever the SYSRESET option is chosen in the configuration, the default reset driver is ignored. Signed-off-by: Sergiu Moga --- arch/arm/mach-at91/arm926ejs/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-at91/arm926ejs/Makefile b/arch/arm/mach-at91/arm926ejs/Makefile index f306b172f0..902dd3a60e 100644 --- a/arch/arm/mach-at91/arm926ejs/Makefile +++ b/arch/arm/mach-at91/arm926ejs/Makefile @@ -18,7 +18,9 @@ obj-$(CONFIG_SAM9X60) += sam9x60_devices.o obj-$(CONFIG_AT91_EFLASH) += eflash.o obj-y += clock.o obj-y += cpu.o +ifndef CONFIG_$(SPL_TPL_)SYSRESET obj-y += reset.o +endif ifneq ($(CONFIG_ATMEL_PIT_TIMER),y) ifneq ($(CONFIG_MCHP_PIT64B_TIMER),y) # old non-DM timer driver From 0fbc893cfe7603f1bff1266dd92ffff525b7909d Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 1 Apr 2022 12:27:27 +0300 Subject: [PATCH 08/15] ARM: mach-at91: armv7: Remove default reset driver This commit removes the default reset driver for armv7, since it is no longer needed due to the presence of the SYSRESET driver. Signed-off-by: Sergiu Moga --- arch/arm/mach-at91/armv7/Makefile | 3 --- arch/arm/mach-at91/armv7/reset.c | 31 ------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 arch/arm/mach-at91/armv7/reset.c diff --git a/arch/arm/mach-at91/armv7/Makefile b/arch/arm/mach-at91/armv7/Makefile index f395b55c3d..6da1cdffef 100644 --- a/arch/arm/mach-at91/armv7/Makefile +++ b/arch/arm/mach-at91/armv7/Makefile @@ -11,9 +11,6 @@ obj-$(CONFIG_SAMA5D3) += sama5d3_devices.o clock.o obj-$(CONFIG_SAMA5D4) += sama5d4_devices.o clock.o obj-$(CONFIG_SAMA7G5) += sama7g5_devices.o obj-y += cpu.o -ifndef CONFIG_$(SPL_TPL_)SYSRESET -obj-y += reset.o -endif ifneq ($(CONFIG_ATMEL_TCB_TIMER),y) ifneq ($(CONFIG_ATMEL_PIT_TIMER),y) ifneq ($(CONFIG_MCHP_PIT64B_TIMER),y) diff --git a/arch/arm/mach-at91/armv7/reset.c b/arch/arm/mach-at91/armv7/reset.c deleted file mode 100644 index 1ea415ea9e..0000000000 --- a/arch/arm/mach-at91/armv7/reset.c +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2007-2008 - * Stelian Pop - * Lead Tech Design - * - * (C) Copyright 2013 - * Bo Shen - */ - -#include -#include -#include -#include -#include - -/* Reset the cpu by telling the reset controller to do so */ -void reset_cpu(void) -{ - at91_rstc_t *rstc = (at91_rstc_t *)ATMEL_BASE_RSTC; - - writel(AT91_RSTC_KEY - | AT91_RSTC_CR_PROCRST /* Processor Reset */ - | AT91_RSTC_CR_PERRST /* Peripheral Reset */ -#ifdef CONFIG_AT91RESET_EXTRST - | AT91_RSTC_CR_EXTRST /* External Reset (assert nRST pin) */ -#endif - , &rstc->cr); - /* never reached */ - do { } while (1); -} From e135d2c2f385fc1cefcea64cf775c6f0267945a2 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Mon, 4 Apr 2022 11:35:50 +0300 Subject: [PATCH 09/15] timers: atmel_tcb: introduce CONFIG_SPL_ATMEL_TCB This commit allows the ATMEL_TCB driver to be unselected in SPL and be selected in u-boot proper. The SPL can use a different timer. By having a separate Kconfig for ATMEL_TCB in SPL, the size of the SPL decreases by 1 KByte. Signed-off-by: Eugen Hristev --- configs/sama5d2_icp_mmc_defconfig | 1 + configs/sama5d2_xplained_emmc_defconfig | 1 + configs/sama5d2_xplained_mmc_defconfig | 1 + configs/sama5d2_xplained_qspiflash_defconfig | 1 + configs/sama5d2_xplained_spiflash_defconfig | 1 + drivers/timer/Kconfig | 8 ++++++++ drivers/timer/Makefile | 2 +- 7 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig index e839d1710a..37f2798608 100644 --- a/configs/sama5d2_icp_mmc_defconfig +++ b/configs/sama5d2_icp_mmc_defconfig @@ -86,5 +86,6 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y +CONFIG_SPL_ATMEL_TCB_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set diff --git a/configs/sama5d2_xplained_emmc_defconfig b/configs/sama5d2_xplained_emmc_defconfig index 478a3cfc8b..06b337ef8b 100644 --- a/configs/sama5d2_xplained_emmc_defconfig +++ b/configs/sama5d2_xplained_emmc_defconfig @@ -94,6 +94,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y +CONFIG_SPL_ATMEL_TCB_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 071758fe00..871ade2135 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -96,6 +96,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y +CONFIG_SPL_ATMEL_TCB_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d2_xplained_qspiflash_defconfig b/configs/sama5d2_xplained_qspiflash_defconfig index bf7368b512..59f62c51d7 100644 --- a/configs/sama5d2_xplained_qspiflash_defconfig +++ b/configs/sama5d2_xplained_qspiflash_defconfig @@ -96,6 +96,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y +CONFIG_SPL_ATMEL_TCB_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index e1d01b43fa..ec2091d1b0 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -100,6 +100,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y +CONFIG_SPL_ATMEL_TCB_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index 672746a181..68e90b8660 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -98,6 +98,14 @@ config ATMEL_TCB_TIMER Select this to enable the use of the timer counter as a monotonic counter. +config SPL_ATMEL_TCB_TIMER + bool "Atmel timer counter support in SPL" + depends on SPL_TIMER + depends on ARCH_AT91 + help + Select this to enable the use of the timer counter as a monotonic + counter in SPL. + config CADENCE_TTC_TIMER bool "Cadence TTC (Triple Timer Counter)" depends on TIMER diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile index 17f9f1d044..ae01a258e3 100644 --- a/drivers/timer/Makefile +++ b/drivers/timer/Makefile @@ -8,7 +8,7 @@ obj-$(CONFIG_ANDES_PLMT_TIMER) += andes_plmt_timer.o obj-$(CONFIG_ARC_TIMER) += arc_timer.o obj-$(CONFIG_AST_TIMER) += ast_timer.o obj-$(CONFIG_ATMEL_PIT_TIMER) += atmel_pit_timer.o -obj-$(CONFIG_ATMEL_TCB_TIMER) += atmel_tcb_timer.o +obj-$(CONFIG_$(SPL_)ATMEL_TCB_TIMER) += atmel_tcb_timer.o obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence-ttc.o obj-$(CONFIG_DESIGNWARE_APB_TIMER) += dw-apb-timer.o obj-$(CONFIG_MPC83XX_TIMER) += mpc83xx_timer.o From 632422d4b333f3580b9fd28c424ff728ed3d3bad Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Mon, 4 Apr 2022 11:35:51 +0300 Subject: [PATCH 10/15] timers: atmel_pit: introduce CONFIG_SPL_ATMEL_PIT_TIMER This commit allows the ATMEL_PIT_TIMER driver to be unselected in SPL and be selected in u-boot proper. The SPL can use a different timer. By having a separate Kconfig for ATMEL_TCB in SPL, the size of the SPL decreases by 0.3 KBytes. Signed-off-by: Eugen Hristev --- configs/gardena-smart-gateway-at91sam_defconfig | 1 + configs/sama5d27_giantboard_defconfig | 1 + configs/sama5d27_som1_ek_mmc1_defconfig | 1 + configs/sama5d27_som1_ek_mmc_defconfig | 1 + configs/sama5d27_som1_ek_qspiflash_defconfig | 1 + configs/sama5d27_wlsom1_ek_mmc_defconfig | 1 + configs/sama5d27_wlsom1_ek_qspiflash_defconfig | 1 + configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + configs/sama5d3xek_mmc_defconfig | 1 + configs/sama5d3xek_nandflash_defconfig | 1 + configs/sama5d3xek_spiflash_defconfig | 1 + configs/sama5d4_xplained_mmc_defconfig | 1 + configs/sama5d4_xplained_nandflash_defconfig | 1 + configs/sama5d4_xplained_spiflash_defconfig | 1 + configs/sama5d4ek_mmc_defconfig | 1 + configs/sama5d4ek_nandflash_defconfig | 1 + configs/sama5d4ek_spiflash_defconfig | 1 + drivers/timer/Kconfig | 9 +++++++++ drivers/timer/Makefile | 3 ++- 20 files changed, 29 insertions(+), 1 deletion(-) diff --git a/configs/gardena-smart-gateway-at91sam_defconfig b/configs/gardena-smart-gateway-at91sam_defconfig index 9c000d10b2..dd61b834a9 100644 --- a/configs/gardena-smart-gateway-at91sam_defconfig +++ b/configs/gardena-smart-gateway-at91sam_defconfig @@ -101,6 +101,7 @@ CONFIG_ATMEL_USART=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y # CONFIG_SYS_WHITE_ON_BLACK is not set CONFIG_WDT=y CONFIG_WDT_AT91=y diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig index 83646853a2..4855e0f072 100644 --- a/configs/sama5d27_giantboard_defconfig +++ b/configs/sama5d27_giantboard_defconfig @@ -77,6 +77,7 @@ CONFIG_DM_SPI=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_som1_ek_mmc1_defconfig b/configs/sama5d27_som1_ek_mmc1_defconfig index cee060b916..d0ff6a9012 100644 --- a/configs/sama5d27_som1_ek_mmc1_defconfig +++ b/configs/sama5d27_som1_ek_mmc1_defconfig @@ -95,6 +95,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig index 3a7b338deb..8096ec7b61 100644 --- a/configs/sama5d27_som1_ek_mmc_defconfig +++ b/configs/sama5d27_som1_ek_mmc_defconfig @@ -95,6 +95,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_som1_ek_qspiflash_defconfig b/configs/sama5d27_som1_ek_qspiflash_defconfig index acc0dc116e..e0b11e9198 100644 --- a/configs/sama5d27_som1_ek_qspiflash_defconfig +++ b/configs/sama5d27_som1_ek_qspiflash_defconfig @@ -94,6 +94,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_wlsom1_ek_mmc_defconfig b/configs/sama5d27_wlsom1_ek_mmc_defconfig index d86974341b..a0e37fa74d 100644 --- a/configs/sama5d27_wlsom1_ek_mmc_defconfig +++ b/configs/sama5d27_wlsom1_ek_mmc_defconfig @@ -100,6 +100,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_wlsom1_ek_qspiflash_defconfig b/configs/sama5d27_wlsom1_ek_qspiflash_defconfig index c029fd5192..8acb8f2242 100644 --- a/configs/sama5d27_wlsom1_ek_qspiflash_defconfig +++ b/configs/sama5d27_wlsom1_ek_qspiflash_defconfig @@ -104,6 +104,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index 04d6214817..ff74988f46 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -90,6 +90,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index 9a1a6376fd..ba7ffd47d7 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -93,6 +93,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig index 71c2caec38..4c8294252c 100644 --- a/configs/sama5d3xek_mmc_defconfig +++ b/configs/sama5d3xek_mmc_defconfig @@ -98,6 +98,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig index dd7713a8a9..977eafd5c3 100644 --- a/configs/sama5d3xek_nandflash_defconfig +++ b/configs/sama5d3xek_nandflash_defconfig @@ -100,6 +100,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig index 838cff6d2d..f2c5576c22 100644 --- a/configs/sama5d3xek_spiflash_defconfig +++ b/configs/sama5d3xek_spiflash_defconfig @@ -99,6 +99,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index 060beb75d0..d147c3e0c3 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -91,6 +91,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index ac662c95f7..8db8ee36d5 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -95,6 +95,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index 6035105d02..0407f7d576 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -97,6 +97,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index 02a3955cc0..d143569c96 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -89,6 +89,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index e76fe59c90..3a037b93b9 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -93,6 +93,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index 4472b66ab0..fb4c58c434 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -92,6 +92,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index 68e90b8660..92050179c2 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -90,6 +90,15 @@ config ATMEL_PIT_TIMER it is designed to offer maximum accuracy and efficient management, even for systems with long response time. +config SPL_ATMEL_PIT_TIMER + bool "Atmel periodic interval timer support in SPL" + depends on SPL_TIMER + help + Select this to enable a periodic interval timer for Atmel devices, + it is designed to offer maximum accuracy and efficient management, + even for systems with long response time. + Select this to be available in SPL. + config ATMEL_TCB_TIMER bool "Atmel timer counter support" depends on TIMER diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile index ae01a258e3..35cc490db1 100644 --- a/drivers/timer/Makefile +++ b/drivers/timer/Makefile @@ -7,7 +7,8 @@ obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o obj-$(CONFIG_ANDES_PLMT_TIMER) += andes_plmt_timer.o obj-$(CONFIG_ARC_TIMER) += arc_timer.o obj-$(CONFIG_AST_TIMER) += ast_timer.o -obj-$(CONFIG_ATMEL_PIT_TIMER) += atmel_pit_timer.o +obj-$(CONFIG_ATCPIT100_TIMER) += atcpit100_timer.o +obj-$(CONFIG_$(SPL_)ATMEL_PIT_TIMER) += atmel_pit_timer.o obj-$(CONFIG_$(SPL_)ATMEL_TCB_TIMER) += atmel_tcb_timer.o obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence-ttc.o obj-$(CONFIG_DESIGNWARE_APB_TIMER) += dw-apb-timer.o From 3fbdd485fd87ce0d4e1b747aea3c433646f4ced2 Mon Sep 17 00:00:00 2001 From: Durai Manickam KR Date: Mon, 4 Apr 2022 16:00:00 +0530 Subject: [PATCH 11/15] ARM: dts: sam9x60: Add pit64b node Add DT node for pit64b support. Signed-off-by: Durai Manickam KR --- arch/arm/dts/sam9x60.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/dts/sam9x60.dtsi b/arch/arm/dts/sam9x60.dtsi index 733cc5cec9..a5c429eb3a 100644 --- a/arch/arm/dts/sam9x60.dtsi +++ b/arch/arm/dts/sam9x60.dtsi @@ -235,6 +235,13 @@ clocks = <&pmc PMC_TYPE_CORE 11>; /* ID_MCK. */ }; + pit64b0: timer@f0028000 { + compatible = "microchip,sam9x60-pit64b"; + reg = <0xf0028000 0xec>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 37>, <&pmc PMC_TYPE_GCK 37>; + clock-names = "pclk", "gclk"; + }; + clk32: sckc@fffffe50 { compatible = "microchip,sam9x60-sckc"; reg = <0xfffffe50 0x4>; From 66692917003cd77ec0271b5c197aded70d1ed14b Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Thu, 7 Apr 2022 09:58:48 +0300 Subject: [PATCH 12/15] include: configs: at91/sam: remove stray #ifdef/#else With the commit that moves the BOOTCOMMAND to Kconfig: 970bf8603b ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") some stray ifdefs have been left in the header files which are now useless. Clean up the include files to remove these lines. Fixes: 970bf8603b ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") Signed-off-by: Eugen Hristev --- include/configs/at91-sama5_common.h | 11 ----------- include/configs/at91sam9m10g45ek.h | 6 ------ include/configs/at91sam9n12ek.h | 9 --------- include/configs/sam9x60ek.h | 10 ---------- include/configs/sama5d27_som1_ek.h | 4 ---- include/configs/sama5d2_xplained.h | 12 ------------ 6 files changed, 52 deletions(-) diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h index 669a8ec7c7..4631acfd66 100644 --- a/include/configs/at91-sama5_common.h +++ b/include/configs/at91-sama5_common.h @@ -15,15 +15,4 @@ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */ -#ifdef CONFIG_SD_BOOT -#else - -#ifdef CONFIG_NAND_BOOT -/* u-boot env in nand flash */ -#elif CONFIG_SPI_BOOT -/* u-boot env in serial flash, by default is bus 0 and cs 0 */ -#endif - -#endif - #endif diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h index 014a7c98fc..38b9061080 100644 --- a/include/configs/at91sam9m10g45ek.h +++ b/include/configs/at91sam9m10g45ek.h @@ -40,12 +40,6 @@ #endif -#ifdef CONFIG_NAND_BOOT -/* bootstrap + u-boot + env in nandflash */ -#elif CONFIG_SD_BOOT -/* bootstrap + u-boot + env + linux in mmc */ -#endif - /* Defines for SPL */ #define CONFIG_SPL_MAX_SIZE 0x010000 #define CONFIG_SPL_STACK 0x310000 diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h index cd7c271cdc..7d378177b0 100644 --- a/include/configs/at91sam9n12ek.h +++ b/include/configs/at91sam9n12ek.h @@ -59,15 +59,6 @@ #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1 #endif -#ifdef CONFIG_SPI_BOOT - -/* bootstrap + u-boot + env + linux in dataflash on CS0 */ - -#elif defined(CONFIG_NAND_BOOT) - -/* bootstrap + u-boot + env + linux in nandflash */ -#endif - /* SPL */ #define CONFIG_SPL_MAX_SIZE 0x6000 #define CONFIG_SPL_STACK 0x308000 diff --git a/include/configs/sam9x60ek.h b/include/configs/sam9x60ek.h index 772805d624..c965fcb4e8 100644 --- a/include/configs/sam9x60ek.h +++ b/include/configs/sam9x60ek.h @@ -40,14 +40,4 @@ #define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5 #endif -#ifdef CONFIG_SD_BOOT -/* bootstrap + u-boot + env + linux in sd card */ - -#elif defined(CONFIG_NAND_BOOT) -/* bootstrap + u-boot + env + linux in nandflash */ - -#elif defined(CONFIG_QSPI_BOOT) -/* bootstrap + u-boot + env + linux in SPI NOR flash */ -#endif - #endif diff --git a/include/configs/sama5d27_som1_ek.h b/include/configs/sama5d27_som1_ek.h index f7d8fb6352..b9144584e3 100644 --- a/include/configs/sama5d27_som1_ek.h +++ b/include/configs/sama5d27_som1_ek.h @@ -21,10 +21,6 @@ (0x22000000 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) #endif -#ifdef CONFIG_SD_BOOT -/* bootstrap + u-boot + env in sd card */ -#endif - /* SPL */ #define CONFIG_SPL_MAX_SIZE 0x10000 #define CONFIG_SPL_BSS_START_ADDR 0x20000000 diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index 11c13c65d8..cab6ae5069 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -18,18 +18,6 @@ (0x22000000 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) #endif -/* SerialFlash */ - -#ifdef CONFIG_SD_BOOT - -/* bootstrap + u-boot + env in sd card */ - -#elif CONFIG_SPI_BOOT - -/* bootstrap + u-boot + env in sd card, but kernel + dtb in eMMC */ - -#endif - /* SPL */ #define CONFIG_SPL_MAX_SIZE 0x10000 #define CONFIG_SPL_BSS_START_ADDR 0x20000000 From 20ced4b22af212874e033a64567b82b469dcd612 Mon Sep 17 00:00:00 2001 From: Tudor Ambarus Date: Fri, 8 Apr 2022 11:40:26 +0300 Subject: [PATCH 13/15] spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller Use the spi_mem_default_supports_op() core helper in order to take into account the buswidth specified by the user in device tree. Fixes: 24c8ff4684 ("spi: Add Atmel QuadSPI driver") Signed-off-by: Tudor Ambarus --- drivers/spi/atmel-quadspi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 098298336d..cb64119f97 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -438,6 +438,9 @@ static bool atmel_qspi_supports_op(struct spi_slave *slave, { struct atmel_qspi *aq = dev_get_priv(slave->dev->parent); + if (!spi_mem_default_supports_op(slave, op)) + return false; + if (aq->caps->octal) { if (atmel_qspi_sama7g5_find_mode(op) < 0) return false; From 51ca6a2583474f764edd3800f6fc0734506fed1d Mon Sep 17 00:00:00 2001 From: Tudor Ambarus Date: Fri, 8 Apr 2022 11:41:11 +0300 Subject: [PATCH 14/15] ARM: dts: at91: sama7g5: Fix QSPI1 clock QSPI1 used the clock of QSPI0, fix it. Fixes: 5eecc37bb1 ("ARM: dts: at91: sama7g5: Add QSPI0 and OSPI1 nodes") Signed-off-by: Tudor Ambarus --- arch/arm/dts/sama7g5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sama7g5.dtsi b/arch/arm/dts/sama7g5.dtsi index 7015bd7f6d..4efecdb92c 100644 --- a/arch/arm/dts/sama7g5.dtsi +++ b/arch/arm/dts/sama7g5.dtsi @@ -323,7 +323,7 @@ dma-names = "tx", "rx"; clocks = <&pmc PMC_TYPE_PERIPHERAL 79>, <&pmc PMC_TYPE_GCK 79>; clock-names = "pclk", "gclk"; - assigned-clocks = <&pmc PMC_TYPE_GCK 78>; + assigned-clocks = <&pmc PMC_TYPE_GCK 79>; assigned-clock-parents = <&pmc PMC_TYPE_CORE 10>; /* sys pll div. */ #address-cells = <1>; #size-cells = <0>; From 1b0eec3c9f04f9cb9d5e5ceac21da140e69a13f8 Mon Sep 17 00:00:00 2001 From: Tudor Ambarus Date: Fri, 8 Apr 2022 12:10:36 +0300 Subject: [PATCH 15/15] ARM: dts: at91: sama7g5ek: Align the impedance of the QSPI0's HSIO and PCB lines The impedance of the QSPI PCB lines on the sama7g5ek is 50 Ohms. Align the output impedance of the QSPI0 HSIOs by setting a medium drive strength which corresponds to an impedance of 56 Ohms when VDD is in the 3.0V - 3.6V range. The high drive strength setting corresponds to an output impedance of 42 Ohms on the QSPI0 HSIOs. This is just a fine tunning. The memory that we have populated on sama7g5ek works fine even with high drive strength, but it's better to adjust it and use medium instead, in case some other flashes with higher frequencies are tested. Suggested-by: Mihai Sain Signed-off-by: Tudor Ambarus --- arch/arm/dts/at91-sama7g5ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/at91-sama7g5ek.dts b/arch/arm/dts/at91-sama7g5ek.dts index 5313c6d160..ee46112b08 100644 --- a/arch/arm/dts/at91-sama7g5ek.dts +++ b/arch/arm/dts/at91-sama7g5ek.dts @@ -667,7 +667,7 @@ ; bias-disable; slew-rate = <0>; - atmel,drive-strength = ; + atmel,drive-strength = ; }; pinctrl_sdmmc0_default: sdmmc0_default {