[U-Boot] [PATCH 2/2] armv8: ls2085a: Add support of LS2085A SoC
Prabhakar Kushwaha
prabhakar at freescale.com
Thu Oct 15 11:14:24 CEST 2015
From: Pratiyush Mohan Srivastava <pratiyush.srivastava at freescale.com>
Freescale's LS2085A is a another personality of LS2080A SoC with
support of AIOP and DP-DDR.
This Patch adds support of LS2085A Personality.
Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava at freescale.com>
---
arch/arm/cpu/armv8/fsl-lsch3/cpu.c | 4 +++-
arch/arm/cpu/armv8/fsl-lsch3/ls2080a_serdes.c | 5 +++++
arch/arm/include/asm/arch-fsl-lsch3/config.h | 8 ++++++--
configs/ls2080a_emu_defconfig | 3 +--
configs/ls2080a_simu_defconfig | 3 +--
configs/ls2080aqds_defconfig | 3 +--
configs/ls2080aqds_nand_defconfig | 3 +--
configs/ls2080ardb_defconfig | 3 +--
configs/ls2080ardb_nand_defconfig | 3 +--
configs/{ls2080a_emu_defconfig => ls2085a_emu_defconfig} | 3 +--
configs/{ls2080a_simu_defconfig => ls2085a_simu_defconfig} | 3 +--
configs/{ls2080aqds_defconfig => ls2085aqds_defconfig} | 3 +--
...{ls2080aqds_nand_defconfig => ls2085aqds_nand_defconfig} | 3 +--
configs/{ls2080ardb_defconfig => ls2085ardb_defconfig} | 3 +--
...{ls2080ardb_nand_defconfig => ls2085ardb_nand_defconfig} | 3 +--
drivers/ddr/fsl/fsl_ddr_gen4.c | 4 ++--
drivers/mmc/fsl_esdhc.c | 13 +++++++------
drivers/pci/pcie_layerscape.c | 2 +-
include/fsl_esdhc.h | 2 +-
include/linux/usb/xhci-fsl.h | 2 +-
20 files changed, 38 insertions(+), 38 deletions(-)
copy configs/{ls2080a_emu_defconfig => ls2085a_emu_defconfig} (86%)
copy configs/{ls2080a_simu_defconfig => ls2085a_simu_defconfig} (88%)
copy configs/{ls2080aqds_defconfig => ls2085aqds_defconfig} (82%)
copy configs/{ls2080aqds_nand_defconfig => ls2085aqds_nand_defconfig} (65%)
copy configs/{ls2080ardb_defconfig => ls2085ardb_defconfig} (82%)
copy configs/{ls2080ardb_nand_defconfig => ls2085ardb_nand_defconfig} (65%)
diff --git a/arch/arm/cpu/armv8/fsl-lsch3/cpu.c b/arch/arm/cpu/armv8/fsl-lsch3/cpu.c
index b219c76..c9cc112 100644
--- a/arch/arm/cpu/armv8/fsl-lsch3/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-lsch3/cpu.c
@@ -28,8 +28,10 @@ static struct cpu_type cpu_type_list[] = {
#ifdef CONFIG_LS2080A
CPU_TYPE_ENTRY(LS2080, LS2080, 8),
#endif
+#ifdef CONFIG_LS2085A
CPU_TYPE_ENTRY(LS2085, LS2085, 8),
CPU_TYPE_ENTRY(LS2045, LS2045, 4),
+#endif
};
void cpu_name(char *name)
@@ -174,7 +176,7 @@ static const struct sys_mmu_table lsch3_final_mmu_table[] = {
CONFIG_SYS_PCIE2_PHYS_SIZE, MT_DEVICE_NGNRNE, PMD_SECT_NON_SHARE },
{ CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR,
CONFIG_SYS_PCIE3_PHYS_SIZE, MT_DEVICE_NGNRNE, PMD_SECT_NON_SHARE },
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
{ CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR,
CONFIG_SYS_PCIE4_PHYS_SIZE, MT_DEVICE_NGNRNE, PMD_SECT_NON_SHARE },
#endif
diff --git a/arch/arm/cpu/armv8/fsl-lsch3/ls2080a_serdes.c b/arch/arm/cpu/armv8/fsl-lsch3/ls2080a_serdes.c
index 64da31c..6256721 100644
--- a/arch/arm/cpu/armv8/fsl-lsch3/ls2080a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-lsch3/ls2080a_serdes.c
@@ -29,7 +29,12 @@ static struct serdes_config serdes1_cfg_tbl[] = {
SGMII1 } },
{0x26, {SGMII8, SGMII7, SGMII6, SGMII5, SGMII4, SGMII3, XFI2, XFI1 } },
{0x28, {SGMII8, SGMII7, SGMII6, SGMII5, XFI4, XFI3, XFI2, XFI1 } },
+#ifdef CONFIG_LS2080A
{0x2A, {NONE, NONE, NONE, XFI5, XFI4, XFI3, XFI2, XFI1 } },
+#endif
+#ifdef CONFIG_LS2085A
+ {0x2A, {XFI8, XFI7, XFI6, XFI5, XFI4, XFI3, XFI2, XFI1 } },
+#endif
{0x2B, {SGMII8, SGMII7, SGMII6, SGMII5, XAUI1, XAUI1, XAUI1, XAUI1 } },
{0x32, {XAUI2, XAUI2, XAUI2, XAUI2, XAUI1, XAUI1, XAUI1, XAUI1 } },
{0x33, {PCIE2, PCIE2, PCIE2, PCIE2, QSGMII_C, QSGMII_D, QSGMII_A,
diff --git a/arch/arm/include/asm/arch-fsl-lsch3/config.h b/arch/arm/include/asm/arch-fsl-lsch3/config.h
index 78562ea..0733852 100644
--- a/arch/arm/include/asm/arch-fsl-lsch3/config.h
+++ b/arch/arm/include/asm/arch-fsl-lsch3/config.h
@@ -163,7 +163,11 @@
#define SCFG_BASE 0x01fc0000
#define SCFG_USB3PRM1CR 0x000
-#ifdef CONFIG_LS2080A
+#ifdef CONFIG_LS2085A
+#define CONFIG_SYS_FSL_HAS_DP_DDR
+#endif
+
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
#define CONFIG_MAX_CPUS 16
#define CONFIG_SYS_FSL_IFC_BANK_COUNT 8
#define CONFIG_NUM_DDR_CONTROLLERS 3
@@ -174,7 +178,7 @@
#error SoC not defined
#endif
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
#define CONFIG_SYS_FSL_ERRATUM_A008336
#define CONFIG_SYS_FSL_ERRATUM_A008511
#define CONFIG_SYS_FSL_ERRATUM_A008514
diff --git a/configs/ls2080a_emu_defconfig b/configs/ls2080a_emu_defconfig
index 7fda0f9..0ab2528 100644
--- a/configs/ls2080a_emu_defconfig
+++ b/configs/ls2080a_emu_defconfig
@@ -1,7 +1,6 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080A_EMU=y
-CONFIG_SYS_EXTRA_OPTIONS="EMU,SYS_FSL_DDR4"
-CONFIG_LS2080A=y
+CONFIG_SYS_EXTRA_OPTIONS="EMU,SYS_FSL_DDR4, LS2080A"
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
diff --git a/configs/ls2080a_simu_defconfig b/configs/ls2080a_simu_defconfig
index 777e866..274de54 100644
--- a/configs/ls2080a_simu_defconfig
+++ b/configs/ls2080a_simu_defconfig
@@ -1,7 +1,6 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080A_SIMU=y
-CONFIG_SYS_EXTRA_OPTIONS="SIMU"
-CONFIG_LS2080A=y
+CONFIG_SYS_EXTRA_OPTIONS="SIMU, LS2080A"
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
diff --git a/configs/ls2080aqds_defconfig b/configs/ls2080aqds_defconfig
index 5b9143a..482604d 100644
--- a/configs/ls2080aqds_defconfig
+++ b/configs/ls2080aqds_defconfig
@@ -1,11 +1,10 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080AQDS=y
# CONFIG_SYS_MALLOC_F is not set
-CONFIG_LS2080A=y
CONFIG_DM_SPI=y
CONFIG_DM_SPI_FLASH=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, LS2080A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
CONFIG_DM=y
diff --git a/configs/ls2080aqds_nand_defconfig b/configs/ls2080aqds_nand_defconfig
index 21cefe1..90a2c78 100644
--- a/configs/ls2080aqds_nand_defconfig
+++ b/configs/ls2080aqds_nand_defconfig
@@ -1,8 +1,7 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080AQDS=y
CONFIG_SPL=y
-CONFIG_LS2080A=y
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND, LS2080A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig
index 8ba93b8..31ac46d 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2080ardb_defconfig
@@ -2,10 +2,9 @@ CONFIG_ARM=y
CONFIG_TARGET_LS2080ARDB=y
# CONFIG_SYS_MALLOC_F is not set
CONFIG_DM_SPI=y
-CONFIG_LS2080A=y
CONFIG_DM_SPI_FLASH=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, LS2080A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
CONFIG_DM=y
diff --git a/configs/ls2080ardb_nand_defconfig b/configs/ls2080ardb_nand_defconfig
index 90d306e..0eb4187 100644
--- a/configs/ls2080ardb_nand_defconfig
+++ b/configs/ls2080ardb_nand_defconfig
@@ -1,8 +1,7 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080ARDB=y
CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND"
-CONFIG_LS2080A=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND, LS2080A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/ls2080a_emu_defconfig b/configs/ls2085a_emu_defconfig
similarity index 86%
copy from configs/ls2080a_emu_defconfig
copy to configs/ls2085a_emu_defconfig
index 7fda0f9..5f5fba9 100644
--- a/configs/ls2080a_emu_defconfig
+++ b/configs/ls2085a_emu_defconfig
@@ -1,7 +1,6 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080A_EMU=y
-CONFIG_SYS_EXTRA_OPTIONS="EMU,SYS_FSL_DDR4"
-CONFIG_LS2080A=y
+CONFIG_SYS_EXTRA_OPTIONS="EMU,SYS_FSL_DDR4, LS2085A"
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
diff --git a/configs/ls2080a_simu_defconfig b/configs/ls2085a_simu_defconfig
similarity index 88%
copy from configs/ls2080a_simu_defconfig
copy to configs/ls2085a_simu_defconfig
index 777e866..96ccbe2 100644
--- a/configs/ls2080a_simu_defconfig
+++ b/configs/ls2085a_simu_defconfig
@@ -1,7 +1,6 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080A_SIMU=y
-CONFIG_SYS_EXTRA_OPTIONS="SIMU"
-CONFIG_LS2080A=y
+CONFIG_SYS_EXTRA_OPTIONS="SIMU, LS2085A"
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
diff --git a/configs/ls2080aqds_defconfig b/configs/ls2085aqds_defconfig
similarity index 82%
copy from configs/ls2080aqds_defconfig
copy to configs/ls2085aqds_defconfig
index 5b9143a..75346b7 100644
--- a/configs/ls2080aqds_defconfig
+++ b/configs/ls2085aqds_defconfig
@@ -1,11 +1,10 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080AQDS=y
# CONFIG_SYS_MALLOC_F is not set
-CONFIG_LS2080A=y
CONFIG_DM_SPI=y
CONFIG_DM_SPI_FLASH=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, LS2085A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
CONFIG_DM=y
diff --git a/configs/ls2080aqds_nand_defconfig b/configs/ls2085aqds_nand_defconfig
similarity index 65%
copy from configs/ls2080aqds_nand_defconfig
copy to configs/ls2085aqds_nand_defconfig
index 21cefe1..7851890 100644
--- a/configs/ls2080aqds_nand_defconfig
+++ b/configs/ls2085aqds_nand_defconfig
@@ -1,8 +1,7 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080AQDS=y
CONFIG_SPL=y
-CONFIG_LS2080A=y
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND,LS2085A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2085ardb_defconfig
similarity index 82%
copy from configs/ls2080ardb_defconfig
copy to configs/ls2085ardb_defconfig
index 8ba93b8..f39d573 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2085ardb_defconfig
@@ -2,10 +2,9 @@ CONFIG_ARM=y
CONFIG_TARGET_LS2080ARDB=y
# CONFIG_SYS_MALLOC_F is not set
CONFIG_DM_SPI=y
-CONFIG_LS2080A=y
CONFIG_DM_SPI_FLASH=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, LS2085A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
CONFIG_DM=y
diff --git a/configs/ls2080ardb_nand_defconfig b/configs/ls2085ardb_nand_defconfig
similarity index 65%
copy from configs/ls2080ardb_nand_defconfig
copy to configs/ls2085ardb_nand_defconfig
index 90d306e..a425179 100644
--- a/configs/ls2080ardb_nand_defconfig
+++ b/configs/ls2085ardb_nand_defconfig
@@ -1,8 +1,7 @@
CONFIG_ARM=y
CONFIG_TARGET_LS2080ARDB=y
CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND"
-CONFIG_LS2080A=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND,LS2085A"
# CONFIG_CMD_SETEXPR is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index eefe709..7881a20 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -107,14 +107,14 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
goto step2;
#ifdef CONFIG_SYS_FSL_ERRATUM_A008336
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
/* A008336 only applies to general DDR controllers */
if ((ctrl_num == 0) || (ctrl_num == 1))
#endif
ddr_out32(eddrtqcr1, 0x63b30002);
#endif
#ifdef CONFIG_SYS_FSL_ERRATUM_A008514
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
/* A008514 only applies to DP-DDR controler */
if (ctrl_num == 2)
#endif
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index c1cd377..45a580d 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -106,7 +106,8 @@ static uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data)
xfertyp |= XFERTYP_RSPTYP_48;
#if defined(CONFIG_MX53) || defined(CONFIG_PPC_T4240) || \
- defined(CONFIG_LS102XA) || defined(CONFIG_LS2080A)
+ defined(CONFIG_LS102XA) || defined(CONFIG_LS2080A) || \
+ defined(CONFIG_LS2085A)
if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
xfertyp |= XFERTYP_CMDTYP_ABORT;
#endif
@@ -184,7 +185,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
int timeout;
struct fsl_esdhc_cfg *cfg = mmc->priv;
struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
dma_addr_t addr;
#endif
uint wml_value;
@@ -197,7 +198,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
esdhc_clrsetbits32(®s->wml, WML_RD_WML_MASK, wml_value);
#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
addr = virt_to_phys((void *)(data->dest));
if (upper_32_bits(addr))
printf("Error found for upper 32 bits\n");
@@ -223,7 +224,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
esdhc_clrsetbits32(®s->wml, WML_WR_WML_MASK,
wml_value << 16);
#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
addr = virt_to_phys((void *)(data->src));
if (upper_32_bits(addr))
printf("Error found for upper 32 bits\n");
@@ -277,7 +278,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
static void check_and_invalidate_dcache_range
(struct mmc_cmd *cmd,
struct mmc_data *data) {
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
unsigned start = 0;
#else
unsigned start = (unsigned)data->dest ;
@@ -285,7 +286,7 @@ static void check_and_invalidate_dcache_range
unsigned size = roundup(ARCH_DMA_MINALIGN,
data->blocks*data->blocksize);
unsigned end = start+size ;
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
dma_addr_t addr;
addr = virt_to_phys((void *)(data->dest));
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index a24e36f..2a320e4 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -663,7 +663,7 @@ void ft_pci_setup(void *blob, bd_t *bd)
}
#endif
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
void pcie_set_available_streamids(void *blob, const char *pcie_path,
u32 *stream_ids, int count)
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index ec5625d..012717a 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -166,7 +166,7 @@
#define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
struct fsl_esdhc_cfg {
-#ifdef CONFIG_LS2080A
+#if defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
u64 esdhc_base;
#else
u32 esdhc_base;
diff --git a/include/linux/usb/xhci-fsl.h b/include/linux/usb/xhci-fsl.h
index 80b7718..f665bf1 100644
--- a/include/linux/usb/xhci-fsl.h
+++ b/include/linux/usb/xhci-fsl.h
@@ -54,7 +54,7 @@ struct fsl_xhci {
#if defined(CONFIG_LS102XA)
#define CONFIG_SYS_FSL_XHCI_USB1_ADDR CONFIG_SYS_LS102XA_XHCI_USB1_ADDR
#define CONFIG_SYS_FSL_XHCI_USB2_ADDR 0
-#elif defined(CONFIG_LS2080A)
+#elif defined(CONFIG_LS2080A) || defined(CONFIG_LS2085A)
#define CONFIG_SYS_FSL_XHCI_USB1_ADDR CONFIG_SYS_LS2080A_XHCI_USB1_ADDR
#define CONFIG_SYS_FSL_XHCI_USB2_ADDR CONFIG_SYS_LS2080A_XHCI_USB2_ADDR
#endif
--
1.9.1
More information about the U-Boot
mailing list