Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3960562pxv; Tue, 13 Jul 2021 07:47:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx76kj6miSS/UGnjMwnkRQA1OXU51RFIncBkr1FZgGOezVTeW2MlPaebcD8Preiumxq8eSN X-Received: by 2002:a92:c143:: with SMTP id b3mr452747ilh.145.1626187642257; Tue, 13 Jul 2021 07:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626187642; cv=none; d=google.com; s=arc-20160816; b=vVzQ+AIy1uX27LJIJHCV5Rg1SyaG6tZrZoJMfzH+91xWna9AxJXiL4qrXrDfuTdyj3 WRPuxt47O42amcopfas47uIy1zlrGLEzUN380AWmPLLkwYCHhQSBsl7vov+Saxc4B4OG i9nU47MelRLKAL5sZErJn0TeSoeS/rn1N7aIiorUL4jT3m1HMmIxtDAcx0YVZRN6BeM+ ApNMQuX8nZOSgD93mSql9Y83iwWPiwG/uNSxPFRTDASdOBaSNv9U6Ye9xp+/jaerwyhh DcJ1+1rGhRUMsCwY2hBrsfeqaO7r+IlzgHTp8lyf7kN0JzY3TqYY9hvtYYBfWB5NSJeM b6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QJJlC2CQzcKyP+v22Q/iPtdF4oeDNMpQiyzlZVvD+wg=; b=eAfvWmjL8gSW/5i82aqkR4n8oAD/yp7YIiGK/+N+0taAyXjFXy4xtAhrkRTaeQLJJJ B1h4PSaZlemzPvFLlRnDExAvFVrhVBe8hBnel0ZEr+7UIzJrlDjXSfMJx7bBZjWgx0fm ZjCGFHR50GaswNqGuEsP+Q7S7oGFwO/tDNd+4zXw+Ey1ryNd82KfBTitPnQMTyS1KqyI zaC8OCQJXQ78/OlXAHzN1MRbnwEThcRxeRko0J1RqoJtnbDXIvIaMguVjEU+Lli2zDoW LMqLHXtYcPDNaHiguN5hT1dTPLQ872M5k0ZnFtvUsYHEm7b6cbfiDDRUntnUzyON7Zu9 r4hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eDx98K8U; 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 o14si7856988ilj.24.2021.07.13.07.47.09; Tue, 13 Jul 2021 07:47:22 -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=@kernel.org header.s=k20201202 header.b=eDx98K8U; 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 S236800AbhGMOtT (ORCPT + 99 others); Tue, 13 Jul 2021 10:49:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:58486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236636AbhGMOtT (ORCPT ); Tue, 13 Jul 2021 10:49:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 17A1C60E0B; Tue, 13 Jul 2021 14:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626187589; bh=8OfT0pQARDOsKTvRaO4tWkRS4CwArG5IMRk8JhdFeGw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eDx98K8UcwT5s+ILi3q9xSEhE89E71SJQCdRNBXkfnG8CjAiWOG5zZGkz4+1AfG86 c4l1McC1/A++77qKRxjuT8JC52h0TVFfbHYoBwtfDGn8c+R1AfblXL9S6VaQHZMqmu sT2w+p3ZlCAHX2lG7MMcBGE5a9hQeV9lLJCc4dW0CuY9NZahWMliZFb3U2q7VNpY0M r6Xsv1F1PhDnIBuwFXvtUYDDDGVp/ZndGkSir4mr9gED4rqy6fIjdR8sq9FPnwAtYn 5JFoJhTxoCqPW5pSs292U/QK+pAVOpxSOjsjrAbqDetboZ2cK1qwJR54N5QUUlJihh BAqxGKSyqCw4Q== Received: by mail-ej1-f41.google.com with SMTP id ga14so26958813ejc.6; Tue, 13 Jul 2021 07:46:29 -0700 (PDT) X-Gm-Message-State: AOAM53128dFITcGko1teOuzqCWtigpiTgUUExSfHLWYmphMOny4UmKyD wpJv1jMs2AVmYSRLTygTzYYx8MH4C7Srg4/ilA== X-Received: by 2002:a17:906:28d1:: with SMTP id p17mr5730032ejd.130.1626187587660; Tue, 13 Jul 2021 07:46:27 -0700 (PDT) MIME-Version: 1.0 References: <268086e273df0c53e3a9a1e751304c63e50ebe12.1626173013.git.viresh.kumar@linaro.org> In-Reply-To: <268086e273df0c53e3a9a1e751304c63e50ebe12.1626173013.git.viresh.kumar@linaro.org> From: Rob Herring Date: Tue, 13 Jul 2021 08:46:15 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/5] dt-bindings: gpio: Add bindings for gpio-virtio To: Viresh Kumar Cc: Jason Wang , "Michael S. Tsirkin" , Arnd Bergmann , Jean-Philippe Brucker , Linus Walleij , Bartosz Golaszewski , Vincent Guittot , Bill Mills , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "Enrico Weigelt, metux IT consult" , Jie Deng , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 4:51 AM Viresh Kumar wrote: > > gpio-virtio represents a virtio GPIO controller and this patch adds > binding for the same. The gpio-virtio subnode can be part of a > virtio,mmio node and is based on its binding. > > Signed-off-by: Viresh Kumar > --- > Depends on: > > https://lore.kernel.org/lkml/7c716c2eb7ace5b5a560d8502af93101dbb53d24.1626170146.git.viresh.kumar@linaro.org/ > --- > .../devicetree/bindings/gpio/gpio-virtio.yaml | 67 +++++++++++++++++++ > 1 file changed, 67 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-virtio.yaml > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-virtio.yaml b/Documentation/devicetree/bindings/gpio/gpio-virtio.yaml > new file mode 100644 > index 000000000000..c813cdfd60fd > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/gpio-virtio.yaml > @@ -0,0 +1,67 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/gpio-virtio.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Virtio memory mapped GPIO controller > + > +maintainers: > + - Viresh Kumar > + > +description: > + Virtio GPIO controller, see /schemas/virtio/mmio.yaml for more details. > + > +allOf: > + - $ref: /schemas/gpio/gpio.yaml# > + > +properties: > + $nodename: > + pattern: '^gpio-virtio@[0-9]+$' > + > + reg: > + description: > + The cell is the device ID of the GPIO device (VIRTIO_ID_GPIO) as per > + dt-bindings/virtio/virtio_ids.h. > + const: 41 > + $ref: /schemas/virtio/mmio.yaml#/properties/reg > + > + gpio-controller: true > + > + "#gpio-cells": > + const: 2 > + > + interrupt-controller: true > + > + "#interrupt-cells": > + const: 2 > + > +required: > + - reg > + - gpio-controller > + - "#gpio-cells" > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + virtio@3000 { > + compatible = "virtio,mmio"; > + reg = <0x3000 0x100>; > + interrupts = <41>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + gpio-virtio@0 { > + reg = ; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; Similar to I2C, all this can just be added to the parent node. Rob