Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1147718pxb; Wed, 6 Apr 2022 09:50:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiM2lQLYr4eOl0/GGefxLR19uRt2hjKUC+t1UpckHUxfqNPNpLAc8GUqo9Qy2ZIV6/rbJ2 X-Received: by 2002:a17:90b:e0d:b0:1ca:b15b:7d4b with SMTP id ge13-20020a17090b0e0d00b001cab15b7d4bmr10852532pjb.91.1649263811915; Wed, 06 Apr 2022 09:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649263811; cv=none; d=google.com; s=arc-20160816; b=qIuOL/JhwhZIB+boXGdbW0lwuGFz6Vwht91yzJWYKovAT4rh8bFia/93qEd9AvDceh Al15Vk0H5MeP9ACL64ekkb6m1/mnIT+55vLUzC0xR1+CJC2eUgL4osmHxjasQZrfPoXi XBSfuq6PbIreppWkD6aeJ1Ool3kk6MqSzJ3YoiVHYFn5zSi6qTnyYMcJdbJ8OV6btvCS 1sYTeGj1nU7Sbl48z3Y7Es0aidlMxoPX6p8/nbpwfkUj4S0XNlxD9Opt7ZYTghRxG1l6 WTxXHufhDRKXd5b4XHypqltGFvXgP4wCiXTh6+2EwpkuegiRJ7DI6fforz/dpVLLpPhc 2DaA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VZSNvYxkXiI/qyt3Ay1/TRdTEkEBSR7Ri5rYdZsNpJg=; b=KnwltyVv0oyk9FWK5HBxnOiJy94STqnSCCSEBgCIaQpGaQhxWFmhQY8f0Z6/msQJEH DsipYJHPENC77XhDUCIRsDdJk6XYFTA9k26COTKPIqmp2EgtK/Le8Z+WduALkOlS1x3r QUbZMVF7C8YboqhCiYqsA4I7PJwJsAJsOQNhNrpKNkFZ/K0SbsmWQaB/g2bYvchCxM0u sFiZV36Fz3hCA2BmRLW3UGj6QGf88fyvlbZX5jeB/P2d9vGfWH6hul4ynav7l5CcrYgK NpxoM9CeyS9DjTUWzpgV70OJV1i6WMDqJV6d+U9ijod7IrUKM330/ctiBWKssDkd6bvn DMng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GnVoS3nt; 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 h5-20020a056a00170500b004fa3a8dff76si16385325pfc.45.2022.04.06.09.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:50:11 -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=GnVoS3nt; 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 F28E73ADACC; Wed, 6 Apr 2022 09:02:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237000AbiDFQE2 (ORCPT + 99 others); Wed, 6 Apr 2022 12:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237123AbiDFQCX (ORCPT ); Wed, 6 Apr 2022 12:02:23 -0400 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AEE7147AC7; Wed, 6 Apr 2022 06:33:50 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id E414124000D; Wed, 6 Apr 2022 13:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1649252029; 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: in-reply-to:in-reply-to:references:references; bh=VZSNvYxkXiI/qyt3Ay1/TRdTEkEBSR7Ri5rYdZsNpJg=; b=GnVoS3ntG9TD90Pj1QbyeCJNCqbLE3j84RFT8YpwsBp2LiW0njGPShVG0jQg3FhPaPuCE+ EILKKtlxrpvoHxDd21noWHF0QD9piuDxcGf0t3nfMepTqrCZdM4nyr4c+E+CrVBaATKwgc JMsYFJt+LMlagQVqdqU33fT/CzSnEaqhG5yBMsEmhyLybc9C1vCv7WXh0d08VZfymFgBUT NOI4adGUAINE12QXOw6IqQ2iuCqVTPVJiyHJN9Pu3AOYUbJvwJweTRLP+QNaZkO0aAWPuL 46sJDwmjU6ghkoMqn9+kfsn08ukZ0uDMQrPVmxf/WnSQ5lACH1f2LjkXfG8kVA== Date: Wed, 6 Apr 2022 15:33:46 +0200 From: Alexandre Belloni To: Rob Herring Cc: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Lizhi Hou , Sonal Santan , Philipp Zabel , Frank Rowand , Lars Povlsen , Steen Hegelund , Microchip Linux Driver Support , Thomas Petazzoni , Allan Nielsen , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Stefano Stabellini , Hans de Goede , Mark Brown 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> <20220406094019.670a2956@fixe.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On 06/04/2022 08:19:16-0500, Rob Herring wrote: > > > > > I've told the Xilinx folks the same thing, but I would separate this > > > > > into 2 parts. First is just h/w work in a DT based system. Second is > > > > > creating a base tree an overlay can be applied to. The first part should > > > > > be pretty straightforward. We already have PCI bus bindings. The only > > > > > tricky part is getting address translation working from leaf device thru > > > > > the PCI bus to host bus, but support for that should all be in place > > > > > (given we support ISA buses off of PCI bus). The second part will > > > > > require generating PCI DT nodes at runtime. That may be needed for both > > > > > DT and ACPI systems as we don't always describe all the PCI hierarchy > > > > > in DT. > > > > > > > > But then, if the driver generate the nodes, it will most probably > > > > have to describe the nodes by hardcoding them right ? > > > > > > 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. > > > > Just to clarified a point, my PCI device exposes multiple peripherals > > behind one single PCI function. > > Right. I would expect your PCI device DT node to have a 'simple-bus' > child node with all those peripherals. And maybe there's other nodes > like fixed-clocks, etc. > > > To be sure I understood what you are suggesting, you propose to create > > a DT node from the PCI driver that has been probed dynamically > > matching this same PCI device with a 'reg' property. I also think > > this would requires to generate some 'pci-ranges' to remap the > > downstream devices that are described in the DTBO, finally, load the > > overlay to be apply under this newly created node. Is that right ? > > Right. You'll need to take the BAR address(es) for the device and stick > those into 'ranges' to translate offsets to BAR+offset. > Last time I tried that, this was not working well because it means that the ranges property of the device depends on the host machine... -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com