blob: 3f54bafdb88a61b7d3e0c3176c4cf07117ce70cb [file] [log] [blame]
Hannes Schmelzerc04ac5b2019-07-17 14:29:53 +02001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Config file for BuR BRPP2_IMX6 board
4 *
5 * Copyright (C) 2018
6 * B&R Industrial Automation GmbH - http://www.br-automation.com/
7 */
8#ifndef __CONFIG_BRPP2_IMX6_H
9#define __CONFIG_BRPP2_IMX6_H
10
11#include <configs/bur_cfg_common.h>
12#include <asm/arch/imx-regs.h>
13
14/* -- i.mx6 specifica -- */
15#ifndef CONFIG_SYS_L2CACHE_OFF
16#define CONFIG_SYS_L2_PL310
17#define CONFIG_SYS_PL310_BASE L2_PL310_BASE
18#endif /* !CONFIG_SYS_L2CACHE_OFF */
19
20#define CONFIG_BOARD_POSTCLK_INIT
21#define CONFIG_MXC_GPT_HCLK
22
Hannes Schmelzerc04ac5b2019-07-17 14:29:53 +020023/* MMC */
24#define CONFIG_FSL_USDHC
25
26/* Boot */
Hannes Schmelzerc04ac5b2019-07-17 14:29:53 +020027
28/* misc */
Hannes Schmelzerc04ac5b2019-07-17 14:29:53 +020029
30/* Environment */
Hannes Schmelzerc04ac5b2019-07-17 14:29:53 +020031
32#define CONFIG_EXTRA_ENV_SETTINGS \
33BUR_COMMON_ENV \
34"autoload=0\0" \
35"cfgaddr=0x106F0000\0" \
36"scraddr=0x10700000\0" \
37"loadaddr=0x10800000\0" \
38"dtbaddr=0x12000000\0" \
39"ramaddr=0x12100000\0" \
40"cfgscr=mw ${loadaddr} 0 128\0" \
41"cfgscrl=fdt addr ${dtbaddr} &&"\
42" sf probe; sf read ${cfgaddr} 0x40000 0x10000 && source ${cfgaddr}\0" \
43"console=ttymxc0,115200n8 consoleblank=0 quiet\0" \
44"t50args#0=setenv bootargs b_mode=${b_mode} console=${console} " \
45 " root=/dev/mmcblk0p2 rootfstype=ext4 rootwait panic=2 \0" \
46"b_t50lgcy#0=" \
47 "load ${loaddev}:2 ${loadaddr} /boot/zImage && " \
48 "load ${loaddev}:2 ${dtbaddr} /boot/imx6dl-brppt50.dtb; " \
49 "run t50args#0; run cfgscrl; bootz ${loadaddr} - ${dtbaddr}\0" \
50"t50args#1=setenv bootargs console=${console} b_mode=${b_mode}" \
51 " rootwait panic=2\0" \
52"b_t50lgcy#1=" \
53 "load ${loaddev}:1 ${loadaddr} zImage && " \
54 "load ${loaddev}:1 ${dtbaddr} imx6dl-brppt50.dtb && " \
55 "load ${loaddev}:1 ${ramaddr} rootfsPPT50.uboot && " \
56 "run t50args#1; run cfgscrl; bootz ${loadaddr} ${ramaddr} ${dtbaddr}\0"\
57"b_mmc0=load ${loaddev}:1 ${scraddr} bootscr.img && source ${scraddr}\0" \
58"b_mmc1=load ${loaddev}:1 ${scraddr} /boot/bootscr.img && source ${scraddr}\0" \
59"b_usb0=usb start && load usb 0 ${scraddr} bootscr.img && source ${scraddr}\0" \
60"b_net=tftp ${scraddr} netscript.img && source ${scraddr}\0" \
61"b_tgts_std=mmc0 mmc1 t50lgcy#0 t50lgcy#1 usb0 net\0" \
62"b_tgts_rcy=t50lgcy#1 usb0 net\0" \
63"b_tgts_pme=net usb0 mmc0 mmc1\0" \
64"b_mode=4\0" \
65"b_break=0\0" \
66"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
67" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
68" else setenv b_tgts ${b_tgts_std}; fi\0" \
69"b_default=run b_deftgts; for target in ${b_tgts};"\
70" do echo \"### booting ${target} ###\"; run b_${target};" \
71" if test ${b_break} = 1; then; exit; fi; done\0" \
72"loaddev=mmc 0\0" \
73"altbootcmd=setenv b_mode 0; run b_default;\0" \
74"bootlimit=1\0" \
75"net2nor=sf probe && dhcp &&" \
76" tftp ${loadaddr} SPL && sf erase 0 +${filesize} &&" \
77" sf write ${loadaddr} 400 ${filesize} &&" \
78" tftp ${loadaddr} u-boot-dtb.img && sf erase 0x100000 +${filesize} &&" \
79" sf write ${loadaddr} 0x100000 ${filesize}\0"
80
81/* RAM */
82#define PHYS_SDRAM_1 MMDC0_ARB_BASE_ADDR
83#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
Hannes Schmelzerc04ac5b2019-07-17 14:29:53 +020084#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
85#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
86#define CONFIG_SYS_INIT_SP_OFFSET \
87 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
88#define CONFIG_SYS_INIT_SP_ADDR \
89 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
90
91/* Ethernet */
92#define CONFIG_MII
93#define CONFIG_FEC_XCV_TYPE RGMII
94#define CONFIG_FEC_FIXED_SPEED _1000BASET
95#define CONFIG_ARP_TIMEOUT 1500UL
96
97/* USB Configs */
98#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
99#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
100
101/* SPL */
102#ifdef CONFIG_SPL
103#include "imx6_spl.h"
104
105#endif /* CONFIG_SPL */
106#endif /* __CONFIG_BRPP2_IMX6_H */