Add support for Stratix 10 SoC
Subsystems (3)
v2 cover Add support for Stratix 10 SoC
Add support for Stratix 10 SoC which is ARM64 based. This series of patches are tested with Stratix 10 SOC Virtual Platform that is available today.
---
Chin Liang See (11):
arm: socfpga: stratix10: Add SOCFPGA Stratix10 base address
arm: socfpga: rstmgr: Add Reset Manager for Stratix 10
arm: socfpga: rstmgr: Segregate the Reset Manager for Stratix 10
arm: socfpga: clkmgr: Segregate the Clock Manager for Stratix 10
arm: socfpga: fpgamgr: Segregate the FPGA Manager for Stratix 10
arm: socfpga: misc: Segregate the misc.c for Stratix 10
arm: socfpga: sysmgr: Fix casting warning when enabling ARM64
arm: socfpga: mmu: Add memory map layout for Stratix 10 SoC
arm: socfpga: stratix10: Add board folder for Stratix 10 socdk
arm: dts: socfpga: Add dts for Stratix 10 socdk
arm: socfpga: Add support for Stratix 10 SoC dev kit
arch/arm/Kconfig | 7 +- arch/arm/dts/Makefile | 3 +- arch/arm/dts/socfpga_stratix10_socdk.dts | 64 ++++++++++ arch/arm/mach-socfpga/Kconfig | 10 ++ arch/arm/mach-socfpga/Makefile | 2 + arch/arm/mach-socfpga/clock_manager.c | 8 ++ arch/arm/mach-socfpga/fpga_manager.c | 4 + arch/arm/mach-socfpga/include/mach/base_addr_s10.h | 48 ++++++++ arch/arm/mach-socfpga/include/mach/reset_manager.h | 32 +++++ arch/arm/mach-socfpga/misc.c | 12 ++ arch/arm/mach-socfpga/mmu-arm64.c | 71 +++++++++++ arch/arm/mach-socfpga/reset_manager.c | 12 ++ arch/arm/mach-socfpga/system_manager.c | 2 +- board/altera/stratix10-socdk/MAINTAINERS | 8 ++ board/altera/stratix10-socdk/Makefile | 7 ++ board/altera/stratix10-socdk/socfpga.c | 7 ++ configs/socfpga_stratix10_defconfig | 14 +++ include/configs/socfpga_stratix10_socdk.h | 135 +++++++++++++++++++++ 18 files changed, 441 insertions(+), 5 deletions(-) create mode 100755 arch/arm/dts/socfpga_stratix10_socdk.dts create mode 100755 arch/arm/mach-socfpga/include/mach/base_addr_s10.h create mode 100755 arch/arm/mach-socfpga/mmu-arm64.c create mode 100755 board/altera/stratix10-socdk/MAINTAINERS create mode 100755 board/altera/stratix10-socdk/Makefile create mode 100755 board/altera/stratix10-socdk/socfpga.c create mode 100755 configs/socfpga_stratix10_defconfig create mode 100644 include/configs/socfpga_stratix10_socdk.h
--
2.2.2
PATCH v2 1/11 arm: socfpga: stratix10: Add SOCFPGA Stratix10 base address
Add base address header file for Stratix10 SoC
--- arch/arm/mach-socfpga/include/mach/base_addr_s10.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 arch/arm/mach-socfpga/include/mach/base_addr_s10.h
arch/arm/mach-socfpga/include/mach/base_addr_s10.h new file +48 -0
@@ -0,0 +1,48 @@ +/* +* Copyright (C) 2016, Intel Corporation +* +* SPDX-License-Identifier: GPL-2.0 +*/ + +#ifndef _SOCFPGA_S10_BASE_HARDWARE_H_ +#define _SOCFPGA_S10_BASE_HARDWARE_H_ + +#define SOCFPGA_SMMU_ADDRESS 0xfa000000 +#define SOCFPGA_EMAC0_ADDRESS 0xff800000 +#define SOCFPGA_EMAC1_ADDRESS 0xff802000 +#define SOCFPGA_EMAC2_ADDRESS 0xff804000 +#define SOCFPGA_SDMMC_ADDRESS 0xff808000 +#define SOCFPGA_USB0_ADDRESS 0xffb00000 +#define SOCFPGA_USB1_ADDRESS 0xffb40000 +#define SOCFPGA_NANDREGS_ADDRESS 0xffb80000 +#define SOCFPGA_NANDDATA_ADDRESS 0xffb90000 +#define SOCFPGA_UART0_ADDRESS 0xffc02000 +#define SOCFPGA_UART1_ADDRESS 0xffc02100 +#define SOCFPGA_I2C0_ADDRESS 0xffc02800 +#define SOCFPGA_I2C1_ADDRESS 0xffc02900 +#define SOCFPGA_I2C2_ADDRESS 0xffc02a00 +#define SOCFPGA_I2C3_ADDRESS 0xffc02b00 +#define SOCFPGA_I2C4_ADDRESS 0xffc02c00 +#define SOCFPGA_SPTIMER0_ADDRESS 0xffc03000 +#define SOCFPGA_SPTIMER1_ADDRESS 0xffc03100 +#define SOCFPGA_GPIO0_ADDRESS 0xffc03200 +#define SOCFPGA_GPIO1_ADDRESS 0xffc03300 +#define SOCFPGA_SYSTIMER0_ADDRESS 0xffd00000 +#define SOCFPGA_SYSTIMER1_ADDRESS 0xffd00100 +#define SOCFPGA_L4WD0_ADDRESS 0xffd00200 +#define SOCFPGA_L4WD1_ADDRESS 0xffd00300 +#define SOCFPGA_L4WD2_ADDRESS 0xffd00400 +#define SOCFPGA_L4WD3_ADDRESS 0xffd00500 +#define SOCFPGA_CLKMGR_ADDRESS 0xffd10000 +#define SOCFPGA_RSTMGR_ADDRESS 0xffd11000 +#define SOCFPGA_SYSMGR_ADDRESS 0xffd12000 +#define SOCFPGA_PINMUX_DEDICATED_IO_ADDRESS 0xffd13000 +#define SOCFPGA_DMANONSECURE_ADDRESS 0xffda0000 +#define SOCFPGA_DMASECURE_ADDRESS 0xffda1000 +#define SOCFPGA_SPIS0_ADDRESS 0xffda2000 +#define SOCFPGA_SPIS1_ADDRESS 0xffda3000 +#define SOCFPGA_SPIM0_ADDRESS 0xffda4000 +#define SOCFPGA_SPIM1_ADDRESS 0xffda5000 +#define SOCFPGA_OCRAM_ADDRESS 0xffe00000 + +#endif /* _SOCFPGA_S10_BASE_HARDWARE_H_ */
Signature · 1 line
2.2.2
Dinh Nguyen
maintainerPATCH v2 1/11 arm: socfpga: stratix10: Add SOCFPGA Stratix10 base address
arch/arm/mach-socfpga/include/mach/base_addr_s10.h
Quoted 14 lines · Chin Liang See
Add base address header file for Stratix10 SoC
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>Acked-by Marek Vasut <[email protected]>--- arch/arm/mach-socfpga/include/mach/base_addr_s10.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 arch/arm/mach-socfpga/include/mach/base_addr_s10.harch/arm/mach-socfpga/include/mach/base_addr_s10.h new file +0
-0
Shouldn't this be 644?
Dinh
PATCH v2 1/11 arm: socfpga: stratix10: Add SOCFPGA Stratix10 base address
Quoted 16 lines · Dinh Nguyen
Quoted 14 lines · Chin Liang See
Add base address header file for Stratix10 SoC
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>Acked-by Marek Vasut <[email protected]>--- arch/arm/mach-socfpga/include/mach/base_addr_s10.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 arch/arm/mach
-socfpga/include/mach/base_addr_s10.h
Quoted 5 lines
arch/arm/mach-socfpga/include/mach/base_addr_s10.h
Quoted 3 lines
arch/arm/mach-socfpga/include/mach/base_addr_s10.h new file +0
-0Shouldn't this be 644?
Good catch as seems my editor is using this mode when creating new files. Will chmod and fix it
Thanks
Chin Liang
Quoted 2 lines
Dinh
PATCH v2 2/11 arm: socfpga: rstmgr: Add Reset Manager for Stratix 10
In reply to Chin Liang SeeAdd Reset Manager registers structure for Stratix 10 SoC
--- arch/arm/mach-socfpga/include/mach/reset_manager.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm/mach-socfpga/include/mach/reset_manager.h +32 -0
@@ -15,6 +15,7 @@ void socfpga_bridges_reset(int enable);void socfpga_per_reset (u32 reset,int set);void socfpga_per_reset_all (void ); +#if defined(CONFIG_TARGET_SOCFPGA_GEN5) struct socfpga_reset_manager { u32 status; u32 ctrl;
@@ -28,11 +29,42 @@ struct socfpga_reset_manager {u32 padding2[12 ]; u32 tstscratch; }; +#elif defined(CONFIG_TARGET_SOCFPGA_STRATIX10) +struct socfpga_reset_manager { +u32 status; +u32 mpu_rst_stat; +u32 misc_stat; +u32 padding1; +u32 hdsk_en; +u32 hdsk_req; +u32 hdsk_ack; +u32 hdsk_stall; +u32 mpu_mod_reset; +u32 per_mod_reset;/* stated as per0_mod_reset in S10 datasheet */ +u32 per2_mod_reset;/* stated as per1_mod_reset in S10 datasheet */ +u32 brg_mod_reset; +u32 padding2; +u32 cold_mod_reset; +u32 padding3; +u32 dbg_mod_reset; +u32 tap_mod_reset; +u32 padding4; +u32 padding5; +u32 brg_warm_mask; +u32 padding6[3 ]; +u32 tst_stat; +u32 padding7; +u32 hdsk_timeout; +u32 mpul2flushtimeout; +u32 dbghdsktimeout; +}; +#endif #if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET )#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2#else #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1 +#define RSTMGR_MPUMODRST_CORE0 1#endif /*
Signature · 1 line
2.2.2
PATCH v2 3/11 arm: socfpga: rstmgr: Separate the Reset Manager for Stratix 10
In reply to Chin Liang SeeSeparate the Reset Manager to support both GEN5 SoC and Stratix 10 SoC.
---
Changes for v2
- Change the segregate to separate
--- arch/arm/mach-socfpga/reset_manager.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-socfpga/reset_manager.c +12 -0
@@ -15,8 +15,10 @@ DECLARE_GLOBAL_DATA_PTR;static const struct socfpga_reset_manager *reset_manager_base = (void *)SOCFPGA_RSTMGR_ADDRESS ; +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )static struct socfpga_system_manager *sysmgr_regs = (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS ; +#endif /* CONFIG_TARGET_SOCFPGA_GEN5) */ /* Assert or de-assert SoCFPGA reset manager reset. */ void socfpga_per_reset (u32 reset,int set)
@@ -31,8 +33,10 @@ void socfpga_per_reset(u32 reset, int set) reg = &reset_manager_base->per2_mod_reset; else if (RSTMGR_BANK(reset) == 3) reg = &reset_manager_base->brg_mod_reset; +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 else if (RSTMGR_BANK(reset) == 4) reg = &reset_manager_base->misc_mod_reset; +#endif /* CONFIG_TARGET_SOCFPGA_GEN5) */ else /* Invalid reset register, do nothing */ return;
@@ -60,9 +64,15 @@ void socfpga_per_reset_all(void)*/ void reset_cpu (ulong addr) { +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )/* request a warm reset */ writel ((1 <<RSTMGR_CTRL_SWWARMRSTREQ_LSB ), &reset_manager_base->ctrl); +#elif defined(CONFIG_TARGET_SOCFPGA_STRATIX10 ) +writel ((1 <<RSTMGR_MPUMODRST_CORE0 ), + &reset_manager_base->mpu_mod_reset); +#endif +/* * infinite loop here as watchdog will trigger and reset * the processor
@@ -92,6 +102,7 @@ void socfpga_bridges_reset(int enable)void socfpga_bridges_reset (int enable) { +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )const uint32_t l3mask =L3REGS_REMAP_LWHPS2FPGA_MASK |L3REGS_REMAP_HPS2FPGA_MASK |L3REGS_REMAP_OCRAM_MASK ;
@@ -116,5 +127,6 @@ void socfpga_bridges_reset(int enable)/* Remap the bridges into memory map */ writel (l3mask,SOCFPGA_L3REGS_ADDRESS ); } +#endif /* CONFIG_TARGET_SOCFPGA_GEN5) */ }#endif
Signature · 1 line
2.2.2
PATCH v2 4/11 arm: socfpga: clkmgr: Separate the Clock Manager for Stratix 10
In reply to Chin Liang SeeSeparate the Clock Manager to support both GEN5 SoC and Stratix 10 SoC.
---
Changes for v2
- Change segregrate to separate
--- arch/arm/mach-socfpga/clock_manager.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/mach-socfpga/clock_manager.c +8 -0
@@ -10,6 +10,7 @@DECLARE_GLOBAL_DATA_PTR ; +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )static const struct socfpga_clock_manager *clock_manager_base = (struct socfpga_clock_manager *)SOCFPGA_CLKMGR_ADDRESS ;
@@ -446,9 +447,11 @@ unsigned int cm_get_l4_sp_clk_hz(void) return clock; } +#endif /* CONFIG_TARGET_SOCFPGA_GEN5 */ unsigned int cm_get_mmc_controller_clk_hz (void ) { +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )uint32_t reg, clock =0 ;/* identify the source of MMC clock */
@@ -475,8 +478,12 @@ unsigned int cm_get_mmc_controller_clk_hz(void)/* further divide by 4 as we have fixed divider at wrapper */ clock /=4 ;return clock; +#elif defined(CONFIG_TARGET_SOCFPGA_STRATIX10 ) +return 25000000 ; +#endif /* CONFIG_TARGET_SOCFPGA_GEN5 */ } +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )unsigned int cm_get_qspi_controller_clk_hz (void ) {uint32_t reg, clock =0 ;
@@ -556,3 +563,4 @@ U_BOOT_CMD("display clocks" ,"" ); +#endif /* CONFIG_TARGET_SOCFPGA_GEN5 */
Signature · 1 line
2.2.2
PATCH v2 5/11 arm: socfpga: fpgamgr: Disable FPGA Manager for Stratix 10
In reply to Chin Liang SeeDisable the FPGA Manager for Stratix 10 SoC as we are not using this for SOCVP
---
Changes for v2
- Change in Makefile instead of fpga_manger.c
--- arch/arm/mach-socfpga/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-socfpga/Makefile +3 -2
@@ -8,12 +8,13 @@ # obj-y += misc.o timer.o reset_manager.o system_manager.o clock_manager.o \ - fpga_manager.o board.o + board.o obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o # QTS-generated config file wrappers -obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += scan_manager.o wrap_pll_config.o +obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += scan_manager.o wrap_pll_config.o \ + fpga_manager.o obj-$(CONFIG_SPL_BUILD) += wrap_iocsr_config.o wrap_pinmux_config.o \ wrap_sdram_config.o CFLAGS_wrap_iocsr_config.o += -I$(srctree)/board/$(BOARDDIR)
Signature · 1 line
2.2.2
PATCH v2 6/11 arm: socfpga: misc: Separate the misc.c for Stratix 10
In reply to Chin Liang SeeSeparate the misc.c to support both GEN5 SoC and Stratix 10 SoC.
---
Changes for v2
- Change segregate to separate
--- arch/arm/mach-socfpga/misc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-socfpga/misc.c +12 -0
@@ -24,6 +24,8 @@DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 +static struct pl310_regs *const pl310 = (struct pl310_regs *)CONFIG_SYS_PL310_BASE ; static struct socfpga_system_manager *sysmgr_regs =
@@ -34,6 +36,7 @@ static struct nic301_registers *nic301_regs = (struct nic301_registers *)SOCFPGA_L3REGS_ADDRESS ;static struct scu_registers *scu_regs = (struct scu_registers *)SOCFPGA_MPUSCU_ADDRESS ; +#endif int dram_init (void ) {
@@ -41,6 +44,7 @@ int dram_init(void)return 0 ; } +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 void enable_caches (void ) {#ifndef CONFIG_SYS_ICACHE_OFF
@@ -246,6 +250,7 @@ static int socfpga_fpga_id(const bool print_id) socfpga_fpga_model[i].name, version); return i; } +#endif /* CONFIG_TARGET_SOCFPGA_GEN5 */ /* * Print CPU information
@@ -253,14 +258,20 @@ static int socfpga_fpga_id(const bool print_id)#if defined(CONFIG_DISPLAY_CPUINFO )int print_cpuinfo (void ) { +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 const u32 bsel =readl (&sysmgr_regs->bootinfo) &0x7 ;puts ("CPU: Altera SoCFPGA Platform\n" );socfpga_fpga_id (1 );printf ("BOOT: %s\n" , bsel_str[bsel].name); +#elif defined(CONFIG_TARGET_SOCFPGA_STRATIX10 ) +puts ("CPU: Altera SoCFPGA Platform\n" ); +puts ("FPGA: Altera Stratix 10\n" ); +#endif /* CONFIG_TARGET_SOCFPGA_GEN5 */ return 0 ; }#endif +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 #ifdef CONFIG_ARCH_MISC_INIT int arch_misc_init(void) {
@@ -469,3 +480,4 @@ U_BOOT_CMD("bridge disable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" "" ); +#endif /* CONFIG_TARGET_SOCFPGA_GEN5 */
Signature · 1 line
2.2.2
PATCH v2 7/11 arm: socfpga: sysmgr: Fix casting warning when enabling ARM64
In reply to Chin Liang SeeFix casting warning to pointer from integer of different size when enabling ARM64 support
--- arch/arm/mach-socfpga/system_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-socfpga/system_manager.c +1 -1
@@ -56,7 +56,7 @@ static void populate_sysmgr_fpgaintf_module(void)*/ void sysmgr_pinmux_init (void ) { -uint32_t regs = (uint32_t )&sysmgr_regs->emacio[0 ]; +uint32_t *regs = (uint32_t *)&sysmgr_regs->emacio[0 ];const u8 *sys_mgr_init_table;unsigned int len;int i;
Signature · 1 line
2.2.2
PATCH v2 8/11 arm: socfpga: mmu: Add memory map layout for Stratix 10 SoC
In reply to Chin Liang SeeAdd memory map layout for Stratix 10 SoC
--- arch/arm/mach-socfpga/Makefile | 2 ++ arch/arm/mach-socfpga/mmu-arm64.c | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 arch/arm/mach-socfpga/mmu-arm64.c
arch/arm/mach-socfpga/Makefile +2 -0
@@ -12,6 +12,8 @@ obj-y += misc.o timer.o reset_manager.o system_manager.o clock_manager.o \ obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o +obj-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += mmu-arm64.o + # QTS-generated config file wrappers obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += scan_manager.o wrap_pll_config.o \ fpga_manager.o
arch/arm/mach-socfpga/mmu-arm64.c new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.2.2
PATCH v2 9/11 arm: socfpga: stratix10: Add board directory for Stratix 10 socdk
In reply to Chin Liang SeeAdd board folder for Stratix 10 SoC development kit
--- board/altera/stratix10-socdk/MAINTAINERS | 7 +++++++ board/altera/stratix10-socdk/Makefile | 7 +++++++ board/altera/stratix10-socdk/socfpga.c | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100755 board/altera/stratix10-socdk/MAINTAINERS create mode 100755 board/altera/stratix10-socdk/Makefile create mode 100755 board/altera/stratix10-socdk/socfpga.c
board/altera/stratix10-socdk/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +SOCFPGA BOARD +M: Chin-Liang See <[email protected]> +M: Dinh Nguyen <[email protected]> +S: Maintained +F: board/altera/stratix10-socdk/ +F: include/configs/socfpga_stratix10_socdk.h +F: configs/socfpga_stratix10_defconfig
board/altera/stratix10-socdk/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Copyright (C) 2016, Intel Corporation +# +# SPDX-License-Identifier: GPL-2.0 +# + +obj-y := socfpga.o
board/altera/stratix10-socdk/socfpga.c new file +7 -0
@@ -0,0 +1,7 @@ +/* +* Copyright (C) 2016, Intel Corporation +* +* SPDX-License-Identifier: GPL-2.0 +*/ + +#include <common.h>
Signature · 1 line
2.2.2
Dinh Nguyen
maintainerPATCH v2 9/11 arm: socfpga: stratix10: Add board directory for Stratix 10 socdk
board/altera/stratix10-socdk/MAINTAINERS
Quoted 17 lines · Chin Liang See
Add board folder for Stratix 10 SoC development kit
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>--- board/altera/stratix10-socdk/MAINTAINERS | 7 +++++++ board/altera/stratix10-socdk/Makefile | 7 +++++++ board/altera/stratix10-socdk/socfpga.c | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100755 board/altera/stratix10-socdk/MAINTAINERS create mode 100755 board/altera/stratix10-socdk/Makefile create mode 100755 board/altera/stratix10-socdk/socfpga.cboard/altera/stratix10-socdk/MAINTAINERS new file +0
-0
644?
board/altera/stratix10-socdk/Makefile
Quoted 13 lines
index 0000000..596933c
board/altera/stratix10-socdk/MAINTAINERS new file +7
-0@@ -0,0 +1,7 @@ +SOCFPGA BOARD +M: Chin-Liang See <[email protected]> +M: Dinh Nguyen <[email protected]> +S: Maintained +F: board/altera/stratix10-socdk/ +F: include/configs/socfpga_stratix10_socdk.h +F: configs/socfpga_stratix10_defconfigboard/altera/stratix10-socdk/Makefile new file +0
-0
644?
Dinh
PATCH v2 9/11 arm: socfpga: stratix10: Add board directory for Stratix 10 socdk
Quoted 17 lines · Dinh Nguyen
Quoted 15 lines · Chin Liang See
Add board folder for Stratix 10 SoC development kit
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>--- board/altera/stratix10-socdk/MAINTAINERS | 7 +++++++ board/altera/stratix10-socdk/Makefile | 7 +++++++ board/altera/stratix10-socdk/socfpga.c | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100755 board/altera/stratix10-socdk/MAINTAINERS create mode 100755 board/altera/stratix10-socdk/Makefile create mode 100755 board/altera/stratix10-socdk/socfpga.c
Quoted 5 lines
board/altera/stratix10-socdk/MAINTAINERS
Quoted 3 lines
board/altera/stratix10-socdk/MAINTAINERS new file +0
-0644?
Will chmod
Quoted 18 lines
board/altera/stratix10-socdk/Makefile
Quoted 15 lines
index 0000000..596933c
board/altera/stratix10-socdk/MAINTAINERS new file +7
-0@@ -0,0 +1,7 @@ +SOCFPGA BOARD +M: Chin-Liang See <[email protected]> +M: Dinh Nguyen <[email protected]> +S: Maintained +F: board/altera/stratix10-socdk/ +F: include/configs/socfpga_stratix10_socdk.h +F: configs/socfpga_stratix10_defconfigboard/altera/stratix10-socdk/Makefile new file +0
-0644?
Will chmod too
Thanks
Chin Liang
Quoted 1 line
Dinh
PATCH v2 10/11 arm: dts: socfpga: Add dts for Stratix 10 socdk
In reply to Chin Liang SeeAdd device tree for Stratix 10 SoC development kit
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/socfpga_stratix10_socdk.dts | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100755 arch/arm/dts/socfpga_stratix10_socdk.dts
arch/arm/dts/Makefile +2 -1
@@ -127,7 +127,8 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \ socfpga_cyclone5_sockit.dtb \ socfpga_cyclone5_socrates.dtb \ socfpga_cyclone5_sr1500.dtb \ - socfpga_cyclone5_vining_fpga.dtb + socfpga_cyclone5_vining_fpga.dtb \ + socfpga_stratix10_socdk.dtb dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \
arch/arm/dts/socfpga_stratix10_socdk.dts new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
2.2.2
Dinh Nguyen
maintainerPATCH v2 10/11 arm: dts: socfpga: Add dts for Stratix 10 socdk
Quoted 33 lines · Chin Liang See
Add device tree for Stratix 10 SoC development kit
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>Acked-by Marek Vasut <[email protected]>--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/socfpga_stratix10_socdk.dts | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100755 arch/arm/dts/socfpga_stratix10_socdk.dtsarch/arm/dts/Makefile +2
-1@@ -127,7 +127,8 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \ socfpga_cyclone5_sockit.dtb \ socfpga_cyclone5_socrates.dtb \ socfpga_cyclone5_sr1500.dtb \ - socfpga_cyclone5_vining_fpga.dtb + socfpga_cyclone5_vining_fpga.dtb \ + socfpga_stratix10_socdk.dtb dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \arch/arm/dts/socfpga_stratix10_socdk.dts new file +0
-0
arch/arm/dts/socfpga_stratix10_socdk.dts line 9
Quoted 9 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +9
-0@@ -0,0 +1,63 @@ +/* + * Copyright (C) 2016 Intel Corporation + * + * SPDX-License-Identifier: GPL-2.0 + */ + +/dts-v1/; +/* First 4KB has trampoline code for secondary cores. */ +/memreserve/ 0x00000000 0x0001000;
ARM64 should be using PSCI for SMP. I don't think the trampoline code is needed.
Quoted 8 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +8
-0+#include "skeleton.dtsi" + +/ { + model = "Altera SOCFPGA Stratix 10 SoC Development Kit"; + compatible = "altr,socfpga-stratix10", "altr,socfpga"; + + #address-cells = <1>; + #size-cells = <1>;
arch/arm/dts/socfpga_stratix10_socdk.dts line 27
Quoted 10 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +10
-0+ + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory { + name = "memory"; + device_type = "memory"; + reg = <0x0 0x40000000>; /* 1GB */ + };
are you sure we still have only 1GB?
Quoted 9 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +9
-0+ + regulator_3_3v: 3-3-v-regulator { + compatible = "regulator-fixed"; + regulator-name = "3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + soc {
arch/arm/dts/socfpga_stratix10_socdk.dts line 46
Quoted 10 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +10
-0+ #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + device_type = "soc"; + ranges; + + mmc0: dwmmc0 at 0xff808000 { + compatible = "altr,socfpga-dw-mshc"; + reg = <0xff808000 0x1000>; + interrupts = <0 139 4>;
This interrupt number is not correct. Copy/paste error from Cyclone5? For S10, I think it's 96.
Quoted 8 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +7
-0+ num-slots = <1>; + broken-cd; + bus-width = <4>; + fifo-depth = <0x400>; + #address-cells = <1>; + #size-cells = <0>; + cap-mmc-highspeed;
arch/arm/dts/socfpga_stratix10_socdk.dts line 63
Quoted 10 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +10
-0+ cap-sd-highspeed; + drvsel = <3>; + smplsel = <0>; + status = "okay"; + u-boot,dm-pre-reloc; + vmmc-supply = <®ulator_3_3v>; + vqmmc-supply = <®ulator_3_3v>; + }; + }; +};
Dinh
PATCH v2 10/11 arm: dts: socfpga: Add dts for Stratix 10 socdk
Quoted 43 lines · Dinh Nguyen
Quoted 41 lines · Chin Liang See
Add device tree for Stratix 10 SoC development kit
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>Acked-by Marek Vasut <[email protected]>--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/socfpga_stratix10_socdk.dts | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100755 arch/arm/dts/socfpga_stratix10_socdk.dtsarch/arm/dts/Makefile +2
-1@@ -127,7 +127,8 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \ socfpga_cyclone5_sockit.dtb \ socfpga_cyclone5_socrates.dtb \ socfpga_cyclone5_sr1500.dtb \ - socfpga_cyclone5_vining_fpga.dtb + socfpga_cyclone5_vining_fpga.dtb \ + socfpga_stratix10_socdk.dtb dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtbdtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \
arch/arm/dts/socfpga_stratix10_socdk.dts new file +5
-0@@ -0,0 +1,63 @@ +/* + * Copyright (C) 2016 Intel Corporation + * + * SPDX-License-Identifier: GPL-2.0 + */
Quoted 9 lines
arch/arm/dts/socfpga_stratix10_socdk.dts line 9
Quoted 4 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +4
-0+ +/dts-v1/; +/* First 4KB has trampoline code for secondary cores. */ +/memreserve/ 0x00000000 0x0001000;ARM64 should be using PSCI for SMP. I don't think the trampoline code is
needed.
You are right and will remove this
Quoted 12 lines
Quoted 12 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +12
-0+#include "skeleton.dtsi" + +/ { + model = "Altera SOCFPGA Stratix 10 SoC Development Kit"; + compatible = "altr,socfpga-stratix10", "altr,socfpga"; + + #address-cells = <1>; + #size-cells = <1>; + + chosen { + bootargs = "console=ttyS0,115200"; + };
Quoted 9 lines
arch/arm/dts/socfpga_stratix10_socdk.dts line 27
Quoted 6 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +6
-0+ + memory { + name = "memory"; + device_type = "memory"; + reg = <0x0 0x40000000>; /* 1GB */ + };are you sure we still have only 1GB?
Good catch as SOCVP has 2GB. But we should have more than 2GB per spec and will investigate more.
Quoted 14 lines
Quoted 14 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +14
-0+ + regulator_3_3v: 3-3-v-regulator { + compatible = "regulator-fixed"; + regulator-name = "3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + device_type = "soc"; + ranges;
Quoted 9 lines
arch/arm/dts/socfpga_stratix10_socdk.dts line 46
Quoted 5 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +5
-0+ + mmc0: dwmmc0 at 0xff808000 { + compatible = "altr,socfpga-dw-mshc"; + reg = <0xff808000 0x1000>; + interrupts = <0 139 4>;This interrupt number is not correct. Copy/paste error from Cyclone5? For S10, I think it's 96.
Yup, my bad as overlook this when enabling the SDMMC. Will fix this.
Thanks
Chin Liang
Quoted 20 lines
Quoted 8 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +7
-0+ num-slots = <1>; + broken-cd; + bus-width = <4>; + fifo-depth = <0x400>; + #address-cells = <1>; + #size-cells = <0>; + cap-mmc-highspeed;arch/arm/dts/socfpga_stratix10_socdk.dts line 63
Quoted 10 lines
arch/arm/dts/socfpga_stratix10_socdk.dts new file +10
-0+ cap-sd-highspeed; + drvsel = <3>; + smplsel = <0>; + status = "okay"; + u-boot,dm-pre-reloc; + vmmc-supply = <®ulator_3_3v>; + vqmmc-supply = <®ulator_3_3v>; + }; + }; +};Dinh
PATCH v2 11/11 arm: socfpga: Add support for Stratix 10 SoC dev kit
In reply to Chin Liang SeeAdd support for Stratix 10 SoC development kit
---
Changes for v2
- Sorting the config alphabetically
--- arch/arm/Kconfig | 7 +- arch/arm/mach-socfpga/Kconfig | 10 +++ configs/socfpga_stratix10_defconfig | 14 ++++ include/configs/socfpga_stratix10_socdk.h | 135 ++++++++++++++++++++++++++++++ 4 files changed, 163 insertions(+), 3 deletions(-) create mode 100755 configs/socfpga_stratix10_defconfig create mode 100644 include/configs/socfpga_stratix10_socdk.h
arch/arm/Kconfig +4 -3
@@ -600,10 +600,11 @@ config ARCH_SNAPDRAGON config ARCH_SOCFPGA bool "Altera SOCFPGA family" - select CPU_V7 - select SUPPORT_SPL + select CPU_V7 if !TARGET_SOCFPGA_STRATIX10 + select ARM64 if TARGET_SOCFPGA_STRATIX10 + select SUPPORT_SPL if !TARGET_SOCFPGA_STRATIX10 select OF_CONTROL - select SPL_OF_CONTROL + select SPL_OF_CONTROL if !TARGET_SOCFPGA_STRATIX10 select DM select DM_SPI_FLASH select DM_SPI
arch/arm/mach-socfpga/Kconfig +10 -0
@@ -11,6 +11,9 @@ config TARGET_SOCFPGA_CYCLONE5 config TARGET_SOCFPGA_GEN5 bool +config TARGET_SOCFPGA_STRATIX10 + bool + choice prompt "Altera SOCFPGA board select" optional
@@ -43,6 +46,10 @@ config TARGET_SOCFPGA_SR1500 bool "SR1500 (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5 +config TARGET_SOCFPGA_STRATIX10_SOCDK + bool "Altera SOCFPGA SoCDK (Stratix 10)" + select TARGET_SOCFPGA_STRATIX10 + config TARGET_SOCFPGA_TERASIC_DE0_NANO bool "Terasic DE0-Nano-Atlas (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5
@@ -62,11 +69,13 @@ config SYS_BOARD default "sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT default "socrates" if TARGET_SOCFPGA_EBV_SOCRATES default "sr1500" if TARGET_SOCFPGA_SR1500 + default "stratix10-socdk" if TARGET_SOCFPGA_STRATIX10_SOCDK default "vining_fpga" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA config SYS_VENDOR default "altera" if TARGET_SOCFPGA_ARRIA5_SOCDK default "altera" if TARGET_SOCFPGA_CYCLONE5_SOCDK + default "altera" if TARGET_SOCFPGA_STRATIX10_SOCDK default "denx" if TARGET_SOCFPGA_DENX_MCVEVK default "ebv" if TARGET_SOCFPGA_EBV_SOCRATES default "samtec" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA
@@ -85,6 +94,7 @@ config SYS_CONFIG_NAME default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT default "socfpga_socrates" if TARGET_SOCFPGA_EBV_SOCRATES default "socfpga_sr1500" if TARGET_SOCFPGA_SR1500 + default "socfpga_stratix10_socdk" if TARGET_SOCFPGA_STRATIX10_SOCDK default "socfpga_vining_fpga" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA endif
configs/socfpga_stratix10_defconfig new file +14 -0
@@ -0,0 +1,14 @@ +CONFIG_ARM=y +CONFIG_ARCH_SOCFPGA=y +CONFIG_TARGET_SOCFPGA_STRATIX10=y +CONFIG_TARGET_SOCFPGA_STRATIX10_SOCDK=y +CONFIG_DEFAULT_DEVICE_TREE="socfpga_stratix10_socdk" +CONFIG_SYS_NS16550=y +# CONFIG_CMD_IMLS is not set +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_CMD_MMC=y +CONFIG_DM_MMC=y +CONFIG_CMD_FAT=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_USE_TINY_PRINTF=y
include/configs/socfpga_stratix10_socdk.h new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.2.2
Dinh Nguyen
maintainerPATCH v2 11/11 arm: socfpga: Add support for Stratix 10 SoC dev kit
Quoted 10 lines · Chin Liang See
Add support for Stratix 10 SoC development kit
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>---
Changes for v2
- Sorting the config alphabetically
---
Please re-check all of your new file attributes for this series.
Dinh
PATCH v2 11/11 arm: socfpga: Add support for Stratix 10 SoC dev kit
Quoted 13 lines · Dinh Nguyen
Quoted 10 lines · Chin Liang See
Add support for Stratix 10 SoC development kit
Signed-off-by Chin Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>---
Changes for v2
- Sorting the config alphabetically
---
Quoted 2 lines
Please re-check all of your new file attributes for this series.
Yup, definitely :)
Thanks
Chin Liang
Quoted 1 line
Dinh