From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70A92C433E7 for ; Sat, 29 Aug 2020 17:09:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 516A420757 for ; Sat, 29 Aug 2020 17:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728470AbgH2RJf (ORCPT ); Sat, 29 Aug 2020 13:09:35 -0400 Received: from foss.arm.com ([217.140.110.172]:45040 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728412AbgH2RJf (ORCPT ); Sat, 29 Aug 2020 13:09:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56C2E113E; Sat, 29 Aug 2020 10:09:34 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 57A6D3F71F; Sat, 29 Aug 2020 10:09:33 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Cc: Sudeep Holla , kernel-team@android.com, Will Deacon , tsoni@quicinc.com, pratikp@quicinc.com Subject: [PATCH 2/9] dt-bindings: Arm: Extend FF-A binding to support in-kernel usage of partitions Date: Sat, 29 Aug 2020 18:09:16 +0100 Message-Id: <20200829170923.29949-3-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829170923.29949-1-sudeep.holla@arm.com> References: <20200829170923.29949-1-sudeep.holla@arm.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Since the FF-A v1.0 specification doesn't list the UUID of all the partitions in the discovery API, we need to specify the UUID of the partitions that need to be accessed by drivers within the kernel. This extends the binding to provide the list of partitions that kernel drivers may need to access and are not part of the partitions managed by the hypervisor. Signed-off-by: Sudeep Holla --- .../devicetree/bindings/arm/arm,ffa.yaml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) Hi, I am sure this is incomplete, but I couldn't figure out how to make all the child properties optional if it is not managed by hypervisor. Moreover, if we don't like the idea of adding UUID of all the partitions that in-kernel drivers may need to communicate to, one alternative I can think of is to allow the creation of FFA device from the FFA driver itself. Regards, Sudeep diff --git a/Documentation/devicetree/bindings/arm/arm,ffa.yaml b/Documentation/devicetree/bindings/arm/arm,ffa.yaml index 668a5995fcab..d5c6d71c99de 100644 --- a/Documentation/devicetree/bindings/arm/arm,ffa.yaml +++ b/Documentation/devicetree/bindings/arm/arm,ffa.yaml @@ -23,11 +23,12 @@ description: | properties: $nodename: - const: ffa_hyp + pattern: "^(ffa|ffa_hyp)$" compatible: oneOf: - const: arm,ffa-1.0-hypervisor + - const: arm,ffa-1.0 memory-region: $ref: '/schemas/types.yaml#/definitions/phandle' @@ -83,10 +84,26 @@ description: | [3] Documentation/devicetree/bindings/reserved-memory/arm,ffa-memory.yaml +required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + const: arm,ffa-1.0-hypervisor + then: + required: + - memory-region + additionalProperties: false examples: - - | + - |+ + + // Case 1: Partitions managed by hypervisor + ffa_hyp { compatible = "arm,ffa-1.0-hypervisor"; memory-region = <&ffa_hyp_reserved>; @@ -100,3 +117,16 @@ additionalProperties: false memory-region = <&ffa_reserved0 &ffa_reserved1>; }; }; + + - |+ + + // Case 2: Partitions needing in-kernel usage + + ffa { + compatible = "arm,ffa-1.0"; + + ffa_partition1 { + compatible = "arm,ffa-1.0-partition"; + uuid = "589fc454-4502-4e66-9347-97b61e27cf73"; + }; + }; -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A680BC433E2 for ; Sat, 29 Aug 2020 17:11:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6F13F20757 for ; Sat, 29 Aug 2020 17:11:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ve1VytUC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F13F20757 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eP2RD+Sd1cVGdP+YD+XGKizCatqDd8YgIdS0Qx7fZGE=; b=Ve1VytUCfGg8uH2sw05nC+vCgE mOVmmQXmWGkuJoin0PD8TcqBXdNR7cho3jIzjZ6K1xdGa0uwJWzPc1Dh08BjX9XVpRW4j2LujpAhu 7IMtrN04Wulk3U7qtoueErT5Lxdwubsdc8vaNgtcPxBj8gdab7tuzTpUmEmaMwgr+pmEcLWviQKZk GU+DdI6ViB+6+TgwVKCQ6d7GxqPWCDsyWGsdDj8ACjoF33m05DGO5M3mQtsvRBOxLDLsMJZDBlHcR sfSo2/JekCYe4S6SmxczPPnD9MEDOMN0v4nGqy5DdqoVlIbwqtWvAKlJwBTOJ9dukJRpuuQuahYxW G3eXTLeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kC4MP-0000XP-Vg; Sat, 29 Aug 2020 17:09:50 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kC4ME-0000TJ-LA for linux-arm-kernel@lists.infradead.org; Sat, 29 Aug 2020 17:09:40 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56C2E113E; Sat, 29 Aug 2020 10:09:34 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 57A6D3F71F; Sat, 29 Aug 2020 10:09:33 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 2/9] dt-bindings: Arm: Extend FF-A binding to support in-kernel usage of partitions Date: Sat, 29 Aug 2020 18:09:16 +0100 Message-Id: <20200829170923.29949-3-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829170923.29949-1-sudeep.holla@arm.com> References: <20200829170923.29949-1-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200829_130938_801606_22F61C57 X-CRM114-Status: GOOD ( 14.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , pratikp@quicinc.com, tsoni@quicinc.com, kernel-team@android.com, Sudeep Holla MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the FF-A v1.0 specification doesn't list the UUID of all the partitions in the discovery API, we need to specify the UUID of the partitions that need to be accessed by drivers within the kernel. This extends the binding to provide the list of partitions that kernel drivers may need to access and are not part of the partitions managed by the hypervisor. Signed-off-by: Sudeep Holla --- .../devicetree/bindings/arm/arm,ffa.yaml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) Hi, I am sure this is incomplete, but I couldn't figure out how to make all the child properties optional if it is not managed by hypervisor. Moreover, if we don't like the idea of adding UUID of all the partitions that in-kernel drivers may need to communicate to, one alternative I can think of is to allow the creation of FFA device from the FFA driver itself. Regards, Sudeep diff --git a/Documentation/devicetree/bindings/arm/arm,ffa.yaml b/Documentation/devicetree/bindings/arm/arm,ffa.yaml index 668a5995fcab..d5c6d71c99de 100644 --- a/Documentation/devicetree/bindings/arm/arm,ffa.yaml +++ b/Documentation/devicetree/bindings/arm/arm,ffa.yaml @@ -23,11 +23,12 @@ description: | properties: $nodename: - const: ffa_hyp + pattern: "^(ffa|ffa_hyp)$" compatible: oneOf: - const: arm,ffa-1.0-hypervisor + - const: arm,ffa-1.0 memory-region: $ref: '/schemas/types.yaml#/definitions/phandle' @@ -83,10 +84,26 @@ description: | [3] Documentation/devicetree/bindings/reserved-memory/arm,ffa-memory.yaml +required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + const: arm,ffa-1.0-hypervisor + then: + required: + - memory-region + additionalProperties: false examples: - - | + - |+ + + // Case 1: Partitions managed by hypervisor + ffa_hyp { compatible = "arm,ffa-1.0-hypervisor"; memory-region = <&ffa_hyp_reserved>; @@ -100,3 +117,16 @@ additionalProperties: false memory-region = <&ffa_reserved0 &ffa_reserved1>; }; }; + + - |+ + + // Case 2: Partitions needing in-kernel usage + + ffa { + compatible = "arm,ffa-1.0"; + + ffa_partition1 { + compatible = "arm,ffa-1.0-partition"; + uuid = "589fc454-4502-4e66-9347-97b61e27cf73"; + }; + }; -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel