From patchwork Mon Jun 7 19:39:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 455376 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3025073jae; Mon, 7 Jun 2021 12:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9bnypER2C8vVneZgcFidVt24a6op8MyoaH11RWC2asrlLwXeskhzDELIkvAskY2gXSPcs X-Received: by 2002:a17:907:1003:: with SMTP id ox3mr19679309ejb.469.1623094783524; Mon, 07 Jun 2021 12:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623094783; cv=none; d=google.com; s=arc-20160816; b=NfKNbBR6xs1NjXSsl4sRlRV2ul6rJiNxrPTdgTyF0qOXekY9J/n+Z/Q3b9Om5BIDfT 5/5U+JqkxonXx8qCZO3nmu2YJhZkH3bzveMAM7QNGLzD2qlxDt78nqUmnSu8BXL1MPtO 19l6mFtJzGzVqAx7RblPxxnwWU8hmnOdfN3qqG8yPuNI3TUV01vUBw7mPxMjHnuD9EeR wCv+WlNS5X71S75OOvlgkJoKkvCe8Dt5TVtMrg7Haw6c9UGY3ajH3/y7fJPpgKzvSAS8 iMuqlzlTh/vsG74S6z/4lPpS4geXPag7ex6X+jXF2Rn5gmwdAoBtW+OqDGlfRM6V3QZD B2Cg== 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 :message-id:date:subject:cc:to:from; bh=oOu6y7k7gvZd3NLHH6tjzjQbm5rJW9mdNwcguV3ceu8=; b=l09ffrJGn6YEOU3Ir6gbtCG4ggxL6VxQxP6oxxAewXNZ2SsnbI42e02SiqXTGR3ZAk f+fgIPUysf0/r8mIIzAQiJu+Qjd4QoghlAFyPGzw8f7HTOtQdHKvQC4FTtrBs4doK2Vd Jo2kR0J7Ot3qh906EPezDMscRYX2VlJW8HBGNT/Jh5HDp0ZaGWvBW0emTdDiwUEKYuzj +Eyu61HI/uRtg4Obi8Oc86A2ipCbubx/ONsCJE+UxIIZm4tnmnmG3XXHErk/FP5rM1w+ CPdU2uOcvrGZLPM1PBKjRP1gawKYxt94nHuBHrfn1j2SoLXpyaUVfIgPhdR66MCHpTgD Z7Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kl25si12659951ejc.370.2021.06.07.12.39.43; Mon, 07 Jun 2021 12:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231392AbhFGTld (ORCPT + 7 others); Mon, 7 Jun 2021 15:41:33 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:37472 "EHLO mail-oi1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231371AbhFGTlc (ORCPT ); Mon, 7 Jun 2021 15:41:32 -0400 Received: by mail-oi1-f171.google.com with SMTP id h9so19234473oih.4; Mon, 07 Jun 2021 12:39:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oOu6y7k7gvZd3NLHH6tjzjQbm5rJW9mdNwcguV3ceu8=; b=d29JAxEc46/zz8shBR89B88ZvLq/rRzs8K77Sb7r3/r/MwaSlVLjWJadT3ncrLw+Jr 6Jquib5YfnzWtII4AAWsfF5TU1CxATse8tu1JCqUrwdROr9yt4ZhXWoaDBEJ87w2cpEh J/7FjTv+ymlk/IJtD4t5YjLYM6NKG4V1Lo6HKfRjZo7vBFpMEB/fbg4ATj0c1Gol2r3q r7iDVIyK3+tF0zTajGYeNMXYjIy4hAtjcF97ioMK84thDeYXccuYZBgL8seiZ54tY21n 1V2n0vYNYvVbemzEZjkFqcA/rywvHxcQwRm9DuD1G9UgkpxLzD4mMYUexLYxUZ9rztn6 3aPQ== X-Gm-Message-State: AOAM533Qbm2Y2WhC5aevAJWLkpfzIVcdsYWmLOPaeEJfY2PUWjMd+odM gFdKp5mtgaWF7LedFF4dYg== X-Received: by 2002:a54:4684:: with SMTP id k4mr568744oic.20.1623094770024; Mon, 07 Jun 2021 12:39:30 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id s6sm2540201otk.71.2021.06.07.12.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 12:39:29 -0700 (PDT) From: Rob Herring To: "Michael S. Tsirkin" Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jason Wang , Jean-Philippe Brucker , virtualization@lists.linux-foundation.org Subject: [PATCH] dt-bindings: virtio: Convert virtio-mmio to DT schema Date: Mon, 7 Jun 2021 14:39:28 -0500 Message-Id: <20210607193928.3092186-1-robh@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the virtio-mmio binding to DT schema format. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Jean-Philippe Brucker Cc: virtualization@lists.linux-foundation.org Signed-off-by: Rob Herring --- Jean-Philippe, hopefully you are okay with being listed as the maintainer here. You're the only active person that's touched this binding. .../devicetree/bindings/virtio/mmio.txt | 47 --------------- .../devicetree/bindings/virtio/mmio.yaml | 60 +++++++++++++++++++ 2 files changed, 60 insertions(+), 47 deletions(-) delete mode 100644 Documentation/devicetree/bindings/virtio/mmio.txt create mode 100644 Documentation/devicetree/bindings/virtio/mmio.yaml -- 2.27.0 Acked-by: Jean-Philippe Brucker diff --git a/Documentation/devicetree/bindings/virtio/mmio.txt b/Documentation/devicetree/bindings/virtio/mmio.txt deleted file mode 100644 index 0a575f329f6e..000000000000 --- a/Documentation/devicetree/bindings/virtio/mmio.txt +++ /dev/null @@ -1,47 +0,0 @@ -* virtio memory mapped device - -See https://ozlabs.org/~rusty/virtio-spec/ for more details. - -Required properties: - -- compatible: "virtio,mmio" compatibility string -- reg: control registers base address and size including configuration space -- interrupts: interrupt generated by the device - -Required properties for virtio-iommu: - -- #iommu-cells: When the node corresponds to a virtio-iommu device, it is - linked to DMA masters using the "iommus" or "iommu-map" - properties [1][2]. #iommu-cells specifies the size of the - "iommus" property. For virtio-iommu #iommu-cells must be - 1, each cell describing a single endpoint ID. - -Optional properties: - -- iommus: If the device accesses memory through an IOMMU, it should - have an "iommus" property [1]. Since virtio-iommu itself - does not access memory through an IOMMU, the "virtio,mmio" - node cannot have both an "#iommu-cells" and an "iommus" - property. - -Example: - - virtio_block@3000 { - compatible = "virtio,mmio"; - reg = <0x3000 0x100>; - interrupts = <41>; - - /* Device has endpoint ID 23 */ - iommus = <&viommu 23> - } - - viommu: iommu@3100 { - compatible = "virtio,mmio"; - reg = <0x3100 0x100>; - interrupts = <42>; - - #iommu-cells = <1> - } - -[1] Documentation/devicetree/bindings/iommu/iommu.txt -[2] Documentation/devicetree/bindings/pci/pci-iommu.txt diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/virtio/mmio.yaml new file mode 100644 index 000000000000..444bfa24affc --- /dev/null +++ b/Documentation/devicetree/bindings/virtio/mmio.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/virtio/mmio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: virtio memory mapped devices + +maintainers: + - Jean-Philippe Brucker + +description: + See https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio for + more details. + +properties: + compatible: + const: virtio-mmio + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + '#iommu-cells': + description: Required when the node corresponds to a virtio-iommu device. + const: 1 + + iommus: + description: Required for devices making accesses thru an IOMMU. + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + virtio@3000 { + compatible = "virtio,mmio"; + reg = <0x3000 0x100>; + interrupts = <41>; + + /* Device has endpoint ID 23 */ + iommus = <&viommu 23>; + }; + + viommu: iommu@3100 { + compatible = "virtio,mmio"; + reg = <0x3100 0x100>; + interrupts = <42>; + + #iommu-cells = <1>; + }; + +...