Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp233271pxy; Thu, 22 Apr 2021 00:25:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6Lzr/S3Vz0FjOYJ3bao55tL/n/GLe5s+0ANSpZSf7UchZqcLDXCpCxaEIepNye4IXv4tF X-Received: by 2002:a17:902:9a84:b029:ec:7fd5:193e with SMTP id w4-20020a1709029a84b02900ec7fd5193emr2143693plp.62.1619076345817; Thu, 22 Apr 2021 00:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619076345; cv=none; d=google.com; s=arc-20160816; b=DPJPah13dxhQmc7Z9dcvvwJ3YCSznmhaGLP8jrJrN+pjQONt9zMoQBkTZPz1AK8h88 tdi4xFj9Lor4qw6vY/2Cux9DDXs7iLNDY0LAzwmFrgAr619giHd6wtewJ/szcbeRwslq jnTlwYId50ZFhDy0GkrMRsi+xWDrJ5MB7ZRUgMTL/iEo7guwjuPKVRg/h6QC2CTjV4vY IfI0ikTpDMmgSiOUR1t0kZd3HfEFol8UjRGYR1qyRDDF3T9lDPVJBJ4Icpiav2d9s1lS rtSayrKak3niAbuC/laMqzf98Ck+SRb+fMXNAmXelivQag9MKjcQ769LVUliUQ9DPJto Mx0w== 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=xo4fLtkM2KTSePLu4aqySEjnnQ83zJ0ZdN0KoalaR0I=; b=qbtwsZj7vOoSx7ZjauZcBAi8kh59web3IMLdt9KMOnGFDCrQ18k8WxCvAhlA1WHuS8 6dSkL0TOfgWzu6yz47QBjH2QKvzQVfzmu5Qjm7Mi3HCmdEAaOs1Dx9SWmbKe/nHAZ+8B aTcFOf5dEYqXDYMBQo2s1Zp/uERnuy67FyzLJLw3f8y4cOQX214Rm+Sv/0ChQNrA6GHq 11FvL34mTgg4IP2UMIo/6sVOQdMhwzCJ3l5ilq/dUhXIpCT7tkVtAPLodkfcsqkb1kpJ wJu8jKTW3xmCUQF2Xzue4RY8xycLPeuK2+d/VFYn/Zjp21NfbSmusXnJMbfdM4KVh7w+ 0k/Q== 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 z19si2149065pgv.404.2021.04.22.00.25.33; Thu, 22 Apr 2021 00:25:45 -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 S235020AbhDVHZe (ORCPT + 99 others); Thu, 22 Apr 2021 03:25:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbhDVHZb (ORCPT ); Thu, 22 Apr 2021 03:25:31 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACE6C06138B; Thu, 22 Apr 2021 00:24:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: benjamin.gaignard) with ESMTPSA id 1D6131F430FB 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 1/3] dt-bindings: iommu: rockchip: Convert IOMMU to DT schema Date: Thu, 22 Apr 2021 09:24:40 +0200 Message-Id: <20210422072442.111070-2-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210422072442.111070-1-benjamin.gaignard@collabora.com> References: <20210422072442.111070-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 --- .../bindings/iommu/rockchip,iommu.txt | 38 ---------- .../bindings/iommu/rockchip,iommu.yaml | 76 +++++++++++++++++++ 2 files changed, 76 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..ab128f8e4c73 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/rockchip,iommu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip IOMMU + +maintainers: + - Simon Xue + +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: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-names: + maxItems: 1 + + 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: | + Don't 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