goflexhome.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * Copyright (C) 2013 Suriyan Ramasami <suriyan.r@gmail.com>
  3. *
  4. * Based on dockstar.h originally written by
  5. * Copyright (C) 2010 Eric C. Cooper <ecc@cmu.edu>
  6. *
  7. * Based on sheevaplug.h originally written by
  8. * Prafulla Wadaskar <prafulla@marvell.com>
  9. * (C) Copyright 2009
  10. * Marvell Semiconductor <www.marvell.com>
  11. *
  12. * SPDX-License-Identifier: GPL-2.0+
  13. */
  14. #ifndef _CONFIG_GOFLEXHOME_H
  15. #define _CONFIG_GOFLEXHOME_H
  16. /*
  17. * High Level Configuration Options (easy to change)
  18. */
  19. #define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
  20. #define CONFIG_KW88F6281 1 /* SOC Name */
  21. #define CONFIG_MACH_GOFLEXHOME /* Machine type */
  22. #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  23. /*
  24. * Default GPIO configuration and LED status
  25. */
  26. #define GOFLEXHOME_OE_LOW (~(0))
  27. #define GOFLEXHOME_OE_HIGH (~(0))
  28. #define GOFLEXHOME_OE_VAL_LOW (1 << 29) /* USB_PWEN low */
  29. #define GOFLEXHOME_OE_VAL_HIGH (1 << 17) /* LED pin high */
  30. /* PHY related */
  31. #define MV88E1116_LED_FCTRL_REG 10
  32. #define MV88E1116_CPRSP_CR3_REG 21
  33. #define MV88E1116_MAC_CTRL_REG 21
  34. #define MV88E1116_PGADR_REG 22
  35. #define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
  36. #define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
  37. /*
  38. * Commands configuration
  39. */
  40. #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  41. #define CONFIG_CMD_ENV
  42. #define CONFIG_CMD_NAND
  43. #define CONFIG_CMD_IDE
  44. #define CONFIG_CMD_DATE
  45. #define CONFIG_SYS_MVFS /* Picks up Filesystem from mv-common.h */
  46. /*
  47. * mv-common.h should be defined after CMD configs since it used them
  48. * to enable certain macros
  49. */
  50. #include "mv-common.h"
  51. /*
  52. * Environment variables configurations
  53. */
  54. #ifdef CONFIG_CMD_NAND
  55. #define CONFIG_ENV_IS_IN_NAND 1
  56. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
  57. #else
  58. #define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
  59. #endif
  60. /*
  61. * max 4k env size is enough, but in case of nand
  62. * it has to be rounded to sector size
  63. */
  64. #define CONFIG_ENV_SIZE 0x20000 /* 128k */
  65. #define CONFIG_ENV_ADDR 0xC0000
  66. #define CONFIG_ENV_OFFSET 0xC0000 /* env starts here */
  67. /*
  68. * Default environment variables
  69. */
  70. #define CONFIG_BOOTCOMMAND \
  71. "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
  72. "ubi part root; " \
  73. "ubifsmount ubi:root; " \
  74. "ubifsload 0x800000 ${kernel}; " \
  75. "bootm 0x800000"
  76. #define CONFIG_MTDPARTS \
  77. "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0"
  78. #define CONFIG_EXTRA_ENV_SETTINGS \
  79. "console=console=ttyS0,115200\0" \
  80. "mtdids=nand0=orion_nand\0" \
  81. "mtdparts="CONFIG_MTDPARTS \
  82. "kernel=/boot/uImage\0" \
  83. "bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0"
  84. /*
  85. * Ethernet Driver configuration
  86. */
  87. #ifdef CONFIG_CMD_NET
  88. #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  89. #define CONFIG_PHY_BASE_ADR 0
  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. #endif /*CONFIG_MVSATA_IDE*/
  97. /*
  98. * * RTC driver configuration
  99. * */
  100. #ifdef CONFIG_CMD_DATE
  101. #define CONFIG_RTC_MV
  102. #endif /* CONFIG_CMD_DATE */
  103. #endif /* _CONFIG_GOFLEXHOME_H */