Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7020702rdb; Fri, 15 Dec 2023 15:32:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IENa2SSG4KO+HgzG87sjMgUsK+UxHnuP8eUzISYypS4CsYHuPH+B6LgDjC31eAqqgYrDjdf X-Received: by 2002:a05:6e02:158c:b0:35f:575f:9f9c with SMTP id m12-20020a056e02158c00b0035f575f9f9cmr9810128ilu.110.1702683151209; Fri, 15 Dec 2023 15:32:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702683151; cv=none; d=google.com; s=arc-20160816; b=yXumVDMd31TH+cGKANGNOIR2vurJT8ZGMERyq/qSThS6ST743w6KZ8U7eJuXwLVq12 YjwzlQcOl3bVkxv6cM0z58FqTmxnrmv9aqqI2lzvy4s3sMZ9WKMU8wFzazBXFBuHpZ7R b43Z+Fdl7ojKIgE7CVKjwW4dyWXIgUnfSeSYy5SwrlhhLQYS3Qki4QhUZUUfXP7tvKIN O/CqZeU2B0tYUVd9M1b7EiG392wV1eGFU8+qvHpHDAP5ZqSPfSekE2uoI3XljoCuzJKt vctzPhld88co3tuH0D+P3hixE3pktKNrkEzSyEknKbpoO8mRuD5bvDiIUvlTz7jHs5VS sjdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=ElzvIEehOe2/hH4JuDtY9mqYy+h20zjv7jvoQyP7RQU=; fh=WGhP14j+nxzuj3a03+WyMcd2ONNxHx8RLX4XTgxwcZQ=; b=CJ9vosd/ygapWEL7mV+5WFi7gk6mshIiaCLGJr6e7VOs4JQZfSNTFbmnn6EuFcDWq2 f/uOxI9h5LBfSUS6GugZGuEIF2J19xYNiW1slyZ7sp7k1q5I3Yjrg5VVVelH7GA+rl85 +26C1Uo5cxnmjp1gYFvYKSWpUE8oI94wSqTRYIXGRqkQj2q9xpITB98k7g6EE+Dx1gpo PNOTFsFOEZX/4hEBLkf8EONI263e41t5FGbNwtu6Pk8uFNNnoXGSHh/d3Spnw7dsyIvG gS54ShQzV3CojXEF/3lieGVu/B8maD17sWuBNYEK6+T+3GoOBaeZ57m1MeSFVm8++MHD OlxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=gwz+pYhN; spf=pass (google.com: domain of linux-kernel+bounces-1825-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1825-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 194-20020a6300cb000000b005bddb7249e0si13516620pga.313.2023.12.15.15.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 15:32:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1825-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=gwz+pYhN; spf=pass (google.com: domain of linux-kernel+bounces-1825-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1825-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 75110B23CD1 for ; Fri, 15 Dec 2023 23:32:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0A522C699; Fri, 15 Dec 2023 23:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ixit.cz header.i=@ixit.cz header.b="gwz+pYhN" X-Original-To: linux-kernel@vger.kernel.org Received: from ixit.cz (ip-89-177-23-149.bb.vodafone.cz [89.177.23.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4685048CD9; Fri, 15 Dec 2023 23:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ixit.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ixit.cz Received: from [10.0.0.200] (unknown [10.0.0.1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id 3FF25162D3F; Sat, 16 Dec 2023 00:32:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1702683131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ElzvIEehOe2/hH4JuDtY9mqYy+h20zjv7jvoQyP7RQU=; b=gwz+pYhNktEttX2XjSBSMTTCBsrqsRpYhSajNabzebjQRn3h7XM3Q4ukBvL+RvgZKp7moZ DhVuhUmk/nlzv2iuBsDg9Jm/X3FsXVsMSv/IJDCAUHZMYrbx3uSTAxJTj0u9nXfJXCLpy/ fJMZ8QAGzD6TILV1UHZ7uv5jNm+CRSM= Message-ID: <7416d373-15c0-44d6-9008-d5d093ba8752@ixit.cz> Date: Sat, 16 Dec 2023 00:32:11 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH v3] dt-bindings: iommu: Convert msm,iommu-v0 to yaml To: Rob Herring Cc: Joerg Roedel , Will Deacon , Andy Gross , Bjorn Andersson , ~okias/devicetree@lists.sr.ht, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20220108184143.69479-1-david@ixit.cz> Content-Language: en-US From: David Heidelberg Autocrypt: addr=david@ixit.cz; keydata= xsFNBF5v1x4BEADS3EddwsNsvVAI1XF8uQKbdYPY/GhjaSLziwVnbwv5BGwqB1tfXoHnccoA 9kTgKAbiXG/CiZFhD6l4WCIskQDKzyQN3JhCUIxh16Xyw0lECI7iqoW9LmMoN1dNKcUmCO9g lZxQaOl+1bY/7ttd7DapLh9rmBXJ2lKiMEaIpUwb/Nw0d7Enp4Jy2TpkhPywIpUn8CoJCv3/ 61qbvI9y5utB/UhfMAUXsaAgwEJyGPAqHlC0YZjaTwOu+YQUE3AFzhCbksq95CwDz4U4gdls dmv9tkATfu2OmzERZQ6vJTehK0Pu4l5KmCAzYg42I9Dy4E6b17x6NncKbcByQFOXMtG0qVUk F1yeeOQUHwu+8t3ZDMBUhCkRL/juuoqLmyDWKMc0hKNNeZ9BNXgB8fXkRLWEUfgDXsFyEkKp NxUy5bDRlivf6XfExnikk5kj9l2gGlNQwqROti/46bfbmlmc/a2GM4k8ZyalHNEAdwtXYSpP 8JJmlbQ7hNTLkc3HQLRsIocN5th/ur7pPMz1Beyp0gbE9GcOceqmdZQB80vJ01XDyCAihf6l AMnzwpXZsjqIqH9r7T7tM6tVEVbPSwPt4eZYXSoJijEBC/43TBbmxDX+5+3txRaSCRQrG9dY k3mMGM3xJLCps2KnaqMcgUnvb1KdTgEFU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gtklyJBc64JK2vgB6xJz9Zc4WoNnifc8QjyhsQ7K0UI9jykBXrb1ZZO DYlcrAqh9Sx4vNTmdi6pJWSsrhDtfmDIw81GIW5pc0QpZPqGeKMi5xEU8se5fQ21DuE5LRKF Zd4Uq64igWvLAgHIcJHgNbc5BruuZm9p1+S5SfQGfnOYxJM1PkY/E32H52iV/Babj30= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Thank you, sent V4. David On 12/01/2022 03:08, Rob Herring wrote: > On Sat, Jan 08, 2022 at 07:41:42PM +0100, David Heidelberg wrote: >> Convert Qualcomm IOMMU v0 implementation to yaml format. >> >> Signed-off-by: David Heidelberg >> --- >> v2: >> - fix wrong path in binding $id >> - comment qcom,mdp4 node example (we don't want to validate it yet) >> >> v3: >> - I kept the name as -v0, since we have other binding -v1 and it look >> good, I can change thou in v4 if requested. > The preference is to use compatible strings for filenames. There's > little reason not to do that here. > >> - dropped non-existent smmu_clk part (and adjusted example, which was >> using it) >> - dropped iommu description >> - moved iommu-cells description to the property #iommu-cells >> Signed-off-by: David Heidelberg >> --- >> .../bindings/iommu/msm,iommu-v0.txt | 64 ------------- >> .../bindings/iommu/qcom,iommu-v0.yaml | 91 +++++++++++++++++++ >> 2 files changed, 91 insertions(+), 64 deletions(-) >> delete mode 100644 Documentation/devicetree/bindings/iommu/msm,iommu-v0.txt >> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu-v0.yaml >> >> diff --git a/Documentation/devicetree/bindings/iommu/msm,iommu-v0.txt b/Documentation/devicetree/bindings/iommu/msm,iommu-v0.txt >> deleted file mode 100644 >> index 20236385f26e..000000000000 >> --- a/Documentation/devicetree/bindings/iommu/msm,iommu-v0.txt >> +++ /dev/null >> @@ -1,64 +0,0 @@ >> -* QCOM IOMMU >> - >> -The MSM IOMMU is an implementation compatible with the ARM VMSA short >> -descriptor page tables. It provides address translation for bus masters outside >> -of the CPU, each connected to the IOMMU through a port called micro-TLB. >> - >> -Required Properties: >> - >> - - compatible: Must contain "qcom,apq8064-iommu". >> - - reg: Base address and size of the IOMMU registers. >> - - interrupts: Specifiers for the MMU fault interrupts. For instances that >> - support secure mode two interrupts must be specified, for non-secure and >> - secure mode, in that order. For instances that don't support secure mode a >> - single interrupt must be specified. >> - - #iommu-cells: The number of cells needed to specify the stream id. This >> - is always 1. >> - - qcom,ncb: The total number of context banks in the IOMMU. >> - - clocks : List of clocks to be used during SMMU register access. See >> - Documentation/devicetree/bindings/clock/clock-bindings.txt >> - for information about the format. For each clock specified >> - here, there must be a corresponding entry in clock-names >> - (see below). >> - >> - - clock-names : List of clock names corresponding to the clocks specified in >> - the "clocks" property (above). >> - Should be "smmu_pclk" for specifying the interface clock >> - required for iommu's register accesses. >> - Should be "smmu_clk" for specifying the functional clock >> - required by iommu for bus accesses. >> - >> -Each bus master connected to an IOMMU must reference the IOMMU in its device >> -node with the following property: >> - >> - - iommus: A reference to the IOMMU in multiple cells. The first cell is a >> - phandle to the IOMMU and the second cell is the stream id. >> - A single master device can be connected to more than one iommu >> - and multiple contexts in each of the iommu. So multiple entries >> - are required to list all the iommus and the stream ids that the >> - master is connected to. >> - >> -Example: mdp iommu and its bus master >> - >> - mdp_port0: iommu@7500000 { >> - compatible = "qcom,apq8064-iommu"; >> - #iommu-cells = <1>; >> - clock-names = >> - "smmu_pclk", >> - "smmu_clk"; >> - clocks = >> - <&mmcc SMMU_AHB_CLK>, >> - <&mmcc MDP_AXI_CLK>; >> - reg = <0x07500000 0x100000>; >> - interrupts = >> - , >> - ; >> - qcom,ncb = <2>; >> - }; >> - >> - mdp: qcom,mdp@5100000 { >> - compatible = "qcom,mdp"; >> - ... >> - iommus = <&mdp_port0 0 >> - &mdp_port0 2>; >> - }; >> diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu-v0.yaml b/Documentation/devicetree/bindings/iommu/qcom,iommu-v0.yaml >> new file mode 100644 >> index 000000000000..a506e8ad8902 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu-v0.yaml >> @@ -0,0 +1,91 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> + >> +$id: "http://devicetree.org/schemas/iommu/qcom,iommu-v0.yaml#" >> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >> + >> +title: Qualcomm IOMMU for APQ8064 >> + >> +maintainers: >> + - Will Deacon >> + >> +description: > >> + The MSM IOMMU is an implementation compatible with the ARM VMSA short >> + descriptor page tables. It provides address translation for bus masters >> + outside of the CPU, each connected to the IOMMU through a port called micro-TLB. >> + >> +properties: >> + compatible: >> + const: qcom,apq8064-iommu >> + >> + clocks: >> + items: >> + - description: interface clock for register accesses >> + - description: functional clock for bus accesses >> + >> + clock-names: >> + items: >> + - const: smmu_pclk >> + - const: iommu_clk >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + description: Specifiers for the MMU fault interrupts. >> + minItems: 1 >> + items: >> + - description: non-secure mode interrupt >> + - description: secure mode interrupt (for instances which supports it) >> + >> + "#iommu-cells": >> + const: 1 >> + description: | >> + The first cell is a phandle to the IOMMU and >> + the second cell is the stream id. >> + A single master device can be connected to more than one iommu >> + and multiple contexts in each of the iommu. >> + So multiple entries are required to list all the iommus and >> + the stream ids that the master is connected to. >> + >> + qcom,ncb: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: The total number of context banks in the IOMMU. >> + >> +required: >> + - clocks >> + - clock-names >> + - reg >> + - interrupts >> + - qcom,ncb >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + >> + mdp_port0: iommu@7500000 { >> + compatible = "qcom,apq8064-iommu"; >> + #iommu-cells = <1>; >> + clock-names = >> + "smmu_pclk", >> + "iommu_clk"; >> + clocks = >> + <&clk SMMU_AHB_CLK>, >> + <&clk MDP_AXI_CLK>; >> + reg = <0x07500000 0x100000>; >> + interrupts = >> + <0 63 0>, >> + <0 64 0>; >> + qcom,ncb = <2>; >> + }; >> + >> + /* mdp: mdp@5100000 { >> + compatible = "qcom,mdp4"; >> + ... >> + >> + iommus = <&mdp_port0 0 >> + &mdp_port0 2>; >> + };*/ >> -- >> 2.34.1 >> >> -- David Heidelberg