From patchwork Tue Oct 26 15:21:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 12585001 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 80E3BC433F5 for ; Tue, 26 Oct 2021 15:23:20 +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 4BC3460E74 for ; Tue, 26 Oct 2021 15:23:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4BC3460E74 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=eKAKeqQJ1eCetMiXAhZ8jOulDmIdhzhnO94xLSl98AE=; b=sTefygQTjCcui6 uftUpnbVAyT4KsOOLfTPbF8OImlukSQEZBCKc9M8mNmjp2ZzEyfU88Muv51q6nPMX6r7ECHlKtXeF MSjvmtMZUHps6SxAqzKNdqx20LYrn+aCF3oFlik2a7ns2VDlKwksNTt0PXpgHgjfz52VP0uGadIEx wrGKeDQK/vtxJx+y7S55of4zk/LtWtt2mN183/rFHPUT2FagJCpbGo2N4zlQOOVnHOGDdw477ykVq kb4QbAiwNQ3a7R7RlK30Mk5rTYQEDNHjp9m9E5KxFEF+5ER0qa+db6It86psIIAlAVE00TKUKyx0E gZTX+EwpptH3S38hRumA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfOGw-0029Co-EI; Tue, 26 Oct 2021 15:21:54 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfOGq-0029Ar-2K for linux-arm-kernel@lists.infradead.org; Tue, 26 Oct 2021 15:21:49 +0000 Received: by mail-wr1-x432.google.com with SMTP id m22so16591164wrb.0 for ; Tue, 26 Oct 2021 08:21:47 -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=lE1Jf5RZ999eTUD2tditSChMc+wv5UffQMX7augoGDc=; b=Gxi0dprOu/xak4Wsfrj7Z2x5nZPVFxmmEPHtTlmkhyzBqPuPtnF7MbQSx4e50VRAJg x6yU6VOQ+M/vGCW/OTp22DOWetmbl59OLLU+oClCk4wkboxA21D9hWKjKOevmxxzUXa/ e7xDrZoLjUQWHLnSMdHaKla+fJTDuvpbSiHxfLGQ9D+rH+aWFZvW9/9PPnJqaKSeTuye U409+Y1iee+vk3mWxZP88aRg/s394fandclCdVkXrGfbtWg0j+tuUjgxPOwG6woqxRg9 OoN9grfz3ALBJPbPovIaSV320PyhkaPvWMRuqlkmd0EaBhIJ8jfBFAvt35rvT5lVMaH6 l1OQ== 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=lE1Jf5RZ999eTUD2tditSChMc+wv5UffQMX7augoGDc=; b=c1NUH6Wc2tYr32XK+o7L+LfgzSyu5kSla8UozQr2rdMrAlIjBvYGq6cPre/vV/WtRo sXEdPXAf+i96hJB88gadgGyYyjVYr9TNaX0NzbYJoiPhqZOkXEW9j/1HSqArB1JXqrAw 5Ygjvdj/ShG9Q23lpb3x620kC9z/j7hAasy7ft6AyeXROaVqw1/AAFt1a6wwwHMlnDnz 3JwDlg520gs3rAuFjaEjcG6uEtYWOzyHCVrm5PmYejV1vqz4/OJf1hunOL4FOsY32c2Z NJcS35sKHVs8x3VgaZDHd3xKdxLAsF3xqgi/6lfqAMtTMPn93tN185G9xP0hny6Iw8PT kjeQ== X-Gm-Message-State: AOAM531UgR2JQt15CWwzghyFPoXBgWJ4uIE41/T+HdiaLq7OMEOtSsw9 2qvUdLYKNT44MHqZaJcc1iV90bcQ9jmveQ== X-Google-Smtp-Source: ABdhPJwtLthLymxJDiZ/cGcx2Z7IgdUx/Ak1EtGQIN/GBB3A1Eg/54k58+T2z4mumRrRmoWH4Q5MAQ== X-Received: by 2002:adf:ca09:: with SMTP id o9mr31956782wrh.303.1635261706475; Tue, 26 Oct 2021 08:21:46 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:1008:8c94:50ee:a5d1:4a7:ad6]) by smtp.gmail.com with ESMTPSA id o11sm27934740wry.0.2021.10.26.08.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 08:21:45 -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 v6 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI Date: Tue, 26 Oct 2021 17:21:27 +0200 Message-Id: <20211026152128.5834-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-20211026_082148_136976_C2345D9A X-CRM114-Status: GOOD ( 11.76 ) 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 --- 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 | 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>; + }; }; };