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:
12
u-boot/board/ti/sdp4430/Kconfig
Normal file
12
u-boot/board/ti/sdp4430/Kconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
if TARGET_OMAP4_SDP4430
|
||||
|
||||
config SYS_BOARD
|
||||
default "sdp4430"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "ti"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "omap4_sdp4430"
|
||||
|
||||
endif
|
||||
6
u-boot/board/ti/sdp4430/MAINTAINERS
Normal file
6
u-boot/board/ti/sdp4430/MAINTAINERS
Normal file
@@ -0,0 +1,6 @@
|
||||
SDP4430 BOARD
|
||||
M: Lokesh Vutla <lokeshvutla@ti.com>
|
||||
S: Maintained
|
||||
F: board/ti/sdp4430/
|
||||
F: include/configs/omap4_sdp4430.h
|
||||
F: configs/omap4_sdp4430_defconfig
|
||||
12
u-boot/board/ti/sdp4430/Makefile
Normal file
12
u-boot/board/ti/sdp4430/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# (C) Copyright 2000, 2001, 2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y := sdp.o
|
||||
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
obj-y += cmd_bat.o
|
||||
endif
|
||||
42
u-boot/board/ti/sdp4430/cmd_bat.c
Normal file
42
u-boot/board/ti/sdp4430/cmd_bat.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Texas Instruments
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
|
||||
#ifdef CONFIG_CMD_BAT
|
||||
#include <twl6030.h>
|
||||
|
||||
int do_vbat(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
if (argc == 2) {
|
||||
if (strncmp(argv[1], "startcharge", 12) == 0)
|
||||
twl6030_start_usb_charging();
|
||||
else if (strncmp(argv[1], "stopcharge", 11) == 0)
|
||||
twl6030_stop_usb_charging();
|
||||
else if (strncmp(argv[1], "status", 7) == 0) {
|
||||
twl6030_get_battery_voltage();
|
||||
twl6030_get_battery_current();
|
||||
} else {
|
||||
goto bat_cmd_usage;
|
||||
}
|
||||
} else {
|
||||
goto bat_cmd_usage;
|
||||
}
|
||||
return 0;
|
||||
|
||||
bat_cmd_usage:
|
||||
return cmd_usage(cmdtp);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
bat, 2, 1, do_vbat,
|
||||
"battery charging, voltage/current measurements",
|
||||
"status - display battery voltage and current\n"
|
||||
"bat startcharge - start charging via USB\n"
|
||||
"bat stopcharge - stop charging\n"
|
||||
);
|
||||
#endif /* CONFIG_BAT_CMD */
|
||||
97
u-boot/board/ti/sdp4430/sdp.c
Normal file
97
u-boot/board/ti/sdp4430/sdp.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Texas Instruments Incorporated, <www.ti.com>
|
||||
* Aneesh V <aneesh@ti.com>
|
||||
* Steve Sakoman <steve@sakoman.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <twl6030.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/arch/mmc_host_def.h>
|
||||
|
||||
#include "sdp4430_mux_data.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
const struct omap_sysinfo sysinfo = {
|
||||
"Board: OMAP4430 SDP\n"
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief board_init
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
gpmc_init();
|
||||
|
||||
gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief misc_init_r - Configure SDP board specific configurations
|
||||
* such as power configurations, ethernet initialization as phase2 of
|
||||
* boot sequence
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
int misc_init_r(void)
|
||||
{
|
||||
#ifdef CONFIG_TWL6030_POWER
|
||||
twl6030_init_battery_charging();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_muxconf_regs(void)
|
||||
{
|
||||
do_set_mux((*ctrl)->control_padconf_core_base,
|
||||
core_padconf_array_essential,
|
||||
sizeof(core_padconf_array_essential) /
|
||||
sizeof(struct pad_conf_entry));
|
||||
|
||||
do_set_mux((*ctrl)->control_padconf_wkup_base,
|
||||
wkup_padconf_array_essential,
|
||||
sizeof(wkup_padconf_array_essential) /
|
||||
sizeof(struct pad_conf_entry));
|
||||
|
||||
if ((omap_revision() >= OMAP4460_ES1_0) &&
|
||||
(omap_revision() < OMAP4470_ES1_0))
|
||||
do_set_mux((*ctrl)->control_padconf_wkup_base,
|
||||
wkup_padconf_array_essential_4460,
|
||||
sizeof(wkup_padconf_array_essential_4460) /
|
||||
sizeof(struct pad_conf_entry));
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
|
||||
int board_mmc_init(bd_t *bis)
|
||||
{
|
||||
omap_mmc_init(0, 0, 0, -1, -1);
|
||||
omap_mmc_init(1, 0, 0, -1, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void board_mmc_power_init(void)
|
||||
{
|
||||
twl6030_power_mmc_init(0);
|
||||
twl6030_power_mmc_init(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* get_board_rev() - get board revision
|
||||
*/
|
||||
u32 get_board_rev(void)
|
||||
{
|
||||
return 0x20;
|
||||
}
|
||||
68
u-boot/board/ti/sdp4430/sdp4430_mux_data.h
Normal file
68
u-boot/board/ti/sdp4430/sdp4430_mux_data.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Texas Instruments Incorporated, <www.ti.com>
|
||||
*
|
||||
* Balaji Krishnamoorthy <balajitk@ti.com>
|
||||
* Aneesh V <aneesh@ti.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
#ifndef _SDP4430_MUX_DATA_H
|
||||
#define _SDP4430_MUX_DATA_H
|
||||
|
||||
#include <asm/arch/mux_omap4.h>
|
||||
|
||||
const struct pad_conf_entry core_padconf_array_essential[] = {
|
||||
|
||||
{GPMC_AD0, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat0 */
|
||||
{GPMC_AD1, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat1 */
|
||||
{GPMC_AD2, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat2 */
|
||||
{GPMC_AD3, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat3 */
|
||||
{GPMC_AD4, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat4 */
|
||||
{GPMC_AD5, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat5 */
|
||||
{GPMC_AD6, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat6 */
|
||||
{GPMC_AD7, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat7 */
|
||||
{GPMC_NOE, (PTU | IEN | OFF_EN | OFF_OUT_PTD | M1)}, /* sdmmc2_clk */
|
||||
{GPMC_NWE, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_cmd */
|
||||
{SDMMC1_CLK, (PTU | OFF_EN | OFF_OUT_PTD | M0)}, /* sdmmc1_clk */
|
||||
{SDMMC1_CMD, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_cmd */
|
||||
{SDMMC1_DAT0, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat0 */
|
||||
{SDMMC1_DAT1, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat1 */
|
||||
{SDMMC1_DAT2, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat2 */
|
||||
{SDMMC1_DAT3, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat3 */
|
||||
{SDMMC1_DAT4, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat4 */
|
||||
{SDMMC1_DAT5, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat5 */
|
||||
{SDMMC1_DAT6, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat6 */
|
||||
{SDMMC1_DAT7, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* sdmmc1_dat7 */
|
||||
{UART3_CTS_RCTX, (PTU | IEN | M0)}, /* uart3_tx */
|
||||
{UART3_RTS_SD, (M0)}, /* uart3_rts_sd */
|
||||
{UART3_RX_IRRX, (IEN | M0)}, /* uart3_rx */
|
||||
{UART3_TX_IRTX, (M0)}, /* uart3_tx */
|
||||
{USBB1_ULPITLL_DAT4, (IEN | OFF_EN | OFF_PD | OFF_IN | M4)}, /* usbb1_ulpiphy_dat4 */
|
||||
{USBB1_ULPITLL_DAT5, (IEN | OFF_EN | OFF_PD | OFF_IN | M4)}, /* usbb1_ulpiphy_dat5 */
|
||||
{USBB1_ULPITLL_DAT6, (IEN | OFF_EN | OFF_PD | OFF_IN | M4)}, /* usbb1_ulpiphy_dat6 */
|
||||
{USBB1_ULPITLL_DAT7, (IEN | OFF_EN | OFF_PD | OFF_IN | M4)}, /* usbb1_ulpiphy_dat7 */
|
||||
{USBB1_HSIC_DATA, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* usbb1_hsic_data */
|
||||
{USBB1_HSIC_STROBE, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* usbb1_hsic_strobe */
|
||||
{USBC1_ICUSB_DP, (IEN | M0)}, /* usbc1_icusb_dp */
|
||||
{USBC1_ICUSB_DM, (IEN | M0)}, /* usbc1_icusb_dm */
|
||||
{USBA0_OTG_CE, (PTD | OFF_EN | OFF_PD | OFF_OUT_PTD | M0)}, /* usba0_otg_ce */
|
||||
{USBA0_OTG_DP, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* usba0_otg_dp */
|
||||
{USBA0_OTG_DM, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* usba0_otg_dm */
|
||||
};
|
||||
|
||||
const struct pad_conf_entry wkup_padconf_array_essential[] = {
|
||||
|
||||
{PAD1_SR_SCL, (PTU | IEN | M0)}, /* sr_scl */
|
||||
{PAD0_SR_SDA, (PTU | IEN | M0)}, /* sr_sda */
|
||||
{PAD1_SYS_32K, (IEN | M0)} /* sys_32k */
|
||||
|
||||
};
|
||||
|
||||
const struct pad_conf_entry wkup_padconf_array_essential_4460[] = {
|
||||
|
||||
{PAD1_FREF_CLK4_REQ, (M3)}, /* gpio_wk7 for TPS: Mode 3 */
|
||||
|
||||
};
|
||||
|
||||
#endif /* _SDP4430_MUX_DATA_H */
|
||||
Reference in New Issue
Block a user