Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp4090666pxm; Tue, 1 Mar 2022 11:02:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTZNiz/et65DerpJXSuBN7rai/tNiEcYJwHbROfrlg8wzPrA6LsPTSmudHlUG2DF1QkdtN X-Received: by 2002:a05:6402:cab:b0:413:2f82:6235 with SMTP id cn11-20020a0564020cab00b004132f826235mr25896550edb.110.1646161325938; Tue, 01 Mar 2022 11:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646161325; cv=none; d=google.com; s=arc-20160816; b=Dr/fvdBVTRW4FBd2wg+OyuOaJOMiFbjK1IObA6NB0dkvYHpofK0LYBW3CRlsjTTeTt t4wtAxeXQZZFoyB2KTbO8R1Y00EmNnecfZqEJH+h4d+QpEje+N6Loup4PDofeLgmPxP5 zKzzIdIGUU7fN8lAIxsFFux9zX9qq6a+ArtSQSnOxLB1mnVrWSCKMIwBJUGg6LssEbhr UCquCq4Qik6aoGvlhwN4ZtL2XFxnEMh18/lXrLxxogwj81c8TJaHYRw7unSQ5PIwzhiO pjwPl4MmUfKyR8jGGWkVN0WZ6GdVsGnh+8JGWI/95URG0+Zm3Ww5+tMOOW1JFCAeKQFI 8Z5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=N005AwlH1PzA71NUEIY/vHtIRr35X9iAtVZVAl8AQhE=; b=g4UlDZAw4kH8sX0yqF2lCRz5aEKYtwTFZ9Yfw9RJa4YTHymOtjwH61oMIA9A/IBaSz wCOr2WhTb/0Al6gLGXIc1Gzb7ni8hyblH7IN2/KwqpF/9mtAqXGPimQoESYyvKoUe8zD 3TGkr0RSkddrttnP7CaixGjVOYDSXNMyVzgaZYr8P3bcUnhbD9o7dDfgtXLWp2baHm7f rfgfWrH8gmcrErw3z9DTbRTnanW/7urnHiJgkV+5QhJjBZa9lYQd0Safj7IcEo09ZUWO XbaVs6+Nzzz3WKtTH/oVK8c0LwFKIanhNc50y1Dw/qzCI/FDUDFa8Xij3fUOBPzKQglK aieQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yWDpHn3Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a170906698a00b006cee60bfc41si8071196ejr.119.2022.03.01.11.01.42; Tue, 01 Mar 2022 11:02:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yWDpHn3Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235112AbiCAOGh (ORCPT + 99 others); Tue, 1 Mar 2022 09:06:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235113AbiCAOGd (ORCPT ); Tue, 1 Mar 2022 09:06:33 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C475C673CC for ; Tue, 1 Mar 2022 06:05:50 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id p4so7044312edi.1 for ; Tue, 01 Mar 2022 06:05:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N005AwlH1PzA71NUEIY/vHtIRr35X9iAtVZVAl8AQhE=; b=yWDpHn3ZxeTncAqWxOgXJB4+cv/Jq+56OLnG14Cng/rsrxC21XQcAZPqDGYJHfxzWG kozfYM1TX7hdwZ/lThUShd8cCntctDLtIC8lUbCPvPBjeLZJmMjgYAnG7VTbsY0Ixcpl BiRcxg+LaTMUbp/xP9RGkKnsE71iRYQOqVmZnvJtlQDmHs8P4wLRmUbaRYCtmqa0mtsI PdNFc9Buor5nM7ZooyT9uVpudHpGXxTbphjliesyFIQg4NPS5iyJfZ4DNxy57OsCITBj 01nGMTW3g+/2OQPxuAyTHG5qEGdbdSQlPK7YEs0IqjXzQpQ+0c9kprfKIROOGiyTgny8 c1/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N005AwlH1PzA71NUEIY/vHtIRr35X9iAtVZVAl8AQhE=; b=7ZVPSJRS6PwHKF5cx5paq4gUVDD7qdv6Kxu24Eh2gJYKexNRLVjp7NL1fzC77G27Z9 xktj3S5jIDlfiBNJPajEdjX4ocE4us0ygZsyEppxPAhcSFCDdVuvc9D0579ifSLwp0n8 46E+CvnCVU8xgwidcB5OBRqPXPVuDI9F4c4MUdxp5yzrlxjFW8l6ItV0u9IMIFsqzNDi 9lOYGHmWgz8sysgG3vqYlzCz6pTurYSeciEcPKXgwEkATdjRBPQkfJR8Vc1pBVYdgs0x nsKK6oe4p+Y0CxsWjuDucofamPnQMNXKD+YqsWWBpKlKIO3nwtxxuUYTiEj1OBKWjz+k IDHA== X-Gm-Message-State: AOAM5302Ki622taNQeDQx172veBrLTmlIzWfrw2A50UyqT0nhurWahuJ zzZ8t2/Z/CZKsiTKxc3j0ncpCTCkVlQ0uoHou6DhKA== X-Received: by 2002:aa7:d7da:0:b0:40f:f16f:dc25 with SMTP id e26-20020aa7d7da000000b0040ff16fdc25mr24119297eds.17.1646143549264; Tue, 01 Mar 2022 06:05:49 -0800 (PST) MIME-Version: 1.0 References: <20211028140009.23331-1-etienne.carriere@linaro.org> <58a0e791-9573-99c2-0cc5-3920a1048113@pengutronix.de> In-Reply-To: <58a0e791-9573-99c2-0cc5-3920a1048113@pengutronix.de> From: Etienne Carriere Date: Tue, 1 Mar 2022 15:05:37 +0100 Message-ID: Subject: Re: [PATCH v8 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI To: Ahmad Fatoum Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla , Cristian Marussi , Vincent Guittot , devicetree@vger.kernel.org, Rob Herring , Pengutronix Kernel Team Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Ahmad, On Mon, 28 Feb 2022 at 17:01, Ahmad Fatoum wrote: > > Hello Etienne, > > On 28.10.21 16:00, Etienne Carriere wrote: > > 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". > > I just found this thread via the compatible in the STM32MP131 patch set: > https://lore.kernel.org/all/20220225133137.813919-1-gabriel.fernandez@foss.st.com/ > > Linux doesn't care whether PSCI is provided by TF-A, OP-TEE or something > else, so there is just the arm,psci* compatible. > > What's different about SCMI that this is not possible? Why couldn't the > existing binding and driver be used to communicate with OP-TEE as secure > monitor as well? Compatible "linaro,scmi-optee" denote a alternate SCMI transport to those already in v5.16. "arm,psci" defines a mailbox + shmem interface. "arm,psci it uses an optee service as in service > > Cheers, > Ahmad > > > > > 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>; > > + }; > > }; > > }; > > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |