iomap.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2013 Google Inc.
  4. * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com>
  5. *
  6. * Modified from coreboot src/soc/intel/baytrail/include/soc/iomap.h
  7. */
  8. #ifndef _BAYTRAIL_IOMAP_H_
  9. #define _BAYTRAIL_IOMAP_H_
  10. /* Memory Mapped IO bases */
  11. /* PCI Configuration Space */
  12. #define MCFG_BASE_ADDRESS CONFIG_PCIE_ECAM_BASE
  13. #define MCFG_BASE_SIZE 0x10000000
  14. /* Temporary Base Address */
  15. #define TEMP_BASE_ADDRESS 0xfd000000
  16. /* Transactions in this range will abort */
  17. #define ABORT_BASE_ADDRESS 0xfeb00000
  18. #define ABORT_BASE_SIZE 0x00100000
  19. /* High Performance Event Timer */
  20. #define HPET_BASE_ADDRESS 0xfed00000
  21. #define HPET_BASE_SIZE 0x400
  22. /* SPI Bus */
  23. #define SPI_BASE_ADDRESS 0xfed01000
  24. #define SPI_BASE_SIZE 0x400
  25. /* Power Management Controller */
  26. #define PMC_BASE_ADDRESS 0xfed03000
  27. #define PMC_BASE_SIZE 0x400
  28. #define GEN_PMCON1 0x20
  29. #define UART_EN (1 << 24)
  30. #define DISB (1 << 23)
  31. #define MEM_SR (1 << 21)
  32. #define SRS (1 << 20)
  33. #define CTS (1 << 19)
  34. #define MS4V (1 << 18)
  35. #define PWR_FLR (1 << 16)
  36. #define PME_B0_S5_DIS (1 << 15)
  37. #define SUS_PWR_FLR (1 << 14)
  38. #define WOL_EN_OVRD (1 << 13)
  39. #define DIS_SLP_X_STRCH_SUS_UP (1 << 12)
  40. #define GEN_RST_STS (1 << 9)
  41. #define RPS (1 << 2)
  42. #define AFTERG3_EN (1 << 0)
  43. #define GEN_PMCON2 0x24
  44. #define SLPSX_STR_POL_LOCK (1 << 18)
  45. #define BIOS_PCI_EXP_EN (1 << 10)
  46. #define PWRBTN_LVL (1 << 9)
  47. #define SMI_LOCK (1 << 4)
  48. /* Power Management Unit */
  49. #define PUNIT_BASE_ADDRESS 0xfed05000
  50. #define PUNIT_BASE_SIZE 0x800
  51. /* Intel Legacy Block */
  52. #define ILB_BASE_ADDRESS 0xfed08000
  53. #define ILB_BASE_SIZE 0x400
  54. /* IO Memory */
  55. #define IO_BASE_ADDRESS 0xfed0c000
  56. #define IO_BASE_OFFSET_GPSCORE 0x0000
  57. #define IO_BASE_OFFSET_GPNCORE 0x1000
  58. #define IO_BASE_OFFSET_GPSSUS 0x2000
  59. #define IO_BASE_SIZE 0x4000
  60. /* Root Complex Base Address */
  61. #define RCBA_BASE_ADDRESS 0xfed1c000
  62. #define RCBA_BASE_SIZE 0x400
  63. /* MODPHY */
  64. #define MPHY_BASE_ADDRESS 0xfef00000
  65. #define MPHY_BASE_SIZE 0x100000
  66. /* IO Port bases */
  67. #define ACPI_BASE_ADDRESS 0x0400
  68. #define ACPI_BASE_SIZE 0x80
  69. #define PM1_STS 0x00
  70. #define PM1_CNT 0x04
  71. #define GPIO_BASE_ADDRESS 0x0500
  72. #define GPIO_BASE_SIZE 0x100
  73. #define SMBUS_BASE_ADDRESS 0xefa0
  74. #endif /* _BAYTRAIL_IOMAP_H_ */