brxre1.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * brxre1.h
  3. *
  4. * specific parts for B&R KWB Motherboard
  5. *
  6. * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
  7. * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
  8. *
  9. * SPDX-License-Identifier: GPL-2.0+
  10. */
  11. #ifndef __CONFIG_BRXRE1_H__
  12. #define __CONFIG_BRXRE1_H__
  13. #include <configs/bur_cfg_common.h>
  14. #include <configs/bur_am335x_common.h>
  15. /* ------------------------------------------------------------------------- */
  16. #define CONFIG_AM335X_LCD
  17. #define CONFIG_LCD_NOSTDOUT
  18. #define CONFIG_SYS_WHITE_ON_BLACK
  19. #define LCD_BPP LCD_COLOR32
  20. #define CONFIG_VIDEO_BMP_GZIP
  21. #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
  22. #define CONFIG_CMD_UNZIP
  23. #define CONFIG_CMD_BMP
  24. #define CONFIG_BMP_24BMP
  25. #define CONFIG_BMP_32BPP
  26. /* memory */
  27. #define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
  28. /* Clock Defines */
  29. #define V_OSCK 26000000 /* Clock output from T2 */
  30. #define V_SCLK (V_OSCK)
  31. #define CONFIG_POWER_TPS65217
  32. #define CONFIG_MACH_TYPE 3589
  33. /* I2C IP block */
  34. #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000
  35. /* GPIO */
  36. /* MMC/SD IP block */
  37. #define CONFIG_GENERIC_MMC
  38. #define CONFIG_OMAP_HSMMC
  39. #define CONFIG_SUPPORT_EMMC_BOOT
  40. /* Always 64 KiB env size */
  41. #define CONFIG_ENV_SIZE (64 << 10)
  42. #ifndef CONFIG_SPL_BUILD
  43. #define CONFIG_EXTRA_ENV_SETTINGS \
  44. BUR_COMMON_ENV \
  45. "bootaddr=0x80001100\0" \
  46. "bootdev=cpsw(0,0)\0" \
  47. "vx_romfsbase=0x800E0000\0" \
  48. "vx_romfssize=0x20000\0" \
  49. "vx_memtop=0x8FBEF000\0" \
  50. "loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
  51. "autoload=0\0" \
  52. "loadaddr=0x80100000\0" \
  53. "logoaddr=0x82000000\0" \
  54. "defaultARlen=0x8000\0" \
  55. "loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
  56. "defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
  57. "logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
  58. "bmp display ${logoaddr} 0 0\0" \
  59. "logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
  60. "bmp display ${logoaddr} 0 0\0" \
  61. "mmcboot=echo booting AR from eMMC-flash ...; "\
  62. "run logo0 || run logo1; " \
  63. "run loadromfs; " \
  64. "fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
  65. "run defaultAR;\0" \
  66. "netboot=echo booting AR from network ...; " \
  67. "run loadromfs; " \
  68. "tftp ${loadaddr} arimg && bootvx ${loadaddr}; " \
  69. "puts 'networkboot failed!';\0" \
  70. "netscript=echo running script from network (tftp) ...; " \
  71. "tftp 0x80000000 netscript.img && source; " \
  72. "puts 'netscript load failed!'\0" \
  73. "netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
  74. "tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
  75. "netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
  76. "if tftp 0x80100000 arimg.bin; " \
  77. "then mmc write 0x80100000 800 ${defaultARlen}; " \
  78. "else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
  79. "netupdateROMFS=echo updating romfs from network (tftp) ...; " \
  80. "if tftp 0x80100000 romfs.bin; " \
  81. "then mmc write 0x80100000 700 100; " \
  82. "else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
  83. #endif /* !CONFIG_SPL_BUILD*/
  84. #define CONFIG_BOOTCOMMAND \
  85. "run usbscript;"
  86. /* undefine command which we not need here */
  87. #undef CONFIG_BOOTM_NETBSD
  88. #undef CONFIG_BOOTM_PLAN9
  89. #undef CONFIG_BOOTM_RTEMS
  90. /* Support both device trees and ATAGs. */
  91. #define CONFIG_CMDLINE_TAG
  92. #define CONFIG_SETUP_MEMORY_TAGS
  93. #define CONFIG_INITRD_TAG
  94. /* USB configuration */
  95. #define CONFIG_USB_MUSB_DSPS
  96. #define CONFIG_ARCH_MISC_INIT
  97. #define CONFIG_USB_MUSB_PIO_ONLY
  98. #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
  99. #define CONFIG_AM335X_USB0
  100. #define CONFIG_AM335X_USB0_MODE MUSB_HOST
  101. #define CONFIG_AM335X_USB1
  102. #define CONFIG_AM335X_USB1_MODE MUSB_HOST
  103. #undef CONFIG_ENV_IS_NOWHERE
  104. #define CONFIG_ENV_IS_IN_MMC
  105. #define CONFIG_SYS_MMC_ENV_DEV 0
  106. #define CONFIG_SYS_MMC_ENV_PART 2
  107. #define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */
  108. #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
  109. #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  110. /*
  111. * Common filesystems support. When we have removable storage we
  112. * enabled a number of useful commands and support.
  113. */
  114. #if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
  115. #define CONFIG_DOS_PARTITION
  116. #define CONFIG_FAT_WRITE
  117. #endif /* CONFIG_MMC, ... */
  118. #endif /* __CONFIG_BRXRE1_H__ */