Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 1 | /* 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 |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame^] | 16 | #define CFG_SYS_PL310_BASE L2_PL310_BASE |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 17 | #endif /* !CONFIG_SYS_L2CACHE_OFF */ |
| 18 | |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 19 | #define CONFIG_MXC_GPT_HCLK |
| 20 | |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 21 | /* MMC */ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 22 | |
| 23 | /* Boot */ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 24 | |
| 25 | /* misc */ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 26 | |
| 27 | /* Environment */ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 28 | |
| 29 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 30 | BUR_COMMON_ENV \ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 31 | "cfgaddr=0x106F0000\0" \ |
| 32 | "scraddr=0x10700000\0" \ |
| 33 | "loadaddr=0x10800000\0" \ |
| 34 | "dtbaddr=0x12000000\0" \ |
| 35 | "ramaddr=0x12100000\0" \ |
| 36 | "cfgscr=mw ${loadaddr} 0 128\0" \ |
| 37 | "cfgscrl=fdt addr ${dtbaddr} &&"\ |
| 38 | " sf probe; sf read ${cfgaddr} 0x40000 0x10000 && source ${cfgaddr}\0" \ |
| 39 | "console=ttymxc0,115200n8 consoleblank=0 quiet\0" \ |
| 40 | "t50args#0=setenv bootargs b_mode=${b_mode} console=${console} " \ |
| 41 | " root=/dev/mmcblk0p2 rootfstype=ext4 rootwait panic=2 \0" \ |
| 42 | "b_t50lgcy#0=" \ |
| 43 | "load ${loaddev}:2 ${loadaddr} /boot/zImage && " \ |
| 44 | "load ${loaddev}:2 ${dtbaddr} /boot/imx6dl-brppt50.dtb; " \ |
| 45 | "run t50args#0; run cfgscrl; bootz ${loadaddr} - ${dtbaddr}\0" \ |
| 46 | "t50args#1=setenv bootargs console=${console} b_mode=${b_mode}" \ |
| 47 | " rootwait panic=2\0" \ |
| 48 | "b_t50lgcy#1=" \ |
| 49 | "load ${loaddev}:1 ${loadaddr} zImage && " \ |
| 50 | "load ${loaddev}:1 ${dtbaddr} imx6dl-brppt50.dtb && " \ |
| 51 | "load ${loaddev}:1 ${ramaddr} rootfsPPT50.uboot && " \ |
| 52 | "run t50args#1; run cfgscrl; bootz ${loadaddr} ${ramaddr} ${dtbaddr}\0"\ |
| 53 | "b_mmc0=load ${loaddev}:1 ${scraddr} bootscr.img && source ${scraddr}\0" \ |
| 54 | "b_mmc1=load ${loaddev}:1 ${scraddr} /boot/bootscr.img && source ${scraddr}\0" \ |
| 55 | "b_usb0=usb start && load usb 0 ${scraddr} bootscr.img && source ${scraddr}\0" \ |
| 56 | "b_net=tftp ${scraddr} netscript.img && source ${scraddr}\0" \ |
| 57 | "b_tgts_std=mmc0 mmc1 t50lgcy#0 t50lgcy#1 usb0 net\0" \ |
| 58 | "b_tgts_rcy=t50lgcy#1 usb0 net\0" \ |
| 59 | "b_tgts_pme=net usb0 mmc0 mmc1\0" \ |
| 60 | "b_mode=4\0" \ |
| 61 | "b_break=0\0" \ |
| 62 | "b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \ |
| 63 | " elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \ |
| 64 | " else setenv b_tgts ${b_tgts_std}; fi\0" \ |
| 65 | "b_default=run b_deftgts; for target in ${b_tgts};"\ |
| 66 | " do echo \"### booting ${target} ###\"; run b_${target};" \ |
| 67 | " if test ${b_break} = 1; then; exit; fi; done\0" \ |
| 68 | "loaddev=mmc 0\0" \ |
| 69 | "altbootcmd=setenv b_mode 0; run b_default;\0" \ |
| 70 | "bootlimit=1\0" \ |
| 71 | "net2nor=sf probe && dhcp &&" \ |
| 72 | " tftp ${loadaddr} SPL && sf erase 0 +${filesize} &&" \ |
| 73 | " sf write ${loadaddr} 400 ${filesize} &&" \ |
| 74 | " tftp ${loadaddr} u-boot-dtb.img && sf erase 0x100000 +${filesize} &&" \ |
| 75 | " sf write ${loadaddr} 0x100000 ${filesize}\0" |
| 76 | |
| 77 | /* RAM */ |
| 78 | #define PHYS_SDRAM_1 MMDC0_ARB_BASE_ADDR |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 79 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame^] | 80 | #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 81 | #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 82 | |
| 83 | /* Ethernet */ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 84 | #define CONFIG_FEC_FIXED_SPEED _1000BASET |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 85 | |
| 86 | /* USB Configs */ |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 87 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 88 | |
Hannes Schmelzer | 6443d5d | 2019-07-17 14:29:53 +0200 | [diff] [blame] | 89 | #endif /* __CONFIG_BRPP2_IMX6_H */ |