Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp970843pxj; Fri, 21 May 2021 03:31:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHe2IDFdQaH3OWYZICKhZGVEue6hLuBdWeoQMtxTjc8c9X8d1PtLDC8YRTtp289m+vC6iJ X-Received: by 2002:a05:6602:1815:: with SMTP id t21mr11395762ioh.193.1621593061236; Fri, 21 May 2021 03:31:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621593061; cv=none; d=google.com; s=arc-20160816; b=rHS5FQTDKYgUyYZ4adtwu42Aa9FLlWuWn6QY+eysDfdK5MQVxRGdINm7ICGq8FsMrx 8CoXPoPovk6VfZBF+tE2u1wIhWPX4yidhfGIiqCzlFgHnrqqSuNCyT1U1xXC5DpgzvFo O0W4DYwItrCaD4qsCZV6UCc/Wo5Lxf70E2ZXMWAdMKtmsKigurzw80znpDkyTwRWrI6P aMYVWlYU6IvomMMvLtREFk4LTur70HbKX8lMHGZ5w+mez+EYjpZPbm7ehTQc4klEQETJ xIHhFsS/Eq3GJKUwLoTFX0FsQK7fAWAla4M7rCxuQc01aYtrdLYpp7c6L71WRvMddnPQ irDg== 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=yXn4lNWN47cq1g5TY7R2sFBOZToM/4FmLuS3fgC7XJI=; b=QBxtSluG0WMe5LOKbqHxc0gvu+1oM85RLS5mN2BfYm0I+WppZAXDgo1V0tWq8Jc42r MFL/oTiY+Z0SyGeKL37uIAPjnS9Zx8LBnwr5Pgw8/aiZyk6rsSyj0wzFXlFXSbxiBQiP JD1oHmm2gsymmqcM8ebmGaRzUEvM54mCSmr/gd0E4ssoYdEIZYJx+GyvDO7cchXTgGFc wAQX/m+hErEWGQ54fSoKJqFnvrtiq3UApRbr0yRCQWnAABK57l3pBOORQzZjSZiqOqhv /ZPm20uGuWEyffpjXCzO+DoL6BWJjHoIrc+TRG/L8gB0ahHqqrUKByBKIGoeL6P9j81A 5ZJA== 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 p8si5147449ioh.104.2021.05.21.03.30.48; Fri, 21 May 2021 03:31:01 -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 S233226AbhEUIiS (ORCPT + 99 others); Fri, 21 May 2021 04:38:18 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59432 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232990AbhEUIiN (ORCPT ); Fri, 21 May 2021 04:38:13 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: benjamin.gaignard) with ESMTPSA id DA47B1F42822 From: Benjamin Gaignard To: joro@8bytes.org, will@kernel.org, robh+dt@kernel.org, heiko@sntech.de, xxm@rock-chips.com, robin.murphy@arm.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 , Rob Herring Subject: [PATCH v5 1/4] dt-bindings: iommu: rockchip: Convert IOMMU to DT schema Date: Fri, 21 May 2021 10:36:34 +0200 Message-Id: <20210521083637.3221304-2-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210521083637.3221304-1-benjamin.gaignard@collabora.com> References: <20210521083637.3221304-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 Reviewed-by: Rob Herring --- .../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