Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3859745pxv; Tue, 13 Jul 2021 05:36:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqP6AcKxhNKTVsSBRdmvcKg8HrSb53RxpUaF9niEvXtNE8juXnJhcRNphWqlcncWvzcZtx X-Received: by 2002:aa7:c5c3:: with SMTP id h3mr5550361eds.376.1626179781969; Tue, 13 Jul 2021 05:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626179781; cv=none; d=google.com; s=arc-20160816; b=tO68Bd19lwqpkk/EEhUb24LyGaxvjIdT6VRFIJFRCsDfAolJIrYGBXK/zAEUABZN/9 Ty+vB1HGA3CDBCY4P0oSjQ5Nwhu+mATQ2l8r1lLYKj0eNGNYMmxzejMbIW7ALvJcZgxe g4pG30hQjXuFzPau2NeuWL+2L54sC53Td0QE2PCKvmZOJMqlh1kRq+vwIg3j/2HpDvHU t+mo5oqM5ICBR36HfFPA0YC0a078L4FjvljXaVlcx7gjhbPGj8QKHVkW72OrXCsPLRWs ZcgqdW43CFkCnm3KYNmSaiCotwEf7ge7LDULMZ7lvZpc1CWcD+pIXzM5pma9eO/GKUqD DSRg== 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=k256N1KY8yNfk2VfS8oXgTv7q6TO3FohKoatQDF7yio=; b=kk6OGC2TK8JT13N/KsbeLm5K7NXllGred5x3js/5wVGYseSgGYo1iFL/V8m28Zr9ae 9yWy7hS8KuMh6EdaZA4ciLn1nLfGciMsgK4q4COKj0fs65jlYLyznh9Rd2dQVMGH5hAl kGymbCI+cU4pBgFq0btu4BIxvCpGbxvCjCU41TfCCGm3V2P9UdDcy1tco9hQBylaaIh+ nN7+LXZUOkPj2h1dsbZfVF7uu50lwne2g7iUYtaaNRzkJGM/vNWbm38vSPQXf0P4jhuG e/8Nxb3YQJBfZ7zemWqjtu+9+mm50Numzgj5fxgRlrG5ZNFNT+cW2EveEkVXeLOWt8Co cr4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZSMIw01t; 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 y20si17379343edw.465.2021.07.13.05.35.59; Tue, 13 Jul 2021 05:36:21 -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=ZSMIw01t; 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 S236160AbhGMMfo (ORCPT + 99 others); Tue, 13 Jul 2021 08:35:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:60818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236042AbhGMMfn (ORCPT ); Tue, 13 Jul 2021 08:35:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDE496128D; Tue, 13 Jul 2021 12:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626179573; bh=lQp1qM+OVyA5FA6UPEdx5FsD+VtYMugCp7+F/oQsaoY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZSMIw01tEJU40SKiEza24NlYBPkARoTSCOyKBrG0JqaXcIHhoi/FhOKa0c4VHtKyo 55VbXAHxc6KyDOljE+3lvNPqUwThsgBE54iLc8kRWwXumv493ZmZM1m7R/BgGJsYjH OCm3ZBYmz1jchBfFwo1KbDn6/Nnxr/1ObX09cij9mW3i+RsGi7sx0afo+jfylf7uQO 9J+jba7/zkpW26hNLbfQZGsxIKDSHInXsH3HBpmczNGgnJHkwYEkEld2KpFa/+9VTk 4g3Rc3mXdXZEa/+4H2dABEXJCCDaCcB2cSC1A7zCM74yuGzGYfRikY5jPoq0qanTDE Vbd/2mZWRIwwA== Received: by mail-wr1-f48.google.com with SMTP id m2so19218737wrq.2; Tue, 13 Jul 2021 05:32:53 -0700 (PDT) X-Gm-Message-State: AOAM533UVpKepGKdA3R+Hk7x8i3Ei1MnIIDvAqUVdBauHNPDJegNzJMb HwC5NBk3NGUfzlWUkcds2l14NfiDRqpUCbtpeEY= X-Received: by 2002:adf:e107:: with SMTP id t7mr5382577wrz.165.1626179572293; Tue, 13 Jul 2021 05:32:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Tue, 13 Jul 2021 14:32:36 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode To: Viresh Kumar Cc: Jason Wang , "Michael S. Tsirkin" , Rob Herring , Jean-Philippe Brucker , Vincent Guittot , Bill Mills , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "Enrico Weigelt, metux IT consult" , Jie Deng , DTML , Linux Kernel Mailing List , virtualization@lists.linux-foundation.org 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 12:51 PM Viresh Kumar wrote: > + > + virtio@3200 { > + compatible = "virtio,mmio"; > + reg = <0x3200 0x100>; > + interrupts = <43>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + i2c-virtio@0 { > + reg = ; > + }; > + }; This works, but it seems oddly inconsistent with the way we do the same thing for PCI, USB and MMC devices that normally don't need device tree properties but can optionally have those. All of the above use the "compatible" property to identify the device, rather than using the "reg" property. Neither of them is actually great here, since we already know what the device is and how to talk to it, but I'd still prefer doing this with compatible = "virtio,34"; or similar, where 34 is the numerical value of VIRTIO_ID_I2C_ADAPTER. This would then be required in the virtio-i2c binding. I think you can skip the #address-cells/#size-cells then. Arnd