Path: blob/master/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1# Copyright 2021 ARM Ltd.2%YAML 1.23---4$id: http://devicetree.org/schemas/firmware/arm,scmi.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: System Control and Management Interface (SCMI) Message Protocol89maintainers:10- Sudeep Holla <sudeep.holla@arm.com>1112description: |13The SCMI is intended to allow agents such as OSPM to manage various functions14that are provided by the hardware platform it is running on, including power15and performance functions.1617This binding is intended to define the interface the firmware implementing18the SCMI as described in ARM document number ARM DEN 0056 ("ARM System Control19and Management Interface Platform Design Document")[0] provide for OSPM in20the device tree.2122[0] https://developer.arm.com/documentation/den0056/latest2324anyOf:25- $ref: /schemas/firmware/nxp,imx95-scmi.yaml2627properties:28$nodename:29const: scmi3031compatible:32oneOf:33- description: SCMI compliant firmware with mailbox transport34items:35- const: arm,scmi36- description: SCMI compliant firmware with ARM SMC/HVC transport37items:38- const: arm,scmi-smc39- description: SCMI compliant firmware with ARM SMC/HVC transport40with shmem address(4KB-page, offset) as parameters41items:42- const: arm,scmi-smc-param43- description: SCMI compliant firmware with Qualcomm SMC/HVC transport44items:45- const: qcom,scmi-smc46- description: SCMI compliant firmware with SCMI Virtio transport.47The virtio transport only supports a single device.48items:49- const: arm,scmi-virtio50- description: SCMI compliant firmware with OP-TEE transport51items:52- const: linaro,scmi-optee5354interrupts:55description:56The interrupt that indicates message completion by the platform57rather than by the return of the smc call. This should not be used58except when the platform requires such behavior.59maxItems: 16061interrupt-names:62const: a2p6364mbox-names:65description:66Specifies the mailboxes used to communicate with SCMI compliant67firmware.68oneOf:69- items:70- const: tx71- const: rx72minItems: 173- items:74- const: tx75- const: tx_reply76- const: rx77- const: rx_reply78minItems: 27980mboxes:81description:82List of phandle and mailbox channel specifiers. It should contain83exactly one, two, three or four mailboxes; the first one or two for84transmitting messages ("tx") and another optional ("rx") for receiving85notifications and delayed responses, if supported by the platform.86The optional ("rx_reply") is for notifications completion interrupt,87if supported by the platform.88The number of mailboxes needed for transmitting messages depends on the89type of channels exposed by the specific underlying mailbox controller;90one single channel descriptor is enough if such channel is bidirectional,91while two channel descriptors are needed to represent the SCMI ("tx")92channel if the underlying mailbox channels are of unidirectional type.93The effective combination in numbers of mboxes and shmem descriptors let94the SCMI subsystem determine unambiguosly which type of SCMI channels are95made available by the underlying mailbox controller and how to use them.961 mbox / 1 shmem => SCMI TX over 1 mailbox bidirectional channel972 mbox / 2 shmem => SCMI TX and RX over 2 mailbox bidirectional channels982 mbox / 1 shmem => SCMI TX over 2 mailbox unidirectional channels993 mbox / 2 shmem => SCMI TX and RX over 3 mailbox unidirectional channels1004 mbox / 2 shmem => SCMI TX and RX over 4 mailbox unidirectional channels101Any other combination of mboxes and shmem is invalid.102minItems: 1103maxItems: 4104105shmem:106description:107List of phandle pointing to the shared memory(SHM) area, for each108transport channel specified.109minItems: 1110maxItems: 2111112'#address-cells':113const: 1114115'#size-cells':116const: 0117118atomic-threshold-us:119description:120An optional time value, expressed in microseconds, representing, on this121platform, the threshold above which any SCMI command, advertised to have122an higher-than-threshold execution latency, should not be considered for123atomic mode of operation, even if requested.124default: 0125126arm,max-rx-timeout-ms:127description:128An optional time value, expressed in milliseconds, representing the129transport maximum timeout value for the receive channel. The value should130be a non-zero value if set.131minimum: 1132133arm,max-msg-size:134$ref: /schemas/types.yaml#/definitions/uint32135description:136An optional value, expressed in bytes, representing the maximum size137allowed for the payload of messages transmitted on this transport.138139arm,max-msg:140$ref: /schemas/types.yaml#/definitions/uint32141description:142An optional value representing the maximum number of concurrent in-flight143messages allowed by this transport; this number represents the maximum144number of concurrently outstanding messages that the server can handle on145this platform. If set, the value should be non-zero.146minimum: 1147148arm,smc-id:149$ref: /schemas/types.yaml#/definitions/uint32150description:151SMC id required when using smc or hvc transports152153linaro,optee-channel-id:154$ref: /schemas/types.yaml#/definitions/uint32155description:156Channel specifier required when using OP-TEE transport.157158protocol@11:159$ref: '#/$defs/protocol-node'160unevaluatedProperties: false161162properties:163reg:164const: 0x11165166'#power-domain-cells':167const: 1168169required:170- '#power-domain-cells'171172protocol@12:173$ref: '#/$defs/protocol-node'174unevaluatedProperties: false175176properties:177reg:178const: 0x12179180protocol@13:181$ref: '#/$defs/protocol-node'182unevaluatedProperties: false183184properties:185reg:186const: 0x13187188'#clock-cells':189const: 1190191'#power-domain-cells':192const: 1193194oneOf:195- required:196- '#clock-cells'197198- required:199- '#power-domain-cells'200201protocol@14:202$ref: '#/$defs/protocol-node'203unevaluatedProperties: false204205properties:206reg:207const: 0x14208209'#clock-cells':210const: 1211212required:213- '#clock-cells'214215protocol@15:216$ref: '#/$defs/protocol-node'217unevaluatedProperties: false218219properties:220reg:221const: 0x15222223'#thermal-sensor-cells':224const: 1225226required:227- '#thermal-sensor-cells'228229protocol@16:230$ref: '#/$defs/protocol-node'231unevaluatedProperties: false232233properties:234reg:235const: 0x16236237'#reset-cells':238const: 1239240required:241- '#reset-cells'242243protocol@17:244$ref: '#/$defs/protocol-node'245unevaluatedProperties: false246247properties:248reg:249const: 0x17250251regulators:252type: object253additionalProperties: false254description:255The list of all regulators provided by this SCMI controller.256257properties:258'#address-cells':259const: 1260261'#size-cells':262const: 0263264patternProperties:265'^regulator@[0-9a-f]+$':266type: object267$ref: /schemas/regulator/regulator.yaml#268unevaluatedProperties: false269270properties:271reg:272maxItems: 1273description: Identifier for the voltage regulator.274275required:276- reg277278protocol@18:279$ref: '#/$defs/protocol-node'280unevaluatedProperties: false281282properties:283reg:284const: 0x18285286protocol@19:287type: object288allOf:289- $ref: '#/$defs/protocol-node'290- anyOf:291- $ref: /schemas/pinctrl/pinctrl.yaml292- $ref: /schemas/firmware/nxp,imx95-scmi-pinctrl.yaml293294unevaluatedProperties: false295296properties:297reg:298const: 0x19299300patternProperties:301'-pins$':302type: object303allOf:304- $ref: /schemas/pinctrl/pincfg-node.yaml#305- $ref: /schemas/pinctrl/pinmux-node.yaml#306unevaluatedProperties: false307308description:309A pin multiplexing sub-node describes how to configure a310set of pins in some desired function.311A single sub-node may define several pin configurations.312This sub-node is using the default pinctrl bindings to configure313pin multiplexing and using SCMI protocol to apply a specified314configuration.315316required:317- reg318319unevaluatedProperties: false320321$defs:322protocol-node:323type: object324description:325Each sub-node represents a protocol supported. If the platform326supports a dedicated communication channel for a particular protocol,327then the corresponding transport properties must be present.328The virtio transport does not support a dedicated communication channel.329330properties:331reg:332maxItems: 1333334mbox-names:335oneOf:336- items:337- const: tx338- const: rx339minItems: 1340- items:341- const: tx342- const: tx_reply343- const: rx344minItems: 2345346mboxes:347minItems: 1348maxItems: 3349350shmem:351minItems: 1352maxItems: 2353354linaro,optee-channel-id:355$ref: /schemas/types.yaml#/definitions/uint32356description:357Channel specifier required when using OP-TEE transport and358protocol has a dedicated communication channel.359360required:361- reg362363required:364- compatible365366if:367properties:368compatible:369contains:370const: arm,scmi371then:372properties:373interrupts: false374interrupt-names: false375376required:377- mboxes378- shmem379380else:381if:382properties:383compatible:384contains:385enum:386- arm,scmi-smc387- arm,scmi-smc-param388- qcom,scmi-smc389then:390required:391- arm,smc-id392- shmem393394else:395if:396properties:397compatible:398contains:399const: linaro,scmi-optee400then:401required:402- linaro,optee-channel-id403404examples:405- |406firmware {407scmi {408compatible = "arm,scmi";409mboxes = <&mhuB 0 0>,410<&mhuB 0 1>;411mbox-names = "tx", "rx";412shmem = <&cpu_scp_lpri0>,413<&cpu_scp_lpri1>;414415#address-cells = <1>;416#size-cells = <0>;417418atomic-threshold-us = <10000>;419420scmi_devpd: protocol@11 {421reg = <0x11>;422#power-domain-cells = <1>;423};424425scmi_dvfs: protocol@13 {426reg = <0x13>;427#power-domain-cells = <1>;428429mboxes = <&mhuB 1 0>,430<&mhuB 1 1>;431mbox-names = "tx", "rx";432shmem = <&cpu_scp_hpri0>,433<&cpu_scp_hpri1>;434};435436scmi_clk: protocol@14 {437reg = <0x14>;438#clock-cells = <1>;439};440441scmi_sensors: protocol@15 {442reg = <0x15>;443#thermal-sensor-cells = <1>;444};445446scmi_reset: protocol@16 {447reg = <0x16>;448#reset-cells = <1>;449};450451scmi_voltage: protocol@17 {452reg = <0x17>;453regulators {454#address-cells = <1>;455#size-cells = <0>;456457regulator_devX: regulator@0 {458reg = <0x0>;459regulator-max-microvolt = <3300000>;460};461462regulator_devY: regulator@9 {463reg = <0x9>;464regulator-min-microvolt = <500000>;465regulator-max-microvolt = <4200000>;466};467};468};469470scmi_powercap: protocol@18 {471reg = <0x18>;472};473474scmi_pinctrl: protocol@19 {475reg = <0x19>;476477i2c2-pins {478groups = "g_i2c2_a", "g_i2c2_b";479function = "f_i2c2";480};481482mdio-pins {483groups = "g_avb_mdio";484drive-strength = <24>;485};486487keys_pins: keys-pins {488pins = "gpio_5_17", "gpio_5_20", "gpio_5_22", "gpio_2_1";489bias-pull-up;490};491};492};493};494495soc {496#address-cells = <2>;497#size-cells = <2>;498499sram@50000000 {500compatible = "mmio-sram";501reg = <0x0 0x50000000 0x0 0x10000>;502503#address-cells = <1>;504#size-cells = <1>;505ranges = <0 0x0 0x50000000 0x10000>;506507cpu_scp_lpri0: scp-sram-section@0 {508compatible = "arm,scmi-shmem";509reg = <0x0 0x80>;510};511512cpu_scp_lpri1: scp-sram-section@80 {513compatible = "arm,scmi-shmem";514reg = <0x80 0x80>;515};516517cpu_scp_hpri0: scp-sram-section@100 {518compatible = "arm,scmi-shmem";519reg = <0x100 0x80>;520};521522cpu_scp_hpri2: scp-sram-section@180 {523compatible = "arm,scmi-shmem";524reg = <0x180 0x80>;525};526};527};528529- |530firmware {531scmi {532compatible = "arm,scmi-smc";533shmem = <&cpu_scp_lpri0>, <&cpu_scp_lpri1>;534arm,smc-id = <0xc3000001>;535536#address-cells = <1>;537#size-cells = <0>;538539scmi_devpd1: protocol@11 {540reg = <0x11>;541#power-domain-cells = <1>;542};543};544};545546- |547firmware {548scmi {549compatible = "linaro,scmi-optee";550linaro,optee-channel-id = <0>;551552#address-cells = <1>;553#size-cells = <0>;554555scmi_dvfs1: protocol@13 {556reg = <0x13>;557linaro,optee-channel-id = <1>;558shmem = <&cpu_optee_lpri0>;559#power-domain-cells = <1>;560};561562scmi_clk0: protocol@14 {563reg = <0x14>;564#clock-cells = <1>;565};566};567};568569soc {570#address-cells = <2>;571#size-cells = <2>;572573sram@51000000 {574compatible = "mmio-sram";575reg = <0x0 0x51000000 0x0 0x10000>;576577#address-cells = <1>;578#size-cells = <1>;579ranges = <0 0x0 0x51000000 0x10000>;580581cpu_optee_lpri0: optee-sram-section@0 {582compatible = "arm,scmi-shmem";583reg = <0x0 0x80>;584};585};586};587588...589590591