stm32-fmc-sdram.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2020 Teslabs Engineering S.L.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_MEMORY_CONTROLLER_STM32_FMC_SDRAM_H_
  7. #define ZEPHYR_INCLUDE_DT_BINDINGS_MEMORY_CONTROLLER_STM32_FMC_SDRAM_H_
  8. /* Number of column address bits */
  9. #define STM32_FMC_SDRAM_NC_8 0x00000000UL
  10. #define STM32_FMC_SDRAM_NC_9 0x00000001UL
  11. #define STM32_FMC_SDRAM_NC_10 0x00000002UL
  12. #define STM32_FMC_SDRAM_NC_11 0x00000003UL
  13. /* Number of row address bits */
  14. #define STM32_FMC_SDRAM_NR_11 0x00000000UL
  15. #define STM32_FMC_SDRAM_NR_12 0x00000004UL
  16. #define STM32_FMC_SDRAM_NR_13 0x00000008UL
  17. /* Memory data bus width. */
  18. #define STM32_FMC_SDRAM_MWID_8 0x00000000UL
  19. #define STM32_FMC_SDRAM_MWID_16 0x00000010UL
  20. #define STM32_FMC_SDRAM_MWID_32 0x00000020UL
  21. /* Number of internal banks */
  22. #define STM32_FMC_SDRAM_NB_2 0x00000000UL
  23. #define STM32_FMC_SDRAM_NB_4 0x00000040UL
  24. /* CAS Latency */
  25. #define STM32_FMC_SDRAM_CAS_1 0x00000080UL
  26. #define STM32_FMC_SDRAM_CAS_2 0x00000100UL
  27. #define STM32_FMC_SDRAM_CAS_3 0x00000180UL
  28. /* SDRAM clock configuration */
  29. #define STM32_FMC_SDRAM_SDCLK_DISABLE 0x00000000UL
  30. #define STM32_FMC_SDRAM_SDCLK_PERIOD_2 0x00000800UL
  31. #define STM32_FMC_SDRAM_SDCLK_PERIOD_3 0x00000C00UL
  32. /* Burst read */
  33. #define STM32_FMC_SDRAM_RBURST_DISABLE 0x00000000UL
  34. #define STM32_FMC_SDRAM_RBURST_ENABLE 0x00001000UL
  35. /* Read pipe */
  36. #define STM32_FMC_SDRAM_RPIPE_0 0x00000000UL
  37. #define STM32_FMC_SDRAM_RPIPE_1 0x00002000UL
  38. #define STM32_FMC_SDRAM_RPIPE_2 0x00004000UL
  39. #endif