novena.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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_LEGACY
  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_LOGO
  83. #define CONFIG_IMX_HDMI
  84. #define CONFIG_IMX_VIDEO_SKIP
  85. /* Extra U-Boot environment. */
  86. #ifndef CONFIG_SPL_BUILD
  87. #define CONFIG_EXTRA_ENV_SETTINGS \
  88. "fdt_high=0xffffffff\0" \
  89. "initrd_high=0xffffffff\0" \
  90. "consdev=ttymxc1\0" \
  91. "baudrate=115200\0" \
  92. "bootdev=/dev/mmcblk0p1\0" \
  93. "rootdev=/dev/mmcblk0p2\0" \
  94. "netdev=eth0\0" \
  95. "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \
  96. "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \
  97. "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \
  98. "ramdisk_addr_r=0x28000000\0" \
  99. "fdt_addr_r=0x18000000\0" \
  100. "fdtfile=imx6q-novena.dtb\0" \
  101. "stdout=serial,vidconsole\0" \
  102. "stderr=serial,vidconsole\0" \
  103. "addcons=" \
  104. "setenv bootargs ${bootargs} " \
  105. "console=${consdev},${baudrate}\0" \
  106. "addip=" \
  107. "setenv bootargs ${bootargs} " \
  108. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  109. "${netmask}:${hostname}:${netdev}:off\0" \
  110. "addmisc=" \
  111. "setenv bootargs ${bootargs} ${miscargs}\0" \
  112. "addargs=run addcons addmisc\0" \
  113. "mmcload=" \
  114. "mmc rescan ; " \
  115. "ext4load mmc 0:1 ${kernel_addr_r} ${bootfile}\0" \
  116. "netload=" \
  117. "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
  118. "miscargs=nohlt panic=1\0" \
  119. "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
  120. "nfsargs=" \
  121. "setenv bootargs root=/dev/nfs rw " \
  122. "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
  123. "mmc_mmc=" \
  124. "run mmcload mmcargs addargs ; " \
  125. "bootm ${kernel_addr_r}\0" \
  126. "mmc_nfs=" \
  127. "run mmcload nfsargs addip addargs ; " \
  128. "bootm ${kernel_addr_r}\0" \
  129. "net_mmc=" \
  130. "run netload mmcargs addargs ; " \
  131. "bootm ${kernel_addr_r}\0" \
  132. "net_nfs=" \
  133. "run netload nfsargs addip addargs ; " \
  134. "bootm ${kernel_addr_r}\0" \
  135. "update_sd_spl_filename=SPL\0" \
  136. "update_sd_uboot_filename=u-boot.img\0" \
  137. "update_sd_firmware=" /* Update the SD firmware partition */ \
  138. "if mmc rescan ; then " \
  139. "if dhcp ${update_sd_spl_filename} ; then " \
  140. "mmc write ${loadaddr} 2 0x200 ; " \
  141. "fi ; " \
  142. "if dhcp ${update_sd_uboot_filename} ; then " \
  143. "fatwrite mmc 0:1 ${loadaddr} u-boot.img ${filesize} ; "\
  144. "fi ; " \
  145. "fi\0" \
  146. BOOTENV
  147. #define BOOT_TARGET_DEVICES(func) \
  148. func(MMC, mmc, 0) \
  149. func(USB, usb, 0) \
  150. func(SATA, sata, 0) \
  151. func(PXE, pxe, na) \
  152. func(DHCP, dhcp, na)
  153. #include <config_distro_bootcmd.h>
  154. #else
  155. #define CONFIG_EXTRA_ENV_SETTINGS
  156. #endif /* CONFIG_SPL_BUILD */
  157. #endif /* __CONFIG_H */