mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
reset: add reset controller driver for SCMI agents
This change introduces a reset controller driver for SCMI agent devices. When SCMI agent and SCMI reset domain drivers are enabled, SCMI agent binds a reset controller device for each SCMI reset domain protocol devices enabled in the FDT. SCMI reset driver is embedded upon CONFIG_RESET_SCMI=y. If enabled, CONFIG_SCMI_AGENT is also enabled. SCMI Reset Domain protocol is defined in the SCMI specification [1]. Links: [1] https://developer.arm.com/architectures/system-architectures/software-standards/scmi Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Cc: Simon Glass <sjg@chromium.org> Cc: Peng Fan <peng.fan@nxp.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
87d4f277d4
commit
34d76fefb2
5 changed files with 154 additions and 0 deletions
|
@ -116,4 +116,64 @@ struct scmi_clk_rate_set_out {
|
|||
s32 status;
|
||||
};
|
||||
|
||||
/*
|
||||
* SCMI Reset Domain Protocol
|
||||
*/
|
||||
|
||||
enum scmi_reset_domain_message_id {
|
||||
SCMI_RESET_DOMAIN_ATTRIBUTES = 0x3,
|
||||
SCMI_RESET_DOMAIN_RESET = 0x4,
|
||||
};
|
||||
|
||||
#define SCMI_RD_NAME_LEN 16
|
||||
|
||||
#define SCMI_RD_ATTRIBUTES_FLAG_ASYNC BIT(31)
|
||||
#define SCMI_RD_ATTRIBUTES_FLAG_NOTIF BIT(30)
|
||||
|
||||
#define SCMI_RD_RESET_FLAG_ASYNC BIT(2)
|
||||
#define SCMI_RD_RESET_FLAG_ASSERT BIT(1)
|
||||
#define SCMI_RD_RESET_FLAG_CYCLE BIT(0)
|
||||
|
||||
/**
|
||||
* struct scmi_rd_attr_in - Payload for RESET_DOMAIN_ATTRIBUTES message
|
||||
* @domain_id: SCMI reset domain ID
|
||||
*/
|
||||
struct scmi_rd_attr_in {
|
||||
u32 domain_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scmi_rd_attr_out - Payload for RESET_DOMAIN_ATTRIBUTES response
|
||||
* @status: SCMI command status
|
||||
* @attributes: Retrieved attributes of the reset domain
|
||||
* @latency: Reset cycle max lantency
|
||||
* @name: Reset domain name
|
||||
*/
|
||||
struct scmi_rd_attr_out {
|
||||
s32 status;
|
||||
u32 attributes;
|
||||
u32 latency;
|
||||
char name[SCMI_RD_NAME_LEN];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scmi_rd_reset_in - Message payload for RESET command
|
||||
* @domain_id: SCMI reset domain ID
|
||||
* @flags: Flags for the reset request
|
||||
* @reset_state: Reset target state
|
||||
*/
|
||||
struct scmi_rd_reset_in {
|
||||
u32 domain_id;
|
||||
u32 flags;
|
||||
u32 reset_state;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scmi_rd_reset_out - Response payload for RESET command
|
||||
* @status: SCMI command status
|
||||
*/
|
||||
struct scmi_rd_reset_out {
|
||||
s32 status;
|
||||
};
|
||||
|
||||
#endif /* _SCMI_PROTOCOLS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue