Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1046986pxb; Wed, 6 Apr 2022 07:28:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+AhX1+Maw9Elz62LKjpQ6TRjAZzXVfnpeSqQm3O+NQ3zlpcFR3WH22ZTpXN2lvOkLunII X-Received: by 2002:a17:902:c2d8:b0:154:b384:917b with SMTP id c24-20020a170902c2d800b00154b384917bmr9193443pla.58.1649255324676; Wed, 06 Apr 2022 07:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649255324; cv=none; d=google.com; s=arc-20160816; b=tVkbup49/Lcp/CBPmoeLia0vUXpRYzsddQoAB87rYKOhgj7ly8BKXUr9Fefx4tzoCW G2lkBd5uBHNKIx8Ck9HUAU78p/rLhsoTgTFakxATZVQ1hxCA62Y42qZCX2gvdBhhOBDo ohWKtEL4NrMtadthVHjpx0+l7g614Typ1j1zZDvbFuf/gi8t2cZa1XG2U7oP/iV6denA fyRq9QYcqvhA8RZaE9qdrPHTRXq2LbYg0PZdxr8TaDXQPo5CJ4YhHgIisbGTXVrBO7eG EKy6T3GD+pWBu/WL9QMeirMHzWLkZlR20dCf7FEcGJ4ZuEnNL0AVG3334ysY7bRfJMwW 8hiw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=aEHF044mvurdicWAqWTz+vjeqtSmEBRXsYOuXWhcUIE=; b=AbIvyEaWsSdTheIGD+hon5IJfjpL4VzjDeEmS6PUyBRYerLBHLt0joLMk4aYpsCaee aGFY9nZVoujJT86FN7GgNcnnPgnpcVVCHKqhoeZQepvUu3CLW1osTYLAEW+AoSJzXepd TTcsmar0bSrfuH64f+CLbMcIEoGtj8u9vZ3uodUhatgiGODn0010FIRbB2g6rqJDe37n M9qrnOMd6+ec39dvWRIuTc4pdDHO1nkxL3jEP6zkY5g+Bgskthge+ZoxcuInR8j/4285 teF/BI3RUKq6w+RWuW7Yok/Xp5kxCfhE4h/CySUivGGx5xC+b514LtneqkbdbGodiVcH i3yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="b/QN8+a5"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w2-20020a170902e88200b001544c9777e0si17584887plg.95.2022.04.06.07.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:28:44 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="b/QN8+a5"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A37AC4FB697; Wed, 6 Apr 2022 05:10:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbiDFMKq (ORCPT + 99 others); Wed, 6 Apr 2022 08:10:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231847AbiDFMKd (ORCPT ); Wed, 6 Apr 2022 08:10:33 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E1B295A3C; Wed, 6 Apr 2022 00:53:44 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id B19C3E0016; Wed, 6 Apr 2022 07:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1649231623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aEHF044mvurdicWAqWTz+vjeqtSmEBRXsYOuXWhcUIE=; b=b/QN8+a5O6IuWnDPBGXJBxablmzOTzv3O3zC1Q5qYmh3hnM8Ben3qtFlLnjmilYYPoZVv+ LY1z0SEQVOIMkXV7ipnv5VOSpdmuPMGIgpJQaiKieocdxEj56RWgje4FOSa0ip6R2wdB3r ynGdDdmiO0qdQjBk9C4syeIwccxxFr/xfi3F+f1583B8x9w6ovtdfN39Zyt8Qn/9R4rFfH PD8r79eUMyGAQOVn43/Hm3fyl34B6BTvQH8tISWnl7kbDZLetK2yUU/9NYlWEIvHPQBdLB PWtQD7zfNHLmK23EzE5z29fr2Ix3MyaM10BFYOWV2lbb49BxEHF/kfqBwvi19A== Date: Wed, 6 Apr 2022 09:52:13 +0200 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Rob Herring Cc: Lizhi Hou , Sonal Santan , Philipp Zabel , Frank Rowand , Lars Povlsen , Steen Hegelund , Microchip Linux Driver Support , Thomas Petazzoni , Alexandre Belloni , Allan Nielsen , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Stefano Stabellini , Hans de Goede Subject: Re: [PATCH v2 0/3] add fwnode support to reset subsystem Message-ID: <20220406095213.21cf3ffb@fixe.home> In-Reply-To: References: <20220324141237.297207-1-clement.leger@bootlin.com> <20220405092434.6e424ed4@fixe.home> <20220405175120.23fc6b2a@fixe.home> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le Tue, 5 Apr 2022 16:28:02 -0500, Rob Herring a =C3=A9crit : > > > > No, the kernel already maintains its own tree of devices. You just > > need to use that to generate the tree. That's really not much more > > than nodes with a 'reg' property encoding the device and function > > numbers. > > > > We already support matching a PCI device to a DT node. The PCI > > subsystem checks if there is a corresponding DT node for each PCI > > device created and sets the of_node pointer if there is. For > > OpenFirmware systems (PPC), there always is a node. For FDT, we > > generally don't have a node unless there are additional > > non-discoverable properties. Hikey960 is an example with PCI device > > nodes in the DT as it has a soldered down PCIe switch with downstream > > devices and non-discoverable properties (e.g. reset GPIO for each > > port). =20 >=20 > Here's a quick and dirty implementation creating DT nodes for PCI devices: >=20 > git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dt/pop-pci-n= odes Ok, thanks, after looking at the branch, it appears that you expect the PCI nodes matching the probed PCI devices should be created by the PCI subsystem itself. My previous comment saying that the node would be created by the PCI driver itself is then wrong and I understand what you meant. Then, there is still a bit of magic to do to correctly fill the ranges for translation and then the driver "simply" have to load the dtbo and apply it with of_overlay_fdt_apply(). >=20 > Rob --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com