From patchwork Thu Oct 21 15:07:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 12575401 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 6F5CEC4332F for ; Thu, 21 Oct 2021 15:08:46 +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 3BD4060F57 for ; Thu, 21 Oct 2021 15:08:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3BD4060F57 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=rz6t2JQW9nrsqGMcjfhrlR134TNVihXLHVPq3UbTKmE=; b=dL2bWfmx6kgcfc m5VC1QuCWZDWiQSi7iXQ+EY0oFQDJC2Rtg22d7Gb9MN4CwbcAkMfyg77F32XjOfHfcopWrnWI+is/ gQH24oKK9DZd8cU6mg4dR+33tLduZzKBnNzXz1w8SkiJZfYfyatZvf//UfIunbFqfgWx92LUfS95L 8whKum1CER8dGwsI17vHVgKqSvjhglU5/OarTAlCvHGz54740V7fm7APNT5/lKtpw4bGf1uLbm05c Zd0dW2Pa3AsvTco7XV4a8/zZHTza9mCLmVZ/CAL5ShygRuorQaOe0PaBxw5w5GsXsNR/6xCSRYtHf h3AeAiLiK5iGO2a4F3xQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdZfF-007yFl-EL; Thu, 21 Oct 2021 15:07:29 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdZfA-007yDU-Mi for linux-arm-kernel@lists.infradead.org; Thu, 21 Oct 2021 15:07:26 +0000 Received: by mail-wr1-x436.google.com with SMTP id m22so106196wrb.0 for ; Thu, 21 Oct 2021 08:07:23 -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=jPp2ez40Oulq5oAldBcB94cKzrEc4MJ5Yq3ggAE4Sdo=; b=KlamjnSAY5WuQM0y/Yj0pi/fSt1fBfaemIGW2igtfXcWr/Zfx7/2HGLdaveBKRsTmn zROA7OVJPE5rFryMlTTmHwfKCWgVPoySSdoPfoBzcbEzqQh6SbH2Eimh7peg2EbPiLIn 0VKn4pXfoG+yGIPEJiE6GARNHiec2f/8qFq9BXSjARiuLFE8W5o5T2UUZIGcT1wQnsWS GBEid8v97lgcbVIqJsWEfNChkmO7SZYYIgcvvbn/wk5ZgPQ5po6ICXwKYGA6/337jJYM 7kI9AH+t+fOh2W4hl395TNv4WUPe5clWXKdNEUxTJs8mvgWTGNz1Xq8YNrClTD3vHqmd 8onA== 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=jPp2ez40Oulq5oAldBcB94cKzrEc4MJ5Yq3ggAE4Sdo=; b=1i7MBE7khQvsfuD9B0zlNDWO8+Q77ZAUPyyH+UI52yL6PQMBBJDGXv7BheWmTHbh3h Ej0/Y7sdb4uU47Iln4wCdEQKu7dRuG5wkUX7xWQb2mr+gL/jNN+Rea8Av3ChEFW5UBOp 6z1uAkuJvzSjoruFI+b8G12r1VYW2CClfP/jLvUu9EMtnWPJW+oLtu3OZqkryHdgjiXj eXYxZPGLKGeBp/OySIQT/KBNOn6R2x8mEywBcCZdkR4Fx/enTOUjmqxzf9iyFscHKhxG Ia5/JX9pwzMI75+P8HMBhJijX5TRuA9WuFKLRDPJKtDvDrJMeoqBv7bjY5TRVVwRrXa2 s7SQ== X-Gm-Message-State: AOAM530saGd/fsVLq3liuci2VQcpFACjYdbo8cZzveTZVWidTdhOkjmn K1gpr8w/0RqdOuQ7cfzkHweXXQ== X-Google-Smtp-Source: ABdhPJzd6Bk3FS4SqRARok6fPF2y6ZSek6qlZVxGSWf73xVb8Rw6NJvu1sEwiCAJTPzLZPeZLLr1OA== X-Received: by 2002:adf:bb12:: with SMTP id r18mr7881092wrg.313.1634828841028; Thu, 21 Oct 2021 08:07:21 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:10f3:5b93:f8bd:7b81:c866:9456]) by smtp.gmail.com with ESMTPSA id c15sm5106925wrs.19.2021.10.21.08.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 08:07:20 -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 v5 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI Date: Thu, 21 Oct 2021 17:07:16 +0200 Message-Id: <20211021150717.2718-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-20211021_080724_767254_45CF2BBC X-CRM114-Status: GOOD ( 11.66 ) 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 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 | 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..d09ebc80e713 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-sram-section@0 { + compatible = "arm,scmi-shmem"; + reg = <0x0 0x80>; + }; }; };