Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1590798pxb; Thu, 4 Feb 2021 17:51:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF48t7Vk3lM61MdNOwZ1X1CXbVzf7+m0eSiekPoiE8hlVvP7CZpOpVfW/NIZPZlcBMeP6o X-Received: by 2002:a17:906:5653:: with SMTP id v19mr1844851ejr.481.1612489913110; Thu, 04 Feb 2021 17:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612489913; cv=none; d=google.com; s=arc-20160816; b=U0V8xJBjWvrfJ9quZyu+kfqs4m5uzdN0oFq2LL4lkO+7XH2rsVmU1suc0ACrhCsJAp H7BSgnyanYJDCZwYHAFWeuDdVLxEQRTO3PP/j6VrWaqdh9Go4VSagFWmtsqQMC1TsRJ6 0YPh/yYU0GhyatCgF2p1TUVVw2icJLijxgOrc4ce2HjgOQHzZ3C8kjH/OGipTikU0fWQ 0VUlBHhNYyGSa3P2Pao5kORHHaPT0eYhWP5Wr9ntn482qBS4OQMaHmOvV6wpPUkPtNYw PfjNBWs7Ap+6YX+FECuA7ZCeW569pFwxJZzsvk0hVzR4MhMpsWJvxfgUMzxa+pi54gmn 7daA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=v2nkVg18wGZEoa8kUGTJqurwpIhtPaAbXmqRIWrxCUE=; b=zA6Hd7m4VmHefBWOUmMicxWTkd9SnJf6mBinR2omXbHwQld0r430q1Z5XPJBrTZfad n8KH89GcZXueuOiKl5LM2UsXuU477dg/SO3KdFYhWQcaMHM0EdtBsVXwiHe5G9i/0YyD InGGijSYAgQzfmRVL+VF7hu1OBsFjAk2pjfBRDWM3tgJDHEDd7rR0jDwqd6+SuTbi8gB FnCBr46m1Fmlu7DDOWt7EtOn3og6Z1KQAOKbSu4Bnxpr27Mf1AuBhMGaTy76uL2XGp8P D+k8xZO6F4LqS7AJIH2IId0BkSH8yTPGWbhJvtCr/ZQSl0I45b5DML0G8MwjX88Z7D0q dX4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si3965257ejw.219.2021.02.04.17.51.29; Thu, 04 Feb 2021 17:51:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbhBDX0e (ORCPT + 99 others); Thu, 4 Feb 2021 18:26:34 -0500 Received: from mail-ot1-f53.google.com ([209.85.210.53]:40839 "EHLO mail-ot1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbhBDX0c (ORCPT ); Thu, 4 Feb 2021 18:26:32 -0500 Received: by mail-ot1-f53.google.com with SMTP id i20so5167280otl.7; Thu, 04 Feb 2021 15:26:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=v2nkVg18wGZEoa8kUGTJqurwpIhtPaAbXmqRIWrxCUE=; b=V3eEP9JJEfj3ydO7NsU48zQ2MigAmNAVma2aJgjA71DDBFYF7zzvc5AKLFoGqLpIRR Xlcfc67SKVyyNZg1dEXfKL1m+7eaGlbZy1sULl5xEgipLM95FUk3KYTvzP3fjHXM4mNf hM3+daxg01mw8DkgwDyNMVaKChKseNghCQWW4VgCmLt9O6AFXeDQMq6MmkmhJOvBECmK nQwri9/givimkVmTsXoGPikYyL/w4WH6tJCBagOpiznb254Y3QQTlrNuAMe4SeEy91Ii 7u1mrhWsqgZd6trtfMIhziz5mz1poR6ZvXl8Xn70f+oaFBBQHEzYy1WbRDBcEO2A6yRJ OnrQ== X-Gm-Message-State: AOAM530Br0tibHWCxFAzz9CSddeM/VCWY54ZXL8RLELXWsVvkF/G8Mf2 qLx7O6zgqNO09wBD+k8DPA== X-Received: by 2002:a05:6830:1f4e:: with SMTP id u14mr1333850oth.65.1612481151222; Thu, 04 Feb 2021 15:25:51 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id w10sm1445771oih.8.2021.02.04.15.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 15:25:50 -0800 (PST) Received: (nullmailer pid 1311195 invoked by uid 1000); Thu, 04 Feb 2021 23:25:49 -0000 Date: Thu, 4 Feb 2021 17:25:49 -0600 From: Rob Herring To: Chunyan Zhang Cc: Robin Murphy , Joerg Roedel , iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, Baolin Wang , linux-kernel@vger.kernel.org, Orson Zhai , Sheng Xu , Chunyan Zhang Subject: Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu Message-ID: <20210204232549.GA1305874@robh.at.kernel.org> References: <20210203090727.789939-1-zhang.lyra@gmail.com> <20210203090727.789939-2-zhang.lyra@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203090727.789939-2-zhang.lyra@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 05:07:26PM +0800, Chunyan Zhang wrote: > From: Chunyan Zhang > > This iommu module can be used by Unisoc's multimedia devices, such as > display, Image codec(jpeg) and a few signal processors, including > VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. > > Signed-off-by: Chunyan Zhang > --- > .../devicetree/bindings/iommu/sprd,iommu.yaml | 72 +++++++++++++++++++ > 1 file changed, 72 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iommu/sprd,iommu.yaml > > diff --git a/Documentation/devicetree/bindings/iommu/sprd,iommu.yaml b/Documentation/devicetree/bindings/iommu/sprd,iommu.yaml > new file mode 100644 > index 000000000000..4fc99e81fa66 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iommu/sprd,iommu.yaml > @@ -0,0 +1,72 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright 2020 Unisoc Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iommu/sprd,iommu.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Unisoc IOMMU and Multi-media MMU > + > +maintainers: > + - Chunyan Zhang > + > +properties: > + compatible: > + enum: > + - sprd,iommu-v1 > + > + "#iommu-cells": > + const: 0 > + description: > + Unisoc IOMMUs are all single-master IOMMU devices, therefore no > + additional information needs to associate with its master device. > + Please refer to the generic bindings document for more details, > + Documentation/devicetree/bindings/iommu/iommu.txt > + > + reg: > + maxItems: 1 > + description: > + Not required if 'sprd,iommu-regs' is defined. > + > + clocks: > + description: > + Reference to a gate clock phandle, since access to some of IOMMUs are > + controlled by gate clock, but this is not required. > + > + sprd,iommu-regs: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: > + Reference to a syscon phandle plus 1 cell, the syscon defines the > + register range used by the iommu and the media device, the cell > + defines the offset for iommu registers. Since iommu module shares > + the same register range with the media device which uses it. > + > +required: > + - compatible > + - "#iommu-cells" > + > +oneOf: > + - required: > + - reg > + - required: > + - sprd,iommu-regs > + > +additionalProperties: false > + > +examples: > + - | > + iommu_disp: iommu-disp { > + compatible = "sprd,iommu-v1"; > + sprd,iommu-regs = <&dpu_regs 0x800>; If the IOMMU is contained within another device, then it should just be a child node of that device. Or just make 'dpu_regs' an IOMMU provider (i.e. just add #iommu-cells to it). > + #iommu-cells = <0>; > + }; > + > + - | > + iommu_jpg: iommu-jpg { > + compatible = "sprd,iommu-v1"; > + sprd,iommu-regs = <&jpg_regs 0x300>; > + #iommu-cells = <0>; > + clocks = <&mm_gate 1>; > + }; > + > +... > -- > 2.25.1 >