aboutsummaryrefslogtreecommitdiff
path: root/drivers/scmi-msg/power_domain.h
blob: 48551fd8891c72ca3b5b17c2ab05c5ed33192114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* SPDX-License-Identifier: BSD-3-Clause */
/*
 * Copyright 2021 NXP
 */

#ifndef SCMI_MSG_PD_H
#define SCMI_MSG_PD_H

#include <stdint.h>

#include <lib/utils_def.h>

#define SCMI_PROTOCOL_VERSION_PD	0x21000U

/*
 * Identifiers of the SCMI POWER DOMAIN Protocol commands
 */
enum scmi_pd_command_id {
	SCMI_PD_ATTRIBUTES = 0x003,
	SCMI_PD_STATE_SET = 0x004,
	SCMI_PD_STATE_GET = 0x005,
};

/* Protocol attributes */
struct scmi_pd_attributes_a2p {
	uint32_t pd_id;
};

struct scmi_protocol_attributes_p2a_pd {
	int32_t status;
	uint32_t attributes;
	uint32_t statistics_addr_low;
	uint32_t statistics_addr_high;
	uint32_t statistics_len;
};

#define SCMI_PD_NAME_LENGTH_MAX	16U

struct scmi_pd_attributes_p2a {
	int32_t status;
	uint32_t attributes;
	char pd_name[SCMI_PD_NAME_LENGTH_MAX];
};

/*
 * Power Domain State Get
 */

struct scmi_pd_state_get_a2p {
	uint32_t pd_id;
};

struct scmi_pd_state_get_p2a {
	int32_t status;
	uint32_t power_state;
};

/*
 * Power domain State Set
 */

struct scmi_pd_state_set_a2p {
	uint32_t flags;
	uint32_t pd_id;
	uint32_t power_state;
};

struct scmi_pd_state_set_p2a {
	int32_t status;
};

#endif /* SCMI_MSG_PD_H */