avionic design with actual uboot and tooling

submodule of avionic design uboot bootloader and with included tools to
get you started , read readme.md and readme-tk1-loader.md
This commit is contained in:
2026-03-03 21:46:32 +02:00
parent fe3ba02c96
commit 68d74d3181
11967 changed files with 2221897 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
BCM11130 BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcm28155_ap/
F: include/configs/bcm_ep_board.h
F: configs/bcm11130_defconfig

View File

@@ -0,0 +1,6 @@
BCM11130_NAND BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcm28155_ap/
F: include/configs/bcm_ep_board.h
F: configs/bcm11130_nand_defconfig

View File

@@ -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

View File

@@ -0,0 +1,6 @@
BCM23550_W1D BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcm23550_w1d/
F: include/configs/bcm23550_w1d.h
F: configs/bcm23550_w1d_defconfig

View File

@@ -0,0 +1,7 @@
#
# Copyright 2013 Broadcom Corporation.
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y += bcm23550_w1d.o

View File

@@ -0,0 +1,120 @@
/*
* Copyright 2013 Broadcom Corporation.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#include <asm/mach-types.h>
#include <mmc.h>
#include <asm/kona-common/kona_sdhci.h>
#include <asm/kona-common/clk.h>
#include <asm/arch/sysmap.h>
#include <usb.h>
#include <usb/dwc2_udc.h>
#include <g_dnl.h>
#define SECWATCHDOG_SDOGCR_OFFSET 0x00000000
#define SECWATCHDOG_SDOGCR_EN_SHIFT 27
#define SECWATCHDOG_SDOGCR_SRSTEN_SHIFT 26
#define SECWATCHDOG_SDOGCR_CLKS_SHIFT 20
#define SECWATCHDOG_SDOGCR_LD_SHIFT 0
#ifndef CONFIG_USB_SERIALNO
#define CONFIG_USB_SERIALNO "1234567890"
#endif
DECLARE_GLOBAL_DATA_PTR;
/*
* board_init - early hardware init
*/
int board_init(void)
{
printf("Relocation Offset is: %08lx\n", gd->reloc_off);
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
clk_init();
return 0;
}
/*
* misc_init_r - miscellaneous platform dependent initializations
*/
int misc_init_r(void)
{
return 0;
}
/*
* dram_init - sets uboots idea of sdram size
*/
int dram_init(void)
{
gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
CONFIG_SYS_SDRAM_SIZE);
return 0;
}
/* This is called after dram_init() so use get_ram_size result */
void dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = gd->ram_size;
}
#ifdef CONFIG_KONA_SDHCI
/*
* mmc_init - Initializes mmc
*/
int board_mmc_init(bd_t *bis)
{
int ret = 0;
/* Register eMMC - SDIO2 */
ret = kona_sdhci_init(1, 400000, 0);
if (ret)
return ret;
/* Register SD Card - SDIO4 kona_mmc_init assumes 0 based index */
ret = kona_sdhci_init(3, 400000, 0);
return ret;
}
#endif
#ifdef CONFIG_USB_GADGET
static struct dwc2_plat_otg_data bcm_otg_data = {
.regs_otg = HSOTG_BASE_ADDR
};
int board_usb_init(int index, enum usb_init_type init)
{
debug("%s: performing dwc2_udc_probe\n", __func__);
return dwc2_udc_probe(&bcm_otg_data);
}
int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
{
debug("%s\n", __func__);
if (!getenv("serial#"))
g_dnl_set_serialnumber(CONFIG_USB_SERIALNO);
return 0;
}
int g_dnl_get_board_bcd_device_number(int gcnum)
{
debug("%s\n", __func__);
return 1;
}
int board_usb_cleanup(int index, enum usb_init_type init)
{
debug("%s\n", __func__);
return 0;
}
#endif

View File

@@ -0,0 +1,15 @@
if TARGET_BCM28155_AP
config SYS_BOARD
default "bcm28155_ap"
config SYS_VENDOR
default "broadcom"
config SYS_SOC
default "bcm281xx"
config SYS_CONFIG_NAME
default "bcm28155_ap"
endif

View File

@@ -0,0 +1,6 @@
BCM28155_AP BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcm28155_ap/
F: include/configs/bcm28155_ap.h
F: configs/bcm28155_ap_defconfig

View File

@@ -0,0 +1,7 @@
#
# Copyright 2013 Broadcom Corporation.
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y += bcm28155_ap.o

View File

@@ -0,0 +1,127 @@
/*
* Copyright 2013 Broadcom Corporation.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#include <asm/mach-types.h>
#include <mmc.h>
#include <asm/kona-common/kona_sdhci.h>
#include <asm/kona-common/clk.h>
#include <asm/arch/sysmap.h>
#include <usb.h>
#include <usb/dwc2_udc.h>
#include <g_dnl.h>
#define SECWATCHDOG_SDOGCR_OFFSET 0x00000000
#define SECWATCHDOG_SDOGCR_EN_SHIFT 27
#define SECWATCHDOG_SDOGCR_SRSTEN_SHIFT 26
#define SECWATCHDOG_SDOGCR_CLKS_SHIFT 20
#define SECWATCHDOG_SDOGCR_LD_SHIFT 0
#ifndef CONFIG_USB_SERIALNO
#define CONFIG_USB_SERIALNO "1234567890"
#endif
DECLARE_GLOBAL_DATA_PTR;
/*
* board_init - early hardware init
*/
int board_init(void)
{
printf("Relocation Offset is: %08lx\n", gd->reloc_off);
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
clk_init();
return 0;
}
/*
* misc_init_r - miscellaneous platform dependent initializations
*/
int misc_init_r(void)
{
/* Disable watchdog reset - watchdog unused */
writel((0 << SECWATCHDOG_SDOGCR_EN_SHIFT) |
(0 << SECWATCHDOG_SDOGCR_SRSTEN_SHIFT) |
(4 << SECWATCHDOG_SDOGCR_CLKS_SHIFT) |
(0x5a0 << SECWATCHDOG_SDOGCR_LD_SHIFT),
(SECWD_BASE_ADDR + SECWATCHDOG_SDOGCR_OFFSET));
return 0;
}
/*
* dram_init - sets uboots idea of sdram size
*/
int dram_init(void)
{
gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
CONFIG_SYS_SDRAM_SIZE);
return 0;
}
/* This is called after dram_init() so use get_ram_size result */
void dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = gd->ram_size;
}
#ifdef CONFIG_KONA_SDHCI
/*
* mmc_init - Initializes mmc
*/
int board_mmc_init(bd_t *bis)
{
int ret = 0;
/* Register eMMC - SDIO2 */
ret = kona_sdhci_init(1, 400000, 0);
if (ret)
return ret;
/* Register SD Card - SDIO4 kona_mmc_init assumes 0 based index */
ret = kona_sdhci_init(3, 400000, 0);
return ret;
}
#endif
#ifdef CONFIG_USB_GADGET
static struct dwc2_plat_otg_data bcm_otg_data = {
.regs_otg = HSOTG_BASE_ADDR
};
int board_usb_init(int index, enum usb_init_type init)
{
debug("%s: performing dwc2_udc_probe\n", __func__);
return dwc2_udc_probe(&bcm_otg_data);
}
int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
{
debug("%s\n", __func__);
if (!getenv("serial#"))
g_dnl_set_serialnumber(CONFIG_USB_SERIALNO);
return 0;
}
int g_dnl_get_board_bcd_device_number(int gcnum)
{
debug("%s\n", __func__);
return 1;
}
int board_usb_cleanup(int index, enum usb_init_type init)
{
debug("%s\n", __func__);
return 0;
}
#endif

View File

@@ -0,0 +1,6 @@
BCM28155_W1D BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcm28155_ap/
F: include/configs/bcm28155_ap.h
F: configs/bcm28155_w1d_defconfig

View File

@@ -0,0 +1,6 @@
BCM911360_ENTPHN-NS BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmcygnus/
F: include/configs/bcm_ep_board.h
F: configs/bcm911360_entphn-ns_defconfig

View File

@@ -0,0 +1,6 @@
BCM911360_ENTPHN BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmcygnus/
F: include/configs/bcm_ep_board.h
F: configs/bcm911360_entphn_defconfig

View File

@@ -0,0 +1,6 @@
BCM911360K BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmcygnus/
F: include/configs/bcm_ep_board.h
F: configs/bcm911360k_defconfig

View File

@@ -0,0 +1,6 @@
BCM958300K-NS BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmcygnus/
F: include/configs/bcm_ep_board.h
F: configs/bcm958300k-ns_defconfig

View File

@@ -0,0 +1,6 @@
BCM958300K BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmcygnus/
F: include/configs/bcm_ep_board.h
F: configs/bcm958300k_defconfig

View File

@@ -0,0 +1,6 @@
BCM958305K BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmcygnus/
F: include/configs/bcm_ep_board.h
F: configs/bcm958305k_defconfig

View File

@@ -0,0 +1,6 @@
BCM958622HR BOARD
M: Steve Rae <steve.rae@raedomain.com>
S: Maintained
F: board/broadcom/bcmnsp/
F: include/configs/bcm_ep_board.h
F: configs/bcm958622hr_defconfig

View File

@@ -0,0 +1,7 @@
#
# Copyright 2014 Broadcom Corporation.
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y += board.o

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2014 Broadcom Corporation.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#include <config.h>
#include <netdev.h>
#include <asm/system.h>
#include <asm/iproc-common/armpll.h>
DECLARE_GLOBAL_DATA_PTR;
/*
* board_init - early hardware init
*/
int board_init(void)
{
/*
* Address of boot parameters passed to kernel
* Use default offset 0x100
*/
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
return 0;
}
/*
* dram_init - sets u-boot's idea of sdram size
*/
int dram_init(void)
{
gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
CONFIG_SYS_SDRAM_SIZE);
return 0;
}
void dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = gd->ram_size;
}
int board_early_init_f(void)
{
uint32_t status = 0;
/* Setup PLL if required */
#if defined(CONFIG_ARMCLK)
armpll_config(CONFIG_ARMCLK);
#endif
return status;
}
#ifdef CONFIG_ARMV7_NONSEC
void smp_set_core_boot_addr(unsigned long addr, int corenr)
{
}
void smp_kick_all_cpus(void)
{
}
void smp_waitloop(unsigned previous_address)
{
}
#endif
#ifdef CONFIG_BCM_SF2_ETH
int board_eth_init(bd_t *bis)
{
int rc = -1;
printf("Registering BCM sf2 eth\n");
rc = bcm_sf2_eth_register(bis, 0);
return rc;
}
#endif

View File

@@ -0,0 +1,15 @@
if TARGET_BCMCYGNUS
config SYS_BOARD
default "bcm_ep"
config SYS_VENDOR
default "broadcom"
config SYS_SOC
default "bcmcygnus"
config SYS_CONFIG_NAME
default "bcm_ep_board"
endif

View File

@@ -0,0 +1,15 @@
if TARGET_BCMNSP
config SYS_BOARD
default "bcm_ep"
config SYS_VENDOR
default "broadcom"
config SYS_SOC
default "bcmnsp"
config SYS_CONFIG_NAME
default "bcm_ep_board"
endif