Skip to contentSkip to conversation

board: ns2: Add support for Broadcom Northstar 2

PATCH Superseded Jon Mason 3 participants 3 messages Feb 17, 2017 – Feb 22, 2017

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 board: ns2: Add support for Broadcom Northstar 2

Add support for the Broadcom Northstar2 SoC and SVK (bcm958712k). The BCM5871X is a series of quad-core 64-bit 2GHz ARMv8 Cortex-A57 processors targeting a broad range of networking applications.

---
 arch/arm/Kconfig                      |  9 ++++++
 board/broadcom/bcm958712k/MAINTAINERS |  6 ++++
 board/broadcom/bcmns2/Kconfig         | 15 +++++++++
 board/broadcom/bcmns2/Makefile        |  7 +++++
 board/broadcom/bcmns2/northstar2.c    | 57 +++++++++++++++++++++++++++++++++++
 configs/bcm958712k_defconfig          |  9 ++++++
 include/configs/bcm_northstar2.h      | 55 +++++++++++++++++++++++++++++++++
 7 files changed, 158 insertions(+)
 create mode 100644 board/broadcom/bcm958712k/MAINTAINERS
 create mode 100644 board/broadcom/bcmns2/Kconfig
 create mode 100644 board/broadcom/bcmns2/Makefile
 create mode 100644 board/broadcom/bcmns2/northstar2.c
 create mode 100644 configs/bcm958712k_defconfig
 create mode 100644 include/configs/bcm_northstar2.h
arch/arm/Kconfig +9 -0
index 0229800..6eb125b 100644
@@ -471,6 +471,14 @@ config TARGET_BCMNSP
 	bool "Support bcmnsp"
 	select CPU_V7
 
+config TARGET_BCMNS2
+	bool "Support Broadcom Northstar2"
+	select ARM64
+	help
+	  Support for Broadcom Northstar 2 SoCs.  NS2 is a quad-core 64-bit
+	  ARMv8 Cortex-A57 processors targeting a broad range of networking
+	  applications
+
 config ARCH_EXYNOS
 	bool "Samsung EXYNOS"
 	select DM
@@ -1090,6 +1098,7 @@ source "board/broadcom/bcm23550_w1d/Kconfig"
 source "board/broadcom/bcm28155_ap/Kconfig"
 source "board/broadcom/bcmcygnus/Kconfig"
 source "board/broadcom/bcmnsp/Kconfig"
+source "board/broadcom/bcmns2/Kconfig"
 source "board/cavium/thunderx/Kconfig"
 source "board/cirrus/edb93xx/Kconfig"
 source "board/compulab/cm_t335/Kconfig"
board/broadcom/bcm958712k/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000..024fb14
@@ -0,0 +1,6 @@
+BCM958712K BOARD
+M:	Jon Mason <[email protected]>
+S:	Maintained
+F:	board/broadcom/bcmns2/
+F:	include/configs/bcm_northstar2.h
+F:	configs/bcm958712k_defconfig
board/broadcom/bcmns2/Kconfig new file +15 -0
new file mode 100644
index 0000000..3ac6724
@@ -0,0 +1,15 @@
+if TARGET_BCMNS2
+
+config SYS_BOARD
+	default "bcmns2"
+
+config SYS_VENDOR
+	default "broadcom"
+
+config SYS_SOC
+	default "ns2"
+
+config SYS_CONFIG_NAME
+	default "bcm_northstar2"
+
+endif
board/broadcom/bcmns2/Makefile new file +7 -0
new file mode 100644
index 0000000..f6ddd80
@@ -0,0 +1,7 @@
+#
+# Copyright 2016 Broadcom Ltd.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= northstar2.o
board/broadcom/bcmns2/northstar2.c new file +57 -0

57 lines not on this page · raw message

configs/bcm958712k_defconfig new file +9 -0
new file mode 100644
index 0000000..b00d3d6
@@ -0,0 +1,9 @@
+CONFIG_ARM=y
+CONFIG_TARGET_BCMNS2=y
+CONFIG_IDENT_STRING=" Broadcom Northstar 2"
+CONFIG_BOOTDELAY=30
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_SYS_PROMPT="u-boot> "
+# CONFIG_CMD_IMLS is not set
+CONFIG_SYS_NS16550=y
+CONFIG_OF_LIBFDT=y
include/configs/bcm_northstar2.h new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 board: ns2: Add support for Broadcom Northstar 2

Quoted 5 lines · Jon Mason

Add support for the Broadcom Northstar2 SoC and SVK (bcm958712k). The BCM5871X is a series of quad-core 64-bit 2GHz ARMv8 Cortex-A57 processors targeting a broad range of networking applications.

Quoted 15 lines
---
 arch/arm/Kconfig                      |  9 ++++++
 board/broadcom/bcm958712k/MAINTAINERS |  6 ++++
 board/broadcom/bcmns2/Kconfig         | 15 +++++++++
 board/broadcom/bcmns2/Makefile        |  7 +++++
 board/broadcom/bcmns2/northstar2.c    | 57 +++++++++++++++++++++++++++++++++++
 configs/bcm958712k_defconfig          |  9 ++++++
 include/configs/bcm_northstar2.h      | 55 +++++++++++++++++++++++++++++++++
 7 files changed, 158 insertions(+)
 create mode 100644 board/broadcom/bcm958712k/MAINTAINERS
 create mode 100644 board/broadcom/bcmns2/Kconfig
 create mode 100644 board/broadcom/bcmns2/Makefile
 create mode 100644 board/broadcom/bcmns2/northstar2.c
 create mode 100644 configs/bcm958712k_defconfig
 create mode 100644 include/configs/bcm_northstar2.h

I assume you have some follow up patches to add some code under arch/arm/mach-xxxx ? Or is there just a whole bunch of stuff that's done in ATF or similar instead? Also:

board/broadcom/bcmns2/northstar2.c line 43

Quoted 5 lines
board/broadcom/bcmns2/northstar2.c new file +5 -0
+int dram_init(void)
+{
+	gd->ram_size = PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE;
+	return 0;
+}

You should be using get_ram_size() here.

[snip]

Quoted 1 line

+CONFIG_BOOTDELAY=30

Having 30 seconds here is huge. I know in your talk you were mentioning how to interrupt boot but I'd really rather not see this exceed 10 and 5 is usually sufficient.

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

PATCH 1/1 board: ns2: Add support for Broadcom Northstar 2

Quoted 23 lines · Tom Rini
Quoted 5 lines · Jon Mason

Add support for the Broadcom Northstar2 SoC and SVK (bcm958712k). The BCM5871X is a series of quad-core 64-bit 2GHz ARMv8 Cortex-A57 processors targeting a broad range of networking applications.

Quoted 15 lines
---
 arch/arm/Kconfig                      |  9 ++++++
 board/broadcom/bcm958712k/MAINTAINERS |  6 ++++
 board/broadcom/bcmns2/Kconfig         | 15 +++++++++
 board/broadcom/bcmns2/Makefile        |  7 +++++
 board/broadcom/bcmns2/northstar2.c    | 57 +++++++++++++++++++++++++++++++++++
 configs/bcm958712k_defconfig          |  9 ++++++
 include/configs/bcm_northstar2.h      | 55 +++++++++++++++++++++++++++++++++
 7 files changed, 158 insertions(+)
 create mode 100644 board/broadcom/bcm958712k/MAINTAINERS
 create mode 100644 board/broadcom/bcmns2/Kconfig
 create mode 100644 board/broadcom/bcmns2/Makefile
 create mode 100644 board/broadcom/bcmns2/northstar2.c
 create mode 100644 configs/bcm958712k_defconfig
 create mode 100644 include/configs/bcm_northstar2.h
Quoted 3 lines

I assume you have some follow up patches to add some code under arch/arm/mach-xxxx ? Or is there just a whole bunch of stuff that's done in ATF or similar instead? Also:

Most/all of the ugliness is being hidden by ATF. So, I believe there is no need for arch/arm/mach-iproc for NS2.

I will have more patches coming to add drivers for boot devices. However, I was going to add those serially. The side benefit

Quoted 7 lines

board/broadcom/bcmns2/northstar2.c line 43

Quoted 5 lines
board/broadcom/bcmns2/northstar2.c new file +5 -0
+int dram_init(void)
+{
+     gd->ram_size = PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE;
+     return 0;
+}

You should be using get_ram_size() here.

Will do

Quoted 6 lines

[snip]

Quoted 1 line

+CONFIG_BOOTDELAY=30

Having 30 seconds here is huge. I know in your talk you were mentioning how to interrupt boot but I'd really rather not see this exceed 10 and 5 is usually sufficient.

5 secs is fine

Also, Alexander Graf mentioned needing to add DISTRO_DEFAULTS (IIRC).

I'll make those changes and push a v2. Thanks for the reviews!

Thanks,
Jon

Quoted 3 lines

--
Tom