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: 474881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46014C07E96 for ; Tue, 13 Jul 2021 10:50:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B8D161249 for ; Tue, 13 Jul 2021 10:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235669AbhGMKxj (ORCPT ); Tue, 13 Jul 2021 06:53:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235616AbhGMKxi (ORCPT ); Tue, 13 Jul 2021 06:53:38 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86A55C0613EE for ; Tue, 13 Jul 2021 03:50:47 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id h1-20020a17090a3d01b0290172d33bb8bcso1195048pjc.0 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=COS3y2+yOhjHxwUvcXhRoGECff54C0pDXbZzhySFcIHsXDhs5asziagkKNyusIEhhZ n83JOxegTe9qrN+Z8KX7/eTfEyMeIjXPQcFnWRbZBWXJiyX4hA4Wx27p3T5BUsrYDXHi Fnmu9g6MAq4keyAyAAHwx+yU9orkrubc1lJdplRkdAVqWST5b66ZD4D+9/BX8RdinZPh kJSkWn4FH4eFAFDdcgdRVUXxnAS+pttkKCisSPbWvrydd74deM9d0XmtsY9UTpwnm++G 7hyTDrizqM0x1mdYnaiQso39Y6lhBJk3DPBOexOcTB9U0qG5N3flsykRY9Q6VNSZtwdE 8Vjw== X-Gm-Message-State: AOAM531Ju0bcty838zbgZvibiVXZiGlJnZoyJ7F/W1/OeI0mgPhEADff 9LS9YsNcb/zw3s7i2gf7Xfz6dw== X-Google-Smtp-Source: ABdhPJxwSt+fW6q6oLmsbQWUpPWMZxVQMEC0vEz1IMyhrgYVT2WsxbkoAvR6ROOjdRLOSHodWNX0Yg== 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: linux-gpio@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