Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2494555pxp; Mon, 7 Mar 2022 17:06:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz33Rv+v58XsMxo44C1bPXt7gno4DjOatv/yQa+W9WQGl90OZUzXvmuVtnT+fok4Ek5DxVl X-Received: by 2002:a05:6402:4312:b0:416:3084:ae0e with SMTP id m18-20020a056402431200b004163084ae0emr10759122edc.358.1646701608830; Mon, 07 Mar 2022 17:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646701608; cv=none; d=google.com; s=arc-20160816; b=p+gIEYzc8cvDmb255HhzRYi6A//D8JQ2v+IFKklo1xk5NQmKgnkc1CIXG6THiASx3Q eR/p5uuYdW1GGNOqb9bWUr3x75Ve2HfFFc+S/OcQpVZNNn9MGNsYpBbN797oYzSydody Fq1lSqSUcPiCTba+QYTTdMlg62bMteIvsqlzrvZbhItKdk77UBPcQ0f8rPvLb7AIIQoQ mTeu1s1HW0jWsm7RmOKiRN0e/+vZjQKv4xUrugaLu55DmsPXAPLF5dYpSV9xJMHZRjpz +BTe6nFHRI1rWdM93DnAp4MqMuy33inH/ryLCkhcVszshUKpDUw7frJbyG27BZ5OMmKA w58w== 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=XxlKcdjLhNI+4bjYU7bBh5bnawi8tY7WzXZa+J0vWkA=; b=FnFFrBMaY7OeCJjBr2YCJRFiesLpTZ/wdszGYBAkEi+mUUsJlmkV6wKofdeyi4yLWX MOT1392P5i7hlIwtg6QEGqfwSmuN7y36FWvkXA1tc1hhU5L8LL++HsnB0B+9/rncrHtZ n3DnQO8a01WlvHV3+cDK+beS6kFW+r12LXGl25gViusQqLD33GYWdCCylX0VX6E4z/e6 8mnBtr/7mrp0fJ4YxZs4ejVXj9oxI8JZJCZBKnxNCHZOJyl5XlF80aqrCfeQHZ9dJ+Iz 0ZUarD8LY1R6nweMFFFl3xSy8FuCMwJQwWOHVOQYEjXBndQek4JPRl1jHAQx1hBkdeJ3 wN8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m0rwrj7q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh34-20020a1709076ea200b006dabf0b7ca8si6327584ejc.306.2022.03.07.17.06.26; Mon, 07 Mar 2022 17:06:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m0rwrj7q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238080AbiCGOJJ (ORCPT + 99 others); Mon, 7 Mar 2022 09:09:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233551AbiCGOJH (ORCPT ); Mon, 7 Mar 2022 09:09:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53CA64F9F9; Mon, 7 Mar 2022 06:08:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 08ED9B81597; Mon, 7 Mar 2022 14:08:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69539C340F6; Mon, 7 Mar 2022 14:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646662089; bh=xwPfd4oUhK0TVFJjZo+icYnrwgPQRppqm/ixqy4gIXI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=m0rwrj7qlWY/EyMdyBJDNDEXDikR7zso2HjNnW2bUT9o1A26Z6NnUbCPYSVY1RmPf mGLDda0SKzo3lVxS7xagvMe2G1eaiWjq2BhjmBPcGekL8DLRK7IJhXYVgBXgFLt9Ck R9wqRIsgMmZkxmZkfjt6rADhYIiG7lg9XJcEWOHIAW7ryAoeX1DBuSCa3qM3MIN3xm I/joxteK4oZIZKHgO1MOXDCAK3E4ASHeK3vTzy0pIecSTGa4hFGS/te+bynMH4/D64 eLY3+8pz/lNH8B3i8y3RZLki77q3sGh6go+bkBa4nW/1D96msiY+BEy58B+mWbU3b4 p8In8A0fCdEIA== Received: by mail-ej1-f47.google.com with SMTP id gb39so32160956ejc.1; Mon, 07 Mar 2022 06:08:09 -0800 (PST) X-Gm-Message-State: AOAM531JljW453JfrmNmnVLPB0//iT+fzdc1Vopd3m7/ZBVQK++j3vcT xzgNGhVETwIP9bGuG18mjJprEBd7VjOeXCs7gA== X-Received: by 2002:a17:906:a38e:b0:6da:a1f9:f9ee with SMTP id k14-20020a170906a38e00b006daa1f9f9eemr8781198ejz.27.1646662087585; Mon, 07 Mar 2022 06:08:07 -0800 (PST) MIME-Version: 1.0 References: <20220305052304.726050-1-lizhi.hou@xilinx.com> <20220305052304.726050-3-lizhi.hou@xilinx.com> In-Reply-To: From: Rob Herring Date: Mon, 7 Mar 2022 08:07:55 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V1 RESEND 2/4] Documentation: devicetree: bindings: add binding for PCIe endpoint bus To: Tom Rix , Lizhi Hou Cc: PCI , devicetree@vger.kernel.org, Xu Yilun , Max Zhen , Sonal Santan , Yu Liu , Michal Simek , Stefano Stabellini , Moritz Fischer , David Woodhouse , "linux-kernel@vger.kernel.org" , Max Zhen Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Sun, Mar 6, 2022 at 9:37 AM Tom Rix wrote: > > Lizhi, > > Sorry for the delay, I am fighting with checking this with 'make > dt_binding_check' > > There is a recent failure in linux-next around display/mediatek,* > between next-20220301 and next-20220302 that I am bisecting. There's already patches for that posted. Just use 'make -k'. > > There are a couple of checkpatch --strict warnings for this set, the > obvious one is adding to the MAINTAINERS for new files. > > Tom > > On 3/4/22 9:23 PM, Lizhi Hou wrote: > > Create device tree binding document for PCIe endpoint bus. > > > > Signed-off-by: Sonal Santan > > Signed-off-by: Max Zhen > > Signed-off-by: Lizhi Hou > > --- > > .../devicetree/bindings/bus/pci-ep-bus.yaml | 72 +++++++++++++++++++ > > 1 file changed, 72 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/bus/pci-ep-bus.yaml > > > > diff --git a/Documentation/devicetree/bindings/bus/pci-ep-bus.yaml b/Documentation/devicetree/bindings/bus/pci-ep-bus.yaml > > new file mode 100644 > > index 000000000000..0ca96298db6f > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/bus/pci-ep-bus.yaml > > @@ -0,0 +1,72 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/bus/pci-ep-bus.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: PCIe Endpoint Bus binding > > + > > +description: | > > + PCIe device may use flattened device tree to describe apertures in its > > + PCIe BARs. The Bus PCIe endpoint node is created and attached under the > > + device tree root node for this kind of device. Then the flatten device > > + tree overlay for this device is attached under the endpoint node. > > + > > + The aperture address which is under the endpoint node consists of BAR > > + index and offset. It uses the following encoding: > > + > > + 0xIooooooo 0xoooooooo > > + > > + Where: > > + > > + I = BAR index > > + oooooo oooooooo = BAR offset > > + > > + The endpoint is compatible with 'simple-bus' and contains 'ranges' > > + property for translating aperture address to CPU address. This binding is completely confusing because 'PCIe endpoint' is generally used (in context of bindings and Linux) for describing the endpoint's system (i.e. the internal structure of a PCIe device (e.g. add-in card) from the view of its own processor (not the host system)). This binding seems to be describing the host system's view of a PCIe device. We already have that! That's just the PCI bus binding[1] which has existed for ~25 years. For a non-DT system, what you are going to need here is some way to create DT nodes of the PCI bus hierarchy or at least from your device back up to the host bridge. I would suggest you solve that problem separately from implementing the FPGA driver by making it work first on a DT based system. Rob [1] https://www.devicetree.org/open-firmware/bindings/pci/pci2_1.pdf