Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 # Copyright 2021 ARM Ltd.
0003 %YAML 1.2
0004 ---
0005 $id: http://devicetree.org/schemas/firmware/arm,scpi.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007 
0008 title: System Control and Power Interface (SCPI) Message Protocol bindings
0009 
0010 maintainers:
0011   - Sudeep Holla <sudeep.holla@arm.com>
0012 
0013 description: |
0014   Firmware implementing the SCPI described in ARM document number ARM DUI
0015   0922B ("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be
0016   used by Linux to initiate various system control and power operations.
0017 
0018   This binding is intended to define the interface the firmware implementing
0019   the SCPI provide for OSPM in the device tree.
0020 
0021   [0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html
0022 
0023 properties:
0024   $nodename:
0025     const: scpi
0026 
0027   compatible:
0028     description:
0029       SCPI compliant firmware complying to SCPI v1.0 and above OR
0030       SCPI compliant firmware complying to all unversioned releases
0031       prior to SCPI v1.0
0032     oneOf:
0033       - const: arm,scpi               # SCPI v1.0 and above
0034       - const: arm,scpi-pre-1.0       # Unversioned SCPI before v1.0
0035       - items:
0036           - enum:
0037               - amlogic,meson-gxbb-scpi
0038           - const: arm,scpi-pre-1.0
0039 
0040   mboxes:
0041     description:
0042       List of phandle and mailbox channel specifiers. All the channels reserved
0043       by remote SCP firmware for use by SCPI message protocol should be
0044       specified in any order.
0045     minItems: 1
0046     maxItems: 4
0047 
0048   shmem:
0049     description:
0050       List of phandle pointing to the shared memory(SHM) area between the
0051       processors using these mailboxes for IPC, one for each mailbox SHM can
0052       be any memory reserved for the purpose of this communication between the
0053       processors.
0054     minItems: 1
0055     maxItems: 4
0056 
0057   power-controller:
0058     type: object
0059     description:
0060       This sub-node represents SCPI power domain controller.
0061 
0062     properties:
0063       compatible:
0064         const: arm,scpi-power-domains
0065 
0066       '#power-domain-cells':
0067         const: 1
0068 
0069       num-domains:
0070         $ref: /schemas/types.yaml#/definitions/uint32
0071         description:
0072           Total number of power domains provided by SCPI. This is needed as
0073           the SCPI message protocol lacks a mechanism to query this
0074           information at runtime.
0075 
0076     required:
0077       - compatible
0078       - '#power-domain-cells'
0079       - num-domains
0080 
0081     additionalProperties: false
0082 
0083   sensors:
0084     type: object
0085     description: |
0086       This sub-node represents SCPI sensors controller.
0087 
0088     properties:
0089       compatible:
0090         oneOf:
0091           - const: arm,scpi-sensors
0092           - items:
0093               - enum:
0094                   - amlogic,meson-gxbb-scpi-sensors
0095               - const: arm,scpi-sensors
0096 
0097       '#thermal-sensor-cells':
0098         const: 1
0099 
0100     required:
0101       - compatible
0102       - '#thermal-sensor-cells'
0103 
0104     additionalProperties: false
0105 
0106   clocks:
0107     type: object
0108     description:
0109       This is the container node. Each sub-node represents one of the types
0110       of clock controller - indexed or full range.
0111 
0112     properties:
0113       compatible:
0114         const: arm,scpi-clocks
0115 
0116     patternProperties:
0117       "^clocks-[0-9a-f]+$":
0118         type: object
0119         description: |
0120           This sub-node represents one of the types of clock controller
0121           - indexed or full range.
0122 
0123           "arm,scpi-dvfs-clocks" - all the clocks that are variable and index
0124           based. These clocks don't provide an entire range of values between
0125           the limits but only discrete points within the range. The firmware
0126           provides the mapping for each such operating frequency and the index
0127           associated with it. The firmware also manages the voltage scaling
0128           appropriately with the clock scaling.
0129 
0130           "arm,scpi-variable-clocks" - all the clocks that are variable and
0131           provide full range within the specified range. The firmware provides
0132           the range of values within a specified range.
0133 
0134         properties:
0135           compatible:
0136             enum:
0137               - arm,scpi-dvfs-clocks
0138               - arm,scpi-variable-clocks
0139 
0140           '#clock-cells':
0141             const: 1
0142 
0143           clock-output-names: true
0144 
0145           clock-indices:
0146             $ref: /schemas/types.yaml#/definitions/uint32-array
0147             description:
0148               The identifying number for the clocks(i.e.clock_id) in the node.
0149               It can be non linear and hence provide the mapping of identifiers
0150               into the clock-output-names array.
0151 
0152         required:
0153           - compatible
0154           - '#clock-cells'
0155           - clock-output-names
0156           - clock-indices
0157 
0158         additionalProperties: false
0159 
0160     required:
0161       - compatible
0162 
0163     additionalProperties: false
0164 
0165 additionalProperties: false
0166 
0167 required:
0168   - compatible
0169   - mboxes
0170   - shmem
0171 
0172 examples:
0173   - |
0174     firmware {
0175         scpi {
0176             compatible = "arm,scpi";
0177             mboxes = <&mhuA 1>;
0178             shmem = <&cpu_scp_hpri>; /* HP-NonSecure */
0179 
0180             scpi_devpd: power-controller {
0181                 compatible = "arm,scpi-power-domains";
0182                 num-domains = <2>;
0183                 #power-domain-cells = <1>;
0184             };
0185 
0186             clocks {
0187                 compatible = "arm,scpi-clocks";
0188 
0189                 scpi_dvfs: clocks-0 {
0190                     compatible = "arm,scpi-dvfs-clocks";
0191                     #clock-cells = <1>;
0192                     clock-indices = <0>, <1>, <2>;
0193                     clock-output-names = "atlclk", "aplclk","gpuclk";
0194                 };
0195 
0196                 scpi_clk: clocks-1 {
0197                     compatible = "arm,scpi-variable-clocks";
0198                     #clock-cells = <1>;
0199                     clock-indices = <3>, <4>;
0200                     clock-output-names = "pxlclk0", "pxlclk1";
0201                 };
0202             };
0203 
0204             scpi_sensors: sensors {
0205                 compatible = "arm,scpi-sensors";
0206                 #thermal-sensor-cells = <1>;
0207             };
0208 
0209         };
0210     };
0211 
0212     soc {
0213         #address-cells = <2>;
0214         #size-cells = <2>;
0215 
0216         sram@50000000 {
0217             compatible = "mmio-sram";
0218             reg = <0x0 0x50000000 0x0 0x10000>;
0219 
0220             #address-cells = <1>;
0221             #size-cells = <1>;
0222             ranges = <0 0x0 0x50000000 0x10000>;
0223 
0224             cpu_scp_lpri: scp-sram-section@0 {
0225                 compatible = "arm,scp-shmem";
0226                 reg = <0x0 0x200>;
0227             };
0228 
0229             cpu_scp_hpri: scp-sram-section@200 {
0230                 compatible = "arm,scp-shmem";
0231                 reg = <0x200 0x200>;
0232             };
0233         };
0234     };
0235 
0236   - |
0237     firmware {
0238         scpi {
0239             compatible = "amlogic,meson-gxbb-scpi", "arm,scpi-pre-1.0";
0240             mboxes = <&mailbox 1>, <&mailbox 2>;
0241             shmem = <&cpu_scp_lpri>, <&cpu_scp_hpri>;
0242 
0243             scpi_sensors1: sensors {
0244                 compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors";
0245                 #thermal-sensor-cells = <1>;
0246             };
0247         };
0248     };
0249 ...