From patchwork Tue Jul 13 10:50:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 474626 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3836938jao; Tue, 13 Jul 2021 03:50:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDA8NXrzSA3VlZMCFzo0/HmvSFCE/Yp+TvlrjATv/BKIhshhshQYXJF1X2lq+FcIotiWQo X-Received: by 2002:a05:6402:2034:: with SMTP id ay20mr5110398edb.188.1626173449809; Tue, 13 Jul 2021 03:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626173449; cv=none; d=google.com; s=arc-20160816; b=ueTIJeWIoe8pvuO56YSSYmlXsUs1o6zxFTM9tP88X7IWCyjgfDJ4b6+M6e9cHazhGP syt4ZhHwMZmx9AwglfpuQftPMIEP/fmtDrtURvZHDU1y1u0HVBrvRC2swKvLXBworHIL XsA+gnuN34cP5W/av2LCKZwHGO9oxsij8aOMHV1O1FHrzbvWMXLY+ec3Io0CGA6VVA4w 2dzYsFDNnzs2AOUIWcksJGtQJtu4sySJ7l7Aexe28/AsXTS3i0x7ojx01dGYhe4HcIrk +xRfbw829Kdtu+XwqZ3HnlbOSX3djx6aeid9Ncb1FBzKnwLa9DoTzmaIKzkkr1iFvjbU uRvg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4xLUJ1dW1Qt0KgF3pEuea/62PVc6DCT7EsaU/Szp0Bg=; b=Q8AokmOfE6gRfdfdXHekCCd89sBEU6izeJmkn7e3nZpb80y3SpQvnNYS4k07Squ8m8 zhOXbfLUjJtBZeelaj9I0s99nO5NJYn7sBjou7oqCJB1GtGSko9FJRC2KjGrkaSPtDA9 ES8RfCfiG9VQ1u929Hwjrl3vWsdZYC9pKtKvMBpGB/bbSE/NEiURbhYjWoII9vGbwKJJ 1D/Llki9+TZPW18AQpQzfMF2XPWZ8eayOSOqcb7VRC3fdvnWtmeidQ3dhiDKz8Ikyc4u +uQav+65zooFFIUH99beVdDhdVbr6tuY92jF5f3nx6QLaYWEVMd+7mtRxvqNexITvzYg WqJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E2vCdTP4; 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 ga12si20801870ejc.247.2021.07.13.03.50.49; Tue, 13 Jul 2021 03:50:49 -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=E2vCdTP4; 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 S235508AbhGMKxh (ORCPT + 7 others); Tue, 13 Jul 2021 06:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235460AbhGMKxh (ORCPT ); Tue, 13 Jul 2021 06:53:37 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73228C0613DD for ; Tue, 13 Jul 2021 03:50:47 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id d9-20020a17090ae289b0290172f971883bso1176385pjz.1 for ; Tue, 13 Jul 2021 03:50:47 -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:mime-version :content-transfer-encoding; bh=4xLUJ1dW1Qt0KgF3pEuea/62PVc6DCT7EsaU/Szp0Bg=; b=E2vCdTP4Dqtla5LUcohrAy+3w9yg8TqQrenrE5K9FTm+s6OAAqAP4MkvIUanmoewVh p9Xoha8+yUnUYTMCuoC0YpI5U+SKq2/0jW9vqhW6ACR2JbmbQlA9mE3k0V9hJ0hd8oan tTlxN5pFfvjiYWIdZqviVCBXIrYVnUuADNxLHBtHQAw7pqzSDE/xUbphfgNvfjOHqS5u JeJ0nuh0WIXCgIrUZzo3opYAS5jkLPFYAnwd+nwZ+eSIYIbqkkdOPQeqgg2Mc7wm6yd8 LE1lVaUisP/flFiy87qUDrIeegoszDgg1BVBZsTYuXAIoMCvvY120W27WX3hWkBNqpEq uoJQ== 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:mime-version :content-transfer-encoding; bh=4xLUJ1dW1Qt0KgF3pEuea/62PVc6DCT7EsaU/Szp0Bg=; b=WQdFz7p4eoGCqbvgd8vXkBNh3J008mChjaJlfZ7kEpeJGNauDlgHwWRdYaTDB7aVs4 EFrB+NQtpA5GAYxqP5Os2QtVTOqf1vj1hjpaI78u9oNgnh8tZfVQwHB57chxeu62F5cI rgNtBnJtr7lFl+L02zr3cgjt87KHtwgd6r9/jY3vgK2THp/P3HA8IL93cgEnzU2xJp47 Dx3488oQGd99lA0dYdKELB0r7WJyfCGWXWGcqgNzd2SuwmVNMUXsufCj8K9WlcEueZa8 9jSw9D0UmddjcLSGIbQJ/dfg0pAqnIm6Kcxo+JFoc6BOhPZmmlC8PJRSugYHKVt/EkiV 8drg== X-Gm-Message-State: AOAM532GXYtj1We92dWHgMevy6lP9jhhJu/PpSqYOFUDTAm7+J0qruNq oy9lmoP7AM5Ar3geZTUEeO3B3g== X-Received: by 2002:a17:90b:957:: with SMTP id dw23mr12591539pjb.123.1626173446842; Tue, 13 Jul 2021 03:50:46 -0700 (PDT) Received: from localhost ([106.201.108.2]) by smtp.gmail.com with ESMTPSA id lj13sm15276916pjb.53.2021.07.13.03.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 03:50:46 -0700 (PDT) From: Viresh Kumar To: Jason Wang , "Michael S. Tsirkin" , Rob Herring , Arnd Bergmann , Jean-Philippe Brucker , Bartosz Golaszewski , Linus Walleij , 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, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, Wolfram Sang Subject: [PATCH 0/5] virtio: Parse virtio-device nodes from DT Date: Tue, 13 Jul 2021 16:20:29 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, Currently the DT only provides support for following node types for virtio-mmio nodes: virtio_mmio@a000000 { dma-coherent; interrupts = <0x00 0x10 0x01>; reg = <0x00 0xa000000 0x00 0x200>; compatible = "virtio,mmio"; }; And each virtio-mmio corresponds to a virtio-device. But there is no way for other users in the DT to show their dependency on virtio devices. This patchset provides that support. The first patch update virtio,mmio bindings to allow for device subnodes to be present and the second patch updates the virtio-mmio driver to update the of_node. Other patches add bindings for i2c and gpio virtio devices (they have some dependencies, mentioned in the patches). Tested on x86 with qemu for arm64. -- Viresh Viresh Kumar (5): dt-bindings: virtio: mmio: Add support for device subnode virtio_mmio: Bind virtio device to device-tree node dt-bindings: i2c: Add bindings for i2c-virtio i2c: virtio: Update i2c-adapter's of_node dt-bindings: gpio: Add bindings for gpio-virtio .../devicetree/bindings/gpio/gpio-virtio.yaml | 67 +++++++++++++++++++ .../devicetree/bindings/i2c/i2c-virtio.yaml | 59 ++++++++++++++++ .../devicetree/bindings/virtio/mmio.yaml | 41 ++++++++++++ drivers/i2c/busses/i2c-virtio.c | 1 + drivers/virtio/virtio_mmio.c | 44 ++++++++++++ include/dt-bindings/virtio/virtio_ids.h | 1 + 6 files changed, 213 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-virtio.yaml create mode 100644 Documentation/devicetree/bindings/i2c/i2c-virtio.yaml create mode 120000 include/dt-bindings/virtio/virtio_ids.h -- 2.31.1.272.g89b43f80a514