syscfg.h 741 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * (C) Copyright 2016
  3. * Michael Kurz, michi.kurz@gmail.com.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _STM32_SYSCFG_H
  8. #define _STM32_SYSCFG_H
  9. struct stm32_syscfg_regs {
  10. u32 memrmp;
  11. u32 pmc;
  12. u32 exticr1;
  13. u32 exticr2;
  14. u32 exticr3;
  15. u32 exticr4;
  16. u32 cmpcr;
  17. };
  18. /*
  19. * SYSCFG registers base
  20. */
  21. #define STM32_SYSCFG ((struct stm32_syscfg_regs *)STM32_SYSCFG_BASE)
  22. /* SYSCFG memory remap register */
  23. #define SYSCFG_MEMRMP_MEM_BOOT BIT(0)
  24. #define SYSCFG_MEMRMP_SWP_FMC BIT(10)
  25. /* SYSCFG peripheral mode configuration register */
  26. #define SYSCFG_PMC_ADCXDC2 BIT(16)
  27. #define SYSCFG_PMC_MII_RMII_SEL BIT(23)
  28. /* Compensation cell control register */
  29. #define SYSCFG_CMPCR_CMP_PD BIT(0)
  30. #define SYSCFG_CMPCR_READY BIT(8)
  31. #endif