board.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * board.h
  3. *
  4. * (C) Copyright 2013 Siemens Schweiz AG
  5. * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
  6. *
  7. * Based on:
  8. * TI AM335x boards information header
  9. * u-boot:/board/ti/am335x/board.h
  10. *
  11. * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
  12. *
  13. * SPDX-License-Identifier: GPL-2.0+
  14. */
  15. #ifndef _BOARD_H_
  16. #define _BOARD_H_
  17. #define PARGS3(x) settings.ddr3.x-ddr3_default.x, \
  18. settings.ddr3.x, ddr3_default.x
  19. #define PRINTARGS(y) printf("%x, %8x, %8x : "#y"\n", PARGS3(y))
  20. #define MAGIC_CHIP 0x50494843
  21. /* Automatic generated definition */
  22. /* Wed, 19 Jun 2013 10:57:48 +0200 */
  23. /* From file: draco/ddr3-data-micron.txt */
  24. struct ddr3_data {
  25. unsigned int magic; /* 0x33524444 */
  26. unsigned int version; /* 0x56312e33 */
  27. unsigned short int ddr3_sratio; /* 0x0100 */
  28. unsigned short int iclkout; /* 0x0001 */
  29. unsigned short int dt0rdsratio0; /* 0x003A */
  30. unsigned short int dt0wdsratio0; /* 0x008A */
  31. unsigned short int dt0fwsratio0; /* 0x010B */
  32. unsigned short int dt0wrsratio0; /* 0x00C4 */
  33. unsigned int sdram_tim1; /* 0x0888A39B */
  34. unsigned int sdram_tim2; /* 0x26247FDA */
  35. unsigned int sdram_tim3; /* 0x501F821F */
  36. unsigned short int emif_ddr_phy_ctlr_1; /* 0x0006 */
  37. unsigned int sdram_config; /* 0x61C04AB2 */
  38. unsigned int ref_ctrl; /* 0x00000618 */
  39. };
  40. struct chip_data {
  41. unsigned int magic;
  42. char sdevname[16];
  43. char shwver[7];
  44. };
  45. struct dxr2_baseboard_id {
  46. struct ddr3_data ddr3;
  47. struct chip_data chip;
  48. };
  49. /*
  50. * We have three pin mux functions that must exist. We must be able to enable
  51. * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
  52. * main pinmux function that can be overridden to enable all other pinmux that
  53. * is required on the board.
  54. */
  55. void enable_uart0_pin_mux(void);
  56. void enable_uart1_pin_mux(void);
  57. void enable_uart2_pin_mux(void);
  58. void enable_uart3_pin_mux(void);
  59. void enable_uart4_pin_mux(void);
  60. void enable_uart5_pin_mux(void);
  61. void enable_i2c0_pin_mux(void);
  62. void enable_board_pin_mux(void);
  63. #endif