1c66ec88fSEmmanuel VadotSystem Control and Management Interface (SCMI) Message Protocol 2c66ec88fSEmmanuel Vadot---------------------------------------------------------- 3c66ec88fSEmmanuel Vadot 4c66ec88fSEmmanuel VadotThe SCMI is intended to allow agents such as OSPM to manage various functions 5c66ec88fSEmmanuel Vadotthat are provided by the hardware platform it is running on, including power 6c66ec88fSEmmanuel Vadotand performance functions. 7c66ec88fSEmmanuel Vadot 8c66ec88fSEmmanuel VadotThis binding is intended to define the interface the firmware implementing 9c66ec88fSEmmanuel Vadotthe SCMI as described in ARM document number ARM DEN 0056A ("ARM System Control 10c66ec88fSEmmanuel Vadotand Management Interface Platform Design Document")[0] provide for OSPM in 11c66ec88fSEmmanuel Vadotthe device tree. 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel VadotRequired properties: 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel VadotThe scmi node with the following properties shall be under the /firmware/ node. 16c66ec88fSEmmanuel Vadot 17c66ec88fSEmmanuel Vadot- compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports 18c66ec88fSEmmanuel Vadot- mboxes: List of phandle and mailbox channel specifiers. It should contain 19c66ec88fSEmmanuel Vadot exactly one or two mailboxes, one for transmitting messages("tx") 20c66ec88fSEmmanuel Vadot and another optional for receiving the notifications("rx") if 21c66ec88fSEmmanuel Vadot supported. 22c66ec88fSEmmanuel Vadot- shmem : List of phandle pointing to the shared memory(SHM) area as per 23c66ec88fSEmmanuel Vadot generic mailbox client binding. 24c66ec88fSEmmanuel Vadot- #address-cells : should be '1' if the device has sub-nodes, maps to 25c66ec88fSEmmanuel Vadot protocol identifier for a given sub-node. 26c66ec88fSEmmanuel Vadot- #size-cells : should be '0' as 'reg' property doesn't have any size 27c66ec88fSEmmanuel Vadot associated with it. 28c66ec88fSEmmanuel Vadot- arm,smc-id : SMC id required when using smc or hvc transports 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel VadotOptional properties: 31c66ec88fSEmmanuel Vadot 32c66ec88fSEmmanuel Vadot- mbox-names: shall be "tx" or "rx" depending on mboxes entries. 33c66ec88fSEmmanuel Vadot 34*5def4c47SEmmanuel Vadot- interrupts : when using smc or hvc transports, this optional 35*5def4c47SEmmanuel Vadot property indicates that msg completion by the platform is indicated 36*5def4c47SEmmanuel Vadot by an interrupt rather than by the return of the smc call. This 37*5def4c47SEmmanuel Vadot should not be used except when the platform requires such behavior. 38*5def4c47SEmmanuel Vadot 39*5def4c47SEmmanuel Vadot- interrupt-names : if "interrupts" is present, interrupt-names must also 40*5def4c47SEmmanuel Vadot be present and have the value "a2p". 41*5def4c47SEmmanuel Vadot 42c66ec88fSEmmanuel VadotSee Documentation/devicetree/bindings/mailbox/mailbox.txt for more details 43c66ec88fSEmmanuel Vadotabout the generic mailbox controller and client driver bindings. 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel VadotThe mailbox is the only permitted method of calling the SCMI firmware. 46c66ec88fSEmmanuel VadotMailbox doorbell is used as a mechanism to alert the presence of a 47c66ec88fSEmmanuel Vadotmessages and/or notification. 48c66ec88fSEmmanuel Vadot 49c66ec88fSEmmanuel VadotEach protocol supported shall have a sub-node with corresponding compatible 50c66ec88fSEmmanuel Vadotas described in the following sections. If the platform supports dedicated 51c66ec88fSEmmanuel Vadotcommunication channel for a particular protocol, the 3 properties namely: 52c66ec88fSEmmanuel Vadotmboxes, mbox-names and shmem shall be present in the sub-node corresponding 53c66ec88fSEmmanuel Vadotto that protocol. 54c66ec88fSEmmanuel Vadot 55c66ec88fSEmmanuel VadotClock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol 56c66ec88fSEmmanuel Vadot------------------------------------------------------------ 57c66ec88fSEmmanuel Vadot 58c66ec88fSEmmanuel VadotThis binding uses the common clock binding[1]. 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel VadotRequired properties: 61c66ec88fSEmmanuel Vadot- #clock-cells : Should be 1. Contains the Clock ID value used by SCMI commands. 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel VadotPower domain bindings for the power domains based on SCMI Message Protocol 64c66ec88fSEmmanuel Vadot------------------------------------------------------------ 65c66ec88fSEmmanuel Vadot 66c66ec88fSEmmanuel VadotThis binding for the SCMI power domain providers uses the generic power 67c66ec88fSEmmanuel Vadotdomain binding[2]. 68c66ec88fSEmmanuel Vadot 69c66ec88fSEmmanuel VadotRequired properties: 70c66ec88fSEmmanuel Vadot - #power-domain-cells : Should be 1. Contains the device or the power 71c66ec88fSEmmanuel Vadot domain ID value used by SCMI commands. 72c66ec88fSEmmanuel Vadot 73*5def4c47SEmmanuel VadotRegulator bindings for the SCMI Regulator based on SCMI Message Protocol 74*5def4c47SEmmanuel Vadot------------------------------------------------------------ 75*5def4c47SEmmanuel VadotAn SCMI Regulator is permanently bound to a well defined SCMI Voltage Domain, 76*5def4c47SEmmanuel Vadotand should be always positioned as a root regulator. 77*5def4c47SEmmanuel VadotIt does not support any current operation. 78*5def4c47SEmmanuel Vadot 79*5def4c47SEmmanuel VadotSCMI Regulators are grouped under a 'regulators' node which in turn is a child 80*5def4c47SEmmanuel Vadotof the SCMI Voltage protocol node inside the desired SCMI instance node. 81*5def4c47SEmmanuel Vadot 82*5def4c47SEmmanuel VadotThis binding uses the common regulator binding[6]. 83*5def4c47SEmmanuel Vadot 84*5def4c47SEmmanuel VadotRequired properties: 85*5def4c47SEmmanuel Vadot - reg : shall identify an existent SCMI Voltage Domain. 86*5def4c47SEmmanuel Vadot 87c66ec88fSEmmanuel VadotSensor bindings for the sensors based on SCMI Message Protocol 88c66ec88fSEmmanuel Vadot-------------------------------------------------------------- 89c66ec88fSEmmanuel VadotSCMI provides an API to access the various sensors on the SoC. 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel VadotRequired properties: 92c66ec88fSEmmanuel Vadot- #thermal-sensor-cells: should be set to 1. This property follows the 93c66ec88fSEmmanuel Vadot thermal device tree bindings[3]. 94c66ec88fSEmmanuel Vadot 95c66ec88fSEmmanuel Vadot Valid cell values are raw identifiers (Sensor ID) 96c66ec88fSEmmanuel Vadot as used by the firmware. Refer to platform details 97c66ec88fSEmmanuel Vadot for your implementation for the IDs to use. 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel VadotReset signal bindings for the reset domains based on SCMI Message Protocol 100c66ec88fSEmmanuel Vadot------------------------------------------------------------ 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel VadotThis binding for the SCMI reset domain providers uses the generic reset 103c66ec88fSEmmanuel Vadotsignal binding[5]. 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel VadotRequired properties: 106c66ec88fSEmmanuel Vadot - #reset-cells : Should be 1. Contains the reset domain ID value used 107c66ec88fSEmmanuel Vadot by SCMI commands. 108c66ec88fSEmmanuel Vadot 109c66ec88fSEmmanuel VadotSRAM and Shared Memory for SCMI 110c66ec88fSEmmanuel Vadot------------------------------- 111c66ec88fSEmmanuel Vadot 112c66ec88fSEmmanuel VadotA small area of SRAM is reserved for SCMI communication between application 113c66ec88fSEmmanuel Vadotprocessors and SCP. 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel VadotThe properties should follow the generic mmio-sram description found in [4] 116c66ec88fSEmmanuel Vadot 117c66ec88fSEmmanuel VadotEach sub-node represents the reserved area for SCMI. 118c66ec88fSEmmanuel Vadot 119c66ec88fSEmmanuel VadotRequired sub-node properties: 120c66ec88fSEmmanuel Vadot- reg : The base offset and size of the reserved area with the SRAM 121c66ec88fSEmmanuel Vadot- compatible : should be "arm,scmi-shmem" for Non-secure SRAM based 122c66ec88fSEmmanuel Vadot shared memory 123c66ec88fSEmmanuel Vadot 124c66ec88fSEmmanuel Vadot[0] http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/index.html 125c66ec88fSEmmanuel Vadot[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 126c66ec88fSEmmanuel Vadot[2] Documentation/devicetree/bindings/power/power-domain.yaml 127c66ec88fSEmmanuel Vadot[3] Documentation/devicetree/bindings/thermal/thermal*.yaml 128c66ec88fSEmmanuel Vadot[4] Documentation/devicetree/bindings/sram/sram.yaml 129c66ec88fSEmmanuel Vadot[5] Documentation/devicetree/bindings/reset/reset.txt 130*5def4c47SEmmanuel Vadot[6] Documentation/devicetree/bindings/regulator/regulator.yaml 131c66ec88fSEmmanuel Vadot 132c66ec88fSEmmanuel VadotExample: 133c66ec88fSEmmanuel Vadot 134c66ec88fSEmmanuel Vadotsram@50000000 { 135c66ec88fSEmmanuel Vadot compatible = "mmio-sram"; 136c66ec88fSEmmanuel Vadot reg = <0x0 0x50000000 0x0 0x10000>; 137c66ec88fSEmmanuel Vadot 138c66ec88fSEmmanuel Vadot #address-cells = <1>; 139c66ec88fSEmmanuel Vadot #size-cells = <1>; 140c66ec88fSEmmanuel Vadot ranges = <0 0x0 0x50000000 0x10000>; 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot cpu_scp_lpri: scp-shmem@0 { 143c66ec88fSEmmanuel Vadot compatible = "arm,scmi-shmem"; 144c66ec88fSEmmanuel Vadot reg = <0x0 0x200>; 145c66ec88fSEmmanuel Vadot }; 146c66ec88fSEmmanuel Vadot 147c66ec88fSEmmanuel Vadot cpu_scp_hpri: scp-shmem@200 { 148c66ec88fSEmmanuel Vadot compatible = "arm,scmi-shmem"; 149c66ec88fSEmmanuel Vadot reg = <0x200 0x200>; 150c66ec88fSEmmanuel Vadot }; 151c66ec88fSEmmanuel Vadot}; 152c66ec88fSEmmanuel Vadot 153c66ec88fSEmmanuel Vadotmailbox@40000000 { 154c66ec88fSEmmanuel Vadot .... 155c66ec88fSEmmanuel Vadot #mbox-cells = <1>; 156c66ec88fSEmmanuel Vadot reg = <0x0 0x40000000 0x0 0x10000>; 157c66ec88fSEmmanuel Vadot}; 158c66ec88fSEmmanuel Vadot 159c66ec88fSEmmanuel Vadotfirmware { 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot ... 162c66ec88fSEmmanuel Vadot 163c66ec88fSEmmanuel Vadot scmi { 164c66ec88fSEmmanuel Vadot compatible = "arm,scmi"; 165c66ec88fSEmmanuel Vadot mboxes = <&mailbox 0 &mailbox 1>; 166c66ec88fSEmmanuel Vadot mbox-names = "tx", "rx"; 167c66ec88fSEmmanuel Vadot shmem = <&cpu_scp_lpri &cpu_scp_hpri>; 168c66ec88fSEmmanuel Vadot #address-cells = <1>; 169c66ec88fSEmmanuel Vadot #size-cells = <0>; 170c66ec88fSEmmanuel Vadot 171c66ec88fSEmmanuel Vadot scmi_devpd: protocol@11 { 172c66ec88fSEmmanuel Vadot reg = <0x11>; 173c66ec88fSEmmanuel Vadot #power-domain-cells = <1>; 174c66ec88fSEmmanuel Vadot }; 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel Vadot scmi_dvfs: protocol@13 { 177c66ec88fSEmmanuel Vadot reg = <0x13>; 178c66ec88fSEmmanuel Vadot #clock-cells = <1>; 179c66ec88fSEmmanuel Vadot }; 180c66ec88fSEmmanuel Vadot 181c66ec88fSEmmanuel Vadot scmi_clk: protocol@14 { 182c66ec88fSEmmanuel Vadot reg = <0x14>; 183c66ec88fSEmmanuel Vadot #clock-cells = <1>; 184c66ec88fSEmmanuel Vadot }; 185c66ec88fSEmmanuel Vadot 186c66ec88fSEmmanuel Vadot scmi_sensors0: protocol@15 { 187c66ec88fSEmmanuel Vadot reg = <0x15>; 188c66ec88fSEmmanuel Vadot #thermal-sensor-cells = <1>; 189c66ec88fSEmmanuel Vadot }; 190c66ec88fSEmmanuel Vadot 191c66ec88fSEmmanuel Vadot scmi_reset: protocol@16 { 192c66ec88fSEmmanuel Vadot reg = <0x16>; 193c66ec88fSEmmanuel Vadot #reset-cells = <1>; 194c66ec88fSEmmanuel Vadot }; 195*5def4c47SEmmanuel Vadot 196*5def4c47SEmmanuel Vadot scmi_voltage: protocol@17 { 197*5def4c47SEmmanuel Vadot reg = <0x17>; 198*5def4c47SEmmanuel Vadot 199*5def4c47SEmmanuel Vadot regulators { 200*5def4c47SEmmanuel Vadot regulator_devX: regulator@0 { 201*5def4c47SEmmanuel Vadot reg = <0x0>; 202*5def4c47SEmmanuel Vadot regulator-max-microvolt = <3300000>; 203*5def4c47SEmmanuel Vadot }; 204*5def4c47SEmmanuel Vadot 205*5def4c47SEmmanuel Vadot regulator_devY: regulator@9 { 206*5def4c47SEmmanuel Vadot reg = <0x9>; 207*5def4c47SEmmanuel Vadot regulator-min-microvolt = <500000>; 208*5def4c47SEmmanuel Vadot regulator-max-microvolt = <4200000>; 209*5def4c47SEmmanuel Vadot }; 210*5def4c47SEmmanuel Vadot 211*5def4c47SEmmanuel Vadot ... 212*5def4c47SEmmanuel Vadot }; 213*5def4c47SEmmanuel Vadot }; 214c66ec88fSEmmanuel Vadot }; 215c66ec88fSEmmanuel Vadot}; 216c66ec88fSEmmanuel Vadot 217c66ec88fSEmmanuel Vadotcpu@0 { 218c66ec88fSEmmanuel Vadot ... 219c66ec88fSEmmanuel Vadot reg = <0 0>; 220c66ec88fSEmmanuel Vadot clocks = <&scmi_dvfs 0>; 221c66ec88fSEmmanuel Vadot}; 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadothdlcd@7ff60000 { 224c66ec88fSEmmanuel Vadot ... 225c66ec88fSEmmanuel Vadot reg = <0 0x7ff60000 0 0x1000>; 226c66ec88fSEmmanuel Vadot clocks = <&scmi_clk 4>; 227c66ec88fSEmmanuel Vadot power-domains = <&scmi_devpd 1>; 228c66ec88fSEmmanuel Vadot resets = <&scmi_reset 10>; 229c66ec88fSEmmanuel Vadot}; 230c66ec88fSEmmanuel Vadot 231c66ec88fSEmmanuel Vadotthermal-zones { 232c66ec88fSEmmanuel Vadot soc_thermal { 233c66ec88fSEmmanuel Vadot polling-delay-passive = <100>; 234c66ec88fSEmmanuel Vadot polling-delay = <1000>; 235c66ec88fSEmmanuel Vadot /* sensor ID */ 236c66ec88fSEmmanuel Vadot thermal-sensors = <&scmi_sensors0 3>; 237c66ec88fSEmmanuel Vadot ... 238c66ec88fSEmmanuel Vadot }; 239c66ec88fSEmmanuel Vadot}; 240