From patchwork Thu Oct 28 07:53:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 12589483 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 D9064C433F5 for ; Thu, 28 Oct 2021 07:57: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 A1457610CF for ; Thu, 28 Oct 2021 07:57:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A1457610CF 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=8+5ns1vo4ZPlXsLqDdsG7sOff2gYSDTJCSFZqOOfBKg=; b=O9XMsdzeuiSRK4 v7gjnv+KcdLaFCUj7dVkFgFcPbrl+tKoHKedABIM+cjbVXQ6hDUrn5VqiEvG3x1f7fYaw9JgGeJj+ 0HXk5mN8SrKddnSHvIdFXoIK6Tku9xlHN88I0WGWQ/GpJsr599Non7TF3E7WL2MF1akbTCItmNu3H UIfGjH6ZqJK6U0Q4CVL9XShxB8nRu69FbfuROWvvkEtoIfeUqBSXhPCM3Sn9pljV8Dk8483aas1j/ uajexlzOMOWcYcvsmzdZbmp7PATQ4YG5BFp3EI512zuBoPo/1fqulElT9+IVqtOYCpQwBSOlYvWjq BPKF6XU3F8g+FHdik9CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg0Ga-007Bp4-JX; Thu, 28 Oct 2021 07:56:04 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg0EV-007Ahg-C7 for linux-arm-kernel@lists.infradead.org; Thu, 28 Oct 2021 07:53:57 +0000 Received: by mail-wr1-x429.google.com with SMTP id k7so8489859wrd.13 for ; Thu, 28 Oct 2021 00:53:54 -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=hwlpnlC96Iq4yd/qa1MHN9OndDMbSpFJ5nBOkRygT0Y=; b=pelz1Ufc5/UAKeFvt0zU3hIcMd/8+35nlNxNl5AGpEgnNfb5Y+o8BZhEsr1TCLrlzy XZFUOHSTRZ8GLwd1ZhF1bFH6is2FJtXEFJZ0bDSa2tfZVCVbyvw7WVbYAVttAv4SRKw1 dKICJLJ+As0pk7cQeiZaB8Q5sgFoKKrCwqWzhkVartmw1zQJEyNSkX7XOIXXhygQUiFw 8+VU9UUG7wWVgjmChhlQG1+6P1NTrJp6l/1v+CyjYWA/E43rJYNIdjyLFD6d4VA1c9FR OWTE2yAMeTdZ6p800O/5w8+W8Lmfcl/zsgy65h2K0qe+r0iqBTMGn1wJI3PtLboDQujE P8/w== 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=hwlpnlC96Iq4yd/qa1MHN9OndDMbSpFJ5nBOkRygT0Y=; b=m7i+sb88IIl143Rk0SSiNQOevuaL3oa80tiFONuJSCRXkacEByZ9nxVUMyi3nP4jjS xb/wF2AgNds6gikajaejWwMKq1d0uAgIbDGOvWzwmi2p24Ehqa89rOW/rDP+Z5vStGwQ cAIVDHRY0nxh3IuOh+bcY1RD4bogrpv63PqNOCr0phnJh6DTTk3CXS/ZPxJ82mMJjhsN 2lqp8uIn0gWkwIPzzVoDwadtxlabmkF9ivOZQF46opgCjpHSuASpMvTbwSY3i6uU3nd2 wm0A+QnXq/gRrRi8XXYJnHbBywKrvzndOSX3XGxtPhrvNTxdSMgwYUoojUkO9A0ie1nj FOrQ== X-Gm-Message-State: AOAM533fYSbwNyvN/hDvP7RenmrC+bfrsmhSBdJ6HU/9XF53NbcWAXrd BWr//xX4Ju/WYWF5fllIfKLmIA== X-Google-Smtp-Source: ABdhPJz+2cI7ART9PUdzOV7ARxZXthcWU+MfZsDw5otUo+78hcs2xAypNpMTKVLApLHW/opWjh5A3w== X-Received: by 2002:a5d:63c2:: with SMTP id c2mr3578371wrw.174.1635407633242; Thu, 28 Oct 2021 00:53:53 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:10ad:cd3f:50ee:a5d1:4a7:ad6]) by smtp.gmail.com with ESMTPSA id y12sm405677wrn.73.2021.10.28.00.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 00:53:52 -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 v7 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI Date: Thu, 28 Oct 2021 09:53:43 +0200 Message-Id: <20211028075344.1688-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-20211028_005355_524621_56C0430F X-CRM114-Status: GOOD ( 11.71 ) 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 v6: - Remove maxItems from linaro,optee-channel-id description No change since v5 Changes since v4: - Fix sram node name in DTS example: s/-shm-/-sram-/ 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 | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index 5c4c6782e052..eae15df36eef 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,12 @@ 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. + required: - reg @@ -226,6 +240,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 +364,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-sram-section@0 { + compatible = "arm,scmi-shmem"; + reg = <0x0 0x80>; + }; }; };