power_domain.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* SPDX-License-Identifier: BSD-3-Clause */
  2. /*
  3. * Copyright 2021 NXP
  4. */
  5. #ifndef SCMI_MSG_PD_H
  6. #define SCMI_MSG_PD_H
  7. #include <stdint.h>
  8. #include <lib/utils_def.h>
  9. #define SCMI_PROTOCOL_VERSION_PD 0x21000U
  10. /*
  11. * Identifiers of the SCMI POWER DOMAIN Protocol commands
  12. */
  13. enum scmi_pd_command_id {
  14. SCMI_PD_ATTRIBUTES = 0x003,
  15. SCMI_PD_STATE_SET = 0x004,
  16. SCMI_PD_STATE_GET = 0x005,
  17. };
  18. /* Protocol attributes */
  19. struct scmi_pd_attributes_a2p {
  20. uint32_t pd_id;
  21. };
  22. struct scmi_protocol_attributes_p2a_pd {
  23. int32_t status;
  24. uint32_t attributes;
  25. uint32_t statistics_addr_low;
  26. uint32_t statistics_addr_high;
  27. uint32_t statistics_len;
  28. };
  29. #define SCMI_PD_NAME_LENGTH_MAX 16U
  30. struct scmi_pd_attributes_p2a {
  31. int32_t status;
  32. uint32_t attributes;
  33. char pd_name[SCMI_PD_NAME_LENGTH_MAX];
  34. };
  35. /*
  36. * Power Domain State Get
  37. */
  38. struct scmi_pd_state_get_a2p {
  39. uint32_t pd_id;
  40. };
  41. struct scmi_pd_state_get_p2a {
  42. int32_t status;
  43. uint32_t power_state;
  44. };
  45. /*
  46. * Power domain State Set
  47. */
  48. struct scmi_pd_state_set_a2p {
  49. uint32_t flags;
  50. uint32_t pd_id;
  51. uint32_t power_state;
  52. };
  53. struct scmi_pd_state_set_p2a {
  54. int32_t status;
  55. };
  56. #endif /* SCMI_MSG_PD_H */