Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp124255pxj; Fri, 7 May 2021 05:17:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoG6Hh3W8NOg+oCu/u2KT2U/dRccLnuNay+G3R4xU/+O/fcSsG2NoS33PKYWcJ3tynYmYN X-Received: by 2002:adf:ea06:: with SMTP id q6mr11708675wrm.34.1620389845153; Fri, 07 May 2021 05:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620389845; cv=none; d=google.com; s=arc-20160816; b=PZzJwDcQaKrC38Ytn7Q7Oaq6N3Oz8ls6nWHMpEbPIyyfAKlMp6xRYzcSw8EEgW9Bl/ Q6Mn3kNdcC7llVUeYaRyQ1DnJqLEWJDsB9a7Dt0BmHJFlkRdBfT14CtbZK6cXcUOnedd mU4osqIxkDmsw9F0fLm9MlmlSw7wgb4Tj7lOecU+e84ZC3QwX1HieX8KIXYlYR3/haXN TctnTsYHSTFMqXh62kWoZVS0QGLFg1anu66mwzH8HbALlIk4VEMOtIO8Eqqdx6NJ1xcr +pAPOXlwMAUPNPvUfl+59a9dEz0W4RxUvB1l50XSbNZ1ltK2OL9NRt7X0zbmQaBXn7mb FdxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=EmtFv8STZmOJXLu0Laebv98YJEvwJMn0zmRr8T9me5M=; b=TfYZ00h0twzofNvW1swsFbLyMGxYXeD0G/kdYdVTHiYKRp4phytZbOU7BHDSbr1wuo Za1ia3fKKEtJguSrBwlJupSN5isHjaZuMa4p1bf16khx6zbmG1LQnRaLCsx5RHDk7d7n mNkTdB0E5q2WZsRY1AXYCGsBkfBX2d1MRripFLH5x2kV2LhBkPAjloe09D6wBax66v57 v5f1zEoVeh5VCSyLJ1rY/P6fgTBQvJjTcLBGTm31dNV/4Fbn8q1KhkziLsVsqmgATgwp w/FINn8BoaluUqIHmUzbflF+dH5naJl3MEp7TZB4y3Q3XUh1DBkZC0U9Ymyo7d5J9qmf opcg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si4729216edx.287.2021.05.07.05.17.00; Fri, 07 May 2021 05:17:25 -0700 (PDT) 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236566AbhEGJDp (ORCPT + 99 others); Fri, 7 May 2021 05:03:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50386 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235607AbhEGJDn (ORCPT ); Fri, 7 May 2021 05:03:43 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: benjamin.gaignard) with ESMTPSA id A9B421F438AA From: Benjamin Gaignard To: joro@8bytes.org, will@kernel.org, robh+dt@kernel.org, heiko@sntech.de, xxm@rock-chips.com Cc: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v4 1/6] dt-bindings: iommu: rockchip: Convert IOMMU to DT schema Date: Fri, 7 May 2021 11:02:27 +0200 Message-Id: <20210507090232.233049-2-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210507090232.233049-1-benjamin.gaignard@collabora.com> References: <20210507090232.233049-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert Rockchip IOMMU to DT schema Signed-off-by: Benjamin Gaignard --- version 4: - Add descriptions for reg items - Add description for interrupts items - Remove useless interrupt-names proporties version 2: - Change maintainer - Change reg maxItems - Change interrupt maxItems .../bindings/iommu/rockchip,iommu.txt | 38 --------- .../bindings/iommu/rockchip,iommu.yaml | 80 +++++++++++++++++++ 2 files changed, 80 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..099fc2578b54 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml @@ -0,0 +1,80 @@ +# 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: + items: + - description: configuration registers for MMU instance 0 + - description: configuration registers for MMU instance 1 + minItems: 1 + maxItems: 2 + + interrupts: + items: + - description: interruption for MMU instance 0 + - description: interruption for MMU instance 1 + minItems: 1 + maxItems: 2 + + 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 = ; + clocks = <&cru ACLK_VOP1>, <&cru HCLK_VOP1>; + clock-names = "aclk", "iface"; + #iommu-cells = <0>; + }; -- 2.25.1