novena.h 5.2 KB

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