openrd.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * (C) Copyright 2009
  3. * Net Insight <www.netinsight.net>
  4. * Written-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
  5. *
  6. * Based on sheevaplug.h:
  7. * (C) Copyright 2009
  8. * Marvell Semiconductor <www.marvell.com>
  9. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  10. *
  11. * SPDX-License-Identifier: GPL-2.0+
  12. */
  13. #ifndef _CONFIG_OPENRD_H
  14. #define _CONFIG_OPENRD_H
  15. /*
  16. * High Level Configuration Options (easy to change)
  17. */
  18. #define CONFIG_SHEEVA_88SV131 1 /* CPU Core subversion */
  19. #define CONFIG_KW88F6281 1 /* SOC Name */
  20. #define CONFIG_MACH_OPENRD_BASE /* Machine type */
  21. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  22. #define CONFIG_SYS_THUMB_BUILD
  23. /*
  24. * Commands configuration
  25. */
  26. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  27. #define CONFIG_SYS_MVFS
  28. #define CONFIG_CMD_ENV
  29. #define CONFIG_CMD_NAND
  30. #define CONFIG_CMD_IDE
  31. /*
  32. * mv-common.h should be defined after CMD configs since it used them
  33. * to enable certain macros
  34. */
  35. #include "mv-common.h"
  36. /*
  37. * Environment variables configurations
  38. */
  39. #ifdef CONFIG_CMD_NAND
  40. #define CONFIG_ENV_IS_IN_NAND 1
  41. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
  42. #else
  43. #define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
  44. #endif
  45. /*
  46. * max 4k env size is enough, but in case of nand
  47. * it has to be rounded to sector size
  48. */
  49. #define CONFIG_ENV_SIZE 0x20000 /* 128k */
  50. #define CONFIG_ENV_ADDR 0x60000
  51. #define CONFIG_ENV_OFFSET 0x60000 /* env starts here */
  52. /*
  53. * Environment is right behind U-Boot in flash. Make sure U-Boot
  54. * doesn't grow into the environment area.
  55. */
  56. #define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET
  57. /*
  58. * Default environment variables
  59. */
  60. #define CONFIG_BOOTCOMMAND "${x_bootcmd_kernel}; " \
  61. "setenv bootargs ${x_bootargs} ${x_bootargs_root}; " \
  62. "${x_bootcmd_usb}; bootm 0x6400000;"
  63. #define MTDIDS_DEFAULT "nand0=nand_mtd"
  64. #define MTDPARTS_DEFAULT "mtdparts=nand_mtd:0x100000@0x000000(uboot),"\
  65. "0x400000@0x100000(uImage),"\
  66. "0x1fb00000@0x500000(rootfs)"
  67. #define CONFIG_EXTRA_ENV_SETTINGS "x_bootargs=console" \
  68. "=ttyS0,115200 "MTDPARTS_DEFAULT " rw ubi.mtd=2,2048\0" \
  69. "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000\0" \
  70. "x_bootcmd_usb=usb start\0" \
  71. "x_bootargs_root=root=ubi0:rootfs rootfstype=ubifs\0" \
  72. "mtdids="MTDIDS_DEFAULT"\0" \
  73. "mtdparts="MTDPARTS_DEFAULT"\0"
  74. /*
  75. * Ethernet Driver configuration
  76. */
  77. #ifdef CONFIG_CMD_NET
  78. # ifdef CONFIG_BOARD_IS_OPENRD_BASE
  79. # define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  80. # else
  81. # define CONFIG_MVGBE_PORTS {1, 1} /* enable both ports */
  82. # endif
  83. # ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE
  84. # define CONFIG_PHY_BASE_ADR 0x0
  85. # define PHY_NO "88E1121"
  86. # else
  87. # define CONFIG_PHY_BASE_ADR 0x8
  88. # define PHY_NO "88E1116"
  89. # endif
  90. #endif /* CONFIG_CMD_NET */
  91. /*
  92. * SATA Driver configuration
  93. */
  94. #ifdef CONFIG_MVSATA_IDE
  95. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  96. #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
  97. #endif /*CONFIG_MVSATA_IDE*/
  98. #ifdef CONFIG_CMD_MMC
  99. #define CONFIG_GENERIC_MMC
  100. #define CONFIG_MVEBU_MMC
  101. #define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
  102. #endif /* CONFIG_CMD_MMC */
  103. #endif /* _CONFIG_OPENRD_BASE_H */