pepper.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2013 Gumstix, Inc. - http://www.gumstix.com/
  4. */
  5. #ifndef __CONFIG_PEPPER_H
  6. #define __CONFIG_PEPPER_H
  7. #include <configs/ti_am335x_common.h>
  8. /* Clock defines */
  9. #define V_OSCK 24000000 /* Clock output from T2 */
  10. #define V_SCLK (V_OSCK)
  11. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  12. /* Mach type */
  13. #define CONFIG_MACH_TYPE MACH_TYPE_PEPPER
  14. #define CONFIG_EXTRA_ENV_SETTINGS \
  15. DEFAULT_LINUX_BOOT_ENV \
  16. "bootdir=/boot\0" \
  17. "bootfile=zImage\0" \
  18. "fdtfile=am335x-pepper.dtb\0" \
  19. "console=ttyO0,115200n8\0" \
  20. "optargs=\0" \
  21. "mmcdev=0\0" \
  22. "mmcroot=/dev/mmcblk0p2 rw\0" \
  23. "mmcrootfstype=ext4 rootwait\0" \
  24. "mmcargs=setenv bootargs console=${console} " \
  25. "${optargs} " \
  26. "root=${mmcroot} " \
  27. "rootfstype=${mmcrootfstype}\0" \
  28. "bootenv=uEnv.txt\0" \
  29. "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
  30. "importbootenv=echo Importing environment from mmc ...; " \
  31. "env import -t ${loadaddr} ${filesize}\0" \
  32. "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
  33. "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
  34. "loaduimage=fatload mmc ${mmcdev}:1 ${loadaddr} uImage\0" \
  35. "uimageboot=echo Booting from mmc${mmcdev} ...; " \
  36. "run mmcargs; " \
  37. "bootm ${loadaddr}\0" \
  38. "mmcboot=echo Booting from mmc ...; " \
  39. "run mmcargs; " \
  40. "bootz ${loadaddr} - ${fdtaddr}\0" \
  41. "ubiboot=echo Booting from nand (ubifs) ...; " \
  42. "run ubiargs; run ubiload; " \
  43. "bootz ${loadaddr} - ${fdtaddr}\0" \
  44. #define CONFIG_BOOTCOMMAND \
  45. "mmc dev ${mmcdev}; if mmc rescan; then " \
  46. "echo SD/MMC found on device ${mmcdev};" \
  47. "if run loadbootenv; then " \
  48. "echo Loaded environment from ${bootenv};" \
  49. "run importbootenv;" \
  50. "fi;" \
  51. "if test -n $uenvcmd; then " \
  52. "echo Running uenvcmd ...;" \
  53. "run uenvcmd;" \
  54. "fi;" \
  55. "if run mmcload; then " \
  56. "run mmcboot;" \
  57. "fi;" \
  58. "if run loaduimage; then " \
  59. "run uimageboot;" \
  60. "fi;" \
  61. "fi;" \
  62. /* Serial console configuration */
  63. #define CONFIG_SYS_NS16550_COM1 0x44e09000
  64. /* Ethernet support */
  65. #define CONFIG_PHY_RESET_DELAY 1000
  66. /* SPL */
  67. #endif /* __CONFIG_PEPPER_H */