From patchwork Thu Jul 22 09:56:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 483872 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp202832jao; Thu, 22 Jul 2021 02:56:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZSXRv7HBpOzgG2HZEDmlgagomsahAQQu5GCfDeIDNeHxjMZ/8pbP6E/fMWp17pfVXX4lX X-Received: by 2002:a02:a115:: with SMTP id f21mr34626211jag.3.1626947816633; Thu, 22 Jul 2021 02:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626947816; cv=none; d=google.com; s=arc-20160816; b=jbX6ozbG063Yeyca0v+xT3rHCKkTOjXRIoD31qBlWZcK0QfraznyULK+HMGVMFaPzX zEastC16IBOPWpMNjnirPxjjz0oyvAfFDoHBaFS9yr1D/fcqN7JqL2tRYEnV6AwVRKy/ vL1RofD7pY55FlTYCkV1jt5RYUifDHpBKQwtoLRj0Wx8OdlloIyLyo07vqyu4+LzcxHe UFlkSBJeaOlTQWXfLyt+MoKzQ483H4tMwoQBANiJ3gyaWr1XKJETQ9ovmuFA4Vd1Pe6T 8yUmNTaGGQqRs1B7+el0+wxWV03I8ESFjYoi2GqRAL7Ntr56qDbaZlTaHiR4fhVNOBVE bU8g== 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 :dkim-signature; bh=BKW8SJUXD86+uZHpTY6dXOSgo09YOklrbve/i0ZpdAI=; b=ihhUEc9nidQVROcSZzkI57rpF2sNQRi3HWb5tCOT2NlJtHCoH9Gb0HEliFj6DxQ8Q4 byuieOsguheSHgPGvj4YWzQsnhaRvAgc90xxIN309sarbvIXT2F4aCNLf9oRcSJ+mN0M Ync31AJp05HsluNDGMUT5uyGZ3n91OkFNRPaPN3VPnkWhR8Y30ss3U8mbcQuY1Q8YWTG d23j4snp6wHkP8DnLxs1Ap+2oxLZVgd5OtwD6WDW1S3iO7pSzvVFiApBZPrH/EXRozVH K/dvbpkh/pCCdGcvxXCxKkJ5ZxWnZnRKIm9VxXghUDEGdzYSDw/k67l7aHRhlnZO8i2F njJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rT0HWshX; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si29393817ila.97.2021.07.22.02.56.56; Thu, 22 Jul 2021 02:56:56 -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; dkim=pass header.i=@linaro.org header.s=google header.b=rT0HWshX; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231355AbhGVJQT (ORCPT + 7 others); Thu, 22 Jul 2021 05:16:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbhGVJQR (ORCPT ); Thu, 22 Jul 2021 05:16:17 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B21CDC061760 for ; Thu, 22 Jul 2021 02:56:52 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id gx2so5388119pjb.5 for ; Thu, 22 Jul 2021 02:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BKW8SJUXD86+uZHpTY6dXOSgo09YOklrbve/i0ZpdAI=; b=rT0HWshXd8nGdtBqoZiI1S6Ws0VED0exTJOCWSfoURsHS8z0r1DP8kKfEqDzoWRlCk ZpyIVRq+7RxtvnBpF/zFFE08CrsMw0EhoJ8nRM8PVPIFOJnTWplPOoWfAKmDYHL4ujnR 3qZlBy11EOkr7TNC6WkFIFv6XipygWZq0ACOPDtoAr+XVYhtSL04jKJm0PkgN42byHQy muaFvdyDV4bPBFwvtEIjNXV1HqZq2mXzlKkRLmkE3nLc2AXBt2V7XXKO2YmSQp4Fqn2O gZtBiljKKyxV6gOGkmJs1WN/00aAbmkNE/HBT/pch6yzRemSo64jG3TXfnuqM2Z39Dal zlQQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BKW8SJUXD86+uZHpTY6dXOSgo09YOklrbve/i0ZpdAI=; b=aMBFqkyZ+RT0m5NQf3o5QacspuSQ1uB8DVsfbTEHRIcPFnMLN4+qUIMbsTXx3jWJvv //x5vzbpsXGQVt9cCvnABdgPuwO4CXgjwfhCuERW964Li7Oc2qAiszSVB0tTg2wi/msq 3G2KRn7KYAxDpAgo4vKNsSURaRfiCkfY1GuaUJfZXsmoyad3kj/PsOpFW8/SuJF+vzDq JLQAV6Kf7IlFQBHWwqPbSbBe4C0+pG9LaZginD0Su7X00g8HK52YnrOAU02gK2fp01D3 9DTe6Z6flGd9t1HVrfl3XHlYK/+Vck1FN7Vaoht3R0YdWUQDWvFJzDX9zUBXF4CgP4qP DCGQ== X-Gm-Message-State: AOAM5324mEyXyDzuv2wKRFh4wQMpN4nAdTdVTpZud3BeBnnoPukFsURb CDzrOqbBpx2ehU92RJhdVNgpVgNpdU7yoQ== X-Received: by 2002:a17:90a:d598:: with SMTP id v24mr37859955pju.185.1626947812304; Thu, 22 Jul 2021 02:56:52 -0700 (PDT) Received: from localhost ([106.201.108.2]) by smtp.gmail.com with ESMTPSA id j21sm24845767pjz.26.2021.07.22.02.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 02:56:51 -0700 (PDT) From: Viresh Kumar To: Jason Wang , "Michael S. Tsirkin" , Rob Herring , Arnd Bergmann , Jean-Philippe Brucker , Viresh Kumar Cc: Vincent Guittot , Bill Mills , =?utf-8?q?Alex_Benn=C3=A9e?= , "Enrico Weigelt, metux IT consult" , Jie Deng , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH V2 1/5] dt-bindings: virtio: Add binding for virtio devices Date: Thu, 22 Jul 2021 15:26:39 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allow virtio device sub-nodes to be added to the virtio mmio or pci nodes. The compatible property for virtio device must be of format "virtio,", where DID is virtio device ID in hexadecimal format. Signed-off-by: Viresh Kumar --- .../devicetree/bindings/virtio/mmio.yaml | 2 +- .../bindings/virtio/virtio-device.yaml | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/virtio/virtio-device.yaml -- 2.31.1.272.g89b43f80a514 diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/virtio/mmio.yaml index d46597028cf1..1b91553f87c6 100644 --- a/Documentation/devicetree/bindings/virtio/mmio.yaml +++ b/Documentation/devicetree/bindings/virtio/mmio.yaml @@ -36,7 +36,7 @@ title: virtio memory mapped devices - reg - interrupts -additionalProperties: false +additionalProperties: true examples: - | diff --git a/Documentation/devicetree/bindings/virtio/virtio-device.yaml b/Documentation/devicetree/bindings/virtio/virtio-device.yaml new file mode 100644 index 000000000000..15cb6df8c98a --- /dev/null +++ b/Documentation/devicetree/bindings/virtio/virtio-device.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/virtio/virtio-device.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Virtio device bindings + +maintainers: + - Viresh Kumar + +description: + These bindings are applicable to virtio devices irrespective of the bus they + are bound to, like mmio or pci. + +# We need a select here so we don't match all nodes with 'virtio,mmio' +properties: + $nodename: + pattern: '^[a-z0-9]+-virtio(-[a-z0-9]+)?$' + description: | + Exactly one node describing the virtio device. The name of the node isn't + significant but its phandle can be used to by a user of the virtio device. + + compatible: + pattern: "^virtio,[0-9a-f]+$" + description: Virtio device nodes. + "virtio,DID", where DID is the virtio device id. The textual + representation of DID shall be in lower case hexadecimal with leading + zeroes suppressed. + +required: + - compatible + +additionalProperties: true + +examples: + - | + virtio@3000 { + compatible = "virtio,mmio"; + reg = <0x3000 0x100>; + interrupts = <43>; + + i2c-virtio { + compatible = "virtio,22"; + }; + }; +...