usbarmory.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * USB armory MkI board configuration settings
  4. * http://inversepath.com/usbarmory
  5. *
  6. * Copyright (C) 2015, Inverse Path
  7. * Andrej Rosano <andrej@inversepath.com>
  8. */
  9. #ifndef __CONFIG_H
  10. #define __CONFIG_H
  11. #define CONFIG_SYS_FSL_CLK
  12. #include <asm/arch/imx-regs.h>
  13. /* U-Boot environment */
  14. #define CONFIG_SYS_MMC_ENV_DEV 0
  15. /* U-Boot general configurations */
  16. #define CONFIG_SYS_CBSIZE 512
  17. /* UART */
  18. #define CONFIG_MXC_UART
  19. #define CONFIG_MXC_UART_BASE UART1_BASE
  20. /* SD/MMC */
  21. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  22. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  23. /* USB */
  24. #define CONFIG_MXC_USB_PORT 1
  25. #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
  26. #define CONFIG_MXC_USB_FLAGS 0
  27. /* I2C */
  28. #define CONFIG_SYS_I2C
  29. #define CONFIG_SYS_I2C_MXC
  30. #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
  31. #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
  32. /* Fuse */
  33. #define CONFIG_FSL_IIM
  34. /* U-Boot memory offsets */
  35. #define CONFIG_LOADADDR 0x72000000
  36. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  37. /* Linux boot */
  38. #define CONFIG_HOSTNAME "usbarmory"
  39. #define CONFIG_BOOTCOMMAND \
  40. "run distro_bootcmd; " \
  41. "setenv bootargs console=${console} ${bootargs_default}; " \
  42. "ext2load mmc 0:1 ${kernel_addr_r} /boot/zImage; " \
  43. "ext2load mmc 0:1 ${fdt_addr_r} /boot/${fdtfile}; " \
  44. "bootz ${kernel_addr_r} - ${fdt_addr_r}"
  45. #define BOOT_TARGET_DEVICES(func) func(MMC, mmc, 0)
  46. #include <config_distro_bootcmd.h>
  47. #define MEM_LAYOUT_ENV_SETTINGS \
  48. "kernel_addr_r=0x70800000\0" \
  49. "fdt_addr_r=0x71000000\0" \
  50. "scriptaddr=0x70800000\0" \
  51. "pxefile_addr_r=0x70800000\0" \
  52. "ramdisk_addr_r=0x73000000\0"
  53. #define CONFIG_EXTRA_ENV_SETTINGS \
  54. MEM_LAYOUT_ENV_SETTINGS \
  55. "bootargs_default=root=/dev/mmcblk0p1 rootwait rw\0" \
  56. "fdtfile=imx53-usbarmory.dtb\0" \
  57. "console=ttymxc0,115200\0" \
  58. BOOTENV
  59. #ifndef CONFIG_CMDLINE
  60. #define USBARMORY_FIT_PATH "/boot/usbarmory.itb"
  61. #define USBARMORY_FIT_ADDR "0x70800000"
  62. #endif
  63. /* Physical Memory Map */
  64. #define PHYS_SDRAM CSD0_BASE_ADDR
  65. #define PHYS_SDRAM_SIZE (gd->ram_size)
  66. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  67. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  68. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  69. #define CONFIG_SYS_INIT_SP_OFFSET \
  70. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  71. #define CONFIG_SYS_INIT_SP_ADDR \
  72. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  73. #define CONFIG_SYS_MEMTEST_START 0x70000000
  74. #define CONFIG_SYS_MEMTEST_END 0x90000000
  75. #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
  76. #endif /* __CONFIG_H */