161b8ac9bSSudeep Holla# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 261b8ac9bSSudeep Holla# Copyright 2021 ARM Ltd. 361b8ac9bSSudeep Holla%YAML 1.2 461b8ac9bSSudeep Holla--- 561b8ac9bSSudeep Holla$id: http://devicetree.org/schemas/firmware/arm,scmi.yaml# 661b8ac9bSSudeep Holla$schema: http://devicetree.org/meta-schemas/core.yaml# 761b8ac9bSSudeep Holla 861b8ac9bSSudeep Hollatitle: System Control and Management Interface (SCMI) Message Protocol bindings 961b8ac9bSSudeep Holla 1061b8ac9bSSudeep Hollamaintainers: 1161b8ac9bSSudeep Holla - Sudeep Holla <sudeep.holla@arm.com> 1261b8ac9bSSudeep Holla 1361b8ac9bSSudeep Holladescription: | 1461b8ac9bSSudeep Holla The SCMI is intended to allow agents such as OSPM to manage various functions 1561b8ac9bSSudeep Holla that are provided by the hardware platform it is running on, including power 1661b8ac9bSSudeep Holla and performance functions. 1761b8ac9bSSudeep Holla 1861b8ac9bSSudeep Holla This binding is intended to define the interface the firmware implementing 1961b8ac9bSSudeep Holla the SCMI as described in ARM document number ARM DEN 0056 ("ARM System Control 2061b8ac9bSSudeep Holla and Management Interface Platform Design Document")[0] provide for OSPM in 2161b8ac9bSSudeep Holla the device tree. 2261b8ac9bSSudeep Holla 2361b8ac9bSSudeep Holla [0] https://developer.arm.com/documentation/den0056/latest 2461b8ac9bSSudeep Holla 2561b8ac9bSSudeep Hollaproperties: 2661b8ac9bSSudeep Holla $nodename: 2761b8ac9bSSudeep Holla const: scmi 2861b8ac9bSSudeep Holla 2961b8ac9bSSudeep Holla compatible: 3061b8ac9bSSudeep Holla oneOf: 3161b8ac9bSSudeep Holla - description: SCMI compliant firmware with mailbox transport 3261b8ac9bSSudeep Holla items: 3361b8ac9bSSudeep Holla - const: arm,scmi 3461b8ac9bSSudeep Holla - description: SCMI compliant firmware with ARM SMC/HVC transport 3561b8ac9bSSudeep Holla items: 3661b8ac9bSSudeep Holla - const: arm,scmi-smc 37*60625667SIgor Skalkin - description: SCMI compliant firmware with SCMI Virtio transport. 38*60625667SIgor Skalkin The virtio transport only supports a single device. 39*60625667SIgor Skalkin items: 40*60625667SIgor Skalkin - const: arm,scmi-virtio 4161b8ac9bSSudeep Holla 4261b8ac9bSSudeep Holla interrupts: 4361b8ac9bSSudeep Holla description: 4461b8ac9bSSudeep Holla The interrupt that indicates message completion by the platform 4561b8ac9bSSudeep Holla rather than by the return of the smc call. This should not be used 4661b8ac9bSSudeep Holla except when the platform requires such behavior. 4761b8ac9bSSudeep Holla maxItems: 1 4861b8ac9bSSudeep Holla 4961b8ac9bSSudeep Holla interrupt-names: 5061b8ac9bSSudeep Holla const: a2p 5161b8ac9bSSudeep Holla 5261b8ac9bSSudeep Holla mbox-names: 5361b8ac9bSSudeep Holla description: 5461b8ac9bSSudeep Holla Specifies the mailboxes used to communicate with SCMI compliant 5561b8ac9bSSudeep Holla firmware. 5661b8ac9bSSudeep Holla items: 5761b8ac9bSSudeep Holla - const: tx 5861b8ac9bSSudeep Holla - const: rx 5961b8ac9bSSudeep Holla 6061b8ac9bSSudeep Holla mboxes: 6161b8ac9bSSudeep Holla description: 6261b8ac9bSSudeep Holla List of phandle and mailbox channel specifiers. It should contain 6361b8ac9bSSudeep Holla exactly one or two mailboxes, one for transmitting messages("tx") 6461b8ac9bSSudeep Holla and another optional for receiving the notifications("rx") if supported. 6561b8ac9bSSudeep Holla minItems: 1 6661b8ac9bSSudeep Holla maxItems: 2 6761b8ac9bSSudeep Holla 6861b8ac9bSSudeep Holla shmem: 6961b8ac9bSSudeep Holla description: 7061b8ac9bSSudeep Holla List of phandle pointing to the shared memory(SHM) area, for each 7161b8ac9bSSudeep Holla transport channel specified. 7261b8ac9bSSudeep Holla minItems: 1 7361b8ac9bSSudeep Holla maxItems: 2 7461b8ac9bSSudeep Holla 7561b8ac9bSSudeep Holla '#address-cells': 7661b8ac9bSSudeep Holla const: 1 7761b8ac9bSSudeep Holla 7861b8ac9bSSudeep Holla '#size-cells': 7961b8ac9bSSudeep Holla const: 0 8061b8ac9bSSudeep Holla 8161b8ac9bSSudeep Holla arm,smc-id: 8261b8ac9bSSudeep Holla $ref: /schemas/types.yaml#/definitions/uint32 8361b8ac9bSSudeep Holla description: 8461b8ac9bSSudeep Holla SMC id required when using smc or hvc transports 8561b8ac9bSSudeep Holla 8661b8ac9bSSudeep Holla protocol@11: 8761b8ac9bSSudeep Holla type: object 8861b8ac9bSSudeep Holla properties: 8961b8ac9bSSudeep Holla reg: 9061b8ac9bSSudeep Holla const: 0x11 9161b8ac9bSSudeep Holla 9261b8ac9bSSudeep Holla '#power-domain-cells': 9361b8ac9bSSudeep Holla const: 1 9461b8ac9bSSudeep Holla 9561b8ac9bSSudeep Holla required: 9661b8ac9bSSudeep Holla - '#power-domain-cells' 9761b8ac9bSSudeep Holla 9861b8ac9bSSudeep Holla protocol@13: 9961b8ac9bSSudeep Holla type: object 10061b8ac9bSSudeep Holla properties: 10161b8ac9bSSudeep Holla reg: 10261b8ac9bSSudeep Holla const: 0x13 10361b8ac9bSSudeep Holla 10461b8ac9bSSudeep Holla '#clock-cells': 10561b8ac9bSSudeep Holla const: 1 10661b8ac9bSSudeep Holla 10761b8ac9bSSudeep Holla required: 10861b8ac9bSSudeep Holla - '#clock-cells' 10961b8ac9bSSudeep Holla 11061b8ac9bSSudeep Holla protocol@14: 11161b8ac9bSSudeep Holla type: object 11261b8ac9bSSudeep Holla properties: 11361b8ac9bSSudeep Holla reg: 11461b8ac9bSSudeep Holla const: 0x14 11561b8ac9bSSudeep Holla 11661b8ac9bSSudeep Holla '#clock-cells': 11761b8ac9bSSudeep Holla const: 1 11861b8ac9bSSudeep Holla 11961b8ac9bSSudeep Holla required: 12061b8ac9bSSudeep Holla - '#clock-cells' 12161b8ac9bSSudeep Holla 12261b8ac9bSSudeep Holla protocol@15: 12361b8ac9bSSudeep Holla type: object 12461b8ac9bSSudeep Holla properties: 12561b8ac9bSSudeep Holla reg: 12661b8ac9bSSudeep Holla const: 0x15 12761b8ac9bSSudeep Holla 12861b8ac9bSSudeep Holla '#thermal-sensor-cells': 12961b8ac9bSSudeep Holla const: 1 13061b8ac9bSSudeep Holla 13161b8ac9bSSudeep Holla required: 13261b8ac9bSSudeep Holla - '#thermal-sensor-cells' 13361b8ac9bSSudeep Holla 13461b8ac9bSSudeep Holla protocol@16: 13561b8ac9bSSudeep Holla type: object 13661b8ac9bSSudeep Holla properties: 13761b8ac9bSSudeep Holla reg: 13861b8ac9bSSudeep Holla const: 0x16 13961b8ac9bSSudeep Holla 14061b8ac9bSSudeep Holla '#reset-cells': 14161b8ac9bSSudeep Holla const: 1 14261b8ac9bSSudeep Holla 14361b8ac9bSSudeep Holla required: 14461b8ac9bSSudeep Holla - '#reset-cells' 14561b8ac9bSSudeep Holla 14661b8ac9bSSudeep Holla protocol@17: 14761b8ac9bSSudeep Holla type: object 14861b8ac9bSSudeep Holla properties: 14961b8ac9bSSudeep Holla reg: 15061b8ac9bSSudeep Holla const: 0x17 15161b8ac9bSSudeep Holla 15261b8ac9bSSudeep Holla regulators: 15361b8ac9bSSudeep Holla type: object 15461b8ac9bSSudeep Holla description: 15561b8ac9bSSudeep Holla The list of all regulators provided by this SCMI controller. 15661b8ac9bSSudeep Holla 15761b8ac9bSSudeep Holla patternProperties: 15861b8ac9bSSudeep Holla '^regulators@[0-9a-f]+$': 15961b8ac9bSSudeep Holla type: object 16061b8ac9bSSudeep Holla $ref: "../regulator/regulator.yaml#" 16161b8ac9bSSudeep Holla 16261b8ac9bSSudeep Holla properties: 16361b8ac9bSSudeep Holla reg: 16461b8ac9bSSudeep Holla maxItems: 1 16561b8ac9bSSudeep Holla description: Identifier for the voltage regulator. 16661b8ac9bSSudeep Holla 16761b8ac9bSSudeep Holla required: 16861b8ac9bSSudeep Holla - reg 16961b8ac9bSSudeep Holla 17061b8ac9bSSudeep HollaadditionalProperties: false 17161b8ac9bSSudeep Holla 17261b8ac9bSSudeep HollapatternProperties: 17361b8ac9bSSudeep Holla '^protocol@[0-9a-f]+$': 17461b8ac9bSSudeep Holla type: object 17561b8ac9bSSudeep Holla description: 17661b8ac9bSSudeep Holla Each sub-node represents a protocol supported. If the platform 17761b8ac9bSSudeep Holla supports a dedicated communication channel for a particular protocol, 17861b8ac9bSSudeep Holla then the corresponding transport properties must be present. 179*60625667SIgor Skalkin The virtio transport does not support a dedicated communication channel. 18061b8ac9bSSudeep Holla 18161b8ac9bSSudeep Holla properties: 18261b8ac9bSSudeep Holla reg: 18361b8ac9bSSudeep Holla maxItems: 1 18461b8ac9bSSudeep Holla 18561b8ac9bSSudeep Holla mbox-names: 18661b8ac9bSSudeep Holla items: 18761b8ac9bSSudeep Holla - const: tx 18861b8ac9bSSudeep Holla - const: rx 18961b8ac9bSSudeep Holla 19061b8ac9bSSudeep Holla mboxes: 19161b8ac9bSSudeep Holla minItems: 1 19261b8ac9bSSudeep Holla maxItems: 2 19361b8ac9bSSudeep Holla 19461b8ac9bSSudeep Holla shmem: 19561b8ac9bSSudeep Holla minItems: 1 19661b8ac9bSSudeep Holla maxItems: 2 19761b8ac9bSSudeep Holla 19861b8ac9bSSudeep Holla required: 19961b8ac9bSSudeep Holla - reg 20061b8ac9bSSudeep Holla 20161b8ac9bSSudeep Hollarequired: 20261b8ac9bSSudeep Holla - compatible 20361b8ac9bSSudeep Holla 20461b8ac9bSSudeep Hollaif: 20561b8ac9bSSudeep Holla properties: 20661b8ac9bSSudeep Holla compatible: 20761b8ac9bSSudeep Holla contains: 20861b8ac9bSSudeep Holla const: arm,scmi 20961b8ac9bSSudeep Hollathen: 21061b8ac9bSSudeep Holla properties: 21161b8ac9bSSudeep Holla interrupts: false 21261b8ac9bSSudeep Holla interrupt-names: false 21361b8ac9bSSudeep Holla 21461b8ac9bSSudeep Holla required: 21561b8ac9bSSudeep Holla - mboxes 216*60625667SIgor Skalkin - shmem 21761b8ac9bSSudeep Holla 21861b8ac9bSSudeep Hollaelse: 21961b8ac9bSSudeep Holla if: 22061b8ac9bSSudeep Holla properties: 22161b8ac9bSSudeep Holla compatible: 22261b8ac9bSSudeep Holla contains: 22361b8ac9bSSudeep Holla const: arm,scmi-smc 22461b8ac9bSSudeep Holla then: 22561b8ac9bSSudeep Holla required: 22661b8ac9bSSudeep Holla - arm,smc-id 227*60625667SIgor Skalkin - shmem 22861b8ac9bSSudeep Holla 22961b8ac9bSSudeep Hollaexamples: 23061b8ac9bSSudeep Holla - | 23161b8ac9bSSudeep Holla firmware { 23261b8ac9bSSudeep Holla scmi { 23361b8ac9bSSudeep Holla compatible = "arm,scmi"; 23461b8ac9bSSudeep Holla mboxes = <&mhuB 0 0>, 23561b8ac9bSSudeep Holla <&mhuB 0 1>; 23661b8ac9bSSudeep Holla mbox-names = "tx", "rx"; 23761b8ac9bSSudeep Holla shmem = <&cpu_scp_lpri0>, 23861b8ac9bSSudeep Holla <&cpu_scp_lpri1>; 23961b8ac9bSSudeep Holla 24061b8ac9bSSudeep Holla #address-cells = <1>; 24161b8ac9bSSudeep Holla #size-cells = <0>; 24261b8ac9bSSudeep Holla 24361b8ac9bSSudeep Holla scmi_devpd: protocol@11 { 24461b8ac9bSSudeep Holla reg = <0x11>; 24561b8ac9bSSudeep Holla #power-domain-cells = <1>; 24661b8ac9bSSudeep Holla }; 24761b8ac9bSSudeep Holla 24861b8ac9bSSudeep Holla scmi_dvfs: protocol@13 { 24961b8ac9bSSudeep Holla reg = <0x13>; 25061b8ac9bSSudeep Holla #clock-cells = <1>; 25161b8ac9bSSudeep Holla 25261b8ac9bSSudeep Holla mboxes = <&mhuB 1 0>, 25361b8ac9bSSudeep Holla <&mhuB 1 1>; 25461b8ac9bSSudeep Holla mbox-names = "tx", "rx"; 25561b8ac9bSSudeep Holla shmem = <&cpu_scp_hpri0>, 25661b8ac9bSSudeep Holla <&cpu_scp_hpri1>; 25761b8ac9bSSudeep Holla }; 25861b8ac9bSSudeep Holla 25961b8ac9bSSudeep Holla scmi_clk: protocol@14 { 26061b8ac9bSSudeep Holla reg = <0x14>; 26161b8ac9bSSudeep Holla #clock-cells = <1>; 26261b8ac9bSSudeep Holla }; 26361b8ac9bSSudeep Holla 26461b8ac9bSSudeep Holla scmi_sensors: protocol@15 { 26561b8ac9bSSudeep Holla reg = <0x15>; 26661b8ac9bSSudeep Holla #thermal-sensor-cells = <1>; 26761b8ac9bSSudeep Holla }; 26861b8ac9bSSudeep Holla 26961b8ac9bSSudeep Holla scmi_reset: protocol@16 { 27061b8ac9bSSudeep Holla reg = <0x16>; 27161b8ac9bSSudeep Holla #reset-cells = <1>; 27261b8ac9bSSudeep Holla }; 27361b8ac9bSSudeep Holla 27461b8ac9bSSudeep Holla scmi_voltage: protocol@17 { 27561b8ac9bSSudeep Holla reg = <0x17>; 27661b8ac9bSSudeep Holla regulators { 27761b8ac9bSSudeep Holla #address-cells = <1>; 27861b8ac9bSSudeep Holla #size-cells = <0>; 27961b8ac9bSSudeep Holla 28061b8ac9bSSudeep Holla regulator_devX: regulator@0 { 28161b8ac9bSSudeep Holla reg = <0x0>; 28261b8ac9bSSudeep Holla regulator-max-microvolt = <3300000>; 28361b8ac9bSSudeep Holla }; 28461b8ac9bSSudeep Holla 28561b8ac9bSSudeep Holla regulator_devY: regulator@9 { 28661b8ac9bSSudeep Holla reg = <0x9>; 28761b8ac9bSSudeep Holla regulator-min-microvolt = <500000>; 28861b8ac9bSSudeep Holla regulator-max-microvolt = <4200000>; 28961b8ac9bSSudeep Holla }; 29061b8ac9bSSudeep Holla }; 29161b8ac9bSSudeep Holla }; 29261b8ac9bSSudeep Holla }; 29361b8ac9bSSudeep Holla }; 29461b8ac9bSSudeep Holla 29561b8ac9bSSudeep Holla soc { 29661b8ac9bSSudeep Holla #address-cells = <2>; 29761b8ac9bSSudeep Holla #size-cells = <2>; 29861b8ac9bSSudeep Holla 29961b8ac9bSSudeep Holla sram@50000000 { 30061b8ac9bSSudeep Holla compatible = "mmio-sram"; 30161b8ac9bSSudeep Holla reg = <0x0 0x50000000 0x0 0x10000>; 30261b8ac9bSSudeep Holla 30361b8ac9bSSudeep Holla #address-cells = <1>; 30461b8ac9bSSudeep Holla #size-cells = <1>; 30561b8ac9bSSudeep Holla ranges = <0 0x0 0x50000000 0x10000>; 30661b8ac9bSSudeep Holla 30761b8ac9bSSudeep Holla cpu_scp_lpri0: scp-sram-section@0 { 30861b8ac9bSSudeep Holla compatible = "arm,scmi-shmem"; 30961b8ac9bSSudeep Holla reg = <0x0 0x80>; 31061b8ac9bSSudeep Holla }; 31161b8ac9bSSudeep Holla 31261b8ac9bSSudeep Holla cpu_scp_lpri1: scp-sram-section@80 { 31361b8ac9bSSudeep Holla compatible = "arm,scmi-shmem"; 31461b8ac9bSSudeep Holla reg = <0x80 0x80>; 31561b8ac9bSSudeep Holla }; 31661b8ac9bSSudeep Holla 31761b8ac9bSSudeep Holla cpu_scp_hpri0: scp-sram-section@100 { 31861b8ac9bSSudeep Holla compatible = "arm,scmi-shmem"; 31961b8ac9bSSudeep Holla reg = <0x100 0x80>; 32061b8ac9bSSudeep Holla }; 32161b8ac9bSSudeep Holla 32261b8ac9bSSudeep Holla cpu_scp_hpri2: scp-sram-section@180 { 32361b8ac9bSSudeep Holla compatible = "arm,scmi-shmem"; 32461b8ac9bSSudeep Holla reg = <0x180 0x80>; 32561b8ac9bSSudeep Holla }; 32661b8ac9bSSudeep Holla }; 32761b8ac9bSSudeep Holla }; 32861b8ac9bSSudeep Holla 32961b8ac9bSSudeep Holla - | 33061b8ac9bSSudeep Holla firmware { 33161b8ac9bSSudeep Holla scmi { 33261b8ac9bSSudeep Holla compatible = "arm,scmi-smc"; 33361b8ac9bSSudeep Holla shmem = <&cpu_scp_lpri0 &cpu_scp_lpri1>; 33461b8ac9bSSudeep Holla arm,smc-id = <0xc3000001>; 33561b8ac9bSSudeep Holla 33661b8ac9bSSudeep Holla #address-cells = <1>; 33761b8ac9bSSudeep Holla #size-cells = <0>; 33861b8ac9bSSudeep Holla 33961b8ac9bSSudeep Holla scmi_devpd1: protocol@11 { 34061b8ac9bSSudeep Holla reg = <0x11>; 34161b8ac9bSSudeep Holla #power-domain-cells = <1>; 34261b8ac9bSSudeep Holla }; 34361b8ac9bSSudeep Holla 34461b8ac9bSSudeep Holla }; 34561b8ac9bSSudeep Holla }; 34661b8ac9bSSudeep Holla 34761b8ac9bSSudeep Holla... 348