Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1144467pxb; Wed, 6 Apr 2022 09:45:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmcNEkzG+PT3VW+pwbMwfDkUKny1g2XCC0NhFF+t/AYEEXii2+t46ojoXr+G8mlLRmvQHh X-Received: by 2002:a63:b255:0:b0:382:3b01:1b59 with SMTP id t21-20020a63b255000000b003823b011b59mr7954538pgo.340.1649263515440; Wed, 06 Apr 2022 09:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649263515; cv=none; d=google.com; s=arc-20160816; b=p81duKzCcwdoDeotA2+1+T8gQP/dle4KQec/tsb9SUgm75sAu4By4bwCkDW5Iy4GpE LAwgb1pKe3o/7b2xwPCyHIgqfErEK6GmbEA6A+FsA5xo/6o/Vm/cPClAiwD1MrADu/sb AgftTHLeApJAzoIMx6PHezCgzZz2qpqPTqW8QgqjllKtDVgi+J8nRaLqGkyjxys3/q/3 xauCo/6bjGljamHLRIANJ0MgOHnTUwxhEof5R8Jn+bRWFRshWeSbck1d1UcsCj0Vwt4W CXJRN0o0xGB7lRF79gA1xLEVDsvltKgDLoXE13xGC09FUJtwXzHMIWj8ZM32/mRtYLZc 9ynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1zwzlI7cDrUzx3niiG9DPxuZXhYhVpti1uJIhGlGfYY=; b=bP4Oqtr9P59RZ+HPlmK9rBKb2vLb3E2/j6VtfNrYDdyrQXGeAMqdwCIRfQmIfJ9nVr Le6HqDtg2zbUIngl1ugeAdx5/B9VD4cKLvSiQuJ6i5qs7FtZeMISH+n1NQKorLjsdVRW azmQ9UUvNV2J29UZVcqjkh12nSlNxWBYaoVmtY9wvkTrJscn8tedQRMiQKJhZzC+CcLG h4ANIA0Ax4+XdqupOCb11W/SHSxQa+y/daQrVjDRkPWed2I/weg9BZso5uVVrB6j1A1m xGOXBvB9MtlQZGOL2v+Wudsxo0OWdjyoCOn6RN8fGXJ6y+eRmSHppkfavyktuFhJfRPP nqVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id cp12-20020a056a00348c00b004fa9292ffb9si15277591pfb.354.2022.04.06.09.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:45:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6962538B628; Wed, 6 Apr 2022 08:56:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236750AbiDFP6p (ORCPT + 99 others); Wed, 6 Apr 2022 11:58:45 -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 S237592AbiDFP6T (ORCPT ); Wed, 6 Apr 2022 11:58:19 -0400 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC8F63682F1; Wed, 6 Apr 2022 06:26:22 -0700 (PDT) Received: by mail-oi1-f175.google.com with SMTP id e189so2347932oia.8; Wed, 06 Apr 2022 06:26:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=1zwzlI7cDrUzx3niiG9DPxuZXhYhVpti1uJIhGlGfYY=; b=BVSJ8J0OM0HgsNezJy9eJIOp66aZeOHqkFqd0EjYfsOwibtO41hrzFWXLs6ytTz7+D lYvev3oJunZpL+aIqqev/II4GgGfEsqrUXnh+1G/LaDXRH7VdGRYaiUSYE+mcuWO7Yja BUnCrjwXGfFuh7js99qGO+VKi4c6/tFFklBl6hB4b3UdqIIbH1p3VIFSTNRYjAJrDL/6 j65/6z58KEnWaN6TpMrgA3Y3g15hHWBm9KQLrFLxOAiDOJUdugpuXzuwzUMULm1b9sty G33PFaDG/CRqJLXvbBtsLBzmcf4Zn4NQKsMI5//SNHNz76Q8Mmpi3Af2bzQKScTC9FWr Nfjw== X-Gm-Message-State: AOAM530UWtcak+PPu+JRYHdE20EQuKGsYqthspbeaNnHQ7nc3jtWcnaC m+GkBD6IQk3lqeFVczydww== X-Received: by 2002:aca:4b50:0:b0:2ef:b47:294a with SMTP id y77-20020aca4b50000000b002ef0b47294amr3479270oia.69.1649251582202; Wed, 06 Apr 2022 06:26:22 -0700 (PDT) Received: from robh.at.kernel.org ([2607:fb90:20d6:52b3:6546:933d:31a7:672c]) by smtp.gmail.com with ESMTPSA id a17-20020a056870b31100b000e1fc4e696esm3454144oao.28.2022.04.06.06.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:26:21 -0700 (PDT) Received: (nullmailer pid 2091366 invoked by uid 1000); Wed, 06 Apr 2022 13:04:35 -0000 Date: Wed, 6 Apr 2022 08:04:35 -0500 From: Rob Herring To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= 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: References: <20220324141237.297207-1-clement.leger@bootlin.com> <20220405092434.6e424ed4@fixe.home> <20220405175120.23fc6b2a@fixe.home> <20220406095213.21cf3ffb@fixe.home> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220406095213.21cf3ffb@fixe.home> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 On Wed, Apr 06, 2022 at 09:52:13AM +0200, Cl?ment L?ger wrote: > Le Tue, 5 Apr 2022 16:28:02 -0500, > Rob Herring a ?crit : > > > > > > > > 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). > > > > Here's a quick and dirty implementation creating DT nodes for PCI devices: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dt/pop-pci-nodes > > 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. As I said before, the driver could create its node and all the parents. I went with the other option partly because I didn't have a particular driver. That has the advantage of only creating necessary nodes and provides a way to trigger doing so. The issue with it is the timing of when the node gets set (after parent devices have probed). > 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(). The host bridge resource list should have all the information needed. Rob