board.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * board.h
  4. *
  5. * (C) Copyright 2013 Siemens Schweiz AG
  6. * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
  7. *
  8. * Based on:
  9. * TI AM335x boards information header
  10. * u-boot:/board/ti/am335x/board.h
  11. *
  12. * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
  13. */
  14. #ifndef _BOARD_H_
  15. #define _BOARD_H_
  16. #define PARGS(x) #x , /* Parameter Name */ \
  17. settings.ddr3.x, /* EEPROM Value */ \
  18. ddr3_default.x, /* Default Value */ \
  19. settings.ddr3.x-ddr3_default.x /* Difference */
  20. #define PRINTARGS(y) printf("%-20s, %8x, %8x, %4d\n", PARGS(y))
  21. #define MAGIC_CHIP 0x50494843
  22. /* Automatic generated definition */
  23. /* Wed, 16 Apr 2014 16:50:41 +0200 */
  24. /* From file: draco/ddr3-data-universal-default@303MHz-i0-ES3.txt */
  25. struct ddr3_data {
  26. unsigned int magic; /* 0x33524444 */
  27. unsigned int version; /* 0x56312e35 */
  28. unsigned short int ddr3_sratio; /* 0x0080 */
  29. unsigned short int iclkout; /* 0x0000 */
  30. unsigned short int dt0rdsratio0; /* 0x003A */
  31. unsigned short int dt0wdsratio0; /* 0x003F */
  32. unsigned short int dt0fwsratio0; /* 0x009F */
  33. unsigned short int dt0wrsratio0; /* 0x0079 */
  34. unsigned int sdram_tim1; /* 0x0888A39B */
  35. unsigned int sdram_tim2; /* 0x26247FDA */
  36. unsigned int sdram_tim3; /* 0x501F821F */
  37. unsigned int emif_ddr_phy_ctlr_1; /* 0x00100206 */
  38. unsigned int sdram_config; /* 0x61A44A32 */
  39. unsigned int ref_ctrl; /* 0x0000093B */
  40. unsigned int ioctr_val; /* 0x0000014A */
  41. char manu_name[32]; /* "default@303MHz \0" */
  42. char manu_marking[32]; /* "default \0" */
  43. };
  44. struct chip_data {
  45. unsigned int magic;
  46. char sdevname[16];
  47. char shwver[7];
  48. };
  49. struct draco_baseboard_id {
  50. struct ddr3_data ddr3;
  51. struct chip_data chip;
  52. };
  53. /*
  54. * We have three pin mux functions that must exist. We must be able to enable
  55. * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
  56. * main pinmux function that can be overridden to enable all other pinmux that
  57. * is required on the board.
  58. */
  59. void enable_uart0_pin_mux(void);
  60. void enable_uart1_pin_mux(void);
  61. void enable_uart2_pin_mux(void);
  62. void enable_uart3_pin_mux(void);
  63. void enable_uart4_pin_mux(void);
  64. void enable_uart5_pin_mux(void);
  65. void enable_i2c0_pin_mux(void);
  66. void enable_board_pin_mux(void);
  67. /* Forwared declaration, defined in common board.c */
  68. void set_env_gpios(unsigned char state);
  69. #endif