2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-02-07 07:07:36 +00:00
|
|
|
/*
|
2016-06-22 10:36:13 +00:00
|
|
|
* brtpp1.h
|
2014-02-07 07:07:36 +00:00
|
|
|
*
|
|
|
|
* specific parts for B&R T-Series Motherboard
|
|
|
|
*
|
2015-05-28 13:41:12 +00:00
|
|
|
* Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
|
2014-02-07 07:07:36 +00:00
|
|
|
* Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
|
|
|
|
*/
|
|
|
|
|
2016-06-22 10:36:13 +00:00
|
|
|
#ifndef __CONFIG_BRPPT1_H__
|
|
|
|
#define __CONFIG_BRPPT1_H__
|
2014-02-07 07:07:36 +00:00
|
|
|
|
2016-02-19 11:09:45 +00:00
|
|
|
#include <configs/bur_cfg_common.h>
|
2014-02-07 07:07:36 +00:00
|
|
|
#include <configs/bur_am335x_common.h>
|
2020-05-10 17:40:09 +00:00
|
|
|
#include <linux/stringify.h>
|
2014-02-07 07:07:36 +00:00
|
|
|
/* ------------------------------------------------------------------------- */
|
2016-02-19 11:09:45 +00:00
|
|
|
/* memory */
|
|
|
|
|
2014-02-07 07:07:36 +00:00
|
|
|
/* Clock Defines */
|
|
|
|
#define V_OSCK 26000000 /* Clock output from T2 */
|
|
|
|
#define V_SCLK (V_OSCK)
|
|
|
|
|
|
|
|
/*
|
2018-07-06 13:41:28 +00:00
|
|
|
* When we have NAND flash we expect to be making use of mtdparts,
|
2014-02-07 07:07:36 +00:00
|
|
|
* both for ease of use in U-Boot and for passing information on to
|
|
|
|
* the Linux kernel.
|
|
|
|
*/
|
2018-07-08 03:18:22 +00:00
|
|
|
|
2022-08-25 06:54:00 +00:00
|
|
|
#define MMC_TGTS \
|
2018-07-06 13:41:26 +00:00
|
|
|
"t30args#0=setenv bootargs ${optargs_rot} ${optargs} console=${console} " \
|
2022-08-25 06:54:04 +00:00
|
|
|
"b_mode=${b_mode} root=${root_dev} rootfstype=ext4 rootwait\0" \
|
2018-07-06 13:41:26 +00:00
|
|
|
"b_t30lgcy#0=" \
|
|
|
|
"load ${loaddev}:2 ${loadaddr} /boot/zImage && " \
|
2022-08-25 06:54:04 +00:00
|
|
|
"run load_dtb && " \
|
2018-07-06 13:41:26 +00:00
|
|
|
"run t30args#0; run cfgscr; bootz ${loadaddr} - ${dtbaddr}\0" \
|
|
|
|
"t30args#1=setenv bootargs ${optargs_rot} ${optargs} console=${console} " \
|
|
|
|
"b_mode=${b_mode}\0" \
|
|
|
|
"b_t30lgcy#1=" \
|
|
|
|
"load ${loaddev}:1 ${loadaddr} zImage && " \
|
2022-08-25 06:54:04 +00:00
|
|
|
"load ${loaddev}:1 ${dtbaddr} am335x-brppt30.dtb && " \
|
2018-07-06 13:41:26 +00:00
|
|
|
"load ${loaddev}:1 ${ramaddr} rootfsPPT30.uboot && " \
|
|
|
|
"run t30args#1; run cfgscr; bootz ${loadaddr} ${ramaddr} ${dtbaddr}\0" \
|
|
|
|
"b_mmc0=load ${loaddev}:1 ${scraddr} bootscr.img && source ${scraddr}\0" \
|
|
|
|
"b_mmc1=load ${loaddev}:1 ${scraddr} /boot/bootscr.img && source ${scraddr}\0" \
|
|
|
|
"b_tgts_std=mmc0 mmc1 t30lgcy#0 t30lgcy#1 usb0 net\0" \
|
|
|
|
"b_tgts_rcy=t30lgcy#1 usb0 net\0" \
|
|
|
|
"b_tgts_pme=net usb0 mmc0 mmc1\0" \
|
2022-08-25 06:54:04 +00:00
|
|
|
"loaddev=mmc 1\0" \
|
|
|
|
"root_dev=/dev/mmcblk0p2\0" \
|
|
|
|
"load_dtb=load ${loaddev}:2 ${dtbaddr} /boot/am335x-brppt30.dtb; " \
|
|
|
|
"if test $? -eq 0; then " \
|
|
|
|
"setenv root_dev /dev/mmcblk1p2; " \
|
|
|
|
"else; " \
|
|
|
|
"load ${loaddev}:1 ${dtbaddr} am335x-brppt30-legacy.dtb; " \
|
|
|
|
"fi;\0"
|
2018-07-06 13:41:26 +00:00
|
|
|
|
2018-07-06 13:41:28 +00:00
|
|
|
#ifdef CONFIG_ENV_IS_IN_MMC
|
2018-07-06 13:41:26 +00:00
|
|
|
#define MMCTGTS \
|
2022-08-25 06:54:00 +00:00
|
|
|
MMC_TGTS \
|
2022-08-25 06:54:04 +00:00
|
|
|
"cfgscr=mw ${cfgaddr} 0;" \
|
2019-05-16 15:24:19 +00:00
|
|
|
" mmc dev 1; mmc read ${cfgaddr} 200 80; source ${cfgaddr};" \
|
|
|
|
" fdt addr ${dtbaddr} || cp ${fdtcontroladdr} ${dtbaddr} 4000\0"
|
2014-02-07 07:07:36 +00:00
|
|
|
#else
|
2018-07-06 13:41:26 +00:00
|
|
|
#define MMCTGTS ""
|
2014-02-07 07:07:36 +00:00
|
|
|
#endif /* CONFIG_MMC */
|
|
|
|
|
2018-07-06 13:41:26 +00:00
|
|
|
#define LOAD_OFFSET(x) 0x8##x
|
|
|
|
|
2014-02-07 07:07:36 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
2015-02-03 12:22:34 +00:00
|
|
|
BUR_COMMON_ENV \
|
2015-02-03 12:22:37 +00:00
|
|
|
"verify=no\0" \
|
2018-07-06 13:41:26 +00:00
|
|
|
"scraddr=" __stringify(LOAD_OFFSET(0000000)) "\0" \
|
|
|
|
"cfgaddr=" __stringify(LOAD_OFFSET(0020000)) "\0" \
|
|
|
|
"dtbaddr=" __stringify(LOAD_OFFSET(0040000)) "\0" \
|
|
|
|
"loadaddr=" __stringify(LOAD_OFFSET(0100000)) "\0" \
|
|
|
|
"ramaddr=" __stringify(LOAD_OFFSET(2000000)) "\0" \
|
2015-02-03 12:22:37 +00:00
|
|
|
"console=ttyO0,115200n8\0" \
|
2015-06-11 10:31:54 +00:00
|
|
|
"optargs=consoleblank=0 quiet panic=2\0" \
|
2018-07-06 13:41:26 +00:00
|
|
|
"b_break=0\0" \
|
|
|
|
"b_usb0=usb start && load usb 0 ${scraddr} bootscr.img && source ${scraddr}\0" \
|
|
|
|
"b_net=tftp ${scraddr} netscript.img && source ${scraddr}\0" \
|
|
|
|
MMCTGTS \
|
|
|
|
"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
|
|
|
|
" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
|
|
|
|
" else setenv b_tgts ${b_tgts_std}; fi\0" \
|
|
|
|
"b_default=run b_deftgts; for target in ${b_tgts};"\
|
|
|
|
" do echo \"### booting ${target} ###\"; run b_${target};" \
|
|
|
|
" if test ${b_break} = 1; then; exit; fi; done\0"
|
2014-02-07 07:07:36 +00:00
|
|
|
|
2016-06-22 10:36:13 +00:00
|
|
|
#endif /* ! __CONFIG_BRPPT1_H__ */
|