stm32mp1_smc.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2016-2024, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP1_SMC_H
  7. #define STM32MP1_SMC_H
  8. /*
  9. * SMC function IDs for STM32 Service queries
  10. * STM32 SMC services use the space between 0x82000000 and 0x8200FFFF
  11. * like this is defined in SMC calling Convention by ARM
  12. * for SiP (silicon Partner)
  13. * https://developer.arm.com/docs/den0028/latest
  14. */
  15. /* Secure Service access from Non-secure */
  16. /*
  17. * STM32_SMC_BSEC call API
  18. *
  19. * Argument a0: (input) SMCC ID
  20. * (output) status return code
  21. * Argument a1: (input) Service ID (STM32_SMC_BSEC_xxx)
  22. * Argument a2: (input) OTP index
  23. * (output) OTP read value, if applicable
  24. * Argument a3: (input) OTP value if applicable
  25. */
  26. #define STM32_SMC_BSEC 0x82001003
  27. /*
  28. * STM32_SIP_SMC_SCMI_AGENT0
  29. * STM32_SIP_SMC_SCMI_AGENT1
  30. * Process SCMI message pending in SCMI shared memory buffer.
  31. *
  32. * Argument a0: (input) SMCC ID
  33. */
  34. #define STM32_SIP_SMC_SCMI_AGENT0 0x82002000
  35. #define STM32_SIP_SMC_SCMI_AGENT1 0x82002001
  36. /* Number of STM32 SiP Calls implemented */
  37. #define STM32_COMMON_SIP_NUM_CALLS 3
  38. /* Service for BSEC */
  39. #define STM32_SMC_READ_SHADOW 0x01
  40. #define STM32_SMC_PROG_OTP 0x02
  41. #define STM32_SMC_WRITE_SHADOW 0x03
  42. #define STM32_SMC_READ_OTP 0x04
  43. #endif /* STM32MP1_SMC_H */