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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, URIBL_RED 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 B1358C433B4 for ; Thu, 6 May 2021 20:35:26 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 3CC2C6112F for ; Thu, 6 May 2021 20:35:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CC2C6112F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DD03241841; Thu, 6 May 2021 20:35:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ufdTf8fCMmVl; Thu, 6 May 2021 20:35:24 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTP id 5DF274145E; Thu, 6 May 2021 20:35:24 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3AFC9C000E; Thu, 6 May 2021 20:35:24 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id ACAFBC0001 for ; Thu, 6 May 2021 20:35:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8D3DD4023C for ; Thu, 6 May 2021 20:35:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Cac1dfUcT2u for ; Thu, 6 May 2021 20:35:22 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) by smtp2.osuosl.org (Postfix) with ESMTPS id 8B33C400C7 for ; Thu, 6 May 2021 20:35:22 +0000 (UTC) Received: by mail-oo1-f41.google.com with SMTP id s24-20020a4aead80000b02901fec6deb28aso1522948ooh.11 for ; Thu, 06 May 2021 13:35:22 -0700 (PDT) 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=onrgqNhsc6VTUYv6U1qfk40eTxmzLwGljQWarb0zJmY=; b=NC9M+Bh+o695xqocqeWVaKReWgi1OkoIrATvnmZdTK3eVJ0O6+ZeeCtVgFJoY7S13x kjCOzSgVQ6YKY+WqibYUas+wPoXGCxlk35OjDfFTCaSfYm7GVhee/AdVCS5vtbkZKnCv 6MPfYRXYQOYAKSSI9864rrCfCgs8hsl98LKvbzx5b1Si9VSCvocOtlfYwFZlx5rFCGRZ EMSDOLLVoW4VD1Cm9pKmnjrbIbfI70NgrMrtIw8Z/GxtlCuHvkfuuKeHQaAgVpHfqX8Z 0b8BMkPoMZSDhbsEg4ynlekajQX26dBUNbNcdz9Dl3uXjunFE9Syc88G4G0tw29UFaCQ VO4Q== X-Gm-Message-State: AOAM532f6DdUdJhT1ty0qlOjLrH0WO1D9dB0VtrhOjLNNCpKM11MrxNt dF+I3iQWoWDGtaQcieXFlA== X-Google-Smtp-Source: ABdhPJxC+96lwNJ6hOaKSxCJ2EIvAf6AIHpT5UmpFzFPB2Ee5lOKBHu+ZStfrF/jlLvXdGUVCBj/FQ== X-Received: by 2002:a4a:dc84:: with SMTP id g4mr5012064oou.24.1620333321458; Thu, 06 May 2021 13:35:21 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id h59sm787947otb.29.2021.05.06.13.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:35:20 -0700 (PDT) Received: (nullmailer pid 758912 invoked by uid 1000); Thu, 06 May 2021 20:35:19 -0000 Date: Thu, 6 May 2021 15:35:19 -0500 From: Rob Herring To: Benjamin Gaignard Subject: Re: [PATCH v3 1/4] dt-bindings: iommu: rockchip: Convert IOMMU to DT schema Message-ID: <20210506203519.GA754007@robh.at.kernel.org> References: <20210504084124.131884-1-benjamin.gaignard@collabora.com> <20210504084124.131884-2-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210504084124.131884-2-benjamin.gaignard@collabora.com> Cc: devicetree@vger.kernel.org, heiko@sntech.de, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, kernel@collabora.com, will@kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, May 04, 2021 at 10:41:21AM +0200, Benjamin Gaignard wrote: > Convert Rockchip IOMMU to DT schema > > Signed-off-by: Benjamin Gaignard > --- > version 2: > - Change maintainer > - Change reg maxItems > - Change interrupt maxItems > > .../bindings/iommu/rockchip,iommu.txt | 38 --------- > .../bindings/iommu/rockchip,iommu.yaml | 79 +++++++++++++++++++ > 2 files changed, 79 insertions(+), 38 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/iommu/rockchip,iommu.txt > create mode 100644 Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml > > diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt b/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt > deleted file mode 100644 > index 6ecefea1c6f9..000000000000 > --- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt > +++ /dev/null > @@ -1,38 +0,0 @@ > -Rockchip IOMMU > -============== > - > -A Rockchip DRM iommu translates io virtual addresses to physical addresses for > -its master device. Each slave device is bound to a single master device, and > -shares its clocks, power domain and irq. > - > -Required properties: > -- compatible : Should be "rockchip,iommu" > -- reg : Address space for the configuration registers > -- interrupts : Interrupt specifier for the IOMMU instance > -- interrupt-names : Interrupt name for the IOMMU instance > -- #iommu-cells : Should be <0>. This indicates the iommu is a > - "single-master" device, and needs no additional information > - to associate with its master device. See: > - Documentation/devicetree/bindings/iommu/iommu.txt > -- clocks : A list of clocks required for the IOMMU to be accessible by > - the host CPU. > -- clock-names : Should contain the following: > - "iface" - Main peripheral bus clock (PCLK/HCL) (required) > - "aclk" - AXI bus clock (required) > - > -Optional properties: > -- rockchip,disable-mmu-reset : Don't use the mmu reset operation. > - Some mmu instances may produce unexpected results > - when the reset operation is used. > - > -Example: > - > - vopl_mmu: iommu@ff940300 { > - compatible = "rockchip,iommu"; > - reg = <0xff940300 0x100>; > - interrupts = ; > - interrupt-names = "vopl_mmu"; > - clocks = <&cru ACLK_VOP1>, <&cru HCLK_VOP1>; > - clock-names = "aclk", "iface"; > - #iommu-cells = <0>; > - }; > diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml > new file mode 100644 > index 000000000000..0db208cf724a > --- /dev/null > +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml > @@ -0,0 +1,79 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iommu/rockchip,iommu.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip IOMMU > + > +maintainers: > + - Heiko Stuebner > + > +description: |+ > + A Rockchip DRM iommu translates io virtual addresses to physical addresses for > + its master device. Each slave device is bound to a single master device and > + shares its clocks, power domain and irq. > + > + For information on assigning IOMMU controller to its peripheral devices, > + see generic IOMMU bindings. > + > +properties: > + compatible: > + const: rockchip,iommu > + > + reg: > + minItems: 1 > + maxItems: 2 What's the 2nd entry? If there's only 1 entry, then you don't have to describe what it is. If more than 1, then each entry has to be defined. > + > + interrupts: > + minItems: 1 > + maxItems: 2 Same here, though if interrupt-names defines them, that's good enough. > + > + interrupt-names: > + minItems: 1 > + maxItems: 2 Here we need the values. > + > + clocks: > + items: > + - description: Core clock > + - description: Interface clock > + > + clock-names: > + items: > + - const: aclk > + - const: iface > + > + "#iommu-cells": > + const: 0 > + > + rockchip,disable-mmu-reset: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + Do not use the mmu reset operation. > + Some mmu instances may produce unexpected results > + when the reset operation is used. > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - "#iommu-cells" > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + vopl_mmu: iommu@ff940300 { > + compatible = "rockchip,iommu"; > + reg = <0xff940300 0x100>; > + interrupts = ; > + interrupt-names = "vopl_mmu"; > + clocks = <&cru ACLK_VOP1>, <&cru HCLK_VOP1>; > + clock-names = "aclk", "iface"; > + #iommu-cells = <0>; > + }; > -- > 2.25.1 > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu