nsa310s.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright (C) 2015
  3. * Gerald Kerma <dreagle@doukki.net>
  4. * Tony Dinh <mibodhi@gmail.com>
  5. * Luka Perkov <luka.perkov@sartura.hr>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef _CONFIG_NSA310S_H
  10. #define _CONFIG_NSA310S_H
  11. /* high level configuration options */
  12. #define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
  13. #define CONFIG_KW88F6192 1 /* SOC Name */
  14. #define CONFIG_KW88F6702 1 /* SOC Name */
  15. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  16. /* add target to build it automatically upon "make" */
  17. #define CONFIG_BUILD_TARGET "u-boot.kwb"
  18. /* compression configuration */
  19. #define CONFIG_BZIP2
  20. #define CONFIG_LZMA
  21. /* commands configuration */
  22. #define CONFIG_SYS_NO_FLASH /* declare no flash (NOR/SPI) */
  23. #define CONFIG_SYS_MVFS
  24. #define CONFIG_CMD_IDE
  25. /*
  26. * mv-common.h should be defined after CMD configs since it used them
  27. * to enable certain macros
  28. */
  29. #include "mv-common.h"
  30. /* environment variables configuration */
  31. #ifdef CONFIG_CMD_NAND
  32. #define CONFIG_ENV_IS_IN_NAND
  33. #define CONFIG_ENV_SECT_SIZE 0x20000
  34. #else
  35. #define CONFIG_ENV_IS_NOWHERE
  36. #endif
  37. #define CONFIG_ENV_SIZE 0x20000
  38. #define CONFIG_ENV_OFFSET 0xe0000
  39. /* default environment variables */
  40. #define CONFIG_BOOTCOMMAND \
  41. "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
  42. "ubi part root; " \
  43. "ubifsmount ubi:rootfs; " \
  44. "ubifsload 0x800000 ${kernel}; " \
  45. "ubifsload 0x700000 ${fdt}; " \
  46. "ubifsumount; " \
  47. "fdt addr 0x700000; fdt resize; fdt chosen; " \
  48. "bootz 0x800000 - 0x700000"
  49. #define CONFIG_MTDPARTS \
  50. "mtdparts=orion_nand:" \
  51. "0xe0000@0x0(uboot)," \
  52. "0x20000@0xe0000(uboot_env)," \
  53. "0x100000@0x100000(second_stage_uboot)," \
  54. "-@0x200000(root)\0"
  55. #define CONFIG_EXTRA_ENV_SETTINGS \
  56. "console=console=ttyS0,115200\0" \
  57. "mtdids=nand0=orion_nand\0" \
  58. "mtdparts="CONFIG_MTDPARTS \
  59. "kernel=/boot/zImage\0" \
  60. "fdt=/boot/nsa310s.dtb\0" \
  61. "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
  62. /* Ethernet driver configuration */
  63. #ifdef CONFIG_CMD_NET
  64. #define CONFIG_NETCONSOLE
  65. #define CONFIG_NET_MULTI
  66. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  67. #define CONFIG_PHY_BASE_ADR 1
  68. #define CONFIG_PHY_GIGE
  69. #define CONFIG_RESET_PHY_R
  70. #endif /* CONFIG_CMD_NET */
  71. /* SATA driver configuration */
  72. #ifdef CONFIG_CMD_IDE
  73. #define __io
  74. #define CONFIG_IDE_PREINIT
  75. #define CONFIG_DOS_PARTITION
  76. #define CONFIG_MVSATA_IDE_USE_PORT0
  77. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  78. #endif /* CONFIG_CMD_IDE */
  79. /* RTC driver configuration */
  80. #ifdef CONFIG_CMD_DATE
  81. #define CONFIG_RTC_MV
  82. #endif /* CONFIG_CMD_DATE */
  83. #endif /* _CONFIG_NSA310S_H */