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