Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp92639lqj; Thu, 11 Apr 2024 10:41:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoVvMmKoQiwneqM+9U9E16D+cR8qc+KoS+tKwNn5RY4oGJXC/S9hrd1xlWgMjhzvBm5RwCrxJHPso9xsA3b6LOmM7OWPE7ltX6CXlGQg== X-Google-Smtp-Source: AGHT+IElwIlyZ+w0AJ6ZXYtWsMPPYR+5GPVSP6RTU5sRllRDk+xMR9JB8nanotMYr73M+99HN9SK X-Received: by 2002:a05:6870:a450:b0:22a:a2e1:def1 with SMTP id n16-20020a056870a45000b0022aa2e1def1mr216494oal.8.1712857285373; Thu, 11 Apr 2024 10:41:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712857285; cv=pass; d=google.com; s=arc-20160816; b=f77wFS71Ar4XG7oOGCA7JtVvDcyvyxRHOKqf/Cgloy1RZGTHWA7fu6T2O77wwdOlsy 4qStXfdeHBGXMCKAPP5z8Rs8s3on0wAC3bF0O9tr9c9RsSMifgaoJyJZ+vOUW8xnh8VS HQg4iMgL5YlRQlIMRVu+X1sa1aQr2rkMxyiJJ9NKttIWE2r3rOhYR6CAznVGzi9uurWR jxaF4t/xfY7i2P9Iyy2vC2Zq2OsTM14YiD2/y0fYqb3Ms/6Nfqj/vTdTIRhr8mWYJrZJ a/ivjd8gF9D9Gj5CyLI18QxPrSHOcrCkkkVQeA+ruy/3u+J7M+3HQmib2bU7tTCH2YmR 0nEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=Z/l1n6A+3IOrNq5BU7KCsvCNQ+Bd+oud1gfsg5gaGQ4=; fh=kkGvGsez4yNffd3xXCy3Z9mY/xi3bfYgZAuRwYcGydA=; b=gOiDB6n08kUNkjGQh7NnCmyXQK0uyHTvt7QX5fUCrY+RULco0Os7kPgjHENphjjG1y dja40AHDwFNLpcjiyiLOdM6T0mUnER+iM+HjUlgsvlHXjariCRzJB6VhCrNbSa6N0sKa s+1+Uecu09DoQtpmLk4eAF8uFTdzPKrFsJNH2vctnBu+8a9hHa2Qc8O0qk+Np/BHk16s Ue2pg6lWt2fqhxDhdd97gO+nMXQcEvDKJbhtfc5NBy78o2+linT1jZUwXuIgF0itWC5V 5P7EcodWGxImqByd+oFet0lXb71qYlnTEMfug54sKzH0VTc1M3R73CtPsLn4yK5scpR+ b4Cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rvm0S2oJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-141291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h21-20020a05620a245500b0078d6855bc3csi2198489qkn.204.2024.04.11.10.41.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 10:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rvm0S2oJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-141291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0CB5C1C221BF for ; Thu, 11 Apr 2024 17:41:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C308F15AAA5; Thu, 11 Apr 2024 16:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rvm0S2oJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6EC115A4AF; Thu, 11 Apr 2024 16:11:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712851870; cv=none; b=Nhsh5S1oKzDA7EsR7YOsKzxI9dRbsxTPPfn84iutEdMmKBoxD1eZod1O8VZhf7TYL6gL+upVRhTaq3neFdScsdKPgyCiiGDDP+Rwf1GEBL1s/4qTMgnzCE9iL9VmYVBxOZ3boatGms7aEDmVCVHZ4+SqOQ9NbZDbmkCFLJTHdGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712851870; c=relaxed/simple; bh=Co3kGhkNsPgacB/pabyCsenR+0gNcn0apDUzg988VHA=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=q18mJbNr1XEByVMCT5shHMfoltp5jkb+eTD+yntIt286pUr9i8Q5ob0UPCd9qtDc46reH9KA02c4CLwOharuqaHIWRxf2kIaY/Ks4FqzXH/TMEKgQtJv4LwV6I2MQQH19xLo5TNS9MMzravLv21fa/xmUeiBnziQdxk58tEjGCg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rvm0S2oJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 001FEC072AA; Thu, 11 Apr 2024 16:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712851870; bh=Co3kGhkNsPgacB/pabyCsenR+0gNcn0apDUzg988VHA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=rvm0S2oJrwiPhJs3eMOF4f2WjbhaHXPCHhoQzlhlvGzTckM5NUJlGvZE//UJTbZuk 7mUvnId3dLSEO383sQdQGizvtxlqOjpE6LHUGEUzOLcvm2FFMA5/b/WtwmbW9OxU3t vraPDqamiI8esjKLmEPlXpKeb3GokCNr0IyDHPJwJEbgyjnyrMewIrl/lr5uw3SXYu ufts0B5MaTMqZx4inTcApZhjiikn03+zpnbGKAZYEpPL3yc3b4UbwWwc/biOcTK9tx O2EDKKXK1jYU6zNUiteXtEM8WNQ9P2BCMa9UpGqUhrAINiWUMdVs8dvmVCMdMSalCs JbWrghBBIpbBg== Date: Thu, 11 Apr 2024 11:11:08 -0500 From: Bjorn Helgaas To: Rob Herring Cc: Sergio Paracuellos , Krzysztof Kozlowski , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Krzysztof Kozlowski , Conor Dooley , Hector Martin , Sven Peter , Alyssa Rosenzweig , Ray Jui , Scott Branden , Broadcom internal kernel review list , Florian Fainelli , Jim Quinlan , Nicolas Saenz Julienne , Will Deacon , Linus Walleij , Srikanth Thokala , Ryder Lee , Jianjun Wang , Matthias Brugger , AngeloGioacchino Del Regno , Daire McNamara , Bjorn Andersson , Konrad Dybcio , Marek Vasut , Yoshihiro Shimoda , Shawn Lin , Heiko Stuebner , Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Bharat Kumar Gogada , Michal Simek , Geert Uytterhoeven , Magnus Damm , Neil Armstrong , Mark Kettenis , Tom Joseph , Ahmad Zainie , Jiaxun Yang , Kishon Vijay Abraham I , Thippeswamy Havalige , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v2 2/4] dt-bindings: PCI: mediatek,mt7621: add missing child node reg Message-ID: <20240411161108.GA2184354@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240411142107.GA3537062-robh@kernel.org> On Thu, Apr 11, 2024 at 09:21:07AM -0500, Rob Herring wrote: > On Thu, Apr 11, 2024 at 07:39:17AM -0500, Bjorn Helgaas wrote: > > On Thu, Apr 11, 2024 at 08:13:18AM +0200, Sergio Paracuellos wrote: > > > On Thu, Apr 11, 2024 at 8:01 AM Krzysztof Kozlowski > > > wrote: > > > > On 10/04/2024 23:26, Bjorn Helgaas wrote: > > > > > On Wed, Apr 10, 2024 at 08:15:19PM +0200, Krzysztof Kozlowski wrote: > > > > >> MT7621 PCI host bridge has children which apparently are also PCI host > > > > >> bridges, at least that's what the binding suggest. > > > > > > > > > > What does it even mean for a PCI host bridge to have a child that is > > > > > also a PCI host bridge? > > It should say 'root port' instead as the binding description correctly > says. OK, that makes a lot more sense, and we should fix the commit log. > > > > I think the question should be towards Mediatek folks. I don't know what > > > > this hardware is exactly, just looks like pci-pci-bridge. The driver > > > > calls the children host bridges as "ports". > > > > > > You can see the topology here in my first driver submit cover letter > > > message [0]. > > > > > > [0]: https://lore.kernel.org/all/CAMhs-H-BA+KzEwuDPzcmrDPdgJBFA2XdYTBvT4R4MEOUB=WQ1g@mail.gmail.com/t/ > > > > Nothing unusual here, this looks like the standard PCIe topology. > > > > What *might* be unusual is describing the Root Ports in DT. Since > > they are standard PCI devices, they shouldn't need DT description > > unless there's some unusual power/clock/reset control or something > > that is not discoverable via PCI enumeration. > > It's only unusual because typically there's only 1 RP per host bridge > and properties which really apply to the RP get stuck in the host bridge > node because we don't have a RP node. An example is perst-gpios. That's > not a property of the RP either, but the RP is the upstream side of a > slot and we often don't have a node for the device either. Makes sense. I'm still confused about one thing, maybe just because I don't really know how to read these bindings. The binding now looks like this: properties: compatible: const: mediatek,mt7621-pci reg: items: - description: host-pci bridge registers - description: pcie port 0 RC control registers # A - description: pcie port 1 RC control registers # A - description: pcie port 2 RC control registers # A patternProperties: '^pcie@[0-2],0$': type: object $ref: /schemas/pci/pci-pci-bridge.yaml# properties: reg: # B maxItems: 1 It looks like the "A" items are separate things from the "B" items? But I think the relevant code is here: mt7621_pcie_probe mt7621_pcie_parse_dt pcie->base = devm_platform_ioremap_resource(pdev, 0) # 1 for_each_available_child_of_node(node, child) mt7621_pcie_parse_port port->base = devm_platform_ioremap_resource(pdev, slot + 1) # 2 where it looks like both "1" and "2" use the items in the "A" list, i.e., resources 0, 1, 2, 3, all from the same platform device. Is there code that uses the "B" item that this patch adds? Bjorn