Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp462674pxy; Thu, 22 Apr 2021 06:17:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcgm4R01e4GqvX3owXcD4MWqc1kqvyVWrBFyhKQBtCm2EuBWxUX7FaUBClhf7l98hhc/1O X-Received: by 2002:a17:906:b6c3:: with SMTP id ec3mr3377992ejb.155.1619097429199; Thu, 22 Apr 2021 06:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619097429; cv=none; d=google.com; s=arc-20160816; b=zlFtCNSrktBtz2kVGFupP9Oy5NQR53bskz1KBJpVszQOnnyIfg3l57oc3kC5KGcny2 RqPcUQh1uOikw0I9K/Vw9UNWhxQnSDB9yG2Bb2iVKEMyVjhpbDO6KZJvgFhd9+UWTiv6 ji//GEnZGlBfm486SDFDfU6nPKX9cSn76OF60EIB3R4cQCj2mBNDiFIgqyg0/dCDZUio YZvPDPxP820sMzFBnCsk28RreyTNiLRng+Iz4ADbJUW1EunXXlJFQl0z7ieMwIAtxKJL sgPhEUZ9ul+fkhUr1vkf1C8cCrSxgRsMPbRejMZt0+CSrZ4hehWS/dkkb6dwZn3RzJfp M7yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=3hsr6lCLd7JFlK9taoygzcaxUpuGrqlvJuCbv9uQLPQ=; b=AeJenD+ecqhHs+jKsrrsQ95taD9XybwyIuxc72P3Z/5XzW0+TYwfQhdQJu8rDMkTo/ jxaxf0fhpJvgcT2sVsEsBZmGEaM+EvHyHe/IDKC7EgqtwKgQgEWwm9BFtH8/gWiCHAJA +wYpKbOa9GtJNW4Bh/7AvztXqCWXj+pXWxNPKFqPzc5+5+KC1l6KeeTI5RoBHYHontE7 TqTsX8CkpJ1Uhvm3XEyUDK4/Jf5CcUfOt9wU7eQcZFCvD1mHeqAt8xKHtCRB0v6qEttb qVWH9pDJAeoQRyKaGc3ud4IW0IaXUVvqp4TYMXDHupAmDTEKU+unctLcbOiyFDtHGsSo z5+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=faywr3P7; 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 s8si2126900ejq.612.2021.04.22.06.16.45; Thu, 22 Apr 2021 06:17:09 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=faywr3P7; 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 S236078AbhDVNOU (ORCPT + 99 others); Thu, 22 Apr 2021 09:14:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbhDVNOT (ORCPT ); Thu, 22 Apr 2021 09:14:19 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADBCCC06174A; Thu, 22 Apr 2021 06:13:43 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id x12so47956994ejc.1; Thu, 22 Apr 2021 06:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3hsr6lCLd7JFlK9taoygzcaxUpuGrqlvJuCbv9uQLPQ=; b=faywr3P7WFufLom1rX2WOmWEReYjumYY9+Q6qWzuIDUblJZ2Hxu+9YJPrj+Eikd4cf RHkz3e/YFfIXC6Us+iaAW/hnfF7gtQ4tegZIM1gbbESI19XyOjf+9s60ZhU4khOVRGSz TMU4rRlg+LNAyMKzX5rNrDsMZ6AA80QzwLWnt5ac/tggOvuZN901ZZ5Ah1lUv4DWXVUB 1pRQyRooIodQOoPK0gLLq2miQkvc1pgNe82optlJgVzv+pSvAmJzpXJU5kYuuEE0BqEF XVYqJJZbvEGytp0OI/5zaAbSILvPtqeY+DNHFIALp6cCINm1R5CtzQXunT4f7g7+06PB n9fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3hsr6lCLd7JFlK9taoygzcaxUpuGrqlvJuCbv9uQLPQ=; b=Mg9DjCt/km9aTNwgno/dtwzuDCCpsvf5ov84F8xjqKMlxtHhFeGDB5fslv9/gSosIF deIkQJsX0HlFD5gvqYx8jWm+BUa5QRVOKNAQq5iH/g9k7lFBiz3TgB4AwdOAt+FXRhpc t8yDXoPSMmZLdXQLy8SQaF3MmS4AIyHJkgZyH9eQwYEAbUWKYqmnjgGPNa/uDmEag0ti hVQ7VMV5xwuxUiarkHF8AlXYjKYMw7iFr4Y7gHYIaPECwwrfDcFQ0LGT1XqcslgWFCGP 9tiDrQnbeNVt/vVrShu/uv8KcDQAMN0PLiR8kDRXCxg0mEUoJurlumufJgRSNi3F5KKT osbg== X-Gm-Message-State: AOAM531CavmZm7ro1SScYD/irON/lCnEK/s0KPXo+9N6t41mQpLHaWgm t/A4sdfAjGyoORLEreuu0tU= X-Received: by 2002:a17:906:a449:: with SMTP id cb9mr3312469ejb.118.1619097222388; Thu, 22 Apr 2021 06:13:42 -0700 (PDT) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id f22sm1828519ejr.35.2021.04.22.06.13.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Apr 2021 06:13:41 -0700 (PDT) Subject: Re: [PATCH 1/3] dt-bindings: iommu: rockchip: Convert IOMMU to DT schema To: Benjamin Gaignard , 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 References: <20210422072442.111070-1-benjamin.gaignard@collabora.com> <20210422072442.111070-2-benjamin.gaignard@collabora.com> From: Johan Jonker Message-ID: Date: Thu, 22 Apr 2021 15:13:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20210422072442.111070-2-benjamin.gaignard@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Benjamin, Please check robh/dtbs-check failed build log at https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20210422072442.111070-2-benjamin.gaignard@collabora.com/ make ARCH=arm64 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml Test if all notifications are gone. === YAML also checks extra properties like "power-domains" not yet included but needed for rk3568. Add them in a separate patch. === rk3229-evb.dt.yaml: iommu@20030480: 'iommu-cells' does not match any of the regexes Change a rk322x.dtsi property to #iommu-cells in a separate patch. === rk3229-xms6.dt.yaml: iommu@20030480: reg: [[537068672, 64], [537068736, 64]] is too long Change reg minItems maxItems. === Johan On 4/22/21 9:24 AM, Benjamin Gaignard wrote: > 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) GPL-2.0 This is a conversion of an existing document. > +%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 - Heiko Stuebner Add someone that can respond in a short time in case rob+dt wants to delete something. > + > +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 No comma "," before "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 minItems: 1 maxItems: 2 > + > + 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 > + power-domains: maxItems: 1 Add in separate patch for review by rob+bt > + rockchip,disable-mmu-reset: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + Don't use the mmu reset operation. Do not use .... The use of "'" in a YAML description gives problems in some text highlighters. Try to avoid. > + 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>; > + }; >