Skip to contentSkip to conversation

board: arm: Add support for Broadcom BCM7260

PATCH Superseded Thomas Fitzsimmons 3 participants 8 messages Aug 17, 2018 – Sep 11, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: arm: Add support for Broadcom BCM7260

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.

---
 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
arch/arm/mach-bcmstb/Kconfig +10 -3
index 6c7952f..0a56c3c 100644
@@ -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"
configs/bcm7260_defconfig new file +23 -0
new file mode 100644
index 0000000..a04f700
@@ -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
include/configs/bcm7260.h new file +35 -0
new file mode 100644
index 0000000..1a5eab1
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2018  Cisco Systems, Inc.
+ *
+ * Author: Thomas Fitzsimmons <[email protected]>
+ *
+ * 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 */
include/configs/bcmstb.h +8 -2
index c74fe40..2dcefb8 100644
@@ -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
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 board: arm: Add support for Broadcom BCM7260

Quoted 6 lines · Thomas Fitzsimmons

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.

Looks good to me given the structured you added earlier for 7445 support, just one nit below:

[snip]

include/configs/bcm7260.h line 13

Quoted 5 lines
include/configs/bcm7260.h new file +5 -0
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_SYS_NS16550_COM3	0xf040c000

This is the physical address of UARTA, there are typically 3 UARTs on those SoCs, is there a reason to name this COM3 and not COM1? If this is an established u-boot convention, pardon my ignore here.

Signature · 1 line
Florian
#2 lore raw

PATCH 1/1 board: arm: Add support for Broadcom BCM7260

Hi Florian,

Florian Fainelli <[email protected]> writes:

[...]

Quoted 5 lines
Quoted 1 line

+#define CONFIG_SYS_NS16550_COM3 0xf040c000

This is the physical address of UARTA, there are typically 3 UARTs on those SoCs, is there a reason to name this COM3 and not COM1? If this is an established u-boot convention, pardon my ignore here.

There wasn't a good reason not to make this COM1, so I changed it and BCM7445 to use CONFIG_CONS_INDEX=1 in the latest patch set I posted.

Thanks for reviewing,
Thomas

#3 lore raw

v2 cover board: arm: Add support for Broadcom BCM7260

In reply to Thomas Fitzsimmons

Add support for loading U-Boot on the Broadcom 7260 SoC. The first patch in this series reorganizes the BCM7445 configury to make way for BCM7260.

Thomas Fitzsimmons (2):
arm: bcm7445: Change serial console index
board: arm: Add support for Broadcom BCM7260

 MAINTAINERS                       |  2 +-
 arch/arm/mach-bcmstb/Kconfig      | 13 ++++++++++---
 board/broadcom/bcmstb/MAINTAINERS |  8 ++++++++
 configs/bcm7260_defconfig         | 17 +++++++++++++++++
 configs/bcm7445_defconfig         |  8 ++++----
 include/configs/bcm7260.h         | 40 +++++++++++++++++++++++++++++++++++++++
 include/configs/bcm7445.h         |  9 +++++++--
 include/configs/bcmstb.h          |  4 ----
 8 files changed, 87 insertions(+), 14 deletions(-)
 create mode 100644 configs/bcm7260_defconfig
 create mode 100644 include/configs/bcm7260.h
Signature · 1 line
1.8.3.1
#4 lore raw

PATCH v2 1/2 arm: bcm7445: Change serial console index

Change the configured serial console index to reflect that it is the first physical UART, reorder some defconfig lines and move some environment configuration from bcmstb.h to bcm7445.h.

---
Changes for v2:
- Rebase to master tip
- Change serial console index
- Reorder defconfig lines
- Move some environment configuration to bcm7445.h

 configs/bcm7445_defconfig | 8 ++++----
 include/configs/bcm7445.h | 9 +++++++--
 include/configs/bcmstb.h  | 4 ----
 3 files changed, 11 insertions(+), 10 deletions(-)
configs/bcm7445_defconfig +4 -4
index 59c745f..cb15226 100644
@@ -12,10 +12,10 @@ CONFIG_OF_PRIOR_STAGE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCMSTB=y
-CONFIG_DM_SPI_FLASH=y
-CONFIG_SPI_FLASH=y
-CONFIG_CONS_INDEX=3
+CONFIG_CONS_INDEX=1
+CONFIG_EFI_LOADER=n
 CONFIG_SPI=y
+CONFIG_SPI_FLASH=y
 CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_BCMSTB_SPI=y
-# CONFIG_EFI_LOADER is not set
include/configs/bcm7445.h +7 -2
index f34cf2d..8c675f7 100644
@@ -10,7 +10,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_SYS_NS16550_COM3	0xf040ab00
+#define CONFIG_SYS_NS16550_COM1	0xf040ab00
 
 #define CONFIG_SYS_TEXT_BASE		0x80100000
 #define CONFIG_SYS_INIT_RAM_ADDR	0x80200000
@@ -28,7 +28,12 @@
 #define BCMSTB_HIF_SPI_INTR2	0xf03e1a00
 #define BCMSTB_CS_REG		0xf03e0920
 
-#define CONFIG_ENV_IS_IN_SPI_FLASH	1
+/*
+ * Environment configuration for SPI flash.
+ */
+#define CONFIG_ENV_OFFSET	0x1e0000
+#define CONFIG_ENV_SECT_SIZE	CONFIG_ENV_SIZE
+
 #define CONFIG_DM_SPI			1
 #define CONFIG_SYS_MAX_FLASH_BANKS	1
 #define CONFIG_CMD_SF
include/configs/bcmstb.h +0 -4
index e755383..cc28924 100644
@@ -114,7 +114,6 @@ extern phys_addr_t prior_stage_fdt_address;
 /*
  * Serial console configuration.
  */
-
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \
 					 115200}
@@ -151,10 +150,7 @@ extern phys_addr_t prior_stage_fdt_address;
  * Environment configuration.
  */
 #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
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_ENV_OVERWRITE
 
Signature · 1 line
1.8.3.1
#5 lore raw

PATCH v2 1/2 arm: bcm7445: Change serial console index

Quoted 6 lines · Thomas Fitzsimmons

Change the configured serial console index to reflect that it is the first physical UART, reorder some defconfig lines and move some environment configuration from bcmstb.h to bcm7445.h.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180911/accf9405/attachment.sig>
#6 lore raw

PATCH v2 2/2 board: arm: Add support for Broadcom BCM7260

In reply to Thomas Fitzsimmons

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.

---
Changes for v2:
- Rebase to master tip
- Change serial console index
- Simplify and reorder defconfig
- Move some environment configuration to bcm7260.h
- Update MAINTAINERS files

 MAINTAINERS                       |  2 +-
 arch/arm/mach-bcmstb/Kconfig      | 13 ++++++++++---
 board/broadcom/bcmstb/MAINTAINERS |  8 ++++++++
 configs/bcm7260_defconfig         | 17 +++++++++++++++++
 include/configs/bcm7260.h         | 40 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 76 insertions(+), 4 deletions(-)
 create mode 100644 configs/bcm7260_defconfig
 create mode 100644 include/configs/bcm7260.h
MAINTAINERS +1 -1
index 8f23712..a1c31e2 100644
@@ -113,7 +113,7 @@ M:	Thomas Fitzsimmons <[email protected]>
 S:	Maintained
 F:	arch/arm/mach-bcmstb/
 F:	board/broadcom/bcmstb/
-F:	configs/bcm7445_defconfig
+F:	configs/bcm7*_defconfig
 F:	doc/README.bcm7xxx
 F:	drivers/mmc/bcmstb_sdhci.c
 F:	drivers/spi/bcmstb_spi.c
arch/arm/mach-bcmstb/Kconfig +10 -3
index 6c7952f..0a56c3c 100644
@@ -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"
board/broadcom/bcmstb/MAINTAINERS +8 -0
index 5851cb9..eda29b9 100644
@@ -5,3 +5,11 @@ F:	board/broadcom/bcmstb/
 F:	include/configs/bcmstb.h
 F:	include/configs/bcm7445.h
 F:	configs/bcm7445_defconfig
+
+BCM7260 BOARD
+M:	Thomas Fitzsimmons <[email protected]>
+S:	Maintained
+F:	board/broadcom/bcmstb/
+F:	include/configs/bcmstb.h
+F:	include/configs/bcm7260.h
+F:	configs/bcm7260_defconfig
configs/bcm7260_defconfig new file +17 -0
new file mode 100644
index 0000000..e3b6ed4
@@ -0,0 +1,17 @@
+CONFIG_ARM=y
+CONFIG_ARCH_BCMSTB=y
+CONFIG_SYS_TEXT_BASE=0x10100000
+CONFIG_TARGET_BCM7260=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_BOOTDELAY=1
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="U-Boot>"
+CONFIG_OF_PRIOR_STAGE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_BCMSTB=y
+CONFIG_CONS_INDEX=1
+CONFIG_EFI_LOADER=n
+CONFIG_EFI_PARTITION=y
include/configs/bcm7260.h new file +40 -0
new file mode 100644
index 0000000..a2d7f61
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2018  Cisco Systems, Inc.
+ *
+ * Author: Thomas Fitzsimmons <[email protected]>
+ *
+ * Configuration settings for the Broadcom BCM7260 SoC family.
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_SYS_NS16550_COM1	0xf040c000
+
+#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
+
+/*
+ * Environment configuration for eMMC.
+ */
+#define CONFIG_ENV_OFFSET	(0x000040a4 * 512)
+#define CONFIG_SYS_MMC_ENV_DEV	0
+#define CONFIG_SYS_MMC_ENV_PART	0
+
+#define CONFIG_CMD_GPT
+
+#endif	/* __CONFIG_H */
Signature · 1 line
1.8.3.1
#7 lore raw

PATCH v2 2/2 board: arm: Add support for Broadcom BCM7260

Quoted 8 lines · Thomas Fitzsimmons

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180911/fadc4417/attachment.sig>