Add support for Broadcom MIPS SoCs
v4 cover Add support for Broadcom MIPS SoCs
This adds support for some of the xDSL Broadcom MIPS SoCs:
- BCM6358
- BCM6328
- BCM63268
However, support for other SoCs could be added in the future:
- Other BCM63xx
- BCM33xx
- BCM71xx
v4: Introduce changes suggested by Simon Glass:
- Refactor cmd/cpu.
- Remove device_probe patch for sysreset.
v3: Introduce changes suggested by Simon Glass.
v2: Introduce changes suggested by Daniel Schwierzeck.
Álvaro Fernández Rojas (14):
cmd: cpu: fix NULL cpu feature prints
sysreset: add syscon-reboot driver
MIPS: allow using generic sysreset drivers
serial: add serial driver for BCM6345
cmd: cpu: refactor to ensure devices are probed and improve code style
cpu: add CPU driver for Broadcom MIPS SoCs
ram: add RAM driver for Broadcom MIPS SoCs
MIPS: add initial infrastructure for Broadcom MIPS SoCs
MIPS: add support for Broadcom MIPS BCM6358 SoC family
MIPS: add BMIPS Huawei HG556a board
MIPS: add support for Broadcom MIPS BCM6328 SoC family
MIPS: add BMIPS Comtrend AR-5387un board
MIPS: add support for Broadcom MIPS BCM63268 SoC family
MIPS: add BMIPS Comtrend VR-3032u board
arch/mips/Kconfig | 10 + arch/mips/Makefile | 1 + arch/mips/cpu/cpu.c | 2 + arch/mips/cpu/start.S | 5 + arch/mips/dts/Makefile | 3 + arch/mips/dts/brcm,bcm63268.dtsi | 88 +++++++++ arch/mips/dts/brcm,bcm6328.dtsi | 88 +++++++++ arch/mips/dts/brcm,bcm6358.dtsi | 98 ++++++++++ arch/mips/dts/comtrend,ar-5387un.dts | 27 +++ arch/mips/dts/comtrend,vr-3032u.dts | 27 +++ arch/mips/dts/huawei,hg556a.dts | 31 ++++ arch/mips/mach-bmips/Kconfig | 86 +++++++++ arch/mips/mach-bmips/Makefile | 5 + arch/mips/mach-bmips/dram.c | 37 ++++ arch/mips/mach-bmips/include/ioremap.h | 45 +++++ board/comtrend/ar5387un/Kconfig | 12 ++ board/comtrend/ar5387un/MAINTAINERS | 6 + board/comtrend/ar5387un/Makefile | 5 + board/comtrend/ar5387un/ar-5387un.c | 7 + board/comtrend/vr3032u/Kconfig | 12 ++ board/comtrend/vr3032u/MAINTAINERS | 6 + board/comtrend/vr3032u/Makefile | 5 + board/comtrend/vr3032u/vr-3032u.c | 7 + board/huawei/hg556a/Kconfig | 12 ++ board/huawei/hg556a/MAINTAINERS | 6 + board/huawei/hg556a/Makefile | 5 + board/huawei/hg556a/hg556a.c | 7 + cmd/cpu.c | 31 ++-- configs/comtrend_ar5387un_ram_defconfig | 42 +++++ configs/comtrend_vr3032u_ram_defconfig | 42 +++++ configs/huawei_hg556a_ram_defconfig | 45 +++++ drivers/cpu/Makefile | 2 + drivers/cpu/bmips_cpu.c | 280 ++++++++++++++++++++++++++++ drivers/ram/Makefile | 2 + drivers/ram/bmips_ram.c | 126 +++++++++++++ drivers/serial/Kconfig | 14 ++ drivers/serial/Makefile | 1 + drivers/serial/serial_bcm6345.c | 311 ++++++++++++++++++++++++++++++++ drivers/sysreset/Kconfig | 8 + drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_syscon.c | 76 ++++++++ include/configs/bmips_bcm63268.h | 25 +++ include/configs/bmips_bcm6328.h | 25 +++ include/configs/bmips_bcm6358.h | 30 +++ include/configs/bmips_common.h | 27 +++ include/configs/comtrend_ar5387un.h | 15 ++ include/configs/comtrend_vr3032u.h | 15 ++ include/configs/huawei_hg556a.h | 18 ++ 48 files changed, 1762 insertions(+), 17 deletions(-) create mode 100644 arch/mips/dts/brcm,bcm63268.dtsi create mode 100644 arch/mips/dts/brcm,bcm6328.dtsi create mode 100644 arch/mips/dts/brcm,bcm6358.dtsi create mode 100644 arch/mips/dts/comtrend,ar-5387un.dts create mode 100644 arch/mips/dts/comtrend,vr-3032u.dts create mode 100644 arch/mips/dts/huawei,hg556a.dts create mode 100644 arch/mips/mach-bmips/Kconfig create mode 100644 arch/mips/mach-bmips/Makefile create mode 100644 arch/mips/mach-bmips/dram.c create mode 100644 arch/mips/mach-bmips/include/ioremap.h create mode 100644 board/comtrend/ar5387un/Kconfig create mode 100644 board/comtrend/ar5387un/MAINTAINERS create mode 100644 board/comtrend/ar5387un/Makefile create mode 100644 board/comtrend/ar5387un/ar-5387un.c create mode 100644 board/comtrend/vr3032u/Kconfig create mode 100644 board/comtrend/vr3032u/MAINTAINERS create mode 100644 board/comtrend/vr3032u/Makefile create mode 100644 board/comtrend/vr3032u/vr-3032u.c create mode 100644 board/huawei/hg556a/Kconfig create mode 100644 board/huawei/hg556a/MAINTAINERS create mode 100644 board/huawei/hg556a/Makefile create mode 100644 board/huawei/hg556a/hg556a.c create mode 100644 configs/comtrend_ar5387un_ram_defconfig create mode 100644 configs/comtrend_vr3032u_ram_defconfig create mode 100644 configs/huawei_hg556a_ram_defconfig create mode 100644 drivers/cpu/bmips_cpu.c create mode 100644 drivers/ram/bmips_ram.c create mode 100644 drivers/serial/serial_bcm6345.c create mode 100644 drivers/sysreset/sysreset_syscon.c create mode 100644 include/configs/bmips_bcm63268.h create mode 100644 include/configs/bmips_bcm6328.h create mode 100644 include/configs/bmips_bcm6358.h create mode 100644 include/configs/bmips_common.h create mode 100644 include/configs/comtrend_ar5387un.h create mode 100644 include/configs/comtrend_vr3032u.h create mode 100644 include/configs/huawei_hg556a.h
Signature · 1 line
2.1.4
PATCH v4 1/14 cmd: cpu: fix NULL cpu feature prints
Commit 740d5d3 added two new features but only one feature name, which results in NULL prints when device_id feature is selected.
Before:
HG556a # cpu detail -1: cpu at 0 BCM6358A1 ID = 0, freq = 300 MHz: L1 cache, MMU, NULL Device ID 0x2a010 -1: cpu at 1 BCM6358A1 ID = 1, freq = 300 MHz: L1 cache, MMU, NULL Device ID 0x2a010 After: HG556a # cpu detail -1: cpu at 0 BCM6358A1 ID = 0, freq = 300 MHz: L1 cache, MMU, Device ID Device ID 0x2a010 -1: cpu at 1 BCM6358A1 ID = 1, freq = 300 MHz: L1 cache, MMU, Device ID Device ID 0x2a010
---
v3: No changes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Add the missing name instead of checking for null names.
cmd/cpu.c | 1 + 1 file changed, 1 insertion(+)
cmd/cpu.c +1 -0
@@ -15,6 +15,7 @@ static const char *cpu_feature_name[CPU_FEAT_COUNT] = {"L1 cache" ,"MMU" ,"Microcode" , + "Device ID", };static int print_cpu_list (bool detail)
Signature · 1 line
2.1.4
PATCH v4 2/14 sysreset: add syscon-reboot driver
In reply to Álvaro Fernández RojasAdd a new sysreset driver based on linux/drivers/power/reset/syscon-reboot.c, which provides a generic driver for platforms that only require writing a mask to a regmap offset.
---
v4: Rebased.
v3: Introduce changes suggested by Simon Glass:
- Add missing driver description.
- Alphabetically order includes.
- Add priv struct to store regmap during probe.
- Cosmetic fixes.
v2: No changes.
drivers/sysreset/Kconfig | 8 ++++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_syscon.c | 76 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 drivers/sysreset/sysreset_syscon.c
drivers/sysreset/Kconfig +8 -0
@@ -23,4 +23,12 @@ config SYSRESET_PSCI must be running on your system. endif + +config SYSRESET_SYSCON + bool "Enable support for mfd syscon reboot driver" + select REGMAP + select SYSCON + help + Reboot support for generic SYSCON mapped register reset. + endmenu
drivers/sysreset/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_SYSRESET) += sysreset-uclass.o obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o +obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_ROCKCHIP_RK3036) += sysreset_rk3036.o
drivers/sysreset/sysreset_syscon.c new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v4 3/14 MIPS: allow using generic sysreset drivers
In reply to Álvaro Fernández RojasAvoid duplicating do_reset definition if SYSRESET is enabled for MIPS
---
v4: No changes.
v3: No changes.
v2: No changes.
arch/mips/cpu/cpu.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/cpu/cpu.c +2 -0
@@ -12,6 +12,7 @@#include <asm/mipsregs.h> #include <asm/reboot.h> +#ifndef CONFIG_SYSRESET void __weak _machine_restart (void ) {fprintf (stderr,"*** reset failed ***\n" );
@@ -26,6 +27,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#endif void write_one_tlb (int index,u32 pagemask,u32 hi,u32 low0,u32 low1) {
Signature · 1 line
2.1.4
PATCH v4 4/14 serial: add serial driver for BCM6345
In reply to Álvaro Fernández RojasIt is based on linux/drivers/tty/serial/bcm63xx_uart.c
---
v4: Add more missing register configurations based on CFE.
v3: Several improvements:
- Add missing register configurations based on CFE.
- Replace tabs with whitespaces.
- Cosmetic fixes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Remove unneeded defines.
- Fix incorrect multi-line comment.
drivers/serial/Kconfig | 14 ++ drivers/serial/Makefile | 1 + drivers/serial/serial_bcm6345.c | 311 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 drivers/serial/serial_bcm6345.c
drivers/serial/Kconfig +14 -0
@@ -134,6 +134,14 @@ config DEBUG_UART_ATMEL will need to provide parameters to make this work. The driver will be available until the real driver-model serial is running. +config DEBUG_UART_BCM6345 + bool "BCM6345 UART" + depends on BCM6345_SERIAL + help + Select this to enable a debug UART on BCM6345 SoCs. You + will need to provide parameters to make this work. The driver will + be available until the real driver model serial is running. + config DEBUG_UART_NS16550 bool "ns16550" help
@@ -339,6 +347,12 @@ config ATMEL_USART configured in the device tree, and input clock frequency can be got from the clk node. +config BCM6345_SERIAL + bool "Support for BCM6345 UART" + depends on DM_SERIAL + help + Select this to enable UART on BCM6345 SoCs. + config FSL_LPUART bool "Freescale LPUART support" help
drivers/serial/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o obj-$(CONFIG_AR933X_UART) += serial_ar933x.o obj-$(CONFIG_ARM_DCC) += arm_dcc.o obj-$(CONFIG_ATMEL_USART) += atmel_usart.o +obj-$(CONFIG_BCM6345_SERIAL) += serial_bcm6345.o obj-$(CONFIG_EFI_APP) += serial_efi.o obj-$(CONFIG_LPC32XX_HSUART) += lpc32xx_hsuart.o obj-$(CONFIG_MCFUART) += mcfuart.o
drivers/serial/serial_bcm6345.c new file +311 -0
311 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v4 5/14 cmd: cpu: refactor to ensure devices are probed and improve code style
In reply to Álvaro Fernández RojasUse uclass_first_device and uclass_next_device in order to avoid exceptions for drivers that aren't probed when cpu ops are requested. Improve code style and fix indentations.
Fix incorrect line break when cpu info is not available.
Remove unneeded brackets.
---
v4: Refactor code to use uclass_first_device and uclass_next_device as
requested by Simon Glass.
v3: add new patch to ensure that device is probed.
cmd/cpu.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-)
cmd/cpu.c +13 -17
@@ -1,6 +1,7 @@/* * Copyright (c) 2015 Google, Inc * Written by Simon Glass <[email protected]> +* Copyright (c) 2017 Álvaro Fernández Rojas <[email protected]> * * SPDX-License-Identifier: GPL-2.0+ */
@@ -21,20 +22,15 @@ static const char *cpu_feature_name[CPU_FEAT_COUNT] = {static int print_cpu_list (bool detail) {struct udevice *dev; -struct uclass *uc;char buf[100 ]; -int ret; - ret =uclass_get (UCLASS_CPU , &uc); -if (ret) { -printf ("Cannot find CPU uclass\n" ); -return ret; - } - uclass_foreach_dev(dev, uc) { +for (uclass_first_device (UCLASS_CPU , &dev); + dev; +uclass_next_device (&dev)) {struct cpu_platdata *plat =dev_get_parent_platdata (dev);struct cpu_info info; -bool first; -int i; +bool first = true; +int ret, i; ret =cpu_get_desc (dev, buf,sizeof (buf)); printf("%3d: %-10s %s\n", dev->seq, dev->name,
@@ -45,13 +41,12 @@ static int print_cpu_list(bool detail)if (ret) {printf ("\t(no detail available" );if (ret != -ENOSYS ) -printf (": err=%d\n" , ret); +printf (": err=%d" , ret);printf (")\n" );continue ; }printf ("\tID = %d, freq = " , plat->cpu_id);print_freq (info.cpu_freq,"" ); - first = true;for (i =0 ; i <CPU_FEAT_COUNT ; i++) {if (info.features & (1 << i)) { printf("%s%s", first ? ": " : ", ",
@@ -60,10 +55,9 @@ static int print_cpu_list(bool detail) } }printf ("\n" ); -if (info.features & (1 <<CPU_FEAT_UCODE )) { +if (info.features & (1 <<CPU_FEAT_UCODE ))printf ("\tMicrocode version %#x\n" , plat->ucode_version); - }if (info.features & (1 <<CPU_FEAT_DEVICE_ID ))printf ("\tDevice ID %#lx\n" , plat->device_id); }
@@ -71,7 +65,8 @@ static int print_cpu_list(bool detail)return 0 ; } -static int do_cpu_list (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_cpu_list (cmd_tbl_t *cmdtp,int flag,int argc, +char *const argv[]) {if (print_cpu_list (false))return CMD_RET_FAILURE ;
@@ -97,7 +92,7 @@ static cmd_tbl_t cmd_cpu_sub[] = {* Process a cpu sub-command */ static int do_cpu (cmd_tbl_t *cmdtp,int flag,int argc, -char *const argv[]) +char *const argv[]) {cmd_tbl_t *c =NULL ;
@@ -106,7 +101,8 @@ static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc, argv++;if (argc) - c =find_cmd_tbl (argv[0 ], cmd_cpu_sub,ARRAY_SIZE (cmd_cpu_sub)); + c =find_cmd_tbl (argv[0 ], cmd_cpu_sub, +ARRAY_SIZE (cmd_cpu_sub));if (c)return c->cmd (cmdtp, flag, argc, argv);
Signature · 1 line
2.1.4
PATCH v4 6/14 cpu: add CPU driver for Broadcom MIPS SoCs
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: Several improvements:
- Probe driver correctly.
- Allocate size for priv struct.
- Cosmetic fixes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Get register base from DT.
drivers/cpu/Makefile | 2 + drivers/cpu/bmips_cpu.c | 280 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 282 insertions(+) create mode 100644 drivers/cpu/bmips_cpu.c
drivers/cpu/Makefile +2 -0
@@ -5,3 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # obj-$(CONFIG_CPU) += cpu-uclass.o + +obj-$(CONFIG_ARCH_BMIPS) += bmips_cpu.o
drivers/cpu/bmips_cpu.c new file +280 -0
280 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v4 7/14 ram: add RAM driver for Broadcom MIPS SoCs
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: Rename of_match to ids.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
drivers/ram/Makefile | 2 + drivers/ram/bmips_ram.c | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 drivers/ram/bmips_ram.c
drivers/ram/Makefile +2 -0
@@ -6,3 +6,5 @@ # obj-$(CONFIG_RAM) += ram-uclass.o obj-$(CONFIG_SANDBOX) += sandbox_ram.o + +obj-$(CONFIG_ARCH_BMIPS) += bmips_ram.o
drivers/ram/bmips_ram.c new file +126 -0
126 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v4 8/14 MIPS: add initial infrastructure for Broadcom MIPS SoCs
In reply to Álvaro Fernández RojasCFE checks CPU Thread in a different way (using register $22):
mfc0 t1, C0_BCM_CONFIG, 3 # $22
li t2, CP0_CMT_TPID # (1 << 31)
and t1, t2
bnez t1, 2f # if we are running on thread 1, skip init
nop
---
v4: No changes.
v3: Select CONFIG_REMAKE_ELF.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Replace initdram with dram_init.
- Merge with "fix first CPU check" patch.
arch/mips/Kconfig | 10 ++++++++++ arch/mips/Makefile | 1 + arch/mips/cpu/start.S | 5 +++++ arch/mips/mach-bmips/Kconfig | 22 ++++++++++++++++++++++ arch/mips/mach-bmips/Makefile | 5 +++++ arch/mips/mach-bmips/dram.c | 37 +++++++++++++++++++++++++++++++++++++ include/configs/bmips_common.h | 27 +++++++++++++++++++++++++++ 7 files changed, 107 insertions(+) create mode 100644 arch/mips/mach-bmips/Kconfig create mode 100644 arch/mips/mach-bmips/Makefile create mode 100644 arch/mips/mach-bmips/dram.c create mode 100644 include/configs/bmips_common.h
arch/mips/Kconfig +10 -0
@@ -75,6 +75,15 @@ config ARCH_ATH79 select OF_CONTROL select DM +config ARCH_BMIPS + bool "Support BMIPS SoCs" + select OF_CONTROL + select DM + select CLK + select CPU + select RAM + select SYSRESET + config MACH_PIC32 bool "Support Microchip PIC32" select OF_CONTROL
@@ -123,6 +132,7 @@ source "board/micronas/vct/Kconfig" source "board/pb1x00/Kconfig" source "board/qemu-mips/Kconfig" source "arch/mips/mach-ath79/Kconfig" +source "arch/mips/mach-bmips/Kconfig" source "arch/mips/mach-pic32/Kconfig" if MIPS
arch/mips/Makefile +1 -0
@@ -15,6 +15,7 @@ libs-y += arch/mips/lib/ machine-$(CONFIG_SOC_AU1X00) += au1x00 machine-$(CONFIG_ARCH_ATH79) += ath79 +machine-$(CONFIG_ARCH_BMIPS) += bmips machine-$(CONFIG_MACH_PIC32) += pic32 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
arch/mips/cpu/start.S +5 -0
@@ -151,8 +151,13 @@ reset: mfc0 t0, CP0_GLOBALNUMBER #endif +#ifdef CONFIG_ARCH_BMIPS +1: mfc0 t0, CP0_DIAGNOSTIC, 3 + and t0, t0, (1 << 31) +#else 1: mfc0 t0, CP0_EBASE and t0, t0, EBASE_CPUNUM +#endif /* Hang if this isn't the first CPU in the system */ 2: beqz t0, 4f
arch/mips/mach-bmips/Kconfig new file +22 -0
@@ -0,0 +1,22 @@ +menu "Broadcom MIPS platforms" + depends on ARCH_BMIPS + +config SYS_SOC + default "none" + +choice + prompt "Boot mode" + +config BMIPS_BOOT_RAM + bool "RAM boot" + depends on BMIPS_SUPPORTS_BOOT_RAM + help + This builds an image that is linked to a RAM address. Caches are + disabled and environment is built in. + +endchoice + +config BMIPS_SUPPORTS_BOOT_RAM + bool + +endmenu
arch/mips/mach-bmips/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += dram.o
arch/mips/mach-bmips/dram.c new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright (C) 2016 Daniel Schwierzeck <[email protected]> +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <ram.h> +#include <dm.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +struct ram_info ram; +struct udevice *dev; +int err; + + err =uclass_get_device (UCLASS_RAM ,0 , &dev); +if (err) { +debug ("DRAM init failed: %d\n" , err); +return 0 ; + } + + err =ram_get_info (dev, &ram); +if (err) { +debug ("Cannot get DRAM size: %d\n" , err); +return 0 ; + } + +debug ("SDRAM base=%zx, size=%x\n" , ram.base, ram.size); + + gd->ram_size = ram.size; + +return 0 ; +}
include/configs/bmips_common.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __CONFIG_BMIPS_COMMON_H +#define __CONFIG_BMIPS_COMMON_H + +/* RAM */ +#define CONFIG_SYS_MEMTEST_START 0xa0000000 +#define CONFIG_SYS_MEMTEST_END 0xa2000000 + +/* Serial */ +#define CONFIG_BAUDRATE 115200 + +/* Memory usage */ +#define CONFIG_SYS_MAXARGS 24 +#define CONFIG_SYS_MALLOC_LEN (1024 * 1024) +#define CONFIG_SYS_BOOTPARAMS_LEN (128 * 1024) +#define CONFIG_SYS_CBSIZE 512 + +/* U-Boot */ +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_REMAKE_ELF + +#endif /* __CONFIG_BMIPS_COMMON_H */
Signature · 1 line
2.1.4
PATCH v4 9/14 MIPS: add support for Broadcom MIPS BCM6358 SoC family
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: Add cfi-flash defines.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Add PERF_BASE to cpus.
- Merge with "fix ioremap for BCM6358" patch.
- Add a custom ioremap.h instead of modifying the generic one.
arch/mips/dts/brcm,bcm6358.dtsi | 98 ++++++++++++++++++++++++++++++++++ arch/mips/mach-bmips/Kconfig | 18 ++++++- arch/mips/mach-bmips/include/ioremap.h | 45 ++++++++++++++++ include/configs/bmips_bcm6358.h | 30 +++++++++++ 4 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 arch/mips/dts/brcm,bcm6358.dtsi create mode 100644 arch/mips/mach-bmips/include/ioremap.h create mode 100644 include/configs/bmips_bcm6358.h
arch/mips/dts/brcm,bcm6358.dtsi new file +98 -0
@@ -0,0 +1,98 @@ +/* + * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <dt-bindings/gpio/gpio.h> +#include "skeleton.dtsi" + +/ { + compatible = "brcm,bcm6358"; + + cpus { + reg = <0xfffe0000 0x4>; + #address-cells = <1>; + #size-cells = <0>; + u-boot,dm-pre-reloc; + + cpu at 0 { + compatible = "brcm,bcm6358-cpu", "mips,mips4Kc"; + device_type = "cpu"; + reg = <0>; + u-boot,dm-pre-reloc; + }; + + cpu at 1 { + compatible = "brcm,bcm6358-cpu", "mips,mips4Kc"; + device_type = "cpu"; + reg = <1>; + u-boot,dm-pre-reloc; + }; + }; + + clocks { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + u-boot,dm-pre-reloc; + + periph_osc: periph-osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + u-boot,dm-pre-reloc; + }; + }; + + pflash: nor at 1e000000 { + compatible = "cfi-flash"; + reg = <0x1e000000 0x2000000>; + bank-width = <2>; + #address-cells = <1>; + #size-cells = <1>; + + status = "disabled"; + }; + + ubus { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + u-boot,dm-pre-reloc; + + periph_cntl: syscon at fffe0000 { + compatible = "syscon"; + reg = <0xfffe0000 0xc>; + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&periph_cntl>; + offset = <0x8>; + mask = <0x1>; + }; + + uart0: serial at fffe0100 { + compatible = "brcm,bcm6345-uart"; + reg = <0xfffe0100 0x18>; + clocks = <&periph_osc>; + + status = "disabled"; + }; + + uart1: serial at fffe0120 { + compatible = "brcm,bcm6345-uart"; + reg = <0xfffe0120 0x18>; + clocks = <&periph_osc>; + + status = "disabled"; + }; + + memory-controller at fffe1200 { + compatible = "brcm,bcm6358-mc"; + reg = <0xfffe1200 0x1000>; + u-boot,dm-pre-reloc; + }; + }; +};
arch/mips/mach-bmips/Kconfig +17 -1
@@ -2,7 +2,23 @@ menu "Broadcom MIPS platforms" depends on ARCH_BMIPS config SYS_SOC - default "none" + default "bcm6358" if SOC_BMIPS_BCM6358 + +choice + prompt "Broadcom MIPS SoC select" + +config SOC_BMIPS_BCM6358 + bool "BMIPS BCM6358 family" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_CPU_MIPS32_R1 + select MIPS_TUNE_4KC + select MIPS_L1_CACHE_SHIFT_4 + select SWAP_IO_SPACE + select SYSRESET_SYSCON + help + This supports BMIPS BCM6358 family including BCM6358 and BCM6359. + +endchoice choice prompt "Boot mode"
arch/mips/mach-bmips/include/ioremap.h new file +45 -0
45 lines not on this page · raw message
include/configs/bmips_bcm6358.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __CONFIG_BMIPS_BCM6358_H +#define __CONFIG_BMIPS_BCM6358_H + +/* CPU */ +#define CONFIG_SYS_MIPS_TIMER_FREQ 150000000 + +/* RAM */ +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_SDRAM_BASE 0x80000000 + +/* U-Boot */ +#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE + 0x100000 + +#if defined(CONFIG_BMIPS_BOOT_RAM ) +#define CONFIG_SYS_INIT_SP_OFFSET 0x2000 +#define CONFIG_SKIP_LOWLEVEL_INIT +#endif + +#define CONFIG_SYS_FLASH_BASE 0xbe000000 +#define CONFIG_SYS_FLASH_EMPTY_INFO +#define CONFIG_SYS_FLASH_PROTECTION +#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT 1 + +#endif /* __CONFIG_BMIPS_BCM6358_H */
Signature · 1 line
2.1.4
PATCH v4 10/14 MIPS: add BMIPS Huawei HG556a board
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: Add cfi-flash support.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Remove DEBUG_UART from defconfig.
arch/mips/dts/Makefile | 1 + arch/mips/dts/huawei,hg556a.dts | 31 +++++++++++++++++++++++++ arch/mips/mach-bmips/Kconfig | 12 ++++++++++ board/huawei/hg556a/Kconfig | 12 ++++++++++ board/huawei/hg556a/MAINTAINERS | 6 +++++ board/huawei/hg556a/Makefile | 5 +++++ board/huawei/hg556a/hg556a.c | 7 ++++++ configs/huawei_hg556a_ram_defconfig | 45 +++++++++++++++++++++++++++++++++++++ include/configs/huawei_hg556a.h | 18 +++++++++++++++ 9 files changed, 137 insertions(+) create mode 100644 arch/mips/dts/huawei,hg556a.dts create mode 100644 board/huawei/hg556a/Kconfig create mode 100644 board/huawei/hg556a/MAINTAINERS create mode 100644 board/huawei/hg556a/Makefile create mode 100644 board/huawei/hg556a/hg556a.c create mode 100644 configs/huawei_hg556a_ram_defconfig create mode 100644 include/configs/huawei_hg556a.h
arch/mips/dts/Makefile +1 -0
@@ -8,6 +8,7 @@ dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb +dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb targets += $(dtb-y)
arch/mips/dts/huawei,hg556a.dts new file +31 -0
@@ -0,0 +1,31 @@ +/* + * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; + +#include "brcm,bcm6358.dtsi" + +/ { + model = "Huawei HG556a Board"; + compatible = "huawei,hg556a", "brcm,bcm6358"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&pflash { + status = "okay"; +}; + +&uart0 { + u-boot,dm-pre-reloc; + status = "okay"; +};
arch/mips/mach-bmips/Kconfig +12 -0
@@ -21,6 +21,16 @@ config SOC_BMIPS_BCM6358 endchoice choice + prompt "Board select" + +config BOARD_HUAWEI_HG556A + bool "Huawei HG556a board" + depends on SOC_BMIPS_BCM6358 + select BMIPS_SUPPORTS_BOOT_RAM + +endchoice + +choice prompt "Boot mode" config BMIPS_BOOT_RAM
@@ -35,4 +45,6 @@ endchoice config BMIPS_SUPPORTS_BOOT_RAM bool +source "board/huawei/hg556a/Kconfig" + endmenu
board/huawei/hg556a/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if BOARD_HUAWEI_HG556A + +config SYS_BOARD + default "hg556a" + +config SYS_VENDOR + default "huawei" + +config SYS_CONFIG_NAME + default "huawei_hg556a" + +endif
board/huawei/hg556a/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +HUAWEI HG556A BOARD +M: Álvaro Fernández Rojas <[email protected]> +S: Maintained +F: board/huawei/hg556a/ +F: include/configs/huawei_hg556a.h +F: configs/huawei_hg556a_ram_defconfig
board/huawei/hg556a/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += hg556a.o
board/huawei/hg556a/hg556a.c new file +7 -0
@@ -0,0 +1,7 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h>
configs/huawei_hg556a_ram_defconfig new file +45 -0
45 lines not on this page · raw message
include/configs/huawei_hg556a.h new file +18 -0
@@ -0,0 +1,18 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <configs/bmips_common.h> +#include <configs/bmips_bcm6358.h> + +#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_ENV_SIZE (8 * 1024) + +#define CONFIG_SYS_LONGHELP +#define CONFIG_AUTO_COMPLETE +#define CONFIG_CMDLINE_EDITING + +#define CONFIG_SYS_FLASH_CFI 1 +#define CONFIG_FLASH_CFI_DRIVER 1
Signature · 1 line
2.1.4
PATCH v4 11/14 MIPS: add support for Broadcom MIPS BCM6328 SoC family
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: No changes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Add PERF_BASE to cpus.
arch/mips/dts/brcm,bcm6328.dtsi | 88 +++++++++++++++++++++++++++++++++++++++++ arch/mips/mach-bmips/Kconfig | 12 ++++++ include/configs/bmips_bcm6328.h | 25 ++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 arch/mips/dts/brcm,bcm6328.dtsi create mode 100644 include/configs/bmips_bcm6328.h
arch/mips/dts/brcm,bcm6328.dtsi new file +88 -0
@@ -0,0 +1,88 @@ +/* + * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <dt-bindings/gpio/gpio.h> +#include "skeleton.dtsi" + +/ { + compatible = "brcm,bcm6328"; + + cpus { + reg = <0x10000000 0x4>; + #address-cells = <1>; + #size-cells = <0>; + u-boot,dm-pre-reloc; + + cpu at 0 { + compatible = "brcm,bcm6328-cpu", "mips,mips4Kc"; + device_type = "cpu"; + reg = <0>; + u-boot,dm-pre-reloc; + }; + + cpu at 1 { + compatible = "brcm,bcm6328-cpu", "mips,mips4Kc"; + device_type = "cpu"; + reg = <1>; + u-boot,dm-pre-reloc; + }; + }; + + clocks { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + u-boot,dm-pre-reloc; + + periph_osc: periph-osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + u-boot,dm-pre-reloc; + }; + }; + + ubus { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + u-boot,dm-pre-reloc; + + reset_cntl: syscon at 10000068 { + compatible = "syscon"; + reg = <0x10000068 0x4>; + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&reset_cntl>; + offset = <0>; + mask = <0x1>; + }; + + uart0: serial at 10000100 { + compatible = "brcm,bcm6345-uart"; + reg = <0x10000100 0x18>; + clocks = <&periph_osc>; + + status = "disabled"; + }; + + uart1: serial at 10000120 { + compatible = "brcm,bcm6345-uart"; + reg = <0x10000120 0x18>; + clocks = <&periph_osc>; + + status = "disabled"; + }; + + memory-controller at 10003000 { + compatible = "brcm,bcm6328-mc"; + reg = <0x10003000 0x1000>; + u-boot,dm-pre-reloc; + }; + }; +};
arch/mips/mach-bmips/Kconfig +12 -0
@@ -2,11 +2,23 @@ menu "Broadcom MIPS platforms" depends on ARCH_BMIPS config SYS_SOC + default "bcm6328" if SOC_BMIPS_BCM6328 default "bcm6358" if SOC_BMIPS_BCM6358 choice prompt "Broadcom MIPS SoC select" +config SOC_BMIPS_BCM6328 + bool "BMIPS BCM6328 family" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_CPU_MIPS32_R1 + select MIPS_TUNE_4KC + select MIPS_L1_CACHE_SHIFT_4 + select SWAP_IO_SPACE + select SYSRESET_SYSCON + help + This supports BMIPS BCM6328 family including BCM63281 and BCM63283. + config SOC_BMIPS_BCM6358 bool "BMIPS BCM6358 family" select SUPPORTS_BIG_ENDIAN
include/configs/bmips_bcm6328.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __CONFIG_BMIPS_BCM6328_H +#define __CONFIG_BMIPS_BCM6328_H + +/* CPU */ +#define CONFIG_SYS_MIPS_TIMER_FREQ 160000000 + +/* RAM */ +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_SDRAM_BASE 0x80000000 + +/* U-Boot */ +#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE + 0x100000 + +#if defined(CONFIG_BMIPS_BOOT_RAM ) +#define CONFIG_SYS_INIT_SP_OFFSET 0x2000 +#define CONFIG_SKIP_LOWLEVEL_INIT +#endif + +#endif /* __CONFIG_BMIPS_BCM6328_H */
Signature · 1 line
2.1.4
PATCH v4 12/14 MIPS: add BMIPS Comtrend AR-5387un board
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: No changes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Remove DEBUG_UART from defconfig.
arch/mips/dts/Makefile | 1 + arch/mips/dts/comtrend,ar-5387un.dts | 27 +++++++++++++++++++++ arch/mips/mach-bmips/Kconfig | 6 +++++ board/comtrend/ar5387un/Kconfig | 12 ++++++++++ board/comtrend/ar5387un/MAINTAINERS | 6 +++++ board/comtrend/ar5387un/Makefile | 5 ++++ board/comtrend/ar5387un/ar-5387un.c | 7 ++++++ configs/comtrend_ar5387un_ram_defconfig | 42 +++++++++++++++++++++++++++++++++ include/configs/comtrend_ar5387un.h | 15 ++++++++++++ 9 files changed, 121 insertions(+) create mode 100644 arch/mips/dts/comtrend,ar-5387un.dts create mode 100644 board/comtrend/ar5387un/Kconfig create mode 100644 board/comtrend/ar5387un/MAINTAINERS create mode 100644 board/comtrend/ar5387un/Makefile create mode 100644 board/comtrend/ar5387un/ar-5387un.c create mode 100644 configs/comtrend_ar5387un_ram_defconfig create mode 100644 include/configs/comtrend_ar5387un.h
arch/mips/dts/Makefile +1 -0
@@ -8,6 +8,7 @@ dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb +dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb
arch/mips/dts/comtrend,ar-5387un.dts new file +27 -0
@@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; + +#include "brcm,bcm6328.dtsi" + +/ { + model = "Comtrend AR-5387un Board"; + compatible = "comtrend,ar5387-un", "brcm,bcm6328"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&uart0 { + u-boot,dm-pre-reloc; + status = "okay"; +};
arch/mips/mach-bmips/Kconfig +6 -0
@@ -35,6 +35,11 @@ endchoice choice prompt "Board select" +config BOARD_COMTREND_AR5387UN + bool "Comtrend AR-5387un board" + depends on SOC_BMIPS_BCM6328 + select BMIPS_SUPPORTS_BOOT_RAM + config BOARD_HUAWEI_HG556A bool "Huawei HG556a board" depends on SOC_BMIPS_BCM6358
@@ -57,6 +62,7 @@ endchoice config BMIPS_SUPPORTS_BOOT_RAM bool +source "board/comtrend/ar5387un/Kconfig" source "board/huawei/hg556a/Kconfig" endmenu
board/comtrend/ar5387un/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if BOARD_COMTREND_AR5387UN + +config SYS_BOARD + default "ar5387un" + +config SYS_VENDOR + default "comtrend" + +config SYS_CONFIG_NAME + default "comtrend_ar5387un" + +endif
board/comtrend/ar5387un/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +COMTREND AR-5387UN BOARD +M: Álvaro Fernández Rojas <[email protected]> +S: Maintained +F: board/comtrend/ar-5387un/ +F: include/configs/comtrend_ar5387un.h +F: configs/comtrend_ar5387un_ram_defconfig
board/comtrend/ar5387un/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += ar-5387un.o
board/comtrend/ar5387un/ar-5387un.c new file +7 -0
@@ -0,0 +1,7 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h>
configs/comtrend_ar5387un_ram_defconfig new file +42 -0
42 lines not on this page · raw message
include/configs/comtrend_ar5387un.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <configs/bmips_common.h> +#include <configs/bmips_bcm6328.h> + +#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_ENV_SIZE (8 * 1024) + +#define CONFIG_SYS_LONGHELP +#define CONFIG_AUTO_COMPLETE +#define CONFIG_CMDLINE_EDITING
Signature · 1 line
2.1.4
PATCH v4 13/14 MIPS: add support for Broadcom MIPS BCM63268 SoC family
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: No changes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Add PERF_BASE to cpus.
arch/mips/dts/brcm,bcm63268.dtsi | 88 ++++++++++++++++++++++++++++++++++++++++ arch/mips/mach-bmips/Kconfig | 12 ++++++ include/configs/bmips_bcm63268.h | 25 ++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 arch/mips/dts/brcm,bcm63268.dtsi create mode 100644 include/configs/bmips_bcm63268.h
arch/mips/dts/brcm,bcm63268.dtsi new file +88 -0
@@ -0,0 +1,88 @@ +/* + * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <dt-bindings/gpio/gpio.h> +#include "skeleton.dtsi" + +/ { + compatible = "brcm,bcm63268"; + + cpus { + reg = <0x10000000 0x4>; + #address-cells = <1>; + #size-cells = <0>; + u-boot,dm-pre-reloc; + + cpu at 0 { + compatible = "brcm,bcm63268-cpu", "mips,mips4Kc"; + device_type = "cpu"; + reg = <0>; + u-boot,dm-pre-reloc; + }; + + cpu at 1 { + compatible = "brcm,bcm63268-cpu", "mips,mips4Kc"; + device_type = "cpu"; + reg = <1>; + u-boot,dm-pre-reloc; + }; + }; + + clocks { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + u-boot,dm-pre-reloc; + + periph_osc: periph-osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + u-boot,dm-pre-reloc; + }; + }; + + ubus { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + u-boot,dm-pre-reloc; + + periph_cntl: syscon at 10000000 { + compatible = "syscon"; + reg = <0x10000000 0x14>; + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&periph_cntl>; + offset = <0x8>; + mask = <0x1>; + }; + + uart0: serial at 10000180 { + compatible = "brcm,bcm6345-uart"; + reg = <0x10000180 0x18>; + clocks = <&periph_osc>; + + status = "disabled"; + }; + + uart1: serial at 100001a0 { + compatible = "brcm,bcm6345-uart"; + reg = <0x100001a0 0x18>; + clocks = <&periph_osc>; + + status = "disabled"; + }; + + memory-controller at 10003000 { + compatible = "brcm,bcm6328-mc"; + reg = <0x10003000 0x1000>; + u-boot,dm-pre-reloc; + }; + }; +};
arch/mips/mach-bmips/Kconfig +12 -0
@@ -4,6 +4,7 @@ menu "Broadcom MIPS platforms" config SYS_SOC default "bcm6328" if SOC_BMIPS_BCM6328 default "bcm6358" if SOC_BMIPS_BCM6358 + default "bcm63268" if SOC_BMIPS_BCM63268 choice prompt "Broadcom MIPS SoC select"
@@ -30,6 +31,17 @@ config SOC_BMIPS_BCM6358 help This supports BMIPS BCM6358 family including BCM6358 and BCM6359. +config SOC_BMIPS_BCM63268 + bool "BMIPS BCM63268 family" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_CPU_MIPS32_R1 + select MIPS_TUNE_4KC + select MIPS_L1_CACHE_SHIFT_4 + select SWAP_IO_SPACE + select SYSRESET_SYSCON + help + This supports BMIPS BCM63268 family including BCM63168, BCM63169, BCM63268 and BCM63269. + endchoice choice
include/configs/bmips_bcm63268.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __CONFIG_BMIPS_BCM63268_H +#define __CONFIG_BMIPS_BCM63268_H + +/* CPU */ +#define CONFIG_SYS_MIPS_TIMER_FREQ 200000000 + +/* RAM */ +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_SDRAM_BASE 0x80000000 + +/* U-Boot */ +#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE + 0x100000 + +#if defined(CONFIG_BMIPS_BOOT_RAM ) +#define CONFIG_SYS_INIT_SP_OFFSET 0x2000 +#define CONFIG_SKIP_LOWLEVEL_INIT +#endif + +#endif /* __CONFIG_BMIPS_BCM63268_H */
Signature · 1 line
2.1.4
PATCH v4 14/14 MIPS: add BMIPS Comtrend VR-3032u board
In reply to Álvaro Fernández Rojas---
v4: No changes.
v3: No changes.
v2: Introduce changes suggested by Daniel Schwierzeck:
- Split BMIPS support patches.
- Remove DEBUG_UART from defconfig.
arch/mips/dts/Makefile | 1 + arch/mips/dts/comtrend,vr-3032u.dts | 27 ++++++++++++++++++++++ arch/mips/mach-bmips/Kconfig | 6 +++++ board/comtrend/vr3032u/Kconfig | 12 ++++++++++ board/comtrend/vr3032u/MAINTAINERS | 6 +++++ board/comtrend/vr3032u/Makefile | 5 ++++ board/comtrend/vr3032u/vr-3032u.c | 7 ++++++ configs/comtrend_vr3032u_ram_defconfig | 42 ++++++++++++++++++++++++++++++++++ include/configs/comtrend_vr3032u.h | 15 ++++++++++++ 9 files changed, 121 insertions(+) create mode 100644 arch/mips/dts/comtrend,vr-3032u.dts create mode 100644 board/comtrend/vr3032u/Kconfig create mode 100644 board/comtrend/vr3032u/MAINTAINERS create mode 100644 board/comtrend/vr3032u/Makefile create mode 100644 board/comtrend/vr3032u/vr-3032u.c create mode 100644 configs/comtrend_vr3032u_ram_defconfig create mode 100644 include/configs/comtrend_vr3032u.h
arch/mips/dts/Makefile +1 -0
@@ -9,6 +9,7 @@ dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb +dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.dtb dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb
arch/mips/dts/comtrend,vr-3032u.dts new file +27 -0
@@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; + +#include "brcm,bcm63268.dtsi" + +/ { + model = "Comtrend VR-3032u Board"; + compatible = "comtrend,vr-3032u", "brcm,bcm63268"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&uart0 { + u-boot,dm-pre-reloc; + status = "okay"; +};
arch/mips/mach-bmips/Kconfig +6 -0
@@ -57,6 +57,11 @@ config BOARD_HUAWEI_HG556A depends on SOC_BMIPS_BCM6358 select BMIPS_SUPPORTS_BOOT_RAM +config BOARD_COMTREND_VR3032U + bool "Comtrend VR-3032u board" + depends on SOC_BMIPS_BCM63268 + select BMIPS_SUPPORTS_BOOT_RAM + endchoice choice
@@ -75,6 +80,7 @@ config BMIPS_SUPPORTS_BOOT_RAM bool source "board/comtrend/ar5387un/Kconfig" +source "board/comtrend/vr3032u/Kconfig" source "board/huawei/hg556a/Kconfig" endmenu
board/comtrend/vr3032u/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if BOARD_COMTREND_VR3032U + +config SYS_BOARD + default "vr3032u" + +config SYS_VENDOR + default "comtrend" + +config SYS_CONFIG_NAME + default "comtrend_vr3032u" + +endif
board/comtrend/vr3032u/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +COMTREND VR-3032U BOARD +M: Álvaro Fernández Rojas <[email protected]> +S: Maintained +F: board/comtrend/vr-3032u/ +F: include/configs/comtrend_vr-3032u.h +F: configs/comtrend_vr3032u_ram_defconfig
board/comtrend/vr3032u/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += vr-3032u.o
board/comtrend/vr3032u/vr-3032u.c new file +7 -0
@@ -0,0 +1,7 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h>
configs/comtrend_vr3032u_ram_defconfig new file +42 -0
42 lines not on this page · raw message
include/configs/comtrend_vr3032u.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* Copyright (C) 2017 Álvaro Fernández Rojas <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <configs/bmips_common.h> +#include <configs/bmips_bcm63268.h> + +#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_ENV_SIZE (8 * 1024) + +#define CONFIG_SYS_LONGHELP +#define CONFIG_AUTO_COMPLETE +#define CONFIG_CMDLINE_EDITING
Signature · 1 line
2.1.4