Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3232012pxv; Sun, 25 Jul 2021 21:53:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyYHKIk4e9O8s3P9zevHIyIZZ04WIYKwbQGJSUopQc7iuzrcH4l9IQ54AqnSXf28ZWuLSs X-Received: by 2002:a6b:6016:: with SMTP id r22mr13744048iog.12.1627275203130; Sun, 25 Jul 2021 21:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627275203; cv=none; d=google.com; s=arc-20160816; b=uGuX1idzC/pJCtRAP4+0Kha3q0qHtKRKsZTwXIq5+Rao6oMkzea2SNCK407qIJCTIc xpF2wkufeWCLptdA7Hx5whHgFeX4lKlMg/hZYxSiRN32skAyd+JGNj2NaU5atxgSD0Cq t91iTBJ8ESKWNXHB/ZsWE8BbxDVACit3siRqYNu/MGFPa67sdvzvLt6tStRRcBvL2tHT 3MtU1iQpSVFL9rDCnIyyNBNuNPlqqY/Fn8nylhrzmPo6A68yB/u8Igks3OpcLfKMmxRc p18zJYnAHkRWw8WDIbn/u8VDCisHIbeR1k4Nna1CugCMY4FAr7WOaoyrYcoT8itwTAn9 fq1w== 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=uv5hoz6Jfr4qMtz3KGmj97rIxpJg4ZZPCcTqCf7HbzZxL0RYlP0u4KdxBjr8nTlGWD 3UoK768CxHgVpAwBM5UV5tHuU+SqpIDZw6Q6MXpBoaBBzSuJzCv0TDYZbOZqpvFaFQJ/ IA1OHYFIINxg83DY8BIPjru3vOhywDDXvnmXXxoR2VmUE/Dmd6fvAtr8MNZH9/BHZ6Z4 rFJQtrMBZipwc1J+SPdtRxzBu4Xa36v6bCmyVpikHUvRO5cxOgL96T6MFqcTHG6CBkzy R0Pm7j+DaRtr2BgpKuYJcZq8Mhz4pddMLSBHlKZOmScPR8hit8ehKxzj9E+bESknXGAz AoGg== 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 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si28622672ilv.81.2021.07.25.21.53.10; Sun, 25 Jul 2021 21:53:23 -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=@linaro.org header.s=google header.b=ZNxdofEa; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbhGZELe (ORCPT + 99 others); Mon, 26 Jul 2021 00:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbhGZELd (ORCPT ); Mon, 26 Jul 2021 00:11:33 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9642EC061760 for ; Sun, 25 Jul 2021 21:52:02 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id b6so11252984pji.4 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=Obo9AN4WkbJxnOCBymyYq1NQIlpwG74NCvEGLB7bzd2c0XOwhO3x/laFeicT8c01Fa 0Z33o7k7WdTwuNPa3myyQqhLKmQhOjBu1vWTfIwKcurTGzd2o4Jd4yW6VRqPiy+yN7w+ Z/VzufvA/kAjgiwaISe/aRK/OQpPNOL9zZlU74XVEdUtulCK+cF9oiPZbO69LTaR6gtN qZ1x69sNuHRCbxFX/UzTZnWLdeZP2groLkJ/J5O2mXmVJEQxEE3sWFAluw04zSCmUo+C hF+aGH17u/v87aHApVtNtX+2YWbqi6KgPzQD4axOLDv2edHNWmlEyQ1WE7A0zeHeWa1A fDqw== X-Gm-Message-State: AOAM533ETBj6C/DvrHJGZMDLda8qk9d8OWZTKgZ83Cu/wbHaUFB3UV0+ kYKB5p9dFf8Akr2uhRPEeqHn3A== 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=20Benn=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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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"; + }; + }; +... -- 2.31.1.272.g89b43f80a514