Skip to contentSkip to conversation

board: arm:: Add support for Broadcom BCM23550

PATCH In review Steve Rae 2 participants 2 messages Jun 2, 2016 – Jun 19, 2016

Subsystems (2)
lore
Share & tools
lore

Steve Rae

author
#0 lore raw

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

Add support for the Broadcom BCM23550 board.

---

 arch/arm/Kconfig                            |   5 +
 arch/arm/cpu/armv7/Makefile                 |   1 +
 arch/arm/cpu/armv7/bcm235xx/Makefile        |  12 +
 arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c  | 573 ++++++++++++++++++++++++++++
 arch/arm/cpu/armv7/bcm235xx/clk-bsc.c       |  52 +++
 arch/arm/cpu/armv7/bcm235xx/clk-core.c      | 513 +++++++++++++++++++++++++
 arch/arm/cpu/armv7/bcm235xx/clk-core.h      | 491 ++++++++++++++++++++++++
 arch/arm/cpu/armv7/bcm235xx/clk-eth.c       | 143 +++++++
 arch/arm/cpu/armv7/bcm235xx/clk-sdio.c      |  73 ++++
 arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c   |  27 ++
 arch/arm/cpu/armv7/kona-common/Makefile     |   1 +
 arch/arm/cpu/armv7/kona-common/reset.S      |  26 ++
 arch/arm/include/asm/arch-bcm235xx/gpio.h   |  15 +
 arch/arm/include/asm/arch-bcm235xx/sysmap.h |  31 ++
 board/broadcom/bcm23550_w1d/Kconfig         |  15 +
 board/broadcom/bcm23550_w1d/MAINTAINERS     |   6 +
 board/broadcom/bcm23550_w1d/Makefile        |   7 +
 board/broadcom/bcm23550_w1d/bcm23550_w1d.c  | 120 ++++++
 configs/bcm23550_w1d_defconfig              |  24 ++
 include/configs/bcm23550_w1d.h              | 148 +++++++
 20 files changed, 2283 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/Makefile
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-bsc.c
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-core.c
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-core.h
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-eth.c
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-sdio.c
 create mode 100644 arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c
 create mode 100644 arch/arm/cpu/armv7/kona-common/reset.S
 create mode 100644 arch/arm/include/asm/arch-bcm235xx/gpio.h
 create mode 100644 arch/arm/include/asm/arch-bcm235xx/sysmap.h
 create mode 100644 board/broadcom/bcm23550_w1d/Kconfig
 create mode 100644 board/broadcom/bcm23550_w1d/MAINTAINERS
 create mode 100644 board/broadcom/bcm23550_w1d/Makefile
 create mode 100644 board/broadcom/bcm23550_w1d/bcm23550_w1d.c
 create mode 100644 configs/bcm23550_w1d_defconfig
 create mode 100644 include/configs/bcm23550_w1d.h
arch/arm/Kconfig +5 -0
index 7a77b6a..ca45928 100644
@@ -406,6 +406,10 @@ config TARGET_TI816X_EVM
 	select CPU_V7
 	select SUPPORT_SPL
 
+config TARGET_BCM23550_W1D
+	bool "Support bcm23550_w1d"
+	select CPU_V7
+
 config TARGET_BCM28155_AP
 	bool "Support bcm28155_ap"
 	select CPU_V7
@@ -835,6 +839,7 @@ source "board/armadeus/apf27/Kconfig"
 source "board/armltd/vexpress/Kconfig"
 source "board/armltd/vexpress64/Kconfig"
 source "board/bluegiga/apx4devkit/Kconfig"
+source "board/broadcom/bcm23550_w1d/Kconfig"
 source "board/broadcom/bcm28155_ap/Kconfig"
 source "board/broadcom/bcmcygnus/Kconfig"
 source "board/broadcom/bcmnsp/Kconfig"
arch/arm/cpu/armv7/Makefile +1 -0
index 328c4b1..0a5ac97 100644
@@ -38,6 +38,7 @@ obj-y += s5p-common/
 endif
 
 obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
+obj-$(if $(filter bcm235xx,$(SOC)),y) += bcm235xx/
 obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
 obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
 obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/
arch/arm/cpu/armv7/bcm235xx/Makefile new file +12 -0
new file mode 100644
index 0000000..7fdb263
@@ -0,0 +1,12 @@
+#
+# Copyright 2013 Broadcom Corporation.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	+= clk-core.o
+obj-y	+= clk-bcm235xx.o
+obj-y	+= clk-sdio.o
+obj-y	+= clk-bsc.o
+obj-$(CONFIG_BCM_SF2_ETH) += clk-eth.o
+obj-y	+= clk-usb-otg.o
arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c new file +573 -0

573 lines not on this page · raw message

arch/arm/cpu/armv7/bcm235xx/clk-bsc.c new file +52 -0

52 lines not on this page · raw message

arch/arm/cpu/armv7/bcm235xx/clk-core.c new file +513 -0

513 lines not on this page · raw message

arch/arm/cpu/armv7/bcm235xx/clk-core.h new file +491 -0

491 lines not on this page · raw message

arch/arm/cpu/armv7/bcm235xx/clk-eth.c new file +143 -0

143 lines not on this page · raw message

arch/arm/cpu/armv7/bcm235xx/clk-sdio.c new file +73 -0

73 lines not on this page · raw message

arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c new file +27 -0
new file mode 100644
index 0000000..1d7c5af
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2014 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/errno.h>
+#include <asm/arch/sysmap.h>
+#include "clk-core.h"
+
+/* Enable appropriate clocks for the USB OTG port */
+int clk_usb_otg_enable(void *base)
+{
+	char *ahbstr;
+
+	switch ((u32) base) {
+	case HSOTG_BASE_ADDR:
+		ahbstr = "usb_otg_ahb_clk";
+		break;
+	default:
+		printf("%s: base 0x%p not found\n", __func__, base);
+		return -EINVAL;
+	}
+
+	return clk_get_and_enable(ahbstr);
+}
arch/arm/cpu/armv7/kona-common/Makefile +1 -0
index da225cb..5167ebb 100644
@@ -7,3 +7,4 @@
 obj-y	+= s_init.o
 obj-y	+= hwinit-common.o
 obj-y	+= clk-stubs.o
+obj-${CONFIG_KONA_RESET_S} += reset.o
arch/arm/cpu/armv7/kona-common/reset.S new file +26 -0
new file mode 100644
index 0000000..220a1ec
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2013 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+.globl reset_cpu
+reset_cpu:
+	ldr	r1, =0x35001f00
+	ldr	r2, [r1]
+	ldr	r4, =0x80000000
+	and	r4, r2, r4
+	ldr	r3, =0xA5A500
+	orr	r4, r4, r3
+	orr	r4, r4, #0x1
+
+	str	r4, [r1]
+
+	ldr	r1, =0x35001f04
+	ldr	r2, [r1]
+	ldr	r4, =0x80000000
+	and	r4, r2, r4
+	str	r4, [r1]
+
+_loop_forever:
+	b	_loop_forever
arch/arm/include/asm/arch-bcm235xx/gpio.h new file +15 -0
new file mode 100644
index 0000000..da31f98
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2013 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __ARCH_BCM235XX_GPIO_H
+#define __ARCH_BCM235XX_GPIO_H
+
+/*
+ * Empty file - cmd_gpio.c requires this. The implementation
+ * is in drivers/gpio/kona_gpio.c instead of inlined here.
+ */
+
+#endif
arch/arm/include/asm/arch-bcm235xx/sysmap.h new file +31 -0
new file mode 100644
index 0000000..90eb2ff
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2013 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __ARCH_BCM235XX_SYSMAP_H
+
+#define BSC1_BASE_ADDR		0x3e016000
+#define BSC2_BASE_ADDR		0x3e017000
+#define BSC3_BASE_ADDR		0x3e018000
+#define GPIO2_BASE_ADDR		0x35003000
+#define HSOTG_BASE_ADDR		0x3f120000
+#define HSOTG_CTRL_BASE_ADDR	0x3f130000
+#define KONA_MST_CLK_BASE_ADDR	0x3f001000
+#define KONA_SLV_CLK_BASE_ADDR	0x3e011000
+#define PMU_BSC_BASE_ADDR	0x3500d000
+#define SDIO1_BASE_ADDR		0x3f180000
+#define SDIO2_BASE_ADDR		0x3f190000
+#define SDIO3_BASE_ADDR		0x3f1a0000
+#define SDIO4_BASE_ADDR		0x3f1b0000
+#define TIMER_BASE_ADDR		0x3e00d000
+
+#define HSOTG_DCTL_OFFSET					0x00000804
+#define    HSOTG_DCTL_SFTDISCON_MASK				0x00000002
+
+#define HSOTG_CTRL_PHY_P1CTL_OFFSET				0x00000008
+#define    HSOTG_CTRL_PHY_P1CTL_SOFT_RESET_MASK			0x00000002
+#define    HSOTG_CTRL_PHY_P1CTL_NON_DRIVING_MASK		0x00000001
+
+#endif
board/broadcom/bcm23550_w1d/Kconfig new file +15 -0
new file mode 100644
index 0000000..007a127
@@ -0,0 +1,15 @@
+if TARGET_BCM23550_W1D
+
+config SYS_BOARD
+	default "bcm23550_w1d"
+
+config SYS_VENDOR
+	default "broadcom"
+
+config SYS_SOC
+	default "bcm235xx"
+
+config SYS_CONFIG_NAME
+	default "bcm23550_w1d"
+
+endif
board/broadcom/bcm23550_w1d/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000..fdaa539
@@ -0,0 +1,6 @@
+BCM23550_W1D BOARD
+M:	Steve Rae <[email protected]>
+S:	Maintained
+F:	board/broadcom/bcm23550_w1d/
+F:	include/configs/bcm23550_w1d.h
+F:	configs/bcm23550_w1d_defconfig
board/broadcom/bcm23550_w1d/Makefile new file +7 -0
new file mode 100644
index 0000000..76bd032
@@ -0,0 +1,7 @@
+#
+# Copyright 2013 Broadcom Corporation.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	+= bcm23550_w1d.o
board/broadcom/bcm23550_w1d/bcm23550_w1d.c new file +120 -0

120 lines not on this page · raw message

configs/bcm23550_w1d_defconfig new file +24 -0
new file mode 100644
index 0000000..3328e51
@@ -0,0 +1,24 @@
+CONFIG_ARM=y
+CONFIG_TARGET_BCM23550_W1D=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_ASKENV=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_FAT=y
+CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
+CONFIG_G_DNL_VENDOR_NUM=0x18d1
+CONFIG_G_DNL_PRODUCT_NUM=0x0d02
+CONFIG_OF_LIBFDT=y
include/configs/bcm23550_w1d.h new file +148 -0

148 lines not on this page · raw message

Signature · 1 line
1.8.5
#1 lore raw
Quoted 3 lines · Steve Rae

Add support for the Broadcom BCM23550 board.

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: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160619/a22e18ae/attachment.sig>