Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1264316pxb; Thu, 4 Mar 2021 07:20:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3grt5J5by+TuJbvIl52bI5iuGl7ExE21w/t0kocghmer/Kfb0rgfq5NmLJvEM8+powyWn X-Received: by 2002:a17:907:36e:: with SMTP id rs14mr4713322ejb.42.1614871211901; Thu, 04 Mar 2021 07:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614871211; cv=none; d=google.com; s=arc-20160816; b=j0E4Yrj4P4G50QoaKgHSa0z06WOXMFmY6+e6RB3cPvbuEDUY8So1h6lFefjGW17w6M vxBW6pz4CHf/+lGLO1SoUpp8THOnQCnpl/EjFykc44gcoBB1peNG0ntJ0chssTyeERak zgl4zpW+C3Bh5VxRTsY40nWPRWEm4fINGLBHso9sm3fplNyaaRdUB0Tchkoq4fNXr63J +GwVOZ/igm/qCBpR5WulzVrlNAqe/iJUIsuUtC8aD/3QBzFgFu9RGZgXreDOV3tIsxS0 6Q6YWniMPo8tP3MSO8uJtVpekp+46dc8IwbzRGHF/sj4bWRY+nf4P79qAcm2SrKB8uXU c4sA== 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=e4pM5UzwJCaSA1xipkCauFzjQ9OrQvbh3Krxwlg6A34=; b=gqFdezBs1Um/ybTuj8qG5rwMzDVOHMqWu92EWkBjC5nENMUsfzdVBm96BRvJxzaAy8 wnlnHFd/5HoDYiTib2bMa1ii+EdvLs01fjNvtTe00vQetGm6ww6H5bbogTX7+9CDCvUg yw1VUTgzr/vAlU6OD8Irwyi+K6SyadH/gVI3YDZzUruPVa2/RS/aJb0vv3XK04QWvWmY wjF1wWpunG2NokNEm7CKFl+JN1NiQAjeX7FXpccX1k89i1Os7dfh3GU2PJaMyBmziZVA by9A879hnb2YWFuQwRBJXl8nXMvuBkski0dVkiCukuETz+e0jUEJxz4reCU6aAUHjrIL ANzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Td5CtP2J; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 24si1304861edv.533.2021.03.04.07.19.45; Thu, 04 Mar 2021 07:20:11 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Td5CtP2J; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236090AbhCDHNd (ORCPT + 99 others); Thu, 4 Mar 2021 02:13:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236109AbhCDHNJ (ORCPT ); Thu, 4 Mar 2021 02:13:09 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49447C061574; Wed, 3 Mar 2021 23:12:29 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id m7so232445wmq.0; Wed, 03 Mar 2021 23:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e4pM5UzwJCaSA1xipkCauFzjQ9OrQvbh3Krxwlg6A34=; b=Td5CtP2JXZs3/z+onUhusDaS/j80xOxhLLTBHnmC2rlv7gQbVZaoasHlCAihJpjy3f 1pn43gUjayYEoX2t50IEoWfDWvSM8yNa1lJKXDRVn3A9XIKqwS21w2G9f/XVkvcBfvB1 sgcrIpMNzLP+UKxP4w3TkoUg5MrBmbdI03BIqawDkqvjhyTYLihP9ZOIH9sYUX38PwqG 7YucHosRHqBc+uLsycdLK9PkJSoHCErCYTvEzxvfZR/uBEApK+X5iqsI44QqHz6fm0nF d/UsWBaKW8wkdfERPQCu0ifMUC8uvblyosKkaNHT4o4Ul3YSuBGxDQYuQtLPIZzXY7Gc 8K5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e4pM5UzwJCaSA1xipkCauFzjQ9OrQvbh3Krxwlg6A34=; b=VCRMfJ7F9cb1ELV/DvqZ/3OGMwJ/P7qJoDSCmUlrmTOq7F3yvaFRRRyFwdbMWFxQuX 92N4stavyel2hoDkgT0SlS60mueB1rp45BYg6Bq3ltgtXTEyfga8TqJSXrdH8675udlr DObcNQqgi+7iC8i04TE61jb7b2bsadFoVuud65uLFwUcwoVo/tBR8NX2EWnjqjBgLfYp JXWuxBxJ2MgFDbat7F6PJoUf/97LaJjhYieSCkkuKfSHYWn5QAQjVY3XSCNzkFggNHZj o3OwYracqtDG+qDn0TYz1FTv5CRC0tL7jB5lZPkHr7KYGQ2X6wrrkXroRBp8uRVprioE zZPQ== X-Gm-Message-State: AOAM533oJzxL8AkPPbRziFGeOGhvtQ66QCH6xli3jGaDvvY7h/mpYeg3 IZpZIN/0stTNBWkfbjfvGondZXPzhxFIJGzqCk0c86Mf X-Received: by 2002:a1c:7402:: with SMTP id p2mr2286514wmc.43.1614841948026; Wed, 03 Mar 2021 23:12:28 -0800 (PST) MIME-Version: 1.0 References: <20210203090727.789939-1-zhang.lyra@gmail.com> <20210203090727.789939-2-zhang.lyra@gmail.com> <20210204232549.GA1305874@robh.at.kernel.org> <4b88182c-f3fb-20d5-de6f-7fd6eddbcba7@arm.com> In-Reply-To: <4b88182c-f3fb-20d5-de6f-7fd6eddbcba7@arm.com> From: Chunyan Zhang Date: Thu, 4 Mar 2021 15:11:51 +0800 Message-ID: Subject: Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu To: Robin Murphy Cc: Rob Herring , Joerg Roedel , Linux IOMMU , DTML , Baolin Wang , Linux Kernel Mailing List , Orson Zhai , Sheng Xu , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robin, On Tue, 16 Feb 2021 at 23:10, Robin Murphy wrote: > > >>> > >>> 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" > > OK, so apparently the hardware is not quite as trivial as my initial > impression, and you should have interrupts as well. I've checked with my colleagues for this issue. And like I explained before, one sprd IOMMU serves one master device only, so interrupts are handled by master devices rather than IOMMUs. Chunyan