15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 25956d97fSEmmanuel Vadot# Copyright 2021 ARM Ltd. 35956d97fSEmmanuel Vadot%YAML 1.2 45956d97fSEmmanuel Vadot--- 55956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/firmware/arm,scpi.yaml# 65956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 75956d97fSEmmanuel Vadot 8*8bab661aSEmmanuel Vadottitle: System Control and Power Interface (SCPI) Message Protocol 95956d97fSEmmanuel Vadot 105956d97fSEmmanuel Vadotmaintainers: 115956d97fSEmmanuel Vadot - Sudeep Holla <sudeep.holla@arm.com> 125956d97fSEmmanuel Vadot 135956d97fSEmmanuel Vadotdescription: | 145956d97fSEmmanuel Vadot Firmware implementing the SCPI described in ARM document number ARM DUI 155956d97fSEmmanuel Vadot 0922B ("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be 165956d97fSEmmanuel Vadot used by Linux to initiate various system control and power operations. 175956d97fSEmmanuel Vadot 185956d97fSEmmanuel Vadot This binding is intended to define the interface the firmware implementing 195956d97fSEmmanuel Vadot the SCPI provide for OSPM in the device tree. 205956d97fSEmmanuel Vadot 215956d97fSEmmanuel Vadot [0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html 225956d97fSEmmanuel Vadot 235956d97fSEmmanuel Vadotproperties: 245956d97fSEmmanuel Vadot $nodename: 255956d97fSEmmanuel Vadot const: scpi 265956d97fSEmmanuel Vadot 275956d97fSEmmanuel Vadot compatible: 285956d97fSEmmanuel Vadot description: 295956d97fSEmmanuel Vadot SCPI compliant firmware complying to SCPI v1.0 and above OR 305956d97fSEmmanuel Vadot SCPI compliant firmware complying to all unversioned releases 315956d97fSEmmanuel Vadot prior to SCPI v1.0 325956d97fSEmmanuel Vadot oneOf: 335956d97fSEmmanuel Vadot - const: arm,scpi # SCPI v1.0 and above 345956d97fSEmmanuel Vadot - const: arm,scpi-pre-1.0 # Unversioned SCPI before v1.0 355956d97fSEmmanuel Vadot - items: 365956d97fSEmmanuel Vadot - enum: 375956d97fSEmmanuel Vadot - amlogic,meson-gxbb-scpi 385956d97fSEmmanuel Vadot - const: arm,scpi-pre-1.0 395956d97fSEmmanuel Vadot 405956d97fSEmmanuel Vadot mboxes: 415956d97fSEmmanuel Vadot description: 425956d97fSEmmanuel Vadot List of phandle and mailbox channel specifiers. All the channels reserved 435956d97fSEmmanuel Vadot by remote SCP firmware for use by SCPI message protocol should be 445956d97fSEmmanuel Vadot specified in any order. 455956d97fSEmmanuel Vadot minItems: 1 46c9ccf3a3SEmmanuel Vadot maxItems: 4 475956d97fSEmmanuel Vadot 485956d97fSEmmanuel Vadot shmem: 495956d97fSEmmanuel Vadot description: 505956d97fSEmmanuel Vadot List of phandle pointing to the shared memory(SHM) area between the 515956d97fSEmmanuel Vadot processors using these mailboxes for IPC, one for each mailbox SHM can 525956d97fSEmmanuel Vadot be any memory reserved for the purpose of this communication between the 535956d97fSEmmanuel Vadot processors. 545956d97fSEmmanuel Vadot minItems: 1 55c9ccf3a3SEmmanuel Vadot maxItems: 4 565956d97fSEmmanuel Vadot 575956d97fSEmmanuel Vadot power-controller: 585956d97fSEmmanuel Vadot type: object 595956d97fSEmmanuel Vadot description: 605956d97fSEmmanuel Vadot This sub-node represents SCPI power domain controller. 615956d97fSEmmanuel Vadot 625956d97fSEmmanuel Vadot properties: 635956d97fSEmmanuel Vadot compatible: 645956d97fSEmmanuel Vadot const: arm,scpi-power-domains 655956d97fSEmmanuel Vadot 665956d97fSEmmanuel Vadot '#power-domain-cells': 675956d97fSEmmanuel Vadot const: 1 685956d97fSEmmanuel Vadot 695956d97fSEmmanuel Vadot num-domains: 705956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 715956d97fSEmmanuel Vadot description: 725956d97fSEmmanuel Vadot Total number of power domains provided by SCPI. This is needed as 735956d97fSEmmanuel Vadot the SCPI message protocol lacks a mechanism to query this 745956d97fSEmmanuel Vadot information at runtime. 755956d97fSEmmanuel Vadot 765956d97fSEmmanuel Vadot required: 775956d97fSEmmanuel Vadot - compatible 785956d97fSEmmanuel Vadot - '#power-domain-cells' 795956d97fSEmmanuel Vadot - num-domains 805956d97fSEmmanuel Vadot 815956d97fSEmmanuel Vadot additionalProperties: false 825956d97fSEmmanuel Vadot 835956d97fSEmmanuel Vadot sensors: 845956d97fSEmmanuel Vadot type: object 855956d97fSEmmanuel Vadot description: | 865956d97fSEmmanuel Vadot This sub-node represents SCPI sensors controller. 875956d97fSEmmanuel Vadot 885956d97fSEmmanuel Vadot properties: 895956d97fSEmmanuel Vadot compatible: 905956d97fSEmmanuel Vadot oneOf: 915956d97fSEmmanuel Vadot - const: arm,scpi-sensors 925956d97fSEmmanuel Vadot - items: 935956d97fSEmmanuel Vadot - enum: 945956d97fSEmmanuel Vadot - amlogic,meson-gxbb-scpi-sensors 955956d97fSEmmanuel Vadot - const: arm,scpi-sensors 965956d97fSEmmanuel Vadot 975956d97fSEmmanuel Vadot '#thermal-sensor-cells': 985956d97fSEmmanuel Vadot const: 1 995956d97fSEmmanuel Vadot 1005956d97fSEmmanuel Vadot required: 1015956d97fSEmmanuel Vadot - compatible 1025956d97fSEmmanuel Vadot - '#thermal-sensor-cells' 1035956d97fSEmmanuel Vadot 1045956d97fSEmmanuel Vadot additionalProperties: false 1055956d97fSEmmanuel Vadot 1065956d97fSEmmanuel Vadot clocks: 1075956d97fSEmmanuel Vadot type: object 1085956d97fSEmmanuel Vadot description: 1095956d97fSEmmanuel Vadot This is the container node. Each sub-node represents one of the types 1105956d97fSEmmanuel Vadot of clock controller - indexed or full range. 1115956d97fSEmmanuel Vadot 1125956d97fSEmmanuel Vadot properties: 1135956d97fSEmmanuel Vadot compatible: 1145956d97fSEmmanuel Vadot const: arm,scpi-clocks 1155956d97fSEmmanuel Vadot 1165956d97fSEmmanuel Vadot patternProperties: 1175956d97fSEmmanuel Vadot "^clocks-[0-9a-f]+$": 1185956d97fSEmmanuel Vadot type: object 1195956d97fSEmmanuel Vadot description: | 1205956d97fSEmmanuel Vadot This sub-node represents one of the types of clock controller 1215956d97fSEmmanuel Vadot - indexed or full range. 1225956d97fSEmmanuel Vadot 1235956d97fSEmmanuel Vadot "arm,scpi-dvfs-clocks" - all the clocks that are variable and index 1245956d97fSEmmanuel Vadot based. These clocks don't provide an entire range of values between 1255956d97fSEmmanuel Vadot the limits but only discrete points within the range. The firmware 1265956d97fSEmmanuel Vadot provides the mapping for each such operating frequency and the index 1275956d97fSEmmanuel Vadot associated with it. The firmware also manages the voltage scaling 1285956d97fSEmmanuel Vadot appropriately with the clock scaling. 1295956d97fSEmmanuel Vadot 1305956d97fSEmmanuel Vadot "arm,scpi-variable-clocks" - all the clocks that are variable and 1315956d97fSEmmanuel Vadot provide full range within the specified range. The firmware provides 1325956d97fSEmmanuel Vadot the range of values within a specified range. 1335956d97fSEmmanuel Vadot 1345956d97fSEmmanuel Vadot properties: 1355956d97fSEmmanuel Vadot compatible: 136354d7675SEmmanuel Vadot enum: 137354d7675SEmmanuel Vadot - arm,scpi-dvfs-clocks 138354d7675SEmmanuel Vadot - arm,scpi-variable-clocks 1395956d97fSEmmanuel Vadot 1405956d97fSEmmanuel Vadot '#clock-cells': 1415956d97fSEmmanuel Vadot const: 1 1425956d97fSEmmanuel Vadot 1435956d97fSEmmanuel Vadot clock-output-names: true 1445956d97fSEmmanuel Vadot 1455956d97fSEmmanuel Vadot clock-indices: 1465956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1475956d97fSEmmanuel Vadot description: 1485956d97fSEmmanuel Vadot The identifying number for the clocks(i.e.clock_id) in the node. 1495956d97fSEmmanuel Vadot It can be non linear and hence provide the mapping of identifiers 1505956d97fSEmmanuel Vadot into the clock-output-names array. 1515956d97fSEmmanuel Vadot 1525956d97fSEmmanuel Vadot required: 1535956d97fSEmmanuel Vadot - compatible 1545956d97fSEmmanuel Vadot - '#clock-cells' 1555956d97fSEmmanuel Vadot - clock-output-names 1565956d97fSEmmanuel Vadot - clock-indices 1575956d97fSEmmanuel Vadot 1585956d97fSEmmanuel Vadot additionalProperties: false 1595956d97fSEmmanuel Vadot 1605956d97fSEmmanuel Vadot required: 1615956d97fSEmmanuel Vadot - compatible 1625956d97fSEmmanuel Vadot 1635956d97fSEmmanuel Vadot additionalProperties: false 1645956d97fSEmmanuel Vadot 1655956d97fSEmmanuel VadotadditionalProperties: false 1665956d97fSEmmanuel Vadot 1675956d97fSEmmanuel Vadotrequired: 1685956d97fSEmmanuel Vadot - compatible 1695956d97fSEmmanuel Vadot - mboxes 1705956d97fSEmmanuel Vadot - shmem 1715956d97fSEmmanuel Vadot 1725956d97fSEmmanuel Vadotexamples: 1735956d97fSEmmanuel Vadot - | 1745956d97fSEmmanuel Vadot firmware { 1755956d97fSEmmanuel Vadot scpi { 1765956d97fSEmmanuel Vadot compatible = "arm,scpi"; 1775956d97fSEmmanuel Vadot mboxes = <&mhuA 1>; 1785956d97fSEmmanuel Vadot shmem = <&cpu_scp_hpri>; /* HP-NonSecure */ 1795956d97fSEmmanuel Vadot 1805956d97fSEmmanuel Vadot scpi_devpd: power-controller { 1815956d97fSEmmanuel Vadot compatible = "arm,scpi-power-domains"; 1825956d97fSEmmanuel Vadot num-domains = <2>; 1835956d97fSEmmanuel Vadot #power-domain-cells = <1>; 1845956d97fSEmmanuel Vadot }; 1855956d97fSEmmanuel Vadot 1865956d97fSEmmanuel Vadot clocks { 1875956d97fSEmmanuel Vadot compatible = "arm,scpi-clocks"; 1885956d97fSEmmanuel Vadot 1895956d97fSEmmanuel Vadot scpi_dvfs: clocks-0 { 1905956d97fSEmmanuel Vadot compatible = "arm,scpi-dvfs-clocks"; 1915956d97fSEmmanuel Vadot #clock-cells = <1>; 1925956d97fSEmmanuel Vadot clock-indices = <0>, <1>, <2>; 1935956d97fSEmmanuel Vadot clock-output-names = "atlclk", "aplclk","gpuclk"; 1945956d97fSEmmanuel Vadot }; 1955956d97fSEmmanuel Vadot 1965956d97fSEmmanuel Vadot scpi_clk: clocks-1 { 1975956d97fSEmmanuel Vadot compatible = "arm,scpi-variable-clocks"; 1985956d97fSEmmanuel Vadot #clock-cells = <1>; 1995956d97fSEmmanuel Vadot clock-indices = <3>, <4>; 2005956d97fSEmmanuel Vadot clock-output-names = "pxlclk0", "pxlclk1"; 2015956d97fSEmmanuel Vadot }; 2025956d97fSEmmanuel Vadot }; 2035956d97fSEmmanuel Vadot 2045956d97fSEmmanuel Vadot scpi_sensors: sensors { 2055956d97fSEmmanuel Vadot compatible = "arm,scpi-sensors"; 2065956d97fSEmmanuel Vadot #thermal-sensor-cells = <1>; 2075956d97fSEmmanuel Vadot }; 2085956d97fSEmmanuel Vadot 2095956d97fSEmmanuel Vadot }; 2105956d97fSEmmanuel Vadot }; 2115956d97fSEmmanuel Vadot 2125956d97fSEmmanuel Vadot soc { 2135956d97fSEmmanuel Vadot #address-cells = <2>; 2145956d97fSEmmanuel Vadot #size-cells = <2>; 2155956d97fSEmmanuel Vadot 2165956d97fSEmmanuel Vadot sram@50000000 { 2175956d97fSEmmanuel Vadot compatible = "mmio-sram"; 2185956d97fSEmmanuel Vadot reg = <0x0 0x50000000 0x0 0x10000>; 2195956d97fSEmmanuel Vadot 2205956d97fSEmmanuel Vadot #address-cells = <1>; 2215956d97fSEmmanuel Vadot #size-cells = <1>; 2225956d97fSEmmanuel Vadot ranges = <0 0x0 0x50000000 0x10000>; 2235956d97fSEmmanuel Vadot 2245956d97fSEmmanuel Vadot cpu_scp_lpri: scp-sram-section@0 { 2255956d97fSEmmanuel Vadot compatible = "arm,scp-shmem"; 2265956d97fSEmmanuel Vadot reg = <0x0 0x200>; 2275956d97fSEmmanuel Vadot }; 2285956d97fSEmmanuel Vadot 2295956d97fSEmmanuel Vadot cpu_scp_hpri: scp-sram-section@200 { 2305956d97fSEmmanuel Vadot compatible = "arm,scp-shmem"; 2315956d97fSEmmanuel Vadot reg = <0x200 0x200>; 2325956d97fSEmmanuel Vadot }; 2335956d97fSEmmanuel Vadot }; 2345956d97fSEmmanuel Vadot }; 2355956d97fSEmmanuel Vadot 2365956d97fSEmmanuel Vadot - | 2375956d97fSEmmanuel Vadot firmware { 2385956d97fSEmmanuel Vadot scpi { 2395956d97fSEmmanuel Vadot compatible = "amlogic,meson-gxbb-scpi", "arm,scpi-pre-1.0"; 240c9ccf3a3SEmmanuel Vadot mboxes = <&mailbox 1>, <&mailbox 2>; 241c9ccf3a3SEmmanuel Vadot shmem = <&cpu_scp_lpri>, <&cpu_scp_hpri>; 2425956d97fSEmmanuel Vadot 2435956d97fSEmmanuel Vadot scpi_sensors1: sensors { 2445956d97fSEmmanuel Vadot compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors"; 2455956d97fSEmmanuel Vadot #thermal-sensor-cells = <1>; 2465956d97fSEmmanuel Vadot }; 2475956d97fSEmmanuel Vadot }; 2485956d97fSEmmanuel Vadot }; 2495956d97fSEmmanuel Vadot... 250