usbarmory.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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_ENV_OFFSET (6 * 64 * 1024)
  15. #define CONFIG_ENV_SIZE (8 * 1024)
  16. #define CONFIG_SYS_MMC_ENV_DEV 0
  17. /* U-Boot general configurations */
  18. #define CONFIG_SYS_CBSIZE 512
  19. /* UART */
  20. #define CONFIG_MXC_UART
  21. #define CONFIG_MXC_UART_BASE UART1_BASE
  22. /* SD/MMC */
  23. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  24. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  25. /* USB */
  26. #define CONFIG_USB_EHCI_MX5
  27. #define CONFIG_MXC_USB_PORT 1
  28. #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
  29. #define CONFIG_MXC_USB_FLAGS 0
  30. /* I2C */
  31. #define CONFIG_SYS_I2C
  32. #define CONFIG_SYS_I2C_MXC
  33. #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
  34. #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
  35. /* Fuse */
  36. #define CONFIG_FSL_IIM
  37. /* U-Boot memory offsets */
  38. #define CONFIG_LOADADDR 0x72000000
  39. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  40. /* Linux boot */
  41. #define CONFIG_HOSTNAME "usbarmory"
  42. #define CONFIG_BOOTCOMMAND \
  43. "run distro_bootcmd; " \
  44. "setenv bootargs console=${console} ${bootargs_default}; " \
  45. "ext2load mmc 0:1 ${kernel_addr_r} /boot/zImage; " \
  46. "ext2load mmc 0:1 ${fdt_addr_r} /boot/${fdtfile}; " \
  47. "bootz ${kernel_addr_r} - ${fdt_addr_r}"
  48. #define BOOT_TARGET_DEVICES(func) func(MMC, mmc, 0)
  49. #include <config_distro_bootcmd.h>
  50. #define MEM_LAYOUT_ENV_SETTINGS \
  51. "kernel_addr_r=0x70800000\0" \
  52. "fdt_addr_r=0x71000000\0" \
  53. "scriptaddr=0x70800000\0" \
  54. "pxefile_addr_r=0x70800000\0" \
  55. "ramdisk_addr_r=0x73000000\0"
  56. #define CONFIG_EXTRA_ENV_SETTINGS \
  57. MEM_LAYOUT_ENV_SETTINGS \
  58. "bootargs_default=root=/dev/mmcblk0p1 rootwait rw\0" \
  59. "fdtfile=imx53-usbarmory.dtb\0" \
  60. "console=ttymxc0,115200\0" \
  61. BOOTENV
  62. #ifndef CONFIG_CMDLINE
  63. #define USBARMORY_FIT_PATH "/boot/usbarmory.itb"
  64. #define USBARMORY_FIT_ADDR "0x70800000"
  65. #endif
  66. /* Physical Memory Map */
  67. #define CONFIG_NR_DRAM_BANKS 1
  68. #define PHYS_SDRAM CSD0_BASE_ADDR
  69. #define PHYS_SDRAM_SIZE (gd->ram_size)
  70. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  71. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  72. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  73. #define CONFIG_SYS_INIT_SP_OFFSET \
  74. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  75. #define CONFIG_SYS_INIT_SP_ADDR \
  76. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  77. #define CONFIG_SYS_MEMTEST_START 0x70000000
  78. #define CONFIG_SYS_MEMTEST_END 0x90000000
  79. #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
  80. #endif /* __CONFIG_H */