kc1.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /*
  2. * Amazon Kindle Fire (first generation) codename kc1 config
  3. *
  4. * Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef __CONFIG_H
  9. #define __CONFIG_H
  10. #include <asm/arch/cpu.h>
  11. #include <asm/arch/omap.h>
  12. /*
  13. * Build
  14. */
  15. #define CONFIG_SYS_THUMB_BUILD
  16. /*
  17. * CPU
  18. */
  19. #define CONFIG_SYS_L2_PL310 1
  20. #define CONFIG_SYS_PL310_BASE 0x48242000
  21. /*
  22. * Platform
  23. */
  24. #define CONFIG_OMAP
  25. #define CONFIG_OMAP4430
  26. /*
  27. * Board
  28. */
  29. #define CONFIG_MISC_INIT_R
  30. /*
  31. * Clocks
  32. */
  33. #define CONFIG_SYS_TIMERBASE GPT2_BASE
  34. #define CONFIG_SYS_PTV 2
  35. /*
  36. * DRAM
  37. */
  38. #define CONFIG_NR_DRAM_BANKS 1
  39. /*
  40. * Memory
  41. */
  42. #define CONFIG_SYS_TEXT_BASE 0x80100000
  43. #define CONFIG_SYS_SDRAM_BASE 0x80000000
  44. #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
  45. GENERATED_GBL_DATA_SIZE)
  46. #define CONFIG_SYS_MALLOC_LEN (1024 * 1024 + CONFIG_ENV_SIZE)
  47. /*
  48. * GPIO
  49. */
  50. #define CONFIG_OMAP_GPIO
  51. /*
  52. * I2C
  53. */
  54. #define CONFIG_SYS_I2C
  55. #define CONFIG_SYS_OMAP24_I2C_SPEED 400000
  56. #define CONFIG_SYS_OMAP24_I2C_SLAVE 1
  57. #define CONFIG_SYS_I2C_OMAP24XX
  58. #define CONFIG_I2C_MULTI_BUS
  59. /*
  60. * Flash
  61. */
  62. #define CONFIG_SYS_NO_FLASH
  63. /*
  64. * MMC
  65. */
  66. #define CONFIG_GENERIC_MMC
  67. #define CONFIG_OMAP_HSMMC
  68. /*
  69. * Power
  70. */
  71. #define CONFIG_TWL6030_POWER
  72. /*
  73. * Input
  74. */
  75. #define CONFIG_TWL6030_INPUT
  76. /*
  77. * Partitions
  78. */
  79. #define CONFIG_PARTITION_UUIDS
  80. #define CONFIG_CMD_PART
  81. /*
  82. * SPL
  83. */
  84. #define CONFIG_SPL_FRAMEWORK
  85. #define CONFIG_SPL_TEXT_BASE 0x40300000
  86. #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
  87. CONFIG_SPL_TEXT_BASE)
  88. #define CONFIG_SPL_BSS_START_ADDR 0x80000000
  89. #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024)
  90. #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
  91. #define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024)
  92. #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
  93. #define CONFIG_SPL_BOARD_INIT
  94. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 2
  95. /*
  96. * Console
  97. */
  98. #define CONFIG_AUTO_COMPLETE
  99. #define CONFIG_SYS_LONGHELP
  100. #define CONFIG_SYS_MAXARGS 16
  101. #define CONFIG_SYS_CBSIZE 512
  102. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) \
  103. + 16)
  104. /*
  105. * Serial
  106. */
  107. #define CONFIG_SYS_NS16550_SERIAL
  108. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  109. #define CONFIG_SYS_NS16550_CLK 48000000
  110. #define CONFIG_SYS_NS16550_COM3 UART3_BASE
  111. #define CONFIG_CONS_INDEX 3
  112. #define CONFIG_BAUDRATE 115200
  113. #define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, \
  114. 115200 }
  115. /*
  116. * USB gadget
  117. */
  118. #define CONFIG_USB_MUSB_PIO_ONLY
  119. #define CONFIG_USB_MUSB_OMAP2PLUS
  120. /*
  121. * Fastboot
  122. */
  123. #define CONFIG_USB_FUNCTION_FASTBOOT
  124. #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
  125. #define CONFIG_FASTBOOT_BUF_SIZE 0x2000000
  126. #define CONFIG_FASTBOOT_FLASH
  127. #define CONFIG_FASTBOOT_FLASH_MMC_DEV 0
  128. #define CONFIG_CMD_FASTBOOT
  129. /*
  130. * Environment
  131. */
  132. #define CONFIG_ENV_SIZE (128 * 1024)
  133. #define CONFIG_ENV_IS_NOWHERE
  134. #define CONFIG_ENV_OVERWRITE
  135. #define CONFIG_EXTRA_ENV_SETTINGS \
  136. "kernel_addr_r=0x82000000\0" \
  137. "loadaddr=0x82000000\0" \
  138. "fdt_addr_r=0x88000000\0" \
  139. "fdtaddr=0x88000000\0" \
  140. "ramdisk_addr_r=0x88080000\0" \
  141. "pxefile_addr_r=0x80100000\0" \
  142. "scriptaddr=0x80000000\0" \
  143. "bootm_size=0x10000000\0" \
  144. "boot_mmc_dev=0\0" \
  145. "kernel_mmc_part=7\0" \
  146. "recovery_mmc_part=5\0" \
  147. "fdtfile=omap4-kc1.dtb\0" \
  148. "bootfile=/boot/extlinux/extlinux.conf\0" \
  149. "bootargs=console=ttyO2,115200 mem=512M\0"
  150. /*
  151. * ATAGs
  152. */
  153. #define CONFIG_SETUP_MEMORY_TAGS
  154. #define CONFIG_CMDLINE_TAG
  155. #define CONFIG_INITRD_TAG
  156. #define CONFIG_REVISION_TAG
  157. #define CONFIG_SERIAL_TAG
  158. /*
  159. * Boot
  160. */
  161. #define CONFIG_SYS_LOAD_ADDR 0x82000000
  162. #define CONFIG_ANDROID_BOOT_IMAGE
  163. #define CONFIG_BOOTCOMMAND \
  164. "setenv boot_mmc_part ${kernel_mmc_part}; " \
  165. "if test reboot-${reboot-mode} = reboot-r; then " \
  166. "echo recovery; setenv boot_mmc_part ${recovery_mmc_part}; fi; " \
  167. "if test reboot-${reboot-mode} = reboot-b; then " \
  168. "echo fastboot; fastboot 0; fi; " \
  169. "part start mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_start; " \
  170. "part size mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_size; " \
  171. "mmc dev ${boot_mmc_dev}; " \
  172. "mmc read ${kernel_addr_r} ${boot_mmc_start} ${boot_mmc_size} && " \
  173. "bootm ${kernel_addr_r};"
  174. /*
  175. * Defaults
  176. */
  177. #include <config_defaults.h>
  178. #include <config_distro_defaults.h>
  179. #endif