From patchwork Wed Oct 20 17:57:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 12572909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88459C433EF for ; Wed, 20 Oct 2021 17:59:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D0D361260 for ; Wed, 20 Oct 2021 17:59:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5D0D361260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=cIxmK66lc1tkEaA37jRcpFKthSCFhHgTpbwl/sp7a0E=; b=NUT+FEKN+dsq8g +oxzuVimoRUfRJwZGJrfUoO7wP1G5HFT5qPID8WABgSdt8g6QDGnx/OwFPdXf/g3j51U+mOfKaW/2 Xh23vD5oi8YNnGn2haMe1ecEfEm0jb4GSWMybdNn9ZrGH9vV5Ze/vJnpVgF61zl9m9851qp4bEMul LlvyYNBfwImbheee4OpoV/UNskE/6yAyJZ1wiDZVr+YHOZI9a2MpI8iMuBlTZB5qnhZpHAOmSuLmj 5JIOvgFpK8cy9HnWr1YnyiZEZnVSKD28rufH0iq0ko9L8GKVM594tvZDDw6rCc7jDz69Ue8Jsiia3 KhVfoXtoC3LfPPgrOr/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdFql-005MKG-6f; Wed, 20 Oct 2021 17:58:03 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdFqg-005MHr-Gy for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 17:58:01 +0000 Received: by mail-wr1-x42d.google.com with SMTP id e12so19744wra.4 for ; Wed, 20 Oct 2021 10:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=RepuXJUEELKyiobJIR91lnWFO15T/GloUqVYiY/VwD8=; b=YO50rxD7BRuFgC6p7ZQpT6gqttx2Lzctu4y6MIR+041UCEhyjU77KDREOmgSIODJm/ +n9rv0iqWnDRkgf0goi5eY19yaoibEVoQ5CV4oXkRTIwCdx70hmbSs4bJszkCEV8i7S0 pz7z1YiiCUL76YcIq+JvU3ER/l1XMpob5XAuOg3GnI3eGFzoQ30PU9bviiskcxuYnjxI 2iBkUwtfND6lC6f9yV6kOHKukBrwejMZ287lSu5cs0I/95ReVITXhPIzGNxCpuIjJzcc mGgq2SJER8sAk99HDExQ27pWoseoccKqoQwz8OKdOV0O3TDt0cKy/FzZ/03jGr/XkkyV HYZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RepuXJUEELKyiobJIR91lnWFO15T/GloUqVYiY/VwD8=; b=gv0b93bJBhuiiq4ePjGCMb2rRK0skIhnb86CZojQzmBtL6kRXbrZiY+rl5l98tN4bL U4b7+SBw5tXvsEbFCzTtlm6865gy0Zhz1oPncCLtkl2cqYSbBqijN6wX91o4x6KV1yEW ChDs8chLzxHqMO18HjoVndBEftzt39TyoeBna+lOSTgSeX9itywBZS3uNCArb4f91lhB Cdqrdlh8/ANmst6a9QJIvFIQToIDSLxC8OL7vmiqzfLAcARLbIGeGO+MyPuLNXYXFZoW Ddd3C1P9QAiyvjhdFEnCmS/mDV6TJxOQyGERl76BKY3XSHEP3NOXSJ1I4V94rtHoc+fH a8zQ== X-Gm-Message-State: AOAM5319puybuAuvyOQUQx+n9lH8w70gTYHQV2LM0GaMxKElMUn21w/Z TcYXMjUUt0eZJYfBTVV8/kaHwZKhPawvhQ== X-Google-Smtp-Source: ABdhPJw0yUpaz/Nhl52S8E7Iu+FHtzj2JtL811eNLwT/O8TEeznni3rrwEwVUDvpuwbKqNBH0k/j+A== X-Received: by 2002:adf:fe45:: with SMTP id m5mr830887wrs.197.1634752674931; Wed, 20 Oct 2021 10:57:54 -0700 (PDT) Received: from lmecxl0524.home (2a01cb058b850800f8bd7b81c8669456.ipv6.abo.wanadoo.fr. [2a01:cb05:8b85:800:f8bd:7b81:c866:9456]) by smtp.gmail.com with ESMTPSA id s3sm2609227wrm.40.2021.10.20.10.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:57:53 -0700 (PDT) From: Etienne Carriere To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Sudeep Holla , Cristian Marussi , Vincent Guittot , Etienne Carriere , devicetree@vger.kernel.org, Rob Herring Subject: [PATCH v4 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI Date: Wed, 20 Oct 2021 19:57:46 +0200 Message-Id: <20211020175747.28449-1-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_105758_588030_4A682535 X-CRM114-Status: GOOD ( 11.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Introduce compatible "linaro,scmi-optee" for SCMI transport channel based on an OP-TEE service invocation. The compatible mandates a channel ID defined with property "linaro,optee-channel-id". Cc: devicetree@vger.kernel.org Cc: Rob Herring Signed-off-by: Etienne Carriere --- Changes since v3: - Add description for linaro,optee-channel-id in patternProperties specifying protocol can optionaly define a dedicated channel id. - Fix DTS example (duplicated phandles issue, subnodes ordering) - Fix typo in DTS example and description comments. Changes since v2: - Define mandatory property linaro,optee-channel-id - Rebased on yaml description file Changes since v1: - Removed modification regarding mboxes property description. --- .../bindings/firmware/arm,scmi.yaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index 5c4c6782e052..997e5f15c735 100644 --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml @@ -38,6 +38,9 @@ properties: The virtio transport only supports a single device. items: - const: arm,scmi-virtio + - description: SCMI compliant firmware with OP-TEE transport + items: + - const: linaro,scmi-optee interrupts: description: @@ -83,6 +86,11 @@ properties: description: SMC id required when using smc or hvc transports + linaro,optee-channel-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Channel specifier required when using OP-TEE transport. + protocol@11: type: object properties: @@ -195,6 +203,13 @@ patternProperties: minItems: 1 maxItems: 2 + linaro,optee-channel-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Channel specifier required when using OP-TEE transport and + protocol has a dedicated communication channel. + maxItems: 1 + required: - reg @@ -226,6 +241,16 @@ else: - arm,smc-id - shmem + else: + if: + properties: + compatible: + contains: + const: linaro,scmi-optee + then: + required: + - linaro,optee-channel-id + examples: - | firmware { @@ -340,7 +365,48 @@ examples: reg = <0x11>; #power-domain-cells = <1>; }; + }; + }; + - | + firmware { + scmi { + compatible = "linaro,scmi-optee"; + linaro,optee-channel-id = <0>; + + #address-cells = <1>; + #size-cells = <0>; + + scmi_dvfs1: protocol@13 { + reg = <0x13>; + linaro,optee-channel-id = <1>; + shmem = <&cpu_optee_lpri0>; + #clock-cells = <1>; + }; + + scmi_clk0: protocol@14 { + reg = <0x14>; + #clock-cells = <1>; + }; + }; + }; + + soc { + #address-cells = <2>; + #size-cells = <2>; + + sram@51000000 { + compatible = "mmio-sram"; + reg = <0x0 0x51000000 0x0 0x10000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x0 0x51000000 0x10000>; + + cpu_optee_lpri0: optee-shm-section@0 { + compatible = "arm,scmi-shmem"; + reg = <0x0 0x80>; + }; }; };