AKASHI Takahiro | 83f23f2 | 2023-11-14 11:14:27 +0900 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
Heinrich Schuchardt | 1b0c316 | 2024-01-14 14:53:13 +0100 | [diff] [blame] | 3 | .. index:: |
| 4 | single: scmi (command) |
| 5 | |
AKASHI Takahiro | 83f23f2 | 2023-11-14 11:14:27 +0900 | [diff] [blame] | 6 | scmi command |
| 7 | ============ |
| 8 | |
| 9 | Synopsis |
| 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 | |
| 19 | Description |
| 20 | ----------- |
| 21 | |
| 22 | Arm System Control and Management Interface (SCMI hereafter) is a set of |
| 23 | standardised interfaces to manage system resources, like clocks, power |
| 24 | domains, pin controls, reset and so on, in a system-wide manner. |
| 25 | |
| 26 | An entity which provides those services is called a SCMI firmware (or |
| 27 | SCMI server if you like) may be placed/implemented by EL3 software or |
| 28 | by a dedicated system control processor (SCP) or else. |
| 29 | |
| 30 | A user of SCMI interfaces, including U-Boot, is called a SCMI agent and |
| 31 | may issues commands, which are defined in each protocol for specific system |
| 32 | resources, to SCMI server via a communication channel, called a transport. |
| 33 | Those interfaces are independent from the server's implementation thanks to |
| 34 | a transport layer. |
| 35 | |
| 36 | For more details, see the `SCMI specification`_. |
| 37 | |
| 38 | While most of system resources managed under SCMI protocols are implemented |
| 39 | and handled as standard U-Boot devices, for example clk_scmi, scmi command |
| 40 | provides additional management functionality against SCMI server. |
| 41 | |
| 42 | scmi info |
| 43 | ~~~~~~~~~ |
| 44 | Show base information about SCMI server and supported protocols |
| 45 | |
| 46 | scmi perm_dev |
| 47 | ~~~~~~~~~~~~~ |
| 48 | Allow or deny access permission to the device |
| 49 | |
| 50 | scmi perm_proto |
| 51 | ~~~~~~~~~~~~~~~ |
| 52 | Allow or deny access to the protocol on the device |
| 53 | |
| 54 | scmi reset |
| 55 | ~~~~~~~~~~ |
| 56 | Reset the already-configured permissions against the device |
| 57 | |
| 58 | Parameters 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 | |
| 81 | Example |
| 82 | ------- |
| 83 | |
| 84 | Obtain 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 | |
| 104 | Ask for access permission to device#0: |
| 105 | |
| 106 | :: |
| 107 | |
| 108 | => scmi perm_dev 1 0 1 |
| 109 | |
| 110 | Reset configurations with all access permission settings retained: |
| 111 | |
| 112 | :: |
| 113 | |
| 114 | => scmi reset 1 0 |
| 115 | |
| 116 | Configuration |
| 117 | ------------- |
| 118 | |
| 119 | The scmi command is only available if CONFIG_CMD_SCMI=y. |
| 120 | Default n because this command is mainly for debug purpose. |
| 121 | |
| 122 | Return value |
| 123 | ------------ |
| 124 | |
| 125 | The return value ($?) is set to 0 if the operation succeeded, |
| 126 | 1 if the operation failed or -1 if the operation failed due to |
| 127 | a syntax error. |
| 128 | |
| 129 | .. _`SCMI specification`: https://developer.arm.com/documentation/den0056/e/?lang=en |