From patchwork Mon Jul 26 04:51:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 485801 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3476553jao; Sun, 25 Jul 2021 21:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8OHg05P5vH1JE1EetbKYLxgQcXi1b3HxHzg9lJ7VVBtM/C9bYsfbV279OqAuDkkDPCmxp X-Received: by 2002:a6b:f813:: with SMTP id o19mr12958501ioh.49.1627275125204; Sun, 25 Jul 2021 21:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627275125; cv=none; d=google.com; s=arc-20160816; b=SZZ0i0pjBU/xH5hMw9OoCmwYzord0vjcM8GKzygm/hrgJVvgl8XGBkzzpF41dLuE3v XnAR9d//une4WV+7uMxhwLPBxlB1ZsxyV0jKbACxX3hDmpMibt+ssSGXTQ/KCaqVMJrT MVm3G/OOImjzCekBE+t/SJPkWXyBndCSst8lU8/tgK5LHLR2aIkS19r64FA7Bt3vuWeH elEOPkWbr2texJMSs2DPolvXQAxwp1hMmGRIudbA2pusduHFt8bXuPXbpi4dbl9d8e10 gseesHtGpJzuDe9JEOg7OU4pyWhyEzyCC6uPf1MKD7Phwact3oL9LGP0O5zrW5Z0MjeR 1wmg== 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=UEBb2IFb6SFW+nnly6KjdeYzA6MvhIGzYA31WKK348oR9HEJXxjbI2oAeaRDqxE6jd mlkPm5k9m9BD9D1Cm43DF/ss06IQQBJHUbQ2nyAxgYDyKkNxFSyLBcQHqN4OLf3W5/9G hhLmfND545d094R2okYT4Aj1sWMONaZsjr6kv5oNwp3oQ1L4t65RIUxCWUjhpx4nx0uS KGHs0hByF2yBiAnpD03IeQ2G2cNbdcwX1BAa6npl7R9SEpSnmKs6wSL0+/PMZW77sAaB aoghX9p/EQjECwRRUoVtWPW03Ke2CXDhnLBFaNcw792u7m6fFg9rmT95PYpnDjKEnlws Q8rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZNxdofEa; 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 s1si40247194jar.29.2021.07.25.21.52.05; Sun, 25 Jul 2021 21:52:05 -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=ZNxdofEa; 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 S231280AbhGZELe (ORCPT + 7 others); Mon, 26 Jul 2021 00:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbhGZELd (ORCPT ); Mon, 26 Jul 2021 00:11:33 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 964CEC061765 for ; Sun, 25 Jul 2021 21:52:02 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id m1so11276558pjv.2 for ; Sun, 25 Jul 2021 21:52:02 -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=ZNxdofEazuCanYJelkULP0+4OuqXw2vw2lLc6piV+972Mo2ZMLPaKvvgt0IeKeeOz4 qfs1uZUtM4SK2si8JRoCdtymsO11GLCcE3dvHNw2RvTb81Op5nV3XSybxbruXjNV/k6U uiyQKL2dOkyLbTmCQBvIoJtmU76+bBYUQVsrfwV3/4etV2OplljWvUKFedVvS7S4tLz6 qPuZ+xPD58dVHGWU4gnH8urTbFlJBUS+bsnPJyDWy308Hc2jbeOdFnFrxxxWDgIdduZj VPVm09fCKAnFZMjSZUk7opAUFtgLYbqIHx32jSDW934DBT3Vwqk5DlaMbp1F2DzXks5/ bL4Q== 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=Q0+tQDL5Lg8lJtKE84R4jPilkqEWsI8Sla4iHryMd7SPhMtDv1uXrVU5v+m1A+KL7W E7563ZVwXynG8POnm5IgoSvLHxUDw2ujBseDvSBjVDgOPsfTLCCNuxWXLpqSrW6mV89e ucjggq5oJAZSfzpUb5ET7bvzhIk9ilmq7z31RJd8+ewEwZLIHpnA6fmj5acxPHWFUDSC 0WgB9u4Pn2qoQmsvHdP5xZ4ItaO9AHPz+H5kzTFsV2EfHhDgDI9eGUsK4pW3b6e+FMw5 vzNpbKDE4ySFmvHY46Z184diPgrneJ4FrVlxVxjJ68ODgZtsfYUCulqLXuqx3QJO4xPI ErsA== X-Gm-Message-State: AOAM531leS2mbDdaCnEtD499D+djTg3VKuctmI371DLGGQ8NH89TZm29 XRVoTNDg1UJ1c16lUbm6KJq4xA== X-Received: by 2002:aa7:9687:0:b029:337:3b49:df24 with SMTP id f7-20020aa796870000b02903373b49df24mr15887381pfk.35.1627275122181; Sun, 25 Jul 2021 21:52:02 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id t26sm45725593pgu.35.2021.07.25.21.51.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 21:51:57 -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 V3 1/5] dt-bindings: virtio: Add binding for virtio devices Date: Mon, 26 Jul 2021 10:21:41 +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"; + }; + }; +...