arm: bcmbca: add basic support for more Broadcom BCA SoCs
William Zhang
maintainercover arm: bcmbca: add basic support for more Broadcom BCA SoCs
Broadcom BCA (Broadband Carrier Access origin) chipset family includes DSL, PON and WLAN access point and gateway SoC. Now that the ARCH_BCMBCA architecture and its first SoC BCM47622 are supported in u-boot 2022.07, this patch series add the basic support for following BCA chips underARCH_BCMBCA: BCM4908, BCM4912, BCM63146 and BCM6813.
This patch series applies on top of the my previous patch [1].
[1] https://lists.denx.de/pipermail/u-boot/2022-August/491060.html
William Zhang (4):
arm: bcmbca: add bcm63146 SoC support
arm: bcmbca: add bcm4912 SoC support
arm: bcmbca: add bcm6813 SoC support
arm: bcmbca: add bcm4908 SoC support
MAINTAINERS | 4 + arch/arm/dts/Makefile | 8 ++ arch/arm/dts/bcm4908.dtsi | 127 +++++++++++++++++++++ arch/arm/dts/bcm4912.dtsi | 128 ++++++++++++++++++++++ arch/arm/dts/bcm63146.dtsi | 110 +++++++++++++++++++ arch/arm/dts/bcm6813.dtsi | 128 ++++++++++++++++++++++ arch/arm/dts/bcm94908.dts | 30 +++++ arch/arm/dts/bcm94912.dts | 30 +++++ arch/arm/dts/bcm963146.dts | 30 +++++ arch/arm/dts/bcm96813.dts | 30 +++++ arch/arm/mach-bcmbca/Kconfig | 32 ++++++ arch/arm/mach-bcmbca/Makefile | 4 + arch/arm/mach-bcmbca/bcm4908/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm4908/Makefile | 5 + arch/arm/mach-bcmbca/bcm4908/mmu_table.c | 32 ++++++ arch/arm/mach-bcmbca/bcm4912/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm4912/Makefile | 5 + arch/arm/mach-bcmbca/bcm4912/mmu_table.c | 32 ++++++ arch/arm/mach-bcmbca/bcm63146/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm63146/Makefile | 5 + arch/arm/mach-bcmbca/bcm63146/mmu_table.c | 32 ++++++ arch/arm/mach-bcmbca/bcm6813/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm6813/Makefile | 5 + arch/arm/mach-bcmbca/bcm6813/mmu_table.c | 32 ++++++ board/broadcom/bcmbca/Kconfig | 28 +++++ configs/bcm94908_defconfig | 23 ++++ configs/bcm94912_defconfig | 23 ++++ configs/bcm963146_defconfig | 23 ++++ configs/bcm96813_defconfig | 23 ++++ include/configs/bcm94908.h | 11 ++ include/configs/bcm94912.h | 11 ++ include/configs/bcm963146.h | 11 ++ include/configs/bcm96813.h | 11 ++ 33 files changed, 1041 insertions(+) create mode 100644 arch/arm/dts/bcm4908.dtsi create mode 100644 arch/arm/dts/bcm4912.dtsi create mode 100644 arch/arm/dts/bcm63146.dtsi create mode 100644 arch/arm/dts/bcm6813.dtsi create mode 100644 arch/arm/dts/bcm94908.dts create mode 100644 arch/arm/dts/bcm94912.dts create mode 100644 arch/arm/dts/bcm963146.dts create mode 100644 arch/arm/dts/bcm96813.dts create mode 100644 arch/arm/mach-bcmbca/bcm4908/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm4908/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm4908/mmu_table.c create mode 100644 arch/arm/mach-bcmbca/bcm4912/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm4912/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm4912/mmu_table.c create mode 100644 arch/arm/mach-bcmbca/bcm63146/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm63146/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm63146/mmu_table.c create mode 100644 arch/arm/mach-bcmbca/bcm6813/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm6813/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm6813/mmu_table.c create mode 100644 configs/bcm94908_defconfig create mode 100644 configs/bcm94912_defconfig create mode 100644 configs/bcm963146_defconfig create mode 100644 configs/bcm96813_defconfig create mode 100644 include/configs/bcm94908.h create mode 100644 include/configs/bcm94912.h create mode 100644 include/configs/bcm963146.h create mode 100644 include/configs/bcm96813.h
Signature · 1 line
2.37.1
William Zhang
maintainerPATCH 1/4 arm: bcmbca: add bcm63146 SoC support
BCM63146 is a Broadcom B53 based DSL Broadband SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under ARCH_BCMBCA platform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.
This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
---
MAINTAINERS | 1 + arch/arm/dts/Makefile | 2 + arch/arm/dts/bcm63146.dtsi | 110 ++++++++++++++++++++++ arch/arm/dts/bcm963146.dts | 30 ++++++ arch/arm/mach-bcmbca/Kconfig | 8 ++ arch/arm/mach-bcmbca/Makefile | 1 + arch/arm/mach-bcmbca/bcm63146/Kconfig | 17 ++++ arch/arm/mach-bcmbca/bcm63146/Makefile | 5 + arch/arm/mach-bcmbca/bcm63146/mmu_table.c | 32 +++++++ board/broadcom/bcmbca/Kconfig | 7 ++ configs/bcm963146_defconfig | 23 +++++ include/configs/bcm963146.h | 11 +++ 12 files changed, 247 insertions(+) create mode 100644 arch/arm/dts/bcm63146.dtsi create mode 100644 arch/arm/dts/bcm963146.dts create mode 100644 arch/arm/mach-bcmbca/bcm63146/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm63146/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm63146/mmu_table.c create mode 100644 configs/bcm963146_defconfig create mode 100644 include/configs/bcm963146.h
MAINTAINERS +1 -0
@@ -220,6 +220,7 @@ F: drivers/timer/bcmbca-timer.c N: bcmbca N: bcm[9]?47622 N: bcm[9]?63138 +N: bcm[9]?63146 N: bcm[9]?63148 N: bcm[9]?63178 N: bcm[9]?6756
arch/arm/dts/Makefile +2 -0
@@ -1167,6 +1167,8 @@ dtb-$(CONFIG_BCM47622) += \ bcm947622.dtb dtb-$(CONFIG_BCM63138) += \ bcm963138.dtb +dtb-$(CONFIG_BCM63146) += \ + bcm963146.dtb dtb-$(CONFIG_BCM63148) += \ bcm963148.dtb dtb-$(CONFIG_BCM63178) += \
arch/arm/dts/bcm63146.dtsi new file +110 -0
110 lines not on this page · raw message
arch/arm/dts/bcm963146.dts new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Broadcom Ltd. + */ + +/dts-v1/; + +#include "bcm63146.dtsi" + +/ { + model = "Broadcom BCM963146 Reference Board"; + compatible = "brcm,bcm963146", "brcm,bcm63146", "brcm,bcmbca"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x08000000>; + }; +}; + +&uart0 { + status = "okay"; +};
arch/arm/mach-bcmbca/Kconfig +8 -0
@@ -20,6 +20,13 @@ config BCM63138 select DM_SERIAL select BCM6345_SERIAL +config BCM63146 + bool "Support for Broadcom 63146 Family" + select ARM64 + select SYS_ARCH_TIMER + select DM_SERIAL + select PL01X_SERIAL + config BCM63148 bool "Support for Broadcom 63148 Family" select SYS_ARCH_TIMER
@@ -57,6 +64,7 @@ config BCM6878 source "arch/arm/mach-bcmbca/bcm47622/Kconfig" source "arch/arm/mach-bcmbca/bcm63138/Kconfig" +source "arch/arm/mach-bcmbca/bcm63146/Kconfig" source "arch/arm/mach-bcmbca/bcm63148/Kconfig" source "arch/arm/mach-bcmbca/bcm63178/Kconfig" source "arch/arm/mach-bcmbca/bcm6756/Kconfig"
arch/arm/mach-bcmbca/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_BCM47622) += bcm47622/ obj-$(CONFIG_BCM63138) += bcm63138/ +obj-$(CONFIG_BCM63146) += bcm63146/ obj-$(CONFIG_BCM63148) += bcm63148/ obj-$(CONFIG_BCM63178) += bcm63178/ obj-$(CONFIG_BCM6756) += bcm6756/
arch/arm/mach-bcmbca/bcm63146/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# + +if BCM63146 + +config TARGET_BCM963146 + bool "Broadcom 63146 Reference Board" + depends on ARCH_BCMBCA + +config SYS_SOC + default "bcm63146" + +source "board/broadcom/bcmbca/Kconfig" + +endif
arch/arm/mach-bcmbca/bcm63146/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# +obj-y += mmu_table.o
arch/arm/mach-bcmbca/bcm63146/mmu_table.c new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2022 Broadcom Ltd. +*/ +#include <common.h> +#include <asm/armv8/mmu.h> +#include <linux/sizes.h> + +static struct mm_region bcm963146_mem_map[] = { + { + .virt =0x00000000UL , + .phys =0x00000000UL , + .size =1UL *SZ_1G , + .attrs =PTE_BLOCK_MEMTYPE (MT_NORMAL ) | +PTE_BLOCK_INNER_SHARE + }, + { +/* SoC peripheral */ + .virt =0xff800000UL , + .phys =0xff800000UL , + .size =0x100000 , + .attrs =PTE_BLOCK_MEMTYPE (MT_DEVICE_NGNRNE ) | +PTE_BLOCK_NON_SHARE | +PTE_BLOCK_PXN |PTE_BLOCK_UXN + }, + { +/* List terminator */ +0 , + } +}; + +struct mm_region *mem_map = bcm963146_mem_map;
board/broadcom/bcmbca/Kconfig +7 -0
@@ -23,6 +23,13 @@ config SYS_CONFIG_NAME endif +if TARGET_BCM963146 + +config SYS_CONFIG_NAME + default "bcm963146" + +endif + if TARGET_BCM963148 config SYS_CONFIG_NAME
configs/bcm963146_defconfig new file +23 -0
@@ -0,0 +1,23 @@ +CONFIG_ARM=y +CONFIG_COUNTER_FREQUENCY=50000000 +CONFIG_ARCH_BCMBCA=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_SYS_MALLOC_LEN=0x2000000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_BCM63146=y +CONFIG_TARGET_BCM963146=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_DEFAULT_DEVICE_TREE="bcm963146" +CONFIG_IDENT_STRING=" Broadcom BCM63146" +CONFIG_SYS_LOAD_ADDR=0x01000000 +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x2000000 +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_HUSH_PARSER=y +CONFIG_SYS_MAXARGS=64 +CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_CMD_CACHE=y +CONFIG_OF_EMBED=y +CONFIG_CLK=y
include/configs/bcm963146.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2022 Broadcom Ltd. +*/ + +#ifndef __BCM963146_H +#define __BCM963146_H + +#define CONFIG_SYS_SDRAM_BASE 0x00000000 + +#endif
Signature · 1 line
2.37.1
Re: [PATCH 1/4] arm: bcmbca: add bcm63146 SoC support
Quoted 13 lines · William Zhang
BCM63146 is a Broadcom B53 based DSL Broadband SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under
ARCH_BCMBCAplatform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
Signed-off-by William Zhang <[email protected]>---
[snip]
arch/arm/mach-bcmbca/bcm63146/mmu_table.c line 17
Quoted 13 lines
arch/arm/mach-bcmbca/bcm63146/mmu_table.c new file +13
-0+#include <common.h> +#include <asm/armv8/mmu.h> +#include <linux/sizes.h> + +static struct mm_region bcm963146_mem_map[] = { + { + .virt =0x00000000UL , + .phys =0x00000000UL , + .size =1UL *SZ_1G , + .attrs =PTE_BLOCK_MEMTYPE (MT_NORMAL ) | +PTE_BLOCK_INNER_SHARE + }, + {
Should you create a mapping for the AXI bus portion at PA 0x81000000 just so it is already in place for when you might need it?
Signature · 1 line
Florian
Re: [PATCH 1/4] arm: bcmbca: add bcm63146 SoC support
In reply to William ZhangQuoted 5 lines · William Zhang
BCM63146 is a Broadcom B53 based DSL Broadband SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under
ARCH_BCMBCAplatform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.
Quoted 8 lines
This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
Signed-off-by William Zhang <[email protected]>Reviewed-by Florian Fainelli <[email protected]>
For the series, applied to u-boot/master, thanks!
Signature · 1 line
Tom
William Zhang
maintainerPATCH 2/4 arm: bcmbca: add bcm4912 SoC support
In reply to William ZhangBCM4912 is a Broadcom B53 based WLAN AP router SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under ARCH_BCMBCA platform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.
This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
---
MAINTAINERS | 1 + arch/arm/dts/Makefile | 2 + arch/arm/dts/bcm4912.dtsi | 128 +++++++++++++++++++++++ arch/arm/dts/bcm94912.dts | 30 ++++++ arch/arm/mach-bcmbca/Kconfig | 8 ++ arch/arm/mach-bcmbca/Makefile | 1 + arch/arm/mach-bcmbca/bcm4912/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm4912/Makefile | 5 + arch/arm/mach-bcmbca/bcm4912/mmu_table.c | 32 ++++++ board/broadcom/bcmbca/Kconfig | 7 ++ configs/bcm94912_defconfig | 23 ++++ include/configs/bcm94912.h | 11 ++ 12 files changed, 265 insertions(+) create mode 100644 arch/arm/dts/bcm4912.dtsi create mode 100644 arch/arm/dts/bcm94912.dts create mode 100644 arch/arm/mach-bcmbca/bcm4912/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm4912/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm4912/mmu_table.c create mode 100644 configs/bcm94912_defconfig create mode 100644 include/configs/bcm94912.h
MAINTAINERS +1 -0
@@ -219,6 +219,7 @@ F: board/broadcom/bcmbca/ F: drivers/timer/bcmbca-timer.c N: bcmbca N: bcm[9]?47622 +N: bcm[9]?4912 N: bcm[9]?63138 N: bcm[9]?63146 N: bcm[9]?63148
arch/arm/dts/Makefile +2 -0
@@ -1165,6 +1165,8 @@ dtb-$(CONFIG_ARCH_BCMSTB) += bcm7xxx.dtb dtb-$(CONFIG_BCM47622) += \ bcm947622.dtb +dtb-$(CONFIG_BCM4912) += \ + bcm94912.dtb dtb-$(CONFIG_BCM63138) += \ bcm963138.dtb dtb-$(CONFIG_BCM63146) += \
arch/arm/dts/bcm4912.dtsi new file +128 -0
128 lines not on this page · raw message
arch/arm/dts/bcm94912.dts new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Broadcom Ltd. + */ + +/dts-v1/; + +#include "bcm4912.dtsi" + +/ { + model = "Broadcom BCM94912 Reference Board"; + compatible = "brcm,bcm94912", "brcm,bcm4912", "brcm,bcmbca"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x08000000>; + }; +}; + +&uart0 { + status = "okay"; +};
arch/arm/mach-bcmbca/Kconfig +8 -0
@@ -12,6 +12,13 @@ config BCM47622 select DM_SERIAL select PL01X_SERIAL +config BCM4912 + bool "Support for Broadcom 4912 Family" + select ARM64 + select SYS_ARCH_TIMER + select DM_SERIAL + select PL01X_SERIAL + config BCM63138 bool "Support for Broadcom 63138 Family" select TIMER
@@ -63,6 +70,7 @@ config BCM6878 select PL01X_SERIAL source "arch/arm/mach-bcmbca/bcm47622/Kconfig" +source "arch/arm/mach-bcmbca/bcm4912/Kconfig" source "arch/arm/mach-bcmbca/bcm63138/Kconfig" source "arch/arm/mach-bcmbca/bcm63146/Kconfig" source "arch/arm/mach-bcmbca/bcm63148/Kconfig"
arch/arm/mach-bcmbca/Makefile +1 -0
@@ -4,6 +4,7 @@ # obj-$(CONFIG_BCM47622) += bcm47622/ +obj-$(CONFIG_BCM4912) += bcm4912/ obj-$(CONFIG_BCM63138) += bcm63138/ obj-$(CONFIG_BCM63146) += bcm63146/ obj-$(CONFIG_BCM63148) += bcm63148/
arch/arm/mach-bcmbca/bcm4912/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# + +if BCM4912 + +config TARGET_BCM94912 + bool "Broadcom 4912 Reference Board" + depends on ARCH_BCMBCA + +config SYS_SOC + default "bcm4912" + +source "board/broadcom/bcmbca/Kconfig" + +endif
arch/arm/mach-bcmbca/bcm4912/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# +obj-y += mmu_table.o
arch/arm/mach-bcmbca/bcm4912/mmu_table.c new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2022 Broadcom Ltd. +*/ +#include <common.h> +#include <asm/armv8/mmu.h> +#include <linux/sizes.h> + +static struct mm_region bcm94912_mem_map[] = { + { + .virt =0x00000000UL , + .phys =0x00000000UL , + .size =1UL *SZ_1G , + .attrs =PTE_BLOCK_MEMTYPE (MT_NORMAL ) | +PTE_BLOCK_INNER_SHARE + }, + { +/* SoC peripheral */ + .virt =0xff800000UL , + .phys =0xff800000UL , + .size =0x100000 , + .attrs =PTE_BLOCK_MEMTYPE (MT_DEVICE_NGNRNE ) | +PTE_BLOCK_NON_SHARE | +PTE_BLOCK_PXN |PTE_BLOCK_UXN + }, + { +/* List terminator */ +0 , + } +}; + +struct mm_region *mem_map = bcm94912_mem_map;
board/broadcom/bcmbca/Kconfig +7 -0
@@ -16,6 +16,13 @@ config SYS_CONFIG_NAME endif +if TARGET_BCM94912 + +config SYS_CONFIG_NAME + default "bcm94912" + +endif + if TARGET_BCM963138 config SYS_CONFIG_NAME
configs/bcm94912_defconfig new file +23 -0
@@ -0,0 +1,23 @@ +CONFIG_ARM=y +CONFIG_COUNTER_FREQUENCY=50000000 +CONFIG_ARCH_BCMBCA=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_SYS_MALLOC_LEN=0x2000000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_BCM4912=y +CONFIG_TARGET_BCM94912=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_DEFAULT_DEVICE_TREE="bcm94912" +CONFIG_IDENT_STRING=" Broadcom BCM4912" +CONFIG_SYS_LOAD_ADDR=0x01000000 +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x2000000 +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_HUSH_PARSER=y +CONFIG_SYS_MAXARGS=64 +CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_CMD_CACHE=y +CONFIG_OF_EMBED=y +CONFIG_CLK=y
include/configs/bcm94912.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2022 Broadcom Ltd. +*/ + +#ifndef __BCM94912_H +#define __BCM94912_H + +#define CONFIG_SYS_SDRAM_BASE 0x00000000 + +#endif
Signature · 1 line
2.37.1
Re: [PATCH 2/4] arm: bcmbca: add bcm4912 SoC support
Quoted 5 lines · William Zhang
BCM4912 is a Broadcom B53 based WLAN AP router SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under
ARCH_BCMBCAplatform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.
Quoted 7 lines
This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
Signed-off-by William Zhang <[email protected]>
Same question as in patch #1, but otherwise:
Signature · 1 line
Florian
William Zhang
maintainerPATCH 3/4 arm: bcmbca: add bcm6813 SoC support
In reply to William ZhangBCM6813 is a Broadcom B53 based PON and WLAN AP router SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under ARCH_BCMBCA platform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.
This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
---
MAINTAINERS | 1 + arch/arm/dts/Makefile | 2 + arch/arm/dts/bcm6813.dtsi | 128 +++++++++++++++++++++++ arch/arm/dts/bcm96813.dts | 30 ++++++ arch/arm/mach-bcmbca/Kconfig | 8 ++ arch/arm/mach-bcmbca/Makefile | 1 + arch/arm/mach-bcmbca/bcm6813/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm6813/Makefile | 5 + arch/arm/mach-bcmbca/bcm6813/mmu_table.c | 32 ++++++ board/broadcom/bcmbca/Kconfig | 7 ++ configs/bcm96813_defconfig | 23 ++++ include/configs/bcm96813.h | 11 ++ 12 files changed, 265 insertions(+) create mode 100644 arch/arm/dts/bcm6813.dtsi create mode 100644 arch/arm/dts/bcm96813.dts create mode 100644 arch/arm/mach-bcmbca/bcm6813/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm6813/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm6813/mmu_table.c create mode 100644 configs/bcm96813_defconfig create mode 100644 include/configs/bcm96813.h
MAINTAINERS +1 -0
@@ -225,6 +225,7 @@ N: bcm[9]?63146 N: bcm[9]?63148 N: bcm[9]?63178 N: bcm[9]?6756 +N: bcm[9]?6813 N: bcm[9]?6846 N: bcm[9]?6878
arch/arm/dts/Makefile +2 -0
@@ -1177,6 +1177,8 @@ dtb-$(CONFIG_BCM63178) += \ bcm963178.dtb dtb-$(CONFIG_BCM6756) += \ bcm96756.dtb +dtb-$(CONFIG_BCM6813) += \ + bcm96813.dtb dtb-$(CONFIG_BCM6846) += \ bcm96846.dtb dtb-$(CONFIG_BCM6878) += \
arch/arm/dts/bcm6813.dtsi new file +128 -0
128 lines not on this page · raw message
arch/arm/dts/bcm96813.dts new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Broadcom Ltd. + */ + +/dts-v1/; + +#include "bcm6813.dtsi" + +/ { + model = "Broadcom BCM96813 Reference Board"; + compatible = "brcm,bcm96813", "brcm,bcm6813", "brcm,bcmbca"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x08000000>; + }; +}; + +&uart0 { + status = "okay"; +};
arch/arm/mach-bcmbca/Kconfig +8 -0
@@ -55,6 +55,13 @@ config BCM6756 select DM_SERIAL select PL01X_SERIAL +config BCM6813 + bool "Support for Broadcom 6813 Family" + select ARM64 + select SYS_ARCH_TIMER + select DM_SERIAL + select PL01X_SERIAL + config BCM6846 bool "Support for Broadcom 6846 Family" select SYS_ARCH_TIMER
@@ -76,6 +83,7 @@ source "arch/arm/mach-bcmbca/bcm63146/Kconfig" source "arch/arm/mach-bcmbca/bcm63148/Kconfig" source "arch/arm/mach-bcmbca/bcm63178/Kconfig" source "arch/arm/mach-bcmbca/bcm6756/Kconfig" +source "arch/arm/mach-bcmbca/bcm6813/Kconfig" source "arch/arm/mach-bcmbca/bcm6846/Kconfig" source "arch/arm/mach-bcmbca/bcm6878/Kconfig"
arch/arm/mach-bcmbca/Makefile +1 -0
@@ -10,5 +10,6 @@ obj-$(CONFIG_BCM63146) += bcm63146/ obj-$(CONFIG_BCM63148) += bcm63148/ obj-$(CONFIG_BCM63178) += bcm63178/ obj-$(CONFIG_BCM6756) += bcm6756/ +obj-$(CONFIG_BCM6813) += bcm6813/ obj-$(CONFIG_BCM6846) += bcm6846/ obj-$(CONFIG_BCM6878) += bcm6878/
arch/arm/mach-bcmbca/bcm6813/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# + +if BCM6813 + +config TARGET_BCM96813 + bool "Broadcom 6813 Reference Board" + depends on ARCH_BCMBCA + +config SYS_SOC + default "bcm6813" + +source "board/broadcom/bcmbca/Kconfig" + +endif
arch/arm/mach-bcmbca/bcm6813/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# +obj-y += mmu_table.o
arch/arm/mach-bcmbca/bcm6813/mmu_table.c new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2022 Broadcom Ltd. +*/ +#include <common.h> +#include <asm/armv8/mmu.h> +#include <linux/sizes.h> + +static struct mm_region bcm96813_mem_map[] = { + { + .virt =0x00000000UL , + .phys =0x00000000UL , + .size =1UL *SZ_1G , + .attrs =PTE_BLOCK_MEMTYPE (MT_NORMAL ) | +PTE_BLOCK_INNER_SHARE + }, + { +/* SoC peripheral */ + .virt =0xff800000UL , + .phys =0xff800000UL , + .size =0x100000 , + .attrs =PTE_BLOCK_MEMTYPE (MT_DEVICE_NGNRNE ) | +PTE_BLOCK_NON_SHARE | +PTE_BLOCK_PXN |PTE_BLOCK_UXN + }, + { +/* List terminator */ +0 , + } +}; + +struct mm_region *mem_map = bcm96813_mem_map;
board/broadcom/bcmbca/Kconfig +7 -0
@@ -58,6 +58,13 @@ config SYS_CONFIG_NAME endif +if TARGET_BCM96813 + +config SYS_CONFIG_NAME + default "bcm96813" + +endif + if TARGET_BCM96846 config SYS_CONFIG_NAME
configs/bcm96813_defconfig new file +23 -0
@@ -0,0 +1,23 @@ +CONFIG_ARM=y +CONFIG_COUNTER_FREQUENCY=50000000 +CONFIG_ARCH_BCMBCA=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_SYS_MALLOC_LEN=0x2000000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_BCM6813=y +CONFIG_TARGET_BCM96813=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_DEFAULT_DEVICE_TREE="bcm96813" +CONFIG_IDENT_STRING=" Broadcom BCM6813" +CONFIG_SYS_LOAD_ADDR=0x01000000 +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x2000000 +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_HUSH_PARSER=y +CONFIG_SYS_MAXARGS=64 +CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_CMD_CACHE=y +CONFIG_OF_EMBED=y +CONFIG_CLK=y
include/configs/bcm96813.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2022 Broadcom Ltd. +*/ + +#ifndef __BCM96813_H +#define __BCM96813_H + +#define CONFIG_SYS_SDRAM_BASE 0x00000000 + +#endif
Signature · 1 line
2.37.1
Re: [PATCH 3/4] arm: bcmbca: add bcm6813 SoC support
Quoted 15 lines · William Zhang
BCM6813 is a Broadcom B53 based PON and WLAN AP router SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under
ARCH_BCMBCAplatform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and ARM PL011 uart.This SoC is supported in the linux-next git repository so the dts and dtsi files are copied from linux.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
Signed-off-by William Zhang <[email protected]>---
Quoted 9 lines
MAINTAINERS | 1 + arch/arm/dts/Makefile | 2 + arch/arm/dts/bcm6813.dtsi | 128 +++++++++++++++++++++++ arch/arm/dts/bcm96813.dts | 30 ++++++ arch/arm/mach-bcmbca/Kconfig | 8 ++ arch/arm/mach-bcmbca/Makefile | 1 + arch/arm/mach-bcmbca/bcm6813/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm6813/Makefile | 5 + arch/arm/mach-bcmbca/bcm6813/mmu_table.c | 32 ++++++
OK, so after seeing the same mmu_table.c 4 times, maybe we could share a common implementation that is configurable enough, even if there may not be any need for configuration other than the DRAM size.
Signature · 1 line
Florian
William Zhang
maintainerPATCH 4/4 arm: bcmbca: add bcm4908 SoC support
In reply to William ZhangBCM4908 is a Broadcom B53 based WLAN AP router SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under ARCH_BCMBCA platform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and Broadcom uart.
This SoC is supported in the linux git repository so the dts and dtsi files are stripped down version of linux copies with mininum blocks needed by u-boot.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
---
MAINTAINERS | 1 + arch/arm/dts/Makefile | 2 + arch/arm/dts/bcm4908.dtsi | 127 +++++++++++++++++++++++ arch/arm/dts/bcm94908.dts | 30 ++++++ arch/arm/mach-bcmbca/Kconfig | 8 ++ arch/arm/mach-bcmbca/Makefile | 1 + arch/arm/mach-bcmbca/bcm4908/Kconfig | 17 +++ arch/arm/mach-bcmbca/bcm4908/Makefile | 5 + arch/arm/mach-bcmbca/bcm4908/mmu_table.c | 32 ++++++ board/broadcom/bcmbca/Kconfig | 7 ++ configs/bcm94908_defconfig | 23 ++++ include/configs/bcm94908.h | 11 ++ 12 files changed, 264 insertions(+) create mode 100644 arch/arm/dts/bcm4908.dtsi create mode 100644 arch/arm/dts/bcm94908.dts create mode 100644 arch/arm/mach-bcmbca/bcm4908/Kconfig create mode 100644 arch/arm/mach-bcmbca/bcm4908/Makefile create mode 100644 arch/arm/mach-bcmbca/bcm4908/mmu_table.c create mode 100644 configs/bcm94908_defconfig create mode 100644 include/configs/bcm94908.h
MAINTAINERS +1 -0
@@ -219,6 +219,7 @@ F: board/broadcom/bcmbca/ F: drivers/timer/bcmbca-timer.c N: bcmbca N: bcm[9]?47622 +N: bcm[9]?4908 N: bcm[9]?4912 N: bcm[9]?63138 N: bcm[9]?63146
arch/arm/dts/Makefile +2 -0
@@ -1165,6 +1165,8 @@ dtb-$(CONFIG_ARCH_BCMSTB) += bcm7xxx.dtb dtb-$(CONFIG_BCM47622) += \ bcm947622.dtb +dtb-$(CONFIG_BCM4908) += \ + bcm94908.dtb dtb-$(CONFIG_BCM4912) += \ bcm94912.dtb dtb-$(CONFIG_BCM63138) += \
arch/arm/dts/bcm4908.dtsi new file +127 -0
127 lines not on this page · raw message
arch/arm/dts/bcm94908.dts new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Broadcom Ltd. + */ + +/dts-v1/; + +#include "bcm4908.dtsi" + +/ { + model = "Broadcom BCM94908 Reference Board"; + compatible = "brcm,bcm94908", "brcm,bcm4908", "brcm,bcmbca"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x08000000>; + }; +}; + +&uart0 { + status = "okay"; +};
arch/arm/mach-bcmbca/Kconfig +8 -0
@@ -12,6 +12,13 @@ config BCM47622 select DM_SERIAL select PL01X_SERIAL +config BCM4908 + bool "Support for Broadcom 4908 Family" + select ARM64 + select SYS_ARCH_TIMER + select DM_SERIAL + select BCM6345_SERIAL + config BCM4912 bool "Support for Broadcom 4912 Family" select ARM64
@@ -77,6 +84,7 @@ config BCM6878 select PL01X_SERIAL source "arch/arm/mach-bcmbca/bcm47622/Kconfig" +source "arch/arm/mach-bcmbca/bcm4908/Kconfig" source "arch/arm/mach-bcmbca/bcm4912/Kconfig" source "arch/arm/mach-bcmbca/bcm63138/Kconfig" source "arch/arm/mach-bcmbca/bcm63146/Kconfig"
arch/arm/mach-bcmbca/Makefile +1 -0
@@ -4,6 +4,7 @@ # obj-$(CONFIG_BCM47622) += bcm47622/ +obj-$(CONFIG_BCM4908) += bcm4908/ obj-$(CONFIG_BCM4912) += bcm4912/ obj-$(CONFIG_BCM63138) += bcm63138/ obj-$(CONFIG_BCM63146) += bcm63146/
arch/arm/mach-bcmbca/bcm4908/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# + +if BCM4908 + +config TARGET_BCM94908 + bool "Broadcom 4908 Reference Board" + depends on ARCH_BCMBCA + +config SYS_SOC + default "bcm4908" + +source "board/broadcom/bcmbca/Kconfig" + +endif
arch/arm/mach-bcmbca/bcm4908/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Broadcom Ltd +# +obj-y += mmu_table.o
arch/arm/mach-bcmbca/bcm4908/mmu_table.c new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2022 Broadcom Ltd. +*/ +#include <common.h> +#include <asm/armv8/mmu.h> +#include <linux/sizes.h> + +static struct mm_region bcm94908_mem_map[] = { + { + .virt =0x00000000UL , + .phys =0x00000000UL , + .size =1UL *SZ_1G , + .attrs =PTE_BLOCK_MEMTYPE (MT_NORMAL ) | +PTE_BLOCK_INNER_SHARE + }, + { +/* SoC peripheral */ + .virt =0xff800000UL , + .phys =0xff800000UL , + .size =0x100000 , + .attrs =PTE_BLOCK_MEMTYPE (MT_DEVICE_NGNRNE ) | +PTE_BLOCK_NON_SHARE | +PTE_BLOCK_PXN |PTE_BLOCK_UXN + }, + { +/* List terminator */ +0 , + } +}; + +struct mm_region *mem_map = bcm94908_mem_map;
board/broadcom/bcmbca/Kconfig +7 -0
@@ -16,6 +16,13 @@ config SYS_CONFIG_NAME endif +if TARGET_BCM94908 + +config SYS_CONFIG_NAME + default "bcm94908" + +endif + if TARGET_BCM94912 config SYS_CONFIG_NAME
configs/bcm94908_defconfig new file +23 -0
@@ -0,0 +1,23 @@ +CONFIG_ARM=y +CONFIG_COUNTER_FREQUENCY=50000000 +CONFIG_ARCH_BCMBCA=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_SYS_MALLOC_LEN=0x2000000 +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_BCM4908=y +CONFIG_TARGET_BCM94908=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_DEFAULT_DEVICE_TREE="bcm94908" +CONFIG_IDENT_STRING=" Broadcom BCM4908" +CONFIG_SYS_LOAD_ADDR=0x01000000 +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x2000000 +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_HUSH_PARSER=y +CONFIG_SYS_MAXARGS=64 +CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_CMD_CACHE=y +CONFIG_OF_EMBED=y +CONFIG_CLK=y
include/configs/bcm94908.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2022 Broadcom Ltd. +*/ + +#ifndef __BCM94908_H +#define __BCM94908_H + +#define CONFIG_SYS_SDRAM_BASE 0x00000000 + +#endif
Signature · 1 line
2.37.1
Re: [PATCH 4/4] arm: bcmbca: add bcm4908 SoC support
Quoted 5 lines · William Zhang
BCM4908 is a Broadcom B53 based WLAN AP router SoC. It is part of the BCA (Broadband Carrier Access origin) chipset family so it's added under
ARCH_BCMBCAplatform. This initial support includes a bare-bone implementation and dts with CPU subsystem, memory and Broadcom uart.
Quoted 8 lines
This SoC is supported in the linux git repository so the dts and dtsi files are stripped down version of linux copies with mininum blocks needed by u-boot.
The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there to the console.
Signed-off-by William Zhang <[email protected]>
Signature · 1 line
Florian
Quoted 9 lines · William Zhang
Broadcom BCA (Broadband Carrier Access origin) chipset family includes DSL, PON and WLAN access point and gateway SoC. Now that the
ARCH_BCMBCAarchitecture and its first SoC BCM47622 are supported in u-boot 2022.07, this patch series add the basic support for following BCA chips underARCH_BCMBCA: BCM4908, BCM4912, BCM63146 and BCM6813.This patch series applies on top of the my previous patch [1].
[1] https://lists.denx.de/pipermail/u-boot/2022-August/491060.html
Looks good to me, thanks William! On the mmu_table.c implementation maybe just a few nits:
- should not we do an early parsing of the memory node for the given board(s) to ensure that we map no more than the amount of available DRAM?
- the exact same file is currently being re-used, so it would make sense to make it a common object
- you could create a memory mapping for the AXI bus region right away to avoid forgetting about it later if you start bringing up drivers that make use of that peripheral region
Thanks!
Signature · 1 line
Florian
William Zhang
maintainerHi Florian,
Thanks for the review! Please see my comments inline blow,
Quoted 9 lines · Florian Fainelli
Quoted 6 lines · William Zhang
Broadcom BCA (Broadband Carrier Access origin) chipset family includes DSL, PON and WLAN access point and gateway SoC. Now that the
ARCH_BCMBCAarchitecture and its first SoC BCM47622 are supported in u-boot 2022.07, this patch series add the basic support for following BCA chips underARCH_BCMBCA: BCM4908, BCM4912, BCM63146 and BCM6813.
Quoted 9 lines
Quoted 3 lines
This patch series applies on top of the my previous patch [1].
[1] https://lists.denx.de/pipermail/u-boot/2022-August/491060.html
Looks good to me, thanks William! On the
mmu_table.cimplementation maybe just a few nits:- should not we do an early parsing of the memory node for the given board(s) to ensure that we map no more than the amount of available DRAM?
Yes there will be a patch after all these SoC patches to set the ddr size during the dram_init based on the actually memory size.
Quoted 2 lines
- the exact same file is currently being re-used, so it would make sense to make it a common object
For these initial soc support patches, I just include the ddr and periph block and they happen to be the same range. But different SoC has different ip block address as we add more more blocks/drivers late. To avoid many ifdef, I would prefer to have one file per chip.
Quoted 4 lines
- you could create a memory mapping for the AXI bus region right away to
avoid forgetting about it later if you start bringing up drivers that make use of that peripheral region
Yeah I could but we won't forget either because system will crash if we miss that entry in the mmu table. IMHO it is better to limit the access than opening a wide range that we don't use. We can catch invalid/unintended access by only allowing the regions that we need to access.
Quoted 1 line
Thanks!