novena.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Configuration settings for the Novena U-Boot.
  4. *
  5. * Copyright (C) 2014 Marek Vasut <marex@denx.de>
  6. */
  7. #ifndef __CONFIG_H
  8. #define __CONFIG_H
  9. /* System configurations */
  10. #define CONFIG_KEYBOARD
  11. #include "mx6_common.h"
  12. /* U-Boot Commands */
  13. /* U-Boot general configurations */
  14. /* U-Boot environment */
  15. /*
  16. * Environment is on MMC, starting at offset 512KiB from start of the card.
  17. * Please place first partition at offset 1MiB from the start of the card
  18. * as recommended by GNU/fdisk. See below for details:
  19. * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/disc-partition-alignment.html
  20. */
  21. /* Booting Linux */
  22. #define CONFIG_BOOTFILE "fitImage"
  23. #define CONFIG_HOSTNAME "novena"
  24. /* Physical Memory Map */
  25. #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
  26. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  27. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  28. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  29. #define CONFIG_SYS_INIT_SP_OFFSET \
  30. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  31. #define CONFIG_SYS_INIT_SP_ADDR \
  32. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  33. #define CONFIG_SYS_MALLOC_LEN (64 * 1024 * 1024)
  34. /* SPL */
  35. #include "imx6_spl.h" /* common IMX6 SPL configuration */
  36. /* Ethernet Configuration */
  37. #ifdef CONFIG_SPL_BUILD
  38. #undef CONFIG_DM_ETH
  39. #endif
  40. /* I2C */
  41. #define CONFIG_SYS_I2C
  42. #define CONFIG_SYS_I2C_MXC
  43. #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
  44. #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
  45. #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
  46. #define CONFIG_I2C_MULTI_BUS
  47. #define CONFIG_SYS_I2C_SPEED 100000
  48. #define CONFIG_SYS_SPD_BUS_NUM 0
  49. /* I2C EEPROM */
  50. #ifdef CONFIG_CMD_EEPROM
  51. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
  52. #define CONFIG_SYS_I2C_EEPROM_BUS 2
  53. #endif
  54. /* MMC Configs */
  55. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  56. #define CONFIG_SYS_FSL_USDHC_NUM 2
  57. /* PCI express */
  58. #ifdef CONFIG_CMD_PCI
  59. #define CONFIG_PCI_SCAN_SHOW
  60. #define CONFIG_PCIE_IMX
  61. #define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(3, 29)
  62. #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(7, 12)
  63. #endif
  64. /* PMIC */
  65. #define CONFIG_POWER
  66. #define CONFIG_POWER_I2C
  67. #define CONFIG_POWER_PFUZE100
  68. #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
  69. /* SATA Configs */
  70. #define CONFIG_LBA48
  71. /* UART */
  72. #define CONFIG_MXC_UART_BASE UART2_BASE
  73. /* USB Configs */
  74. #ifdef CONFIG_CMD_USB
  75. #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
  76. #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
  77. #define CONFIG_MXC_USB_FLAGS 0
  78. /* Gadget part */
  79. #define CONFIG_USBD_HS
  80. #endif
  81. /* Video output */
  82. #define CONFIG_VIDEO_BMP_RLE8
  83. #define CONFIG_BMP_16BPP
  84. #define CONFIG_VIDEO_LOGO
  85. #define CONFIG_IMX_HDMI
  86. #define CONFIG_IMX_VIDEO_SKIP
  87. /* Extra U-Boot environment. */
  88. #ifndef CONFIG_SPL_BUILD
  89. #define CONFIG_EXTRA_ENV_SETTINGS \
  90. "fdt_high=0xffffffff\0" \
  91. "initrd_high=0xffffffff\0" \
  92. "consdev=ttymxc1\0" \
  93. "baudrate=115200\0" \
  94. "bootdev=/dev/mmcblk0p1\0" \
  95. "rootdev=/dev/mmcblk0p2\0" \
  96. "netdev=eth0\0" \
  97. "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \
  98. "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \
  99. "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \
  100. "ramdisk_addr_r=0x28000000\0" \
  101. "fdt_addr_r=0x18000000\0" \
  102. "fdtfile=imx6q-novena.dtb\0" \
  103. "stdout=serial,vidconsole\0" \
  104. "stderr=serial,vidconsole\0" \
  105. "addcons=" \
  106. "setenv bootargs ${bootargs} " \
  107. "console=${consdev},${baudrate}\0" \
  108. "addip=" \
  109. "setenv bootargs ${bootargs} " \
  110. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  111. "${netmask}:${hostname}:${netdev}:off\0" \
  112. "addmisc=" \
  113. "setenv bootargs ${bootargs} ${miscargs}\0" \
  114. "addargs=run addcons addmisc\0" \
  115. "mmcload=" \
  116. "mmc rescan ; " \
  117. "ext4load mmc 0:1 ${kernel_addr_r} ${bootfile}\0" \
  118. "netload=" \
  119. "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
  120. "miscargs=nohlt panic=1\0" \
  121. "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
  122. "nfsargs=" \
  123. "setenv bootargs root=/dev/nfs rw " \
  124. "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
  125. "mmc_mmc=" \
  126. "run mmcload mmcargs addargs ; " \
  127. "bootm ${kernel_addr_r}\0" \
  128. "mmc_nfs=" \
  129. "run mmcload nfsargs addip addargs ; " \
  130. "bootm ${kernel_addr_r}\0" \
  131. "net_mmc=" \
  132. "run netload mmcargs addargs ; " \
  133. "bootm ${kernel_addr_r}\0" \
  134. "net_nfs=" \
  135. "run netload nfsargs addip addargs ; " \
  136. "bootm ${kernel_addr_r}\0" \
  137. "update_sd_spl_filename=SPL\0" \
  138. "update_sd_uboot_filename=u-boot.img\0" \
  139. "update_sd_firmware=" /* Update the SD firmware partition */ \
  140. "if mmc rescan ; then " \
  141. "if dhcp ${update_sd_spl_filename} ; then " \
  142. "mmc write ${loadaddr} 2 0x200 ; " \
  143. "fi ; " \
  144. "if dhcp ${update_sd_uboot_filename} ; then " \
  145. "fatwrite mmc 0:1 ${loadaddr} u-boot.img ${filesize} ; "\
  146. "fi ; " \
  147. "fi\0" \
  148. BOOTENV
  149. #define BOOT_TARGET_DEVICES(func) \
  150. func(MMC, mmc, 0) \
  151. func(USB, usb, 0) \
  152. func(SATA, sata, 0) \
  153. func(PXE, pxe, na) \
  154. func(DHCP, dhcp, na)
  155. #include <config_distro_bootcmd.h>
  156. #else
  157. #define CONFIG_EXTRA_ENV_SETTINGS
  158. #endif /* CONFIG_SPL_BUILD */
  159. #endif /* __CONFIG_H */