Skip to content

Commit

Permalink
board: arm: Add support for Broadcom BCM7445
Browse files Browse the repository at this point in the history
Add support for loading U-Boot on the Broadcom 7445 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@fitzsim.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
  • Loading branch information
fitzsim authored and trini committed Jul 10, 2018
1 parent d154ca6 commit 894c3ad
Show file tree
Hide file tree
Showing 28 changed files with 1,305 additions and 1 deletion.
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ F: drivers/video/bcm2835.c
F: include/dm/platform_data/serial_bcm283x_mu.h
F: drivers/pinctrl/broadcom/

ARM BROADCOM BCMSTB
M: Thomas Fitzsimmons <fitzsim@fitzsim.org>
S: Maintained
F: arch/arm/mach-bcmstb/
F: board/broadcom/bcmstb/
F: configs/bcm7445_defconfig
F: doc/README.bcm7xxx
F: drivers/mmc/bcmstb_sdhci.c
F: drivers/spi/bcmstb_spi.c

ARM FREESCALE IMX
M: Stefano Babic <sbabic@denx.de>
M: Fabio Estevam <fabio.estevam@nxp.com>
Expand Down
12 changes: 12 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,16 @@ config TARGET_VEXPRESS_CA15_TC2
select CPU_V7_HAS_VIRT
select PL011_SERIAL

config ARCH_BCMSTB
bool "Broadcom BCM7XXX family"
select CPU_V7A
select DM
select OF_CONTROL
select OF_PRIOR_STAGE
help
This enables support for Broadcom ARM-based set-top box
chipsets, including the 7445 family of chips.

config TARGET_VEXPRESS_CA5X2
bool "Support vexpress_ca5x2"
select CPU_V7A
Expand Down Expand Up @@ -1326,6 +1336,8 @@ source "arch/arm/mach-at91/Kconfig"

source "arch/arm/mach-bcm283x/Kconfig"

source "arch/arm/mach-bcmstb/Kconfig"

source "arch/arm/mach-davinci/Kconfig"

source "arch/arm/mach-exynos/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)
machine-$(CONFIG_ARCH_ASPEED) += aspeed
machine-$(CONFIG_ARCH_AT91) += at91
machine-$(CONFIG_ARCH_BCM283X) += bcm283x
machine-$(CONFIG_ARCH_BCMSTB) += bcmstb
machine-$(CONFIG_ARCH_DAVINCI) += davinci
machine-$(CONFIG_ARCH_EXYNOS) += exynos
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
Expand Down
36 changes: 36 additions & 0 deletions arch/arm/mach-bcmstb/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
if ARCH_BCMSTB

config TARGET_BCM7445
bool "Broadcom 7445 TSBL"
depends on ARCH_BCMSTB
help
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 SYS_CPU
default "armv7"

config SYS_BOARD
default "bcmstb"

config SYS_VENDOR
default "broadcom"

config SYS_SOC
default "bcmstb"

config SYS_CONFIG_NAME
default "bcm7445"

config SYS_FDT_SAVE_ADDRESS
hex "Address to which the prior stage provided DTB will be copied"
default 0x1f00000

config BCMSTB_SDHCI_INDEX
int "Index of preferred BCMSTB SDHCI alias in DTB"
default 1

endif
8 changes: 8 additions & 0 deletions arch/arm/mach-bcmstb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2018 Cisco Systems, Inc.
#
# Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
#

obj-y := lowlevel_init.o
11 changes: 11 additions & 0 deletions arch/arm/mach-bcmstb/include/mach/gpio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Cisco Systems, Inc.
*
* Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
*/

#ifndef _BCMSTB_GPIO_H
#define _BCMSTB_GPIO_H

#endif /* _BCMSTB_GPIO_H */
11 changes: 11 additions & 0 deletions arch/arm/mach-bcmstb/include/mach/hardware.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Cisco Systems, Inc.
*
* Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
*/

#ifndef _BCMSTB_HARDWARE_H
#define _BCMSTB_HARDWARE_H

#endif /* _BCMSTB_HARDWARE_H */
30 changes: 30 additions & 0 deletions arch/arm/mach-bcmstb/include/mach/prior_stage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Cisco Systems, Inc.
*
* Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
*/

#ifndef _BCMSTB_PRIOR_STAGE_H
#define _BCMSTB_PRIOR_STAGE_H

#ifndef __ASSEMBLY__

#include <linux/types.h>

struct bcmstb_boot_parameters {
u32 r0;
u32 r1;
u32 r2;
u32 r3;
u32 sp;
u32 lr;
};

extern struct bcmstb_boot_parameters bcmstb_boot_parameters;

extern phys_addr_t prior_stage_fdt_address;

#endif /* __ASSEMBLY__ */

#endif /* _BCMSTB_PRIOR_STAGE_H */
15 changes: 15 additions & 0 deletions arch/arm/mach-bcmstb/include/mach/sdhci.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Cisco Systems, Inc.
*
* Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
*/

#ifndef _BCMSTB_SDHCI_H
#define _BCMSTB_SDHCI_H

#include <linux/types.h>

int bcmstb_sdhci_init(phys_addr_t regbase);

#endif /* _BCMSTB_SDHCI_H */
13 changes: 13 additions & 0 deletions arch/arm/mach-bcmstb/include/mach/timer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Cisco Systems, Inc.
*
* Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
*/

#ifndef _BCMSTB_TIMER_H
#define _BCMSTB_TIMER_H

unsigned long timer_read_counter(void);

#endif /* _BCMSTB_TIMER_H */
21 changes: 21 additions & 0 deletions arch/arm/mach-bcmstb/lowlevel_init.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Cisco Systems, Inc.
*
* Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
*/

#include <linux/linkage.h>

ENTRY(save_boot_params)
ldr r6, =bcmstb_boot_parameters
str r0, [r6, #0]
str r1, [r6, #4]
str r2, [r6, #8]
str r3, [r6, #12]
str sp, [r6, #16]
str lr, [r6, #20]
ldr r6, =prior_stage_fdt_address
str r2, [r6]
b save_boot_params_ret
ENDPROC(save_boot_params)
7 changes: 7 additions & 0 deletions board/broadcom/bcmstb/MAINTAINERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
BCM7445 BOARD
M: Thomas Fitzsimmons <fitzsim@fitzsim.org>
S: Maintained
F: board/broadcom/bcmstb/
F: include/configs/bcmstb.h
F: include/configs/bcm7445.h
F: configs/bcm7445_defconfig
8 changes: 8 additions & 0 deletions board/broadcom/bcmstb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2018 Cisco Systems, Inc.
#
# Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
#

obj-y := bcmstb.o
Loading

0 comments on commit 894c3ad

Please sign in to comment.