From patchwork Tue Jul 27 05:23:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 486659 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4197601jao; Mon, 26 Jul 2021 22:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweg0GqDP/VSK+YImE3k7eOcWfCEL86FYQhE9uyzh5ZGxN4uTuR+n1ZJmWSdbZ5XW9vYrSI X-Received: by 2002:a5e:c70d:: with SMTP id f13mr17421884iop.95.1627363446086; Mon, 26 Jul 2021 22:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627363446; cv=none; d=google.com; s=arc-20160816; b=QZHv08ahFCNhGfxHWzG4waR2en2ImZCvRuHbURSGnrZPXYX/jhYAzrcUFNt4de88HR MTsRLZod216pSfT77Ip/69g2cVjWrLVkjTE965+I6nzCehaqvlm6dRXJyyRLJNkzyaVP DG76+xrtt98h/DfnlPwf5BXafVpH/Kd4G8JWhxOl6abMl8IVsWYx0tr5Amfh/+xmdPTA jmLtnOTJrY8lwSEmcZCWh1d4mrV47+SRPrm/mInvmJdB+aexWU0xUGyr7g+q3rxTbVXQ ZP1f7PnjTaMKOXEm0Q7PyrEPYB3EPas2s2yADZwBnq1pifxUSUVy6mhNsmhVzT9cDXjU EnlQ== 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=pli4HJidOpxsK8M83Hgdvi+NbofSGQAN0jGG2SdYKog=; b=NCP1+z1ZaC8xpnfor3xRGs7JZCN/6Pv/fmUqee/zmz9maqzTBhuEhPGZNt6naMMzza uLfEFFQbfo8g8S2krFwrUegdve/L2NeT1ZcmwIqLDtaT4DSQwDcinLVBzTfOtGn+lSkG uC1SQfYDFpOKzPn7287txEduodXaACZUkLdBkw2Yk8XBD/cfSFyTOEaKdpyQYLg/VJbG O96WHIgR7kQYAZoZDcJNysm/8Ou32fQxNpXZqLAxcGbAjThB9rwAfTO+9gcb6W8aAF2J EjueDKuO6LCpDFD/FTifsKJ6XKrn91zca1euqk3uj8HXR6VQ57CGo9msl0YYoQH8fiD9 WFHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tmUUUVQw; 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 q8si2715784ilo.95.2021.07.26.22.24.05; Mon, 26 Jul 2021 22:24:06 -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=tmUUUVQw; 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 S235253AbhG0FYB (ORCPT + 7 others); Tue, 27 Jul 2021 01:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235217AbhG0FYA (ORCPT ); Tue, 27 Jul 2021 01:24:00 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA4CC061764 for ; Mon, 26 Jul 2021 22:24:01 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id c16so8889524plh.7 for ; Mon, 26 Jul 2021 22:24:01 -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=pli4HJidOpxsK8M83Hgdvi+NbofSGQAN0jGG2SdYKog=; b=tmUUUVQweZacwI01RO3nQ+0SYtgnKAmFfjVdsxkSGafeGPRhnTcLzjTLff3NffemQY bZu8YkYmdFOpGUTi16lwRipdAGxhIG8f3gUx/zul1mAKBVuM/5a+U0P6tek/bCJMSmg7 pAK9hhWPFL95tv8ujz7S8F4eboM80B5NqLUPXCd89AQ2M6d7jz8N0lVYykfcVJjqAUp/ 0rlneCGVpuCvfhLmjX4H+prUiaNneK6Rk4cD1d/wMkKpnhJy4srY0MDs3dQWjhHlKp4e MpvBBqv0iHX2esEKoBxiSfCvdzsjqGBlzRx/54ojkbKa5Kg/jJJ2wCBCrX+FSi+VgsrZ ltIA== 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=pli4HJidOpxsK8M83Hgdvi+NbofSGQAN0jGG2SdYKog=; b=gatCyEb8gLn/Ih19bcpDr96Fd6oYS7DwI768dXoex7N/K3KPJu6K91U8BnksNMK5dE nJRBPZmL0JW5hI+7LG1+ov+XO3gieTq0K4/aBGNus5uY1kvU6hx1eg2qong4yER7XqkO j3YtmLFlvbGzw5y1aK9doHjPso6I5mRCiaspXQFZH9mFpJzdJAcdJDkyLaXptnJzS1z/ Lb5PilSyrbNVq/wEvuzfFYGGBbDKuD8ZXPBWpLbgGTVIYzB6I7busToVj1L1veRZDpZY jzKnwu0UxvkAM+9vc65vov6Nd32CzbOZLxDsMoctATSg/y9dT0SjcsoyJ+WGA5lxlFo4 +EZg== X-Gm-Message-State: AOAM5313ftbjFpThI8VUN+dR36LhPPL/C4CDu2vH8sqe0cELtKMHI6OI DctVd7+rVJWcb3iaHymwfJferw== X-Received: by 2002:a17:90b:a0c:: with SMTP id gg12mr20634688pjb.165.1627363441015; Mon, 26 Jul 2021 22:24:01 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id f3sm1433531pjt.19.2021.07.26.22.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 22:24:00 -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 V4 1/5] dt-bindings: virtio: Add binding for virtio devices Date: Tue, 27 Jul 2021 10:53:48 +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 the format "virtio,device", where ID is virtio device ID in hexadecimal format. Signed-off-by: Viresh Kumar --- .../devicetree/bindings/virtio/mmio.yaml | 3 +- .../bindings/virtio/virtio-device.yaml | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/virtio/virtio-device.yaml -- 2.31.1.272.g89b43f80a514 Reviewed-by: Arnd Bergmann Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/virtio/mmio.yaml index d46597028cf1..4b7a0273181c 100644 --- a/Documentation/devicetree/bindings/virtio/mmio.yaml +++ b/Documentation/devicetree/bindings/virtio/mmio.yaml @@ -36,7 +36,8 @@ title: virtio memory mapped devices - reg - interrupts -additionalProperties: false +additionalProperties: + type: object 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..1778ea9b5aa5 --- /dev/null +++ b/Documentation/devicetree/bindings/virtio/virtio-device.yaml @@ -0,0 +1,41 @@ +# 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: + compatible: + pattern: "^virtio,device[0-9a-f]{1,8}$" + description: Virtio device nodes. + "virtio,deviceID", where ID is the virtio device id. The textual + representation of ID 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 { + compatible = "virtio,device22"; + }; + }; +...