Add Intel Stratix 10 SoC support
Subsystems (3)
Marek Vasut
Appliedv3 cover Add Intel Stratix 10 SoC support
In reply to Ley Foon TanQuoted 7 lines · Ley Foon Tan
This is 3rd version of patchset to adds support for Intel Stratix 10 SoC. This patchset is work on top of uboot.git/master and patchset in [1].
Changes:
- rebase on uboot.git/master
- update reviewed-by
Quoted 5 lines
Patchset history:
[v1]: https://patchwork.ozlabs.org/cover/900499/
[v2]: https://patchwork.ozlabs.org/cover/916060/
Applied, thanks
Signature · 2 lines
Best regards, Marek Vasut
v3 cover Add Intel Stratix 10 SoC support
This is 3rd version of patchset to adds support for Intel Stratix 10 SoC. This patchset is work on top of uboot.git/master and patchset in [1].
Changes:
- rebase on uboot.git/master
- update reviewed-by
Patchset history:
[v1]: https://patchwork.ozlabs.org/cover/900499/
[v2]: https://patchwork.ozlabs.org/cover/916060/
[1]: https://patchwork.ozlabs.org/cover/910018/
Ley Foon Tan (10):
arm: socfpga: misc: Move bridge command to misc common
arm: socfpga: stratix10: Add misc support for Stratix10 SoC
arm: socfpga: stratix10: Add mailbox support for Stratix10 SoC
arm: socfpga: stratix10: Add MMU support for Stratix10 SoC
arm: socfpga: Restructure the SPL file
arm: socfpga: stratix10: Add SPL driver for Stratix10 SoC
arm: socfpga: stratix10: Add timer support for Stratix10 SoC
ddr: altera: stratix10: Add DDR support for Stratix10 SoC
board: altera: stratix10: Add socdk board support for Stratix10 SoC
arm: socfpga: stratix10: Enable Stratix10 SoC build
arch/arm/Kconfig | 10 +-
arch/arm/mach-socfpga/Kconfig | 13 +
arch/arm/mach-socfpga/Makefile | 16 +-
arch/arm/mach-socfpga/include/mach/firewall_s10.h | 120 +++++++
arch/arm/mach-socfpga/include/mach/mailbox_s10.h | 144 ++++++++
arch/arm/mach-socfpga/include/mach/misc.h | 2 +
arch/arm/mach-socfpga/include/mach/sdram_s10.h | 183 ++++++++++
arch/arm/mach-socfpga/mailbox_s10.c | 380 ++++++++++++++++++++
arch/arm/mach-socfpga/misc.c | 31 ++
arch/arm/mach-socfpga/misc_gen5.c | 26 +--
arch/arm/mach-socfpga/misc_s10.c | 133 +++++++
arch/arm/mach-socfpga/mmu-arm64_s10.c | 71 ++++
arch/arm/mach-socfpga/spl_a10.c | 105 ++++++
arch/arm/mach-socfpga/{spl.c => spl_gen5.c} | 62 +---
arch/arm/mach-socfpga/spl_s10.c | 199 +++++++++++
arch/arm/mach-socfpga/timer_s10.c | 26 ++
board/altera/stratix10-socdk/MAINTAINERS | 7 +
board/altera/stratix10-socdk/Makefile | 7 +
board/altera/stratix10-socdk/socfpga.c | 7 +
configs/socfpga_stratix10_defconfig | 56 +++
drivers/ddr/altera/Makefile | 1 +
drivers/ddr/altera/sdram_s10.c | 388 +++++++++++++++++++++
include/configs/socfpga_stratix10_socdk.h | 222 ++++++++++++
23 files changed, 2129 insertions(+), 80 deletions(-)
create mode 100644 arch/arm/mach-socfpga/include/mach/firewall_s10.h
create mode 100644 arch/arm/mach-socfpga/include/mach/mailbox_s10.h
create mode 100644 arch/arm/mach-socfpga/include/mach/sdram_s10.h
create mode 100644 arch/arm/mach-socfpga/mailbox_s10.c
create mode 100644 arch/arm/mach-socfpga/misc_s10.c
create mode 100644 arch/arm/mach-socfpga/mmu-arm64_s10.c
create mode 100644 arch/arm/mach-socfpga/spl_a10.c
rename arch/arm/mach-socfpga/{spl.c => spl_gen5.c} (81%)
create mode 100644 arch/arm/mach-socfpga/spl_s10.c
create mode 100644 arch/arm/mach-socfpga/timer_s10.c
create mode 100644 board/altera/stratix10-socdk/MAINTAINERS
create mode 100644 board/altera/stratix10-socdk/Makefile
create mode 100644 board/altera/stratix10-socdk/socfpga.c
create mode 100644 configs/socfpga_stratix10_defconfig
create mode 100644 drivers/ddr/altera/sdram_s10.c
create mode 100644 include/configs/socfpga_stratix10_socdk.hPATCH v3 1/10 arm: socfpga: misc: Move bridge command to misc common
Move bridge command to misc common driver, in preparation to used by other platforms.
--- arch/arm/mach-socfpga/include/mach/misc.h | 2 + arch/arm/mach-socfpga/misc.c | 32 +++++++++++++++++++++++++++++ arch/arm/mach-socfpga/misc_gen5.c | 26 ++-------------------- 3 files changed, 37 insertions(+), 23 deletions(-)
arch/arm/mach-socfpga/include/mach/misc.h +2 -0
@@ -27,4 +27,6 @@ unsigned int shared_uart_com_port(const void *blob);unsigned int uart_com_port (const void *blob);#endif +void do_bridge_reset (int enable); +#endif /* _MISC_H_ */
arch/arm/mach-socfpga/misc.c +32 -0
@@ -204,3 +204,35 @@ int socfpga_eth_reset_common(void (*resetfn)(const u8 of_reset_id, return 0; }#endif + +#ifndef CONFIG_SPL_BUILD +static int do_bridge (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +if (argc !=2 ) +return CMD_RET_USAGE ; + + argv++; + +switch (*argv[0 ]) { +case 'e' :/* Enable */ +do_bridge_reset (1 ); +break ; +case 'd' :/* Disable */ +do_bridge_reset (0 ); +break ; +default : +return CMD_RET_USAGE ; + } + +return 0 ; +} + +U_BOOT_CMD ( + bridge,2 ,1 , do_bridge, +"SoCFPGA HPS FPGA bridge control" , +"enable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" +"bridge disable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" +"" +); + +#endif
arch/arm/mach-socfpga/misc_gen5.c +3 -23
@@ -259,40 +259,20 @@ static void socfpga_sdram_apply_static_cfg(void) : : "r"(val), "r"(&sdr_ctrl->static_cfg) : "memory", "cc"); } -static int do_bridge (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +void do_bridge_reset (int enable) { -if (argc !=2 ) -return CMD_RET_USAGE ; - - argv++; - -switch (*argv[0 ]) { -case 'e' :/* Enable */ +if (enable) {writel (iswgrp_handoff[2 ], &sysmgr_regs->fpgaintfgrp_module);socfpga_sdram_apply_static_cfg ();writel (iswgrp_handoff[3 ], &sdr_ctrl->fpgaport_rst);writel (iswgrp_handoff[0 ], &reset_manager_base->brg_mod_reset);writel (iswgrp_handoff[1 ], &nic301_regs->remap); -break ; -case 'd' :/* Disable */ + }else {writel (0 , &sysmgr_regs->fpgaintfgrp_module);writel (0 , &sdr_ctrl->fpgaport_rst);socfpga_sdram_apply_static_cfg ();writel (0 , &reset_manager_base->brg_mod_reset);writel (1 , &nic301_regs->remap); -break ; -default : -return CMD_RET_USAGE ; } - -return 0 ; } - -U_BOOT_CMD ( - bridge,2 ,1 , do_bridge, -"SoCFPGA HPS FPGA bridge control" , -"enable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" -"bridge disable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" -"" -);#endif
Signature · 1 line
1.7.1
PATCH v3 2/10 arm: socfpga: stratix10: Add misc support for Stratix10 SoC
In reply to Ley Foon TanAdd misc support such as EMAC and cpu info printout for Stratix SoC
--- arch/arm/mach-socfpga/Makefile | 1 + arch/arm/mach-socfpga/misc_s10.c | 133 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-socfpga/misc_s10.c
arch/arm/mach-socfpga/Makefile +1 -0
@@ -30,6 +30,7 @@ endif ifdef CONFIG_TARGET_SOCFPGA_STRATIX10 obj-y += clock_manager_s10.o +obj-y += misc_s10.o obj-y += reset_manager_s10.o obj-y += system_manager_s10.o obj-y += wrap_pinmux_config_s10.o
arch/arm/mach-socfpga/misc_s10.c new file +133 -0
133 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 3/10 arm: socfpga: stratix10: Add mailbox support for Stratix10 SoC
In reply to Ley Foon TanAdd mailbox support for Stratix SoC
--- arch/arm/mach-socfpga/Makefile | 1 + arch/arm/mach-socfpga/include/mach/mailbox_s10.h | 144 ++++++++ arch/arm/mach-socfpga/mailbox_s10.c | 380 ++++++++++++++++++++++ 3 files changed, 525 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-socfpga/include/mach/mailbox_s10.h create mode 100644 arch/arm/mach-socfpga/mailbox_s10.c
arch/arm/mach-socfpga/Makefile +1 -0
@@ -30,6 +30,7 @@ endif ifdef CONFIG_TARGET_SOCFPGA_STRATIX10 obj-y += clock_manager_s10.o +obj-y += mailbox_s10.o obj-y += misc_s10.o obj-y += reset_manager_s10.o obj-y += system_manager_s10.o
arch/arm/mach-socfpga/include/mach/mailbox_s10.h new file +144 -0
144 lines not on this page · raw message
arch/arm/mach-socfpga/mailbox_s10.c new file +380 -0
380 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 4/10 arm: socfpga: stratix10: Add MMU support for Stratix10 SoC
In reply to Ley Foon TanAdd MMU memory mapping table for Stratix SoC.
--- arch/arm/mach-socfpga/Makefile | 1 + arch/arm/mach-socfpga/mmu-arm64_s10.c | 71 +++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-socfpga/mmu-arm64_s10.c
arch/arm/mach-socfpga/Makefile +1 -0
@@ -32,6 +32,7 @@ ifdef CONFIG_TARGET_SOCFPGA_STRATIX10 obj-y += clock_manager_s10.o obj-y += mailbox_s10.o obj-y += misc_s10.o +obj-y += mmu-arm64_s10.o obj-y += reset_manager_s10.o obj-y += system_manager_s10.o obj-y += wrap_pinmux_config_s10.o
arch/arm/mach-socfpga/mmu-arm64_s10.c new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 5/10 arm: socfpga: Restructure the SPL file
In reply to Ley Foon TanRestructure the SPL so each devices such as CV, A10 and S10 will have their own dedicated SPL file. SPL file determine the HW initialization flow which is device specific
---
arch/arm/mach-socfpga/Makefile | 5 +-
arch/arm/mach-socfpga/spl_a10.c | 105 +++++++++++++++++++++++++++
arch/arm/mach-socfpga/{spl.c => spl_gen5.c} | 62 +++-------------
3 files changed, 120 insertions(+), 52 deletions(-)
create mode 100644 arch/arm/mach-socfpga/spl_a10.c
rename arch/arm/mach-socfpga/{spl.c => spl_gen5.c} (81%)arch/arm/mach-socfpga/Makefile +4 -1
@@ -39,13 +39,16 @@ obj-y += wrap_pinmux_config_s10.o obj-y += wrap_pll_config_s10.o endif ifdef CONFIG_SPL_BUILD -obj-y += spl.o ifdef CONFIG_TARGET_SOCFPGA_GEN5 +obj-y += spl_gen5.o obj-y += freeze_controller.o obj-y += wrap_iocsr_config.o obj-y += wrap_pinmux_config.o obj-y += wrap_sdram_config.o endif +ifdef CONFIG_TARGET_SOCFPGA_ARRIA10 +obj-y += spl_a10.o +endif endif ifdef CONFIG_TARGET_SOCFPGA_GEN5
arch/arm/mach-socfpga/spl_a10.c new file +105 -0
105 lines not on this page · raw message
arch/arm/mach-socfpga/spl_gen5.c renamed from arch/arm/mach-socfpga/spl.c +11 -51
86 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 6/10 arm: socfpga: stratix10: Add SPL driver for Stratix10 SoC
In reply to Ley Foon TanAdd SPL driver support for Stratix SoC
--- arch/arm/mach-socfpga/Makefile | 4 + arch/arm/mach-socfpga/include/mach/firewall_s10.h | 120 +++++++++++++ arch/arm/mach-socfpga/spl_s10.c | 199 +++++++++++++++++++++ 3 files changed, 323 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-socfpga/include/mach/firewall_s10.h create mode 100644 arch/arm/mach-socfpga/spl_s10.c
arch/arm/mach-socfpga/Makefile +4 -0
@@ -38,6 +38,7 @@ obj-y += system_manager_s10.o obj-y += wrap_pinmux_config_s10.o obj-y += wrap_pll_config_s10.o endif + ifdef CONFIG_SPL_BUILD ifdef CONFIG_TARGET_SOCFPGA_GEN5 obj-y += spl_gen5.o
@@ -49,6 +50,9 @@ endif ifdef CONFIG_TARGET_SOCFPGA_ARRIA10 obj-y += spl_a10.o endif +ifdef CONFIG_TARGET_SOCFPGA_STRATIX10 +obj-y += spl_s10.o +endif endif ifdef CONFIG_TARGET_SOCFPGA_GEN5
arch/arm/mach-socfpga/include/mach/firewall_s10.h new file +120 -0
120 lines not on this page · raw message
arch/arm/mach-socfpga/spl_s10.c new file +199 -0
199 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 7/10 arm: socfpga: stratix10: Add timer support for Stratix10 SoC
In reply to Ley Foon TanAdd timer support for Stratix SoC
--- arch/arm/mach-socfpga/Makefile | 4 +++- arch/arm/mach-socfpga/timer_s10.c | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-socfpga/timer_s10.c
arch/arm/mach-socfpga/Makefile +3 -1
@@ -9,7 +9,6 @@ obj-y += board.o obj-y += clock_manager.o obj-y += misc.o obj-y += reset_manager.o -obj-y += timer.o ifdef CONFIG_TARGET_SOCFPGA_GEN5 obj-y += clock_manager_gen5.o
@@ -17,6 +16,7 @@ obj-y += misc_gen5.o obj-y += reset_manager_gen5.o obj-y += scan_manager.o obj-y += system_manager_gen5.o +obj-y += timer.o obj-y += wrap_pll_config.o obj-y += fpga_manager.o endif
@@ -26,6 +26,7 @@ obj-y += clock_manager_arria10.o obj-y += misc_arria10.o obj-y += pinmux_arria10.o obj-y += reset_manager_arria10.o +obj-y += timer.o endif ifdef CONFIG_TARGET_SOCFPGA_STRATIX10
@@ -35,6 +36,7 @@ obj-y += misc_s10.o obj-y += mmu-arm64_s10.o obj-y += reset_manager_s10.o obj-y += system_manager_s10.o +obj-y += timer_s10.o obj-y += wrap_pinmux_config_s10.o obj-y += wrap_pll_config_s10.o endif
arch/arm/mach-socfpga/timer_s10.c new file +26 -0
@@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2017-2018 Intel Corporation <www.intel.com> +* +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/timer.h> + +/* +* Timer initialization +*/ +int timer_init (void ) +{ +int enable =0x3 ;/* timer enable + output signal masked */ +int loadval = ~0 ; + +/* enable system counter */ +writel (enable,SOCFPGA_GTIMER_SEC_ADDRESS ); +/* enable processor pysical counter */ + asmvolatile ("msr cntp_ctl_el0, %0" : :"r" (enable)); + asmvolatile ("msr cntp_tval_el0, %0" : :"r" (loadval)); + +return 0 ; +}
Signature · 1 line
1.7.1
PATCH v3 8/10 ddr: altera: stratix10: Add DDR support for Stratix10 SoC
In reply to Ley Foon TanAdd DDR support for Stratix SoC
--- arch/arm/mach-socfpga/include/mach/sdram_s10.h | 183 +++++++++++ arch/arm/mach-socfpga/misc.c | 11 +- drivers/ddr/altera/Makefile | 1 + drivers/ddr/altera/sdram_s10.c | 388 ++++++++++++++++++++++++ 4 files changed, 577 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-socfpga/include/mach/sdram_s10.h create mode 100644 drivers/ddr/altera/sdram_s10.c
arch/arm/mach-socfpga/include/mach/sdram_s10.h new file +183 -0
@@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* Copyright (C) 2017-2018 Intel Corporation <www.intel.com> +* +*/ + +#ifndef _SDRAM_S10_H_ +#define _SDRAM_S10_H_ + +unsigned long sdram_calculate_size (void ); +int sdram_mmr_init_full (unsigned int sdr_phy_reg); +int sdram_calibration_full (void ); + +#define DDR_TWR 15 +#define DDR_READ_LATENCY_DELAY 40 +#define DDR_ACTIVATE_FAWBANK 0x1 + +/* ECC HMC registers */ +#define DDRIOCTRL 0x8 +#define DDRCALSTAT 0xc +#define DRAMADDRWIDTH 0xe0 +#define ECCCTRL1 0x100 +#define ECCCTRL2 0x104 +#define ERRINTEN 0x110 +#define INTMODE 0x11c +#define INTSTAT 0x120 +#define AUTOWB_CORRADDR 0x138 +#define ECC_REG2WRECCDATABUS 0x144 +#define ECC_DIAGON 0x150 +#define ECC_DECSTAT 0x154 +#define HPSINTFCSEL 0x210 +#define RSTHANDSHAKECTRL 0x214 +#define RSTHANDSHAKESTAT 0x218 + +#define DDR_HMC_DDRIOCTRL_IOSIZE_MSK 0x00000003 +#define DDR_HMC_DDRCALSTAT_CAL_MSK BIT(0) +#define DDR_HMC_ECCCTL_AWB_CNT_RST_SET_MSK BIT(16) +#define DDR_HMC_ECCCTL_CNT_RST_SET_MSK BIT(8) +#define DDR_HMC_ECCCTL_ECC_EN_SET_MSK BIT(0) +#define DDR_HMC_ECCCTL2_RMW_EN_SET_MSK BIT(8) +#define DDR_HMC_ECCCTL2_AWB_EN_SET_MSK BIT(0) +#define DDR_HMC_ECC_DIAGON_ECCDIAGON_EN_SET_MSK BIT(16) +#define DDR_HMC_ECC_DIAGON_WRDIAGON_EN_SET_MSK BIT(0) +#define DDR_HMC_ERRINTEN_SERRINTEN_EN_SET_MSK BIT(0) +#define DDR_HMC_ERRINTEN_DERRINTEN_EN_SET_MSK BIT(1) +#define DDR_HMC_INTSTAT_SERRPENA_SET_MSK BIT(0) +#define DDR_HMC_INTSTAT_DERRPENA_SET_MSK BIT(1) +#define DDR_HMC_INTSTAT_ADDRMTCFLG_SET_MSK BIT(16) +#define DDR_HMC_INTMODE_INTMODE_SET_MSK BIT(0) +#define DDR_HMC_RSTHANDSHAKE_MASK 0x000000ff +#define DDR_HMC_CORE2SEQ_INT_REQ 0xF +#define DDR_HMC_SEQ2CORE_INT_RESP_MASK BIT(3) +#define DDR_HMC_HPSINTFCSEL_ENABLE_MASK 0x001f1f1f + +/* NOC DDR scheduler */ +#define DDR_SCH_ID_COREID 0 +#define DDR_SCH_ID_REVID 0x4 +#define DDR_SCH_DDRCONF 0x8 +#define DDR_SCH_DDRTIMING 0xc +#define DDR_SCH_DDRMODE 0x10 +#define DDR_SCH_READ_LATENCY 0x14 +#define DDR_SCH_ACTIVATE 0x38 +#define DDR_SCH_DEVTODEV 0x3c +#define DDR_SCH_DDR4TIMING 0x40 + +#define DDR_SCH_DDRTIMING_ACTTOACT_OFF 0 +#define DDR_SCH_DDRTIMING_RDTOMISS_OFF 6 +#define DDR_SCH_DDRTIMING_WRTOMISS_OFF 12 +#define DDR_SCH_DDRTIMING_BURSTLEN_OFF 18 +#define DDR_SCH_DDRTIMING_RDTOWR_OFF 21 +#define DDR_SCH_DDRTIMING_WRTORD_OFF 26 +#define DDR_SCH_DDRTIMING_BWRATIO_OFF 31 +#define DDR_SCH_DDRMOD_BWRATIOEXTENDED_OFF 1 +#define DDR_SCH_ACTIVATE_RRD_OFF 0 +#define DDR_SCH_ACTIVATE_FAW_OFF 4 +#define DDR_SCH_ACTIVATE_FAWBANK_OFF 10 +#define DDR_SCH_DEVTODEV_BUSRDTORD_OFF 0 +#define DDR_SCH_DEVTODEV_BUSRDTOWR_OFF 2 +#define DDR_SCH_DEVTODEV_BUSWRTORD_OFF 4 + +/* HMC MMR IO48 registers */ +#define CTRLCFG0 0x28 +#define CTRLCFG1 0x2c +#define DRAMTIMING0 0x50 +#define CALTIMING0 0x7c +#define CALTIMING1 0x80 +#define CALTIMING2 0x84 +#define CALTIMING3 0x88 +#define CALTIMING4 0x8c +#define CALTIMING9 0xa0 +#define DRAMADDRW 0xa8 +#define DRAMSTS 0xec +#define NIOSRESERVED0 0x110 +#define NIOSRESERVED1 0x114 +#define NIOSRESERVED2 0x118 + +#define DRAMADDRW_CFG_COL_ADDR_WIDTH (x) \ + (((x) >> 0) & 0x1F) +#define DRAMADDRW_CFG_ROW_ADDR_WIDTH (x) \ + (((x) >> 5) & 0x1F) +#define DRAMADDRW_CFG_BANK_ADDR_WIDTH (x) \ + (((x) >> 10) & 0xF) +#define DRAMADDRW_CFG_BANK_GRP_ADDR_WIDTH (x) \ + (((x) >> 14) & 0x3) +#define DRAMADDRW_CFG_CS_ADDR_WIDTH (x) \ + (((x) >> 16) & 0x7) + +#define CTRLCFG0_CFG_MEMTYPE (x) \ + (((x) >> 0) & 0xF) +#define CTRLCFG0_CFG_DIMM_TYPE (x) \ + (((x) >> 4) & 0x7) +#define CTRLCFG0_CFG_AC_POS (x) \ + (((x) >> 7) & 0x3) +#define CTRLCFG0_CFG_CTRL_BURST_LEN (x) \ + (((x) >> 9) & 0x1F) + +#define CTRLCFG1_CFG_DBC3_BURST_LEN (x) \ + (((x) >> 0) & 0x1F) +#define CTRLCFG1_CFG_ADDR_ORDER (x) \ + (((x) >> 5) & 0x3) +#define CTRLCFG1_CFG_CTRL_EN_ECC (x) \ + (((x) >> 7) & 0x1) + +#define DRAMTIMING0_CFG_TCL (x) \ + (((x) >> 0) & 0x7F) + +#define CALTIMING0_CFG_ACT_TO_RDWR (x) \ + (((x) >> 0) & 0x3F) +#define CALTIMING0_CFG_ACT_TO_PCH (x) \ + (((x) >> 6) & 0x3F) +#define CALTIMING0_CFG_ACT_TO_ACT (x) \ + (((x) >> 12) & 0x3F) +#define CALTIMING0_CFG_ACT_TO_ACT_DB (x) \ + (((x) >> 18) & 0x3F) + +#define CALTIMING1_CFG_RD_TO_RD (x) \ + (((x) >> 0) & 0x3F) +#define CALTIMING1_CFG_RD_TO_RD_DC (x) \ + (((x) >> 6) & 0x3F) +#define CALTIMING1_CFG_RD_TO_RD_DB (x) \ + (((x) >> 12) & 0x3F) +#define CALTIMING1_CFG_RD_TO_WR (x) \ + (((x) >> 18) & 0x3F) +#define CALTIMING1_CFG_RD_TO_WR_DC (x) \ + (((x) >> 24) & 0x3F) + +#define CALTIMING2_CFG_RD_TO_WR_DB (x) \ + (((x) >> 0) & 0x3F) +#define CALTIMING2_CFG_RD_TO_WR_PCH (x) \ + (((x) >> 6) & 0x3F) +#define CALTIMING2_CFG_RD_AP_TO_VALID (x) \ + (((x) >> 12) & 0x3F) +#define CALTIMING2_CFG_WR_TO_WR (x) \ + (((x) >> 18) & 0x3F) +#define CALTIMING2_CFG_WR_TO_WR_DC (x) \ + (((x) >> 24) & 0x3F) + +#define CALTIMING3_CFG_WR_TO_WR_DB (x) \ + (((x) >> 0) & 0x3F) +#define CALTIMING3_CFG_WR_TO_RD (x) \ + (((x) >> 6) & 0x3F) +#define CALTIMING3_CFG_WR_TO_RD_DC (x) \ + (((x) >> 12) & 0x3F) +#define CALTIMING3_CFG_WR_TO_RD_DB (x) \ + (((x) >> 18) & 0x3F) +#define CALTIMING3_CFG_WR_TO_PCH (x) \ + (((x) >> 24) & 0x3F) + +#define CALTIMING4_CFG_WR_AP_TO_VALID (x) \ + (((x) >> 0) & 0x3F) +#define CALTIMING4_CFG_PCH_TO_VALID (x) \ + (((x) >> 6) & 0x3F) +#define CALTIMING4_CFG_PCH_ALL_TO_VALID (x) \ + (((x) >> 12) & 0x3F) +#define CALTIMING4_CFG_ARF_TO_VALID (x) \ + (((x) >> 18) & 0xFF) +#define CALTIMING4_CFG_PDN_TO_VALID (x) \ + (((x) >> 26) & 0x3F) + +#define CALTIMING9_CFG_4_ACT_TO_ACT (x) \ + (((x) >> 0) & 0xFF) + +#endif /* _SDRAM_S10_H_ */
arch/arm/mach-socfpga/misc.c +5 -6
@@ -227,12 +227,11 @@ static int do_bridge(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -U_BOOT_CMD ( - bridge,2 ,1 , do_bridge, -"SoCFPGA HPS FPGA bridge control" , -"enable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" -"bridge disable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" -"" +U_BOOT_CMD (bridge,2 ,1 , do_bridge, +"SoCFPGA HPS FPGA bridge control" , +"enable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" +"bridge disable - Enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges\n" +"" );#endif
drivers/ddr/altera/Makefile +1 -0
@@ -9,4 +9,5 @@ ifdef CONFIG_ALTERA_SDRAM obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += sdram_gen5.o sequencer.o obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += sdram_arria10.o +obj-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += sdram_s10.o endif
drivers/ddr/altera/sdram_s10.c new file +388 -0
388 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 9/10 board: altera: stratix10: Add socdk board support for Stratix10 SoC
In reply to Ley Foon TanAdd socdk board support for Stratix SoC
--- board/altera/stratix10-socdk/MAINTAINERS | 7 +++++++ board/altera/stratix10-socdk/Makefile | 7 +++++++ board/altera/stratix10-socdk/socfpga.c | 7 +++++++ 3 files changed, 21 insertions(+), 0 deletions(-) create mode 100644 board/altera/stratix10-socdk/MAINTAINERS create mode 100644 board/altera/stratix10-socdk/Makefile create mode 100644 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-2017 Intel Corporation <www.intel.com> +# +# SPDX-License-Identifier: GPL-2.0 +# + +obj-y := socfpga.o
board/altera/stratix10-socdk/socfpga.c new file +7 -0
@@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2016-2018 Intel Corporation <www.intel.com> +* +*/ + +#include <common.h>
Signature · 1 line
1.7.1
PATCH v3 10/10 arm: socfpga: stratix10: Enable Stratix10 SoC build
In reply to Ley Foon TanAdd build support for Stratix SoC
Conflicts:
arch/arm/Kconfig
arch/arm/mach-socfpga/Kconfig
--- arch/arm/Kconfig | 10 +- arch/arm/mach-socfpga/Kconfig | 13 ++ configs/socfpga_stratix10_defconfig | 56 +++++++ include/configs/socfpga_stratix10_socdk.h | 222 +++++++++++++++++++++++++++++ 4 files changed, 297 insertions(+), 4 deletions(-) create mode 100644 configs/socfpga_stratix10_defconfig create mode 100644 include/configs/socfpga_stratix10_socdk.h
arch/arm/Kconfig +6 -4
@@ -732,10 +732,10 @@ config ARCH_SOCFPGA bool "Altera SOCFPGA family" select ARCH_EARLY_INIT_R select ARCH_MISC_INIT - select CPU_V7A + select CPU_V7A if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10 select DM select DM_SERIAL - select ENABLE_ARM_SOC_BOOT0_HOOK + select ENABLE_ARM_SOC_BOOT0_HOOK if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10 select OF_CONTROL select SPL_LIBCOMMON_SUPPORT select SPL_LIBDISK_SUPPORT
@@ -745,20 +745,22 @@ config ARCH_SOCFPGA select SPL_OF_CONTROL select SPL_SERIAL_SUPPORT select SPL_DM_SERIAL + select SPL_RESET_SUPPORT select SPL_SPI_FLASH_SUPPORT if SPL_SPI_SUPPORT select SPL_SPI_SUPPORT if DM_SPI select SPL_WATCHDOG_SUPPORT select SUPPORT_SPL select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE select SYS_NS16550 - select SYS_THUMB_BUILD + select SYS_THUMB_BUILD if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10 + select ARM64 if TARGET_SOCFPGA_STRATIX10 imply CMD_MTDPARTS imply CRC32_VERIFY imply DM_SPI imply DM_SPI_FLASH imply FAT_WRITE - imply HW_WATCHDOG imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION + select SPL_SEPARATE_BSS if TARGET_SOCFPGA_STRATIX10 config ARCH_SUNXI bool "Support sunxi (Allwinner) SoCs"
arch/arm/mach-socfpga/Kconfig +13 -0
@@ -20,6 +20,12 @@ config TARGET_SOCFPGA_GEN5 bool select ALTERA_SDRAM +config TARGET_SOCFPGA_STRATIX10 + bool + select ARMV8_MULTIENTRY + select ARMV8_SPIN_TABLE + select ARMV8_SET_SMPEN + choice prompt "Altera SOCFPGA board select" optional
@@ -61,6 +67,10 @@ config TARGET_SOCFPGA_SR1500 bool "SR1500 (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5 +config TARGET_SOCFPGA_STRATIX10_SOCDK + bool "Intel 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
@@ -92,12 +102,14 @@ 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_ARRIA10_SOCDK default "altera" if TARGET_SOCFPGA_CYCLONE5_SOCDK + default "altera" if TARGET_SOCFPGA_STRATIX10_SOCDK default "aries" if TARGET_SOCFPGA_ARIES_MCVEVK default "devboards" if TARGET_SOCFPGA_DEVBOARDS_DBM_SOC1 default "ebv" if TARGET_SOCFPGA_EBV_SOCRATES
@@ -123,6 +135,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 +56 -0
56 lines not on this page · raw message
include/configs/socfpga_stratix10_socdk.h new file +222 -0
222 lines not on this page · raw message
Signature · 1 line
1.7.1
v3 cover Add Intel Stratix 10 SoC support
In reply to Marek VasutQuoted 12 lines · Marek Vasut
Quoted 11 lines · Ley Foon Tan
This is 3rd version of patchset to adds support for Intel Stratix 10 SoC. This patchset is work on top of uboot.git/master and patchset in [1].
Changes:
- rebase on uboot.git/master
- update reviewed-byPatchset history:
[v1]: https://patchwork.ozlabs.org/cover/900499/
[v2]: https://patchwork.ozlabs.org/cover/916060/
Quoted 5 lines
Quoted 1 line
Applied, thanks
--
Thanks!
Regards
Ley Foon