blob: 9ea7e0e41dadc09c5c514e869e0ee76d1ff2f145 [file] [log] [blame]
AKASHI Takahiro23b159e2023-11-14 11:14:27 +09001.. SPDX-License-Identifier: GPL-2.0+:
2
3scmi command
4============
5
6Synopsis
7--------
8
9::
10
11 scmi info
12 scmi perm_dev <agent id> <device id> <flags>
13 scmi perm_proto <agent id> <device id> <protocol id> <flags>
14 scmi reset <agent id> <flags>
15
16Description
17-----------
18
19Arm System Control and Management Interface (SCMI hereafter) is a set of
20standardised interfaces to manage system resources, like clocks, power
21domains, pin controls, reset and so on, in a system-wide manner.
22
23An entity which provides those services is called a SCMI firmware (or
24SCMI server if you like) may be placed/implemented by EL3 software or
25by a dedicated system control processor (SCP) or else.
26
27A user of SCMI interfaces, including U-Boot, is called a SCMI agent and
28may issues commands, which are defined in each protocol for specific system
29resources, to SCMI server via a communication channel, called a transport.
30Those interfaces are independent from the server's implementation thanks to
31a transport layer.
32
33For more details, see the `SCMI specification`_.
34
35While most of system resources managed under SCMI protocols are implemented
36and handled as standard U-Boot devices, for example clk_scmi, scmi command
37provides additional management functionality against SCMI server.
38
39scmi info
40~~~~~~~~~
41 Show base information about SCMI server and supported protocols
42
43scmi perm_dev
44~~~~~~~~~~~~~
45 Allow or deny access permission to the device
46
47scmi perm_proto
48~~~~~~~~~~~~~~~
49 Allow or deny access to the protocol on the device
50
51scmi reset
52~~~~~~~~~~
53 Reset the already-configured permissions against the device
54
55Parameters are used as follows:
56
57<agent id>
58 SCMI Agent ID, hex value
59
60<device id>
61 SCMI Device ID, hex value
62
63 Please note that what a device means is not defined
64 in the specification.
65
66<protocol id>
67 SCMI Protocol ID, hex value
68
69 It must not be 0x10 (base protocol)
70
71<flags>
72 Flags to control the action, hex value
73
74 0 to deny, 1 to allow. The other values are reserved and allowed
75 values may depend on the implemented version of SCMI server in
76 the future. See SCMI specification for more details.
77
78Example
79-------
80
81Obtain basic information about SCMI server:
82
83::
84
85 => scmi info
86 SCMI device: scmi
87 protocol version: 0x20000
88 # of agents: 3
89 0: platform
90 > 1: OSPM
91 2: PSCI
92 # of protocols: 4
93 Power domain management
94 Performance domain management
95 Clock management
96 Sensor management
97 vendor: Linaro
98 sub vendor: PMWG
99 impl version: 0x20b0000
100
101Ask for access permission to device#0:
102
103::
104
105 => scmi perm_dev 1 0 1
106
107Reset configurations with all access permission settings retained:
108
109::
110
111 => scmi reset 1 0
112
113Configuration
114-------------
115
116The scmi command is only available if CONFIG_CMD_SCMI=y.
117Default n because this command is mainly for debug purpose.
118
119Return value
120------------
121
122The return value ($?) is set to 0 if the operation succeeded,
1231 if the operation failed or -1 if the operation failed due to
124a syntax error.
125
126.. _`SCMI specification`: https://developer.arm.com/documentation/den0056/e/?lang=en