omap3_pandora.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. * (C) Copyright 2008-2010
  3. * Gražvydas Ignotas <notasas@gmail.com>
  4. *
  5. * Configuration settings for the OMAP3 Pandora.
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef __CONFIG_H
  10. #define __CONFIG_H
  11. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  12. #define CONFIG_NAND
  13. /* override base for compatibility with MLO the device ships with */
  14. #define CONFIG_SYS_TEXT_BASE 0x80008000
  15. #include <configs/ti_omap3_common.h>
  16. #define CONFIG_MISC_INIT_R
  17. #define CONFIG_REVISION_TAG 1
  18. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  19. #define CONFIG_SYS_DEVICE_NULLDEV 1
  20. /*
  21. * Hardware drivers
  22. */
  23. /* I2C Support */
  24. #define CONFIG_SYS_I2C_OMAP34XX
  25. /* TWL4030 LED */
  26. #define CONFIG_TWL4030_LED
  27. /* Initialize GPIOs by default */
  28. #define CONFIG_OMAP3_GPIO_4 /* GPIO96..127 is in GPIO Bank 4 */
  29. #define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO Bank 6 */
  30. /*
  31. * NS16550 Configuration
  32. */
  33. #undef CONFIG_SYS_NS16550_CLK
  34. #define CONFIG_SYS_NS16550_SERIAL
  35. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  36. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  37. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  38. #define CONFIG_SERIAL3 3
  39. /* commands to include */
  40. /*
  41. * Board NAND Info.
  42. */
  43. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  44. /* to access nand */
  45. #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
  46. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_SW
  47. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  48. #define CONFIG_SYS_NAND_OOBSIZE 64
  49. #ifdef CONFIG_NAND
  50. #define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
  51. #define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
  52. #define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
  53. #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
  54. #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
  55. #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(xloader),"\
  56. "1920k(uboot),128k(uboot-env),"\
  57. "10m(boot),-(rootfs)"
  58. #else
  59. #define MTDPARTS_DEFAULT
  60. #endif
  61. #define CONFIG_BOOTCOMMAND \
  62. "run distro_bootcmd; " \
  63. "setenv bootargs ${bootargs_ubi}; " \
  64. "if mmc rescan && load mmc 0:1 ${loadaddr} autoboot.scr; then " \
  65. "source ${loadaddr}; " \
  66. "fi; " \
  67. "ubi part boot && ubifsmount ubi:boot && " \
  68. "ubifsload ${loadaddr} uImage && bootm ${loadaddr}"
  69. #define BOOT_TARGET_DEVICES(func) \
  70. func(MMC, mmc, 0) \
  71. #include <config_distro_bootcmd.h>
  72. #define CONFIG_EXTRA_ENV_SETTINGS \
  73. DEFAULT_LINUX_BOOT_ENV \
  74. "usbtty=cdc_acm\0" \
  75. "bootargs_ubi=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \
  76. "rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K\0" \
  77. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  78. BOOTENV \
  79. /* memtest works on */
  80. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
  81. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
  82. 0x01F00000) /* 31MB */
  83. #if defined(CONFIG_NAND)
  84. #define CONFIG_SYS_FLASH_BASE NAND_BASE
  85. #endif
  86. /* Monitor at start of flash */
  87. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  88. #define CONFIG_ENV_IS_IN_NAND 1
  89. #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
  90. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  91. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  92. #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
  93. #endif /* __CONFIG_H */