Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3515906pxj; Mon, 7 Jun 2021 12:41:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFzcCXRRHCYavU5EMjecEb2ZOrX43lQ7rNS4lqZVxKEVME2GrR9kAIedYh5yh4mEUXm772 X-Received: by 2002:a17:906:128e:: with SMTP id k14mr19390305ejb.485.1623094893727; Mon, 07 Jun 2021 12:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623094893; cv=none; d=google.com; s=arc-20160816; b=YlKnGdeAkNSC51LmFGcqRJ3A5U4JBZgLOkjct1GPYFBtRtVcr33rpq2yL1ex165kjQ MGU0bYTOfZZ+z38z8SXrZxJq153titMrDeg5kpFuEvCCUd3sYIfNBTe9J8GNKqvs9bVT u1LHzLNl6/KwFnIFM4XL5oYdFm2kLk/836PDUebit51GX0OjpKjF2EP1Orn1gpX/CN/z 0Ha2j4tLl1KoDu45Ztn96q3e8JJN7Pb2YznnyBzbtaIzE/SCi/0Lg1Lj7IQCzHTFsm/h KwfBPfFJ9jhWfJEL1lz1d60YSmwKdQkWoVAVx0Lu5SiBLMG8XdeHcaUQD9PdTof3thRK 8A9Q== 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=JC61BHb0tG/DcAPoKoyp6NajLnGhxItJfXwAJwI/p490GdAX5yFnijl5FJp6tpCs2A MXXhahNu2vxgEqoNoETYInAIUKWHdFO3xeusC+g8J2jCMQ6L+/a/vvM9r585N/V/3V3V qASRn59jRCY59CbLQFSdA5dFQzIwbWglqws6e1Xl40Yu0cE1JTNVd3AzOdCrwLs2J1MY V2UBEKt9M7NLjz6afWtqU1dryT2CAopm2PetG56/qzxK59bsblCa+QgDau9cQ6yWP2Xn XjxkhacFEO4jALcVnXao5869MU0IHC9PfWBMXU2yieE3r/SugRWH5Yl546ybCTGeTVEB KOlg== 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=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 p13si779332eja.162.2021.06.07.12.41.10; Mon, 07 Jun 2021 12:41:33 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231401AbhFGTld (ORCPT + 99 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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>; + }; + +... -- 2.27.0