From 38742c748562d0faee9f6831858322e7b5feb670 Mon Sep 17 00:00:00 2001 From: Oliver Gaskell Date: Thu, 12 Sep 2024 16:50:54 +0100 Subject: arm: SC598-SOM-EZKIT initial support Adds support for Analog Devices' SC598-SOM-EZKIT board. Includes: - CONFIG options common to all SC5xx SoCs - SoC specific configs in mach-sc5xx/Kconfig - SPL config options in common/spl/Kconfig - Memory Map for SPL - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa Signed-off-by: Greg Malysa Co-developed-by: Nathan Barrett-Morrison Signed-off-by: Nathan Barrett-Morrison Co-developed-by: Trevor Woerner Signed-off-by: Trevor Woerner Signed-off-by: Oliver Gaskell --- include/configs/sc598-som.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/configs/sc598-som.h (limited to 'include') diff --git a/include/configs/sc598-som.h b/include/configs/sc598-som.h new file mode 100644 index 00000000000..964c694bbe7 --- /dev/null +++ b/include/configs/sc598-som.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#ifndef __CONFIG_SC598_SOM_H +#define __CONFIG_SC598_SOM_H + +/* + * Memory Settings + */ +#define MEM_IS43TR16512BL +#define MEM_ISSI_4Gb_DDR3_800MHZ +#define MEM_DMC0 + +#define CFG_SYS_SDRAM_BASE 0x90000000 +#define CFG_SYS_SDRAM_SIZE 0x0e000000 + +/* GIC */ +#define GICD_BASE 0x31200000 +#define GICR_BASE 0x31240000 + +#endif -- cgit v1.3.1 From e91d85e8fb9446ca9a0f396832637c0f586a0c39 Mon Sep 17 00:00:00 2001 From: Oliver Gaskell Date: Thu, 12 Sep 2024 16:50:56 +0100 Subject: arm: SC594-SOM-EZKIT initial support Adds support for Analog Devices' SC594-SOM-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - SPL config options in common/spl/Kconfig - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa Signed-off-by: Greg Malysa Co-developed-by: Trevor Woerner Signed-off-by: Trevor Woerner Co-developed-by: Nathan Barrett-Morrison Signed-off-by: Nathan Barrett-Morrison Co-developed-by: Ian Roberts Signed-off-by: Ian Roberts Signed-off-by: Oliver Gaskell --- Kconfig | 1 + arch/arm/mach-sc5xx/Kconfig | 17 +++- arch/arm/mach-sc5xx/Makefile | 1 + arch/arm/mach-sc5xx/sc59x-spl.c | 26 +++++ board/adi/sc594-som-ezkit/Kconfig | 133 ++++++++++++++++++++++++++ board/adi/sc594-som-ezkit/sc594-som-ezkit.env | 13 +++ common/spl/Kconfig | 7 +- include/configs/sc594-som.h | 19 ++++ 8 files changed, 213 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-sc5xx/sc59x-spl.c create mode 100644 board/adi/sc594-som-ezkit/Kconfig create mode 100644 board/adi/sc594-som-ezkit/sc594-som-ezkit.env create mode 100644 include/configs/sc594-som.h (limited to 'include') diff --git a/Kconfig b/Kconfig index 15961391609..f7971057510 100644 --- a/Kconfig +++ b/Kconfig @@ -646,6 +646,7 @@ config TEXT_BASE default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256 default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64 default 0x96000000 if ARCH_SC5XX && SC59X_64 + default 0xB2200000 if ARCH_SC5XX && SC59X hex "Text Base" help The address in memory that U-Boot will be copied and executed from diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index e3d3a4c89ec..e93f2144417 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -35,7 +35,7 @@ config SC59X bool "SC59x 32-bit series" select COMMON_CLK_ADI_SC594 select CPU_V7A - select NOP_PHY + select NOP_PHY if PHY config SC59X_64 bool "SC59x 64-bit series" @@ -49,6 +49,20 @@ config SC59X_64 endchoice +if SC59X + +choice + prompt "SC59x 32-bit board select" + +config TARGET_SC594_SOM_EZKIT + bool + prompt "SC594-SOM with SOMCRR-EZKIT" + select ADI_CARRIER_SOMCRR_EZKIT + +endchoice + +endif + if SC59X_64 choice @@ -509,5 +523,6 @@ config PINCTRL_ADI source "board/adi/sc598-som-ezkit/Kconfig" source "board/adi/sc598-som-ezlite/Kconfig" +source "board/adi/sc594-som-ezkit/Kconfig" endif diff --git a/arch/arm/mach-sc5xx/Makefile b/arch/arm/mach-sc5xx/Makefile index 0955c509a50..a8079b6120e 100644 --- a/arch/arm/mach-sc5xx/Makefile +++ b/arch/arm/mach-sc5xx/Makefile @@ -13,6 +13,7 @@ obj-y += soc.o init/ obj-$(CONFIG_SC57X) += sc57x.o obj-$(CONFIG_SC58X) += sc58x.o obj-$(CONFIG_SC59X) += sc59x.o +obj-$(CONFIG_SC59X) += sc59x-spl.o obj-$(CONFIG_SC59X_64) += sc59x_64.o obj-$(CONFIG_SC59X_64) += sc59x_64-spl.o diff --git a/arch/arm/mach-sc5xx/sc59x-spl.c b/arch/arm/mach-sc5xx/sc59x-spl.c new file mode 100644 index 00000000000..c8fc25fe7c4 --- /dev/null +++ b/arch/arm/mach-sc5xx/sc59x-spl.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +// Table 45-14 in sc594 HRM +const struct adi_boot_args adi_rom_boot_args[] = { + // JTAG/no boot + [0] = {0, 0, 0}, + // SPI master, used for qspi as well + [1] = {0x60040000, 0x00040000, 0x20620247}, + // SPI slave + [2] = {0, 0, 0x00000212}, + // UART slave + [3] = {0, 0, 0x00000013}, + // Linkport slave + [4] = {0, 0, 0x00000014}, + // OSPI master + [5] = {0x60040000, 0, 0x00000008}, + // reserved, no boot + [6] = {0, 0, 0}, + // reserved, also no boot + [7] = {0, 0, 0} +}; diff --git a/board/adi/sc594-som-ezkit/Kconfig b/board/adi/sc594-som-ezkit/Kconfig new file mode 100644 index 00000000000..ff9231b393c --- /dev/null +++ b/board/adi/sc594-som-ezkit/Kconfig @@ -0,0 +1,133 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# (C) Copyright 2024 - Analog Devices, Inc. + +if TARGET_SC594_SOM_EZKIT + +config LDR_CPU + default "ADSP-SC594-0.0" + +config SYS_BOARD + default "sc594-som-ezkit" + +config SYS_CONFIG_NAME + default "sc594-som" + +config DEFAULT_DEVICE_TREE + default "sc594-som-ezkit" + +config ADI_IMAGE + default "minimal" + +config CUSTOM_SYS_INIT_SP_ADDR + default 0xA003f000 + +# SPL + +config SPL_OF_LIBFDT_ASSUME_MASK + default 0x0 + +# SPI Flash + +config SF_DEFAULT_BUS + default 2 + +config SF_DEFAULT_CS + default 1 + +config SF_DEFAULT_SPEED + default 10000000 + +# Clocks + +config CGU0_DF_DIV + default 0 + +config CGU0_VCO_MULT + default 80 + +config CGU0_CCLK_DIV + default 2 + +config CGU0_SCLK_DIV + default 4 + +config CGU0_SCLK0_DIV + default 4 + +config CGU0_SCLK1_DIV + default 2 + +config CGU0_DCLK_DIV + default 2 + +config CGU0_OCLK_DIV + default 16 + +config CGU0_DIV_S1SELEX + default 6 + +config CGU1_VCO_MULT + default 64 + +config CGU1_DF_DIV + default 0 + +config CGU1_CCLK_DIV + default 2 + +config CGU1_SCLK_DIV + default 4 + +config CGU1_SCLK0_DIV + default 4 + +config CGU1_SCLK1_DIV + default 2 + +config CGU1_DCLK_DIV + default 2 + +config CGU1_OCLK_DIV + default 16 + +config CGU1_DIV_S1SELEX + default 6 + +config CDU0_CLKO0 + default 1 + +config CDU0_CLKO1 + default 1 + +config CDU0_CLKO2 + default 1 + +config CDU0_CLKO3 + default 3 + +config CDU0_CLKO4 + default 3 + +config CDU0_CLKO5 + default 1 + +config CDU0_CLKO6 + default 1 + +config CDU0_CLKO7 + default 1 + +config CDU0_CLKO8 + default 3 + +config CDU0_CLKO9 + default 1 + +config CDU0_CLKO10 + default 1 + +config CDU0_CLKO12 + default 1 + +endif diff --git a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env new file mode 100644 index 00000000000..83d6b457a08 --- /dev/null +++ b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later+ */ + +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +adi_stage2_offset=0x40000 +adi_image_offset=0x0120000 +adi_rfs_offset=0x1020000 +loadaddr=0xA2000000 +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc594-som-ezkit.jffs2 diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 48775b04bb6..d46984b3eac 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -86,7 +86,7 @@ config SPL_MAX_SIZE default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0 default 0x10000 if ASPEED_AST2600 default 0x27000 if IMX8MM && SPL_TEXT_BASE = 0x7E1000 - default 0x30000 if ARCH_SC5XX && SC59X_64 + default 0x30000 if ARCH_SC5XX && (SC59X_64 || SC59X) default 0x0 help Maximum size of the SPL image (text, data, rodata, and linker lists @@ -123,7 +123,7 @@ config SPL_BSS_START_ADDR default 0x4ff80000 if ARCH_SUNXI && !(MACH_SUN9I || MACH_SUNIV) default 0x2ff80000 if ARCH_SUNXI && MACH_SUN9I default 0x1000 if ARCH_ZYNQMP - default 0x200B0000 if ARCH_SC5XX && SC59X_64 + default 0x200B0000 if ARCH_SC5XX && (SC59X_64 || SC59X) choice prompt "Enforce SPL BSS limit" @@ -394,7 +394,7 @@ config SPL_STACK default 0x54000 if MACH_SUN50I || MACH_SUN50I_H5 default 0x18000 if MACH_SUN9I default 0x8000 if ARCH_SUNXI - default 0x200E4000 if ARCH_SC5XX && SC59X_64 + default 0x200E4000 if ARCH_SC5XX && (SC59X_64 || SC59X) help Address of the start of the stack SPL will use before SDRAM is initialized. @@ -1130,6 +1130,7 @@ config SPL_PAYLOAD_ARGS_ADDR depends on SPL_OS_BOOT || SPL_LOAD_FIT_OPENSBI_OS_BOOT default 0x88000000 if ARCH_OMAP2PLUS default 0x99000000 if ARCH_SC5XX && SC59X_64 + default 0xA0000000 if ARCH_SC5XX && TARGET_SC594_SOM_EZKIT help Address in memory where the 'args' file, typically a device tree will be loaded in to memory. diff --git a/include/configs/sc594-som.h b/include/configs/sc594-som.h new file mode 100644 index 00000000000..ba9b0cdb0c0 --- /dev/null +++ b/include/configs/sc594-som.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#ifndef __CONFIG_SC594_SOM_H +#define __CONFIG_SC594_SOM_H + +/* + * Memory Settings + */ +#define MEM_IS43TR16512BL +#define MEM_ISSI_8Gb_DDR3_800MHZ +#define MEM_DMC0 + +#define CFG_SYS_SDRAM_BASE 0xA0000000 +#define CFG_SYS_SDRAM_SIZE 0x20000000 + +#endif -- cgit v1.3.1 From 07735eee98aac467a8539eaa02c3c64c73dfe864 Mon Sep 17 00:00:00 2001 From: Oliver Gaskell Date: Thu, 12 Sep 2024 16:50:58 +0100 Subject: arm: SC584-EZKIT initial support Adds support for Analog Devices' SC584-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - SPL config options in common/spl/Kconfig - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa Signed-off-by: Greg Malysa Co-developed-by: Trevor Woerner Signed-off-by: Trevor Woerner Co-developed-by: Nathan Barrett-Morrison Signed-off-by: Nathan Barrett-Morrison Signed-off-by: Oliver Gaskell --- Kconfig | 1 + arch/arm/mach-sc5xx/Kconfig | 15 +++++ arch/arm/mach-sc5xx/Makefile | 1 + arch/arm/mach-sc5xx/sc58x-spl.c | 26 ++++++++ board/adi/sc584-ezkit/Kconfig | 116 ++++++++++++++++++++++++++++++++++ board/adi/sc584-ezkit/sc584-ezkit.env | 13 ++++ common/spl/Kconfig | 3 + include/configs/sc584-ezkit.h | 18 ++++++ 8 files changed, 193 insertions(+) create mode 100644 arch/arm/mach-sc5xx/sc58x-spl.c create mode 100644 board/adi/sc584-ezkit/Kconfig create mode 100644 board/adi/sc584-ezkit/sc584-ezkit.env create mode 100644 include/configs/sc584-ezkit.h (limited to 'include') diff --git a/Kconfig b/Kconfig index f7971057510..2422b94e6d2 100644 --- a/Kconfig +++ b/Kconfig @@ -647,6 +647,7 @@ config TEXT_BASE default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64 default 0x96000000 if ARCH_SC5XX && SC59X_64 default 0xB2200000 if ARCH_SC5XX && SC59X + default 0x89200000 if ARCH_SC5XX && TARGET_SC584_EZKIT hex "Text Base" help The address in memory that U-Boot will be copied and executed from diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index b57c21cf165..ac2b6699402 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -49,6 +49,20 @@ config SC59X_64 endchoice +if SC58X + +choice + prompt "SC58x board select" + +config TARGET_SC584_EZKIT + bool + prompt "SC584-EZKIT" + select ADI_USE_DDR2 + +endchoice + +endif + if SC59X choice @@ -530,5 +544,6 @@ source "board/adi/sc598-som-ezkit/Kconfig" source "board/adi/sc598-som-ezlite/Kconfig" source "board/adi/sc594-som-ezkit/Kconfig" source "board/adi/sc594-som-ezlite/Kconfig" +source "board/adi/sc584-ezkit/Kconfig" endif diff --git a/arch/arm/mach-sc5xx/Makefile b/arch/arm/mach-sc5xx/Makefile index a8079b6120e..9a00a430b49 100644 --- a/arch/arm/mach-sc5xx/Makefile +++ b/arch/arm/mach-sc5xx/Makefile @@ -12,6 +12,7 @@ obj-y += soc.o init/ obj-$(CONFIG_SC57X) += sc57x.o obj-$(CONFIG_SC58X) += sc58x.o +obj-$(CONFIG_SC58X) += sc58x-spl.o obj-$(CONFIG_SC59X) += sc59x.o obj-$(CONFIG_SC59X) += sc59x-spl.o obj-$(CONFIG_SC59X_64) += sc59x_64.o diff --git a/arch/arm/mach-sc5xx/sc58x-spl.c b/arch/arm/mach-sc5xx/sc58x-spl.c new file mode 100644 index 00000000000..ae809f09e55 --- /dev/null +++ b/arch/arm/mach-sc5xx/sc58x-spl.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +// Table 53-13 in SC58x HRM +const struct adi_boot_args adi_rom_boot_args[] = { + // JTAG/no boot + [0] = {0, 0, 0}, + // SPI master, used for qspi as well + [1] = {0x60020000, 0x00040000, 0x00010207}, + // SPI slave + [2] = {0, 0, 0x00000212}, + // reserved, no boot + [3] = {0, 0, 0}, + // reserved, no boot + [4] = {0, 0, 0}, + // reserved, also no boot + [5] = {0, 0, 0}, + // Linkport slave + [6] = {0, 0, 0x00000014}, + // UART slave + [7] = {0, 0, 0x00000013}, +}; diff --git a/board/adi/sc584-ezkit/Kconfig b/board/adi/sc584-ezkit/Kconfig new file mode 100644 index 00000000000..14c47f1d69d --- /dev/null +++ b/board/adi/sc584-ezkit/Kconfig @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# (C) Copyright 2024 - Analog Devices, Inc. + +if TARGET_SC584_EZKIT + +config LDR_CPU + default "ADSP-SC584-0.1" + +config SYS_BOARD + default "sc584-ezkit" + +config SYS_CONFIG_NAME + default "sc584-ezkit" + +config DEFAULT_DEVICE_TREE + default "sc584-ezkit" + +config ADI_IMAGE + default "tiny" + +config CUSTOM_SYS_INIT_SP_ADDR + default 0x8903f000 + +# SPI Flash + +config SF_DEFAULT_BUS + default 2 + +config SF_DEFAULT_CS + default 1 + +config SF_DEFAULT_SPEED + default 5000000 + +# Clocks + +config CGU0_DF_DIV + default 0 + +config CGU0_VCO_MULT + default 18 + +config CGU0_CCLK_DIV + default 1 + +config CGU0_SCLK_DIV + default 2 + +config CGU0_SCLK0_DIV + default 2 + +config CGU0_SCLK1_DIV + default 2 + +config CGU0_DCLK_DIV + default 2 + +config CGU0_OCLK_DIV + default 3 + +config CGU1_VCO_MULT + default 5 + +config CGU1_DF_DIV + default 0 + +config CGU1_CCLK_DIV + default 1 + +config CGU1_SCLK_DIV + default 2 + +config CGU1_SCLK0_DIV + default 2 + +config CGU1_SCLK1_DIV + default 2 + +config CGU1_DCLK_DIV + default 2 + +config CGU1_OCLK_DIV + default 3 + +config CDU0_CLKO0 + default 1 + +config CDU0_CLKO1 + default 1 + +config CDU0_CLKO2 + default 1 + +config CDU0_CLKO3 + default 1 + +config CDU0_CLKO4 + default 1 + +config CDU0_CLKO5 + default 1 + +config CDU0_CLKO6 + default 1 + +config CDU0_CLKO7 + default 5 + +config CDU0_CLKO8 + default 1 + +config CDU0_CLKO9 + default 1 + +endif diff --git a/board/adi/sc584-ezkit/sc584-ezkit.env b/board/adi/sc584-ezkit/sc584-ezkit.env new file mode 100644 index 00000000000..af9a9e01bcf --- /dev/null +++ b/board/adi/sc584-ezkit/sc584-ezkit.env @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later+ */ + +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +adi_stage2_offset=0x20000 +adi_image_offset=0xE0000 +adi_rfs_offset=0x6E0000 +loadaddr=0x89300000 +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc584-ezkit.jffs2 diff --git a/common/spl/Kconfig b/common/spl/Kconfig index e723ff19968..a7378bea8f2 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -87,6 +87,7 @@ config SPL_MAX_SIZE default 0x10000 if ASPEED_AST2600 default 0x27000 if IMX8MM && SPL_TEXT_BASE = 0x7E1000 default 0x30000 if ARCH_SC5XX && (SC59X_64 || SC59X) + default 0x20000 if ARCH_SC5XX && SC58X default 0x0 help Maximum size of the SPL image (text, data, rodata, and linker lists @@ -124,6 +125,7 @@ config SPL_BSS_START_ADDR default 0x2ff80000 if ARCH_SUNXI && MACH_SUN9I default 0x1000 if ARCH_ZYNQMP default 0x200B0000 if ARCH_SC5XX && (SC59X_64 || SC59X) + default 0x20080000 if ARCH_SC5XX && SC58X choice prompt "Enforce SPL BSS limit" @@ -395,6 +397,7 @@ config SPL_STACK default 0x18000 if MACH_SUN9I default 0x8000 if ARCH_SUNXI default 0x200E4000 if ARCH_SC5XX && (SC59X_64 || SC59X) + default 0x200B0000 if ARCH_SC5XX && SC58X help Address of the start of the stack SPL will use before SDRAM is initialized. diff --git a/include/configs/sc584-ezkit.h b/include/configs/sc584-ezkit.h new file mode 100644 index 00000000000..905836cc2cf --- /dev/null +++ b/include/configs/sc584-ezkit.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#ifndef __CONFIG_SC584_EZKIT_H +#define __CONFIG_SC584_EZKIT_H + +/* + * Memory Settings + */ +#define MEM_MT47H128M16RT +#define MEM_DMC0 + +#define CFG_SYS_SDRAM_BASE 0x89000000 +#define CFG_SYS_SDRAM_SIZE 0x7000000 + +#endif -- cgit v1.3.1 From 03ef0adcebcb548e5e4dc9a798227efaa1c16370 Mon Sep 17 00:00:00 2001 From: Oliver Gaskell Date: Thu, 12 Sep 2024 16:50:59 +0100 Subject: arm: SC589-EZKIT initial support Adds support for Analog Devices' SC589-EZKIT board. Includes: - Board specific configs in mach-sc5xx/Kconfig - Board-specific Kconfig and environment in board/adi/ - Memory configuration Signed-off-by: Oliver Gaskell --- Kconfig | 1 + arch/arm/mach-sc5xx/Kconfig | 5 ++ board/adi/sc589-ezkit/Kconfig | 116 ++++++++++++++++++++++++++++++++++ board/adi/sc589-ezkit/sc589-ezkit.env | 13 ++++ include/configs/sc589.h | 19 ++++++ 5 files changed, 154 insertions(+) create mode 100644 board/adi/sc589-ezkit/Kconfig create mode 100644 board/adi/sc589-ezkit/sc589-ezkit.env create mode 100644 include/configs/sc589.h (limited to 'include') diff --git a/Kconfig b/Kconfig index 2422b94e6d2..bdae1b01d3f 100644 --- a/Kconfig +++ b/Kconfig @@ -648,6 +648,7 @@ config TEXT_BASE default 0x96000000 if ARCH_SC5XX && SC59X_64 default 0xB2200000 if ARCH_SC5XX && SC59X default 0x89200000 if ARCH_SC5XX && TARGET_SC584_EZKIT + default 0xC2200000 if ARCH_SC5XX && TARGET_SC589_EZKIT hex "Text Base" help The address in memory that U-Boot will be copied and executed from diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index ac2b6699402..408b943fd67 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -59,6 +59,10 @@ config TARGET_SC584_EZKIT prompt "SC584-EZKIT" select ADI_USE_DDR2 +config TARGET_SC589_EZKIT + bool + prompt "SC589-EZKIT" + endchoice endif @@ -544,6 +548,7 @@ source "board/adi/sc598-som-ezkit/Kconfig" source "board/adi/sc598-som-ezlite/Kconfig" source "board/adi/sc594-som-ezkit/Kconfig" source "board/adi/sc594-som-ezlite/Kconfig" +source "board/adi/sc589-ezkit/Kconfig" source "board/adi/sc584-ezkit/Kconfig" endif diff --git a/board/adi/sc589-ezkit/Kconfig b/board/adi/sc589-ezkit/Kconfig new file mode 100644 index 00000000000..b5f555f3a21 --- /dev/null +++ b/board/adi/sc589-ezkit/Kconfig @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# (C) Copyright 2024 - Analog Devices, Inc. + +if TARGET_SC589_EZKIT + +config LDR_CPU + default "ADSP-SC589-0.1" + +config SYS_BOARD + default "sc589-ezkit" + +config SYS_CONFIG_NAME + default "sc589" + +config DEFAULT_DEVICE_TREE + default "sc589-ezkit" + +config ADI_IMAGE + default "tiny" + +config CUSTOM_SYS_INIT_SP_ADDR + default 0xC203f000 + +# SPI Flash + +config SF_DEFAULT_BUS + default 2 + +config SF_DEFAULT_CS + default 1 + +config SF_DEFAULT_SPEED + default 10000000 + +# Clocks + +config CGU0_DF_DIV + default 0 + +config CGU0_VCO_MULT + default 18 + +config CGU0_CCLK_DIV + default 1 + +config CGU0_SCLK_DIV + default 2 + +config CGU0_SCLK0_DIV + default 2 + +config CGU0_SCLK1_DIV + default 2 + +config CGU0_DCLK_DIV + default 1 + +config CGU0_OCLK_DIV + default 3 + +config CGU1_VCO_MULT + default 5 + +config CGU1_DF_DIV + default 0 + +config CGU1_CCLK_DIV + default 1 + +config CGU1_SCLK_DIV + default 2 + +config CGU1_SCLK0_DIV + default 2 + +config CGU1_SCLK1_DIV + default 2 + +config CGU1_DCLK_DIV + default 2 + +config CGU1_OCLK_DIV + default 3 + +config CDU0_CLKO0 + default 1 + +config CDU0_CLKO1 + default 1 + +config CDU0_CLKO2 + default 1 + +config CDU0_CLKO3 + default 1 + +config CDU0_CLKO4 + default 1 + +config CDU0_CLKO5 + default 1 + +config CDU0_CLKO6 + default 1 + +config CDU0_CLKO7 + default 5 + +config CDU0_CLKO8 + default 1 + +config CDU0_CLKO9 + default 1 + +endif diff --git a/board/adi/sc589-ezkit/sc589-ezkit.env b/board/adi/sc589-ezkit/sc589-ezkit.env new file mode 100644 index 00000000000..34b924992ac --- /dev/null +++ b/board/adi/sc589-ezkit/sc589-ezkit.env @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later+ */ + +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +adi_stage2_offset=0x20000 +adi_image_offset=0xE0000 +adi_rfs_offset=0x6E0000 +loadaddr=0xC3000000 +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc589-ezkit.jffs2 diff --git a/include/configs/sc589.h b/include/configs/sc589.h new file mode 100644 index 00000000000..137c80be8e5 --- /dev/null +++ b/include/configs/sc589.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#ifndef __CONFIG_SC589_H +#define __CONFIG_SC589_H + +/* + * Memory Settings + */ +#define MEM_MT41K128M16JT +#define MEM_DMC0 +#define MEM_DMC1 + +#define CFG_SYS_SDRAM_BASE 0xC2000000 +#define CFG_SYS_SDRAM_SIZE 0xe000000 + +#endif -- cgit v1.3.1 From 1083fa7577e3660c56b1690bb8aab30c6a3ffb25 Mon Sep 17 00:00:00 2001 From: Oliver Gaskell Date: Thu, 12 Sep 2024 16:51:01 +0100 Subject: arm: SC573-EZKIT initial support Adds support for Analog Devices' SC573-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa Signed-off-by: Greg Malysa Co-developed-by: Nathan Barrett-Morrison Signed-off-by: Nathan Barrett-Morrison Signed-off-by: Oliver Gaskell --- Kconfig | 1 + arch/arm/mach-sc5xx/Kconfig | 9 +++ arch/arm/mach-sc5xx/Makefile | 1 + arch/arm/mach-sc5xx/sc57x-spl.c | 26 ++++++++ board/adi/sc573-ezkit/Kconfig | 116 ++++++++++++++++++++++++++++++++++ board/adi/sc573-ezkit/sc573-ezkit.env | 13 ++++ common/spl/Kconfig | 4 +- include/configs/sc573-ezkit.h | 18 ++++++ 8 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-sc5xx/sc57x-spl.c create mode 100644 board/adi/sc573-ezkit/Kconfig create mode 100644 board/adi/sc573-ezkit/sc573-ezkit.env create mode 100644 include/configs/sc573-ezkit.h (limited to 'include') diff --git a/Kconfig b/Kconfig index 6853219dd52..709271ef0bc 100644 --- a/Kconfig +++ b/Kconfig @@ -649,6 +649,7 @@ config TEXT_BASE default 0xB2200000 if ARCH_SC5XX && SC59X default 0x89200000 if ARCH_SC5XX && TARGET_SC584_EZKIT default 0xC2200000 if ARCH_SC5XX && (TARGET_SC589_EZKIT || TARGET_SC589_MINI) + default 0x82200000 if ARCH_SC5XX && SC57X hex "Text Base" help The address in memory that U-Boot will be copied and executed from diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index 6f8ea453b08..30444f04fc4 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -25,6 +25,7 @@ config SC57X bool "SC57x series" select COMMON_CLK_ADI_SC57X select CPU_V7A + select TARGET_SC573_EZKIT config SC58X bool "SC58x series" @@ -49,6 +50,13 @@ config SC59X_64 endchoice +if SC57X + +config TARGET_SC573_EZKIT + bool "Support SC573-EZKIT" + +endif + if SC58X choice @@ -555,5 +563,6 @@ source "board/adi/sc594-som-ezlite/Kconfig" source "board/adi/sc589-ezkit/Kconfig" source "board/adi/sc589-mini/Kconfig" source "board/adi/sc584-ezkit/Kconfig" +source "board/adi/sc573-ezkit/Kconfig" endif diff --git a/arch/arm/mach-sc5xx/Makefile b/arch/arm/mach-sc5xx/Makefile index 9a00a430b49..cac768ba565 100644 --- a/arch/arm/mach-sc5xx/Makefile +++ b/arch/arm/mach-sc5xx/Makefile @@ -11,6 +11,7 @@ obj-y += soc.o init/ obj-$(CONFIG_SC57X) += sc57x.o +obj-$(CONFIG_SC57X) += sc57x-spl.o obj-$(CONFIG_SC58X) += sc58x.o obj-$(CONFIG_SC58X) += sc58x-spl.o obj-$(CONFIG_SC59X) += sc59x.o diff --git a/arch/arm/mach-sc5xx/sc57x-spl.c b/arch/arm/mach-sc5xx/sc57x-spl.c new file mode 100644 index 00000000000..28380b89b48 --- /dev/null +++ b/arch/arm/mach-sc5xx/sc57x-spl.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +// Table 45-16 in SC573 HRM +const struct adi_boot_args adi_rom_boot_args[] = { + // JTAG/no boot + [0] = {0, 0, 0}, + // SPI master, used for qspi as well + [1] = {0x60020000, 0x00040000, 0x00010207}, + // SPI slave + [2] = {0, 0, 0x00000212}, + // UART slave + [3] = {0, 0, 0x00000013}, + // Linkport slave + [4] = {0, 0, 0x00000014}, + // reserved, no boot + [5] = {0, 0, 0}, + // reserved, no boot + [6] = {0, 0, 0}, + // reserved, also no boot + [7] = {0, 0, 0} +}; diff --git a/board/adi/sc573-ezkit/Kconfig b/board/adi/sc573-ezkit/Kconfig new file mode 100644 index 00000000000..328563c1296 --- /dev/null +++ b/board/adi/sc573-ezkit/Kconfig @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# (C) Copyright 2024 - Analog Devices, Inc. + +if TARGET_SC573_EZKIT + +config SYS_BOARD + default "sc573-ezkit" + +config SYS_CONFIG_NAME + default "sc573-ezkit" + +config LDR_CPU + default "ADSP-SC573-0.0" + +config DEFAULT_DEVICE_TREE + default "sc573-ezkit" + +config ADI_IMAGE + default "tiny" + +config CUSTOM_SYS_INIT_SP_ADDR + default 0x8203f000 + +# SPI Flash + +config SF_DEFAULT_BUS + default 2 + +config SF_DEFAULT_CS + default 1 + +config SF_DEFAULT_SPEED + default 10000000 + +# Clocks + +config CGU0_DF_DIV + default 0 + +config CGU0_VCO_MULT + default 18 + +config CGU0_CCLK_DIV + default 1 + +config CGU0_SCLK_DIV + default 2 + +config CGU0_SCLK0_DIV + default 2 + +config CGU0_SCLK1_DIV + default 2 + +config CGU0_DCLK_DIV + default 2 + +config CGU0_OCLK_DIV + default 3 + +config CGU1_VCO_MULT + default 5 + +config CGU1_DF_DIV + default 0 + +config CGU1_CCLK_DIV + default 1 + +config CGU1_SCLK_DIV + default 2 + +config CGU1_SCLK0_DIV + default 2 + +config CGU1_SCLK1_DIV + default 2 + +config CGU1_DCLK_DIV + default 2 + +config CGU1_OCLK_DIV + default 3 + +config CDU0_CLKO0 + default 1 + +config CDU0_CLKO1 + default 1 + +config CDU0_CLKO2 + default 1 + +config CDU0_CLKO3 + default 1 + +config CDU0_CLKO4 + default 1 + +config CDU0_CLKO5 + default 1 + +config CDU0_CLKO6 + default 1 + +config CDU0_CLKO7 + default 5 + +config CDU0_CLKO8 + default 1 + +config CDU0_CLKO9 + default 1 + +endif diff --git a/board/adi/sc573-ezkit/sc573-ezkit.env b/board/adi/sc573-ezkit/sc573-ezkit.env new file mode 100644 index 00000000000..26f7b6cb799 --- /dev/null +++ b/board/adi/sc573-ezkit/sc573-ezkit.env @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later+ */ + +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#include + +adi_stage2_offset=0x20000 +adi_image_offset=0xE0000 +adi_rfs_offset=0x6E0000 +loadaddr=0x83000000 +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc573-ezkit.jffs2 diff --git a/common/spl/Kconfig b/common/spl/Kconfig index a7378bea8f2..6dc0b6444c3 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -87,7 +87,7 @@ config SPL_MAX_SIZE default 0x10000 if ASPEED_AST2600 default 0x27000 if IMX8MM && SPL_TEXT_BASE = 0x7E1000 default 0x30000 if ARCH_SC5XX && (SC59X_64 || SC59X) - default 0x20000 if ARCH_SC5XX && SC58X + default 0x20000 if ARCH_SC5XX && (SC58X || SC57X) default 0x0 help Maximum size of the SPL image (text, data, rodata, and linker lists @@ -126,6 +126,7 @@ config SPL_BSS_START_ADDR default 0x1000 if ARCH_ZYNQMP default 0x200B0000 if ARCH_SC5XX && (SC59X_64 || SC59X) default 0x20080000 if ARCH_SC5XX && SC58X + default 0x200A0000 if ARCH_SC5XX && SC57X choice prompt "Enforce SPL BSS limit" @@ -398,6 +399,7 @@ config SPL_STACK default 0x8000 if ARCH_SUNXI default 0x200E4000 if ARCH_SC5XX && (SC59X_64 || SC59X) default 0x200B0000 if ARCH_SC5XX && SC58X + default 0x200D0000 if ARCH_SC5XX && SC57X help Address of the start of the stack SPL will use before SDRAM is initialized. diff --git a/include/configs/sc573-ezkit.h b/include/configs/sc573-ezkit.h new file mode 100644 index 00000000000..42e42f8150b --- /dev/null +++ b/include/configs/sc573-ezkit.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * (C) Copyright 2024 - Analog Devices, Inc. + */ + +#ifndef __CONFIG_SC573_EZKIT_H +#define __CONFIG_SC573_EZKIT_H + +/* + * Memory Settings + */ +#define MEM_MT41K128M16JT +#define MEM_DMC0 + +#define CFG_SYS_SDRAM_BASE 0x82000000 +#define CFG_SYS_SDRAM_SIZE 0xe000000 + +#endif -- cgit v1.3.1