kc1.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Amazon Kindle Fire (first generation) codename kc1 config
  4. *
  5. * Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
  6. */
  7. #ifndef __CONFIG_H
  8. #define __CONFIG_H
  9. #include <asm/arch/cpu.h>
  10. #include <asm/arch/omap.h>
  11. /*
  12. * Build
  13. */
  14. /*
  15. * CPU
  16. */
  17. #define CONFIG_SYS_L2_PL310 1
  18. #define CONFIG_SYS_PL310_BASE 0x48242000
  19. /*
  20. * Board
  21. */
  22. /*
  23. * Clocks
  24. */
  25. #define CONFIG_SYS_TIMERBASE GPT2_BASE
  26. #define CONFIG_SYS_PTV 2
  27. /*
  28. * DRAM
  29. */
  30. /*
  31. * Memory
  32. */
  33. #define CONFIG_SYS_SDRAM_BASE 0x80000000
  34. #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
  35. GENERATED_GBL_DATA_SIZE)
  36. #define CONFIG_SYS_MALLOC_LEN (1024 * 1024 + CONFIG_ENV_SIZE)
  37. /*
  38. * I2C
  39. */
  40. #define CONFIG_SYS_I2C
  41. #define CONFIG_I2C_MULTI_BUS
  42. /*
  43. * Power
  44. */
  45. #define CONFIG_TWL6030_POWER
  46. /*
  47. * Input
  48. */
  49. #define CONFIG_TWL6030_INPUT
  50. /*
  51. * SPL
  52. */
  53. #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
  54. CONFIG_SPL_TEXT_BASE)
  55. #define CONFIG_SPL_BSS_START_ADDR 0x80000000
  56. #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024)
  57. #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
  58. #define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024)
  59. /*
  60. * Console
  61. */
  62. #define CONFIG_SYS_CBSIZE 512
  63. /*
  64. * Serial
  65. */
  66. #define CONFIG_SYS_NS16550_SERIAL
  67. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  68. #define CONFIG_SYS_NS16550_CLK 48000000
  69. #define CONFIG_SYS_NS16550_COM3 UART3_BASE
  70. #define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, \
  71. 115200 }
  72. /*
  73. * USB gadget
  74. */
  75. /*
  76. * Environment
  77. */
  78. #define CONFIG_ENV_OVERWRITE
  79. #define CONFIG_EXTRA_ENV_SETTINGS \
  80. "kernel_addr_r=0x82000000\0" \
  81. "loadaddr=0x82000000\0" \
  82. "fdt_addr_r=0x88000000\0" \
  83. "fdtaddr=0x88000000\0" \
  84. "ramdisk_addr_r=0x88080000\0" \
  85. "pxefile_addr_r=0x80100000\0" \
  86. "scriptaddr=0x80000000\0" \
  87. "bootm_size=0x10000000\0" \
  88. "boot_mmc_dev=0\0" \
  89. "kernel_mmc_part=7\0" \
  90. "recovery_mmc_part=5\0" \
  91. "fdtfile=omap4-kc1.dtb\0" \
  92. "bootfile=/boot/extlinux/extlinux.conf\0" \
  93. "bootargs=console=ttyO2,115200 mem=512M\0"
  94. /*
  95. * ATAGs
  96. */
  97. #define CONFIG_SETUP_MEMORY_TAGS
  98. #define CONFIG_CMDLINE_TAG
  99. #define CONFIG_INITRD_TAG
  100. #define CONFIG_REVISION_TAG
  101. #define CONFIG_SERIAL_TAG
  102. /*
  103. * Boot
  104. */
  105. #define CONFIG_SYS_LOAD_ADDR 0x82000000
  106. #define CONFIG_BOOTCOMMAND \
  107. "setenv boot_mmc_part ${kernel_mmc_part}; " \
  108. "if test reboot-${reboot-mode} = reboot-r; then " \
  109. "echo recovery; setenv boot_mmc_part ${recovery_mmc_part}; fi; " \
  110. "if test reboot-${reboot-mode} = reboot-b; then " \
  111. "echo fastboot; fastboot 0; fi; " \
  112. "part start mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_start; " \
  113. "part size mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_size; " \
  114. "mmc dev ${boot_mmc_dev}; " \
  115. "mmc read ${kernel_addr_r} ${boot_mmc_start} ${boot_mmc_size} && " \
  116. "bootm ${kernel_addr_r};"
  117. /*
  118. * Defaults
  119. */
  120. #include <config_defaults.h>
  121. #endif