[U-Boot] [PATCH] board: arm: Add support for Broadcom BCM7260

Thomas Fitzsimmons fitzsim at fitzsim.org
Fri Aug 17 01:44:06 UTC 2018


Add support for loading U-Boot on the Broadcom 7260 SoC.  This port
assumes Broadcom's BOLT bootloader is acting as the second stage
bootloader, and U-Boot is acting as the third stage bootloader, loaded
as an ELF program by BOLT.

Signed-off-by: Thomas Fitzsimmons <fitzsim at fitzsim.org>
---
 arch/arm/mach-bcmstb/Kconfig | 13 ++++++++++---
 configs/bcm7260_defconfig    | 23 +++++++++++++++++++++++
 include/configs/bcm7260.h    | 35 +++++++++++++++++++++++++++++++++++
 include/configs/bcmstb.h     | 10 ++++++++--
 4 files changed, 76 insertions(+), 5 deletions(-)
 create mode 100644 configs/bcm7260_defconfig
 create mode 100644 include/configs/bcm7260.h

diff --git a/arch/arm/mach-bcmstb/Kconfig b/arch/arm/mach-bcmstb/Kconfig
index 6c7952f..0a56c3c 100644
--- a/arch/arm/mach-bcmstb/Kconfig
+++ b/arch/arm/mach-bcmstb/Kconfig
@@ -7,8 +7,14 @@ config TARGET_BCM7445
 	  Support for the Broadcom 7445 SoC.  This port assumes BOLT
 	  is acting as the second stage bootloader, and U-Boot is
 	  acting as the third stage bootloader (TSBL), loaded by BOLT.
-	  This port may work on other BCM7xxx boards with
-	  configuration changes.
+
+config TARGET_BCM7260
+	bool "Broadcom 7260 TSBL"
+	depends on ARCH_BCMSTB
+	help
+	  Support for the Broadcom 7260 SoC.  This port assumes BOLT
+	  is acting as the second stage bootloader, and U-Boot is
+	  acting as the third stage bootloader (TSBL), loaded by BOLT.
 
 config SYS_CPU
 	default "armv7"
@@ -23,7 +29,8 @@ config SYS_SOC
 	default "bcmstb"
 
 config SYS_CONFIG_NAME
-	default "bcm7445"
+	default "bcm7445" if TARGET_BCM7445
+	default "bcm7260" if TARGET_BCM7260
 
 config SYS_FDT_SAVE_ADDRESS
 	hex "Address to which the prior stage provided DTB will be copied"
diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig
new file mode 100644
index 0000000..a04f700
--- /dev/null
+++ b/configs/bcm7260_defconfig
@@ -0,0 +1,23 @@
+CONFIG_ARM=y
+CONFIG_ARCH_BCMSTB=y
+CONFIG_TARGET_BCM7260=y
+CONFIG_USE_PRIVATE_LIBGCC=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_PRIOR_STAGE=y
+CONFIG_DM=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_RSA=y
+CONFIG_BLK=n
+CONFIG_SDHCI=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_BCMSTB=y
+CONFIG_CONS_INDEX=3
+CONFIG_BOOTDELAY=1
+CONFIG_SYS_PROMPT="U-Boot>"
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_TEXT_BASE=0x10100000
+CONFIG_SYS_NS16550_COM3=0xf040c000
+CONFIG_EFI_LOADER=n
+CONFIG_EFI_PARTITION=y
diff --git a/include/configs/bcm7260.h b/include/configs/bcm7260.h
new file mode 100644
index 0000000..1a5eab1
--- /dev/null
+++ b/include/configs/bcm7260.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2018  Cisco Systems, Inc.
+ *
+ * Author: Thomas Fitzsimmons <fitzsim at fitzsim.org>
+ *
+ * Configuration settings for the Broadcom BCM7260 SoC family.
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_SYS_NS16550_COM3	0xf040c000
+
+#define CONFIG_NR_DRAM_BANKS		1
+
+#define CONFIG_SYS_TEXT_BASE		0x10100000
+#define CONFIG_SYS_INIT_RAM_ADDR	0x10200000
+
+#define CONFIG_SYS_MALLOC_LEN		((40 * 1024) << 10) /* 40 MiB */
+
+#include "bcmstb.h"
+
+#define BCMSTB_SDHCI_BASE	0xf0200300
+#define BCMSTB_TIMER_LOW	0xf0412008
+#define BCMSTB_TIMER_HIGH	0xf041200c
+#define BCMSTB_TIMER_FREQUENCY	0xf0412020
+#define BCMSTB_HIF_MSPI_BASE	0xf0203c00
+#define BCMSTB_BSPI_BASE	0xf0203a00
+#define BCMSTB_HIF_SPI_INTR2	0xf0201a00
+#define BCMSTB_CS_REG		0xf0200920
+
+#define CONFIG_CMD_GPT
+
+#endif	/* __CONFIG_H */
diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index c74fe40..2dcefb8 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -158,9 +158,15 @@ extern phys_addr_t prior_stage_fdt_address;
  */
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
-#define CONFIG_ENV_OFFSET		0x1e0000
 #define CONFIG_ENV_SIZE			(64 << 10) /* 64 KiB */
-#define CONFIG_ENV_SECT_SIZE		CONFIG_ENV_SIZE
+#if defined(CONFIG_ENV_IS_IN_MMC)
+# define CONFIG_SYS_MMC_ENV_DEV		0
+# define CONFIG_SYS_MMC_ENV_PART	0
+# define CONFIG_ENV_OFFSET		(0x000040a4 * 512)
+#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
+# define CONFIG_ENV_OFFSET		0x1e0000
+# define CONFIG_ENV_SECT_SIZE		CONFIG_ENV_SIZE
+#endif
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_ENV_OVERWRITE
 
-- 
1.8.3.1



More information about the U-Boot mailing list