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