Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp399510lqg; Thu, 11 Apr 2024 06:34:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4bm0YxZXIanl5de9RVckD1/NuukOQNXhXtsfUjQ1Kzd5BjTeezbeaNZu3cv5dWVf13fd7aTsj7FEWdJJqz91N8csFhQJ3Bp6RG5S1yw== X-Google-Smtp-Source: AGHT+IGgr8tb1ZU/lVrnHmbcpxg7+pSD0t07FsDMhWDLfKQfEtMSv6HyixsjTu+b36Rr+mRaRN+C X-Received: by 2002:a05:620a:448b:b0:78d:6574:8230 with SMTP id x11-20020a05620a448b00b0078d65748230mr6834838qkp.56.1712842474367; Thu, 11 Apr 2024 06:34:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712842474; cv=pass; d=google.com; s=arc-20160816; b=LF5kAHZuCRK/9NVVpldTCxO+2fCk1Oqub2Z7W3xT2KDnzftRxP2G05kS+nvfecOWGX 2EJnB7NY8rsVjMHb1VyRJvzAOKOW4HG9kjqvcLIubffK0twDrjcFQ+CfCzJ8ZXJVD6oS Qg1Mag344SUtCXBRV3bWqWpM0d7MN2/w0Dj8zQRBId3OV1Mc1UHq44QnbwZ2EsSXyOQD hAZS8VEnkwwT8J4NJsJ8eHq4y7SllkQyjC9N2M44Q68B4O5IUkdAYi5oWiOMFAMsox6s 4NtL+kkhHQqRnRltzLG6tcihu1Gs1WBIS8kKAEt9I7xBEhmAav7nzb5LvKXJETDyaEUD Jmzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=tbcCaa8DX09SvsMoBHm+TyAMbhm9qLZzeE5P/R6GO7M=; fh=ys4UtzziWc9cSbzykqCctI5eSdhINZnwFPMfiwRZeJQ=; b=yP71uSrmvuwLXZVqwOtPgBnvw2uR+jCIN5zfk/iGLeW1PFq2UV6EdaAX1UcBv8F+eC n97WI8Ujwi1csGAN5LhquesBc1dbxVyCJ5LIayP3aM2JlXBXXbDNStJEQzFNBhEmr/b4 DlkyiI9PCeOC4bIwIrZAFed19JPPWa9i4mWxrKdhxYqAxtGJu/tm71c+6DWjJhGT8Bko R7MpUmwrGC9MEDE5q0AEABMqj8hPvt4Y1KyGwm8r/Hpk0OZCQ5yO3NHLInyjwqxByYmK STOEPW3UM1fjiqzBLNKETp5K+M2u05G9taU0w+WgARXua9NwhTHKJv6ftSZes6jXjMlo yqVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Js1uhFjg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-140514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x14-20020a05620a14ae00b0078d6e2a14b4si1506600qkj.456.2024.04.11.06.34.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 06:34:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140514-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=@gmail.com header.s=20230601 header.b=Js1uhFjg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-140514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 0E9931C21F2F for ; Thu, 11 Apr 2024 13:34:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9C82152163; Thu, 11 Apr 2024 13:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Js1uhFjg" Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 505561514E0; Thu, 11 Apr 2024 13:33:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712842431; cv=none; b=SI5QDiJklmleld58NzJBMjTG+BhVl4G4TN8sE4jJ6KgB3oc0Y9aIDHvRukntm0k/ZqnVFep7O5/Y9HW4q2NUrkkfHB5uv3KUE6Um62fK0xtQjLq8w+hwD4rSPkhN0bqafrEyMbZPU6eg3MkQ4LA7JnmlkcFmjkpVyugkVAQQ3lM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712842431; c=relaxed/simple; bh=IsdcePQGmtwf23Dn6ZnBklfJevHVN5lRzy64rGYlrRg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FD/usqhYzNBKHYQs2r8eNzZSd6PZvOcLrfysyMnYz+QmPtqXYpKUFW8OLyp6FfqJgJMXsfx/RN/GpHpI5/jI1Rts8oiL0b+omu/vJZBxSmmdoWvs4h00ZRfK4s3IeFP5RTpf+YkLzhI43LvEB2ROs+cKMclqTzcOtoAflRZ6EF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Js1uhFjg; arc=none smtp.client-ip=209.85.161.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5a49261093cso4007544eaf.3; Thu, 11 Apr 2024 06:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712842429; x=1713447229; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tbcCaa8DX09SvsMoBHm+TyAMbhm9qLZzeE5P/R6GO7M=; b=Js1uhFjgMFdtEGeQzgkjk/l/2w54FrgIHPZQsZ+KzHmXFWTNuzOQyNqPGoiugd/QzX JlS9//xxaSFGWExtD86/a7fEsk1LZXsautey1Qsto3lt1M65XHigrRSG1Iq0z47DNj1u juQvx4pJ+mwF7oY3kDl7H6ymZyWfOAjKDepLxBw+X17tiUiop3mB075qjIOnGix871Wb Jc8bqrg3ncgjUlvrgssCiKEYkB9UWDBP3aHMcF4nk1fNxS9A//hDfAKLpTyhLjHy3vXd bTtAGiH2VibZhO4AVRLXJPc9FRZfD8ynZ40Z5Zy2i7mI18T24CIKB3miMbv3jNR29xhp c3qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712842429; x=1713447229; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tbcCaa8DX09SvsMoBHm+TyAMbhm9qLZzeE5P/R6GO7M=; b=fAVzGBLV/JUM6dvyWp7qWcGbKsaf1vJ5uqZPpD07UnVmCArFA+R9FzFZmg4YsvHz7D +AaXmnrpj+/1efEZuQKLMhHS/yrYH56CXmGUkT8ZjVFHY8aZnv3+XrbZmxNbAxEwFBWV 0aBALQredgzOqQ65Ua8Upo4QWzN5v+0SmkG34yrrtc1AC6oSIgkcI4ukr8z/1HsIyTp7 sfpDqQdNojBI0ncbbUVSi+EHR6VOHlKX3cvrm7wI7R5Gs9kAF2n/a6hT7k2ZEHjdB8sB t7bUMH6pCDhbNsQgQQY6qhgdiJ3To90v9h89b5mxqIuDbgqABAgOF5U//3sBWeckQ4U7 ianQ== X-Forwarded-Encrypted: i=1; AJvYcCVJ2//Lc6Tk0VZY2L4/fphfeK2kj/ChS7p/lMnpZVNjOmQSBidDePq20Hoz4s682jU3kieXcvqRWZ2sJsu/pfSufrSzue76cAmo9rXq3Wf8ytTBVhSF0pwV87YmwIgVTkH2IeUKXgnzpRr91FI0vdbQDORIbdgVKpJFi7qTgl0OD2ef8ISxAB15mqlbb0ENiluml5Xy37DC6lCVtEI5RceCBzqzKF5fkgnz3ONp0y8PK8pEX/2TVK6B2szI77lMkWUADScOdA== X-Gm-Message-State: AOJu0YyuF0luFDI92wH0kBm0u7Tx9B3O+sl0t7RGVXp4EgET3uGMbqcA MS6gjMvEfAa85EtYot6hq18keOa9xyHJt/JoYwfp+kK4XXrB59bGaItC1BIj5JkTLggeHqHIRBT sFvi8A5NP2BXNgTn2vsdhf2LBvMU= X-Received: by 2002:a05:6870:b411:b0:22e:e6:673 with SMTP id x17-20020a056870b41100b0022e00e60673mr5611022oap.37.1712842429406; Thu, 11 Apr 2024 06:33:49 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240411123917.GA2180141@bhelgaas> In-Reply-To: <20240411123917.GA2180141@bhelgaas> From: Sergio Paracuellos Date: Thu, 11 Apr 2024 15:33:37 +0200 Message-ID: Subject: Re: [PATCH v2 2/4] dt-bindings: PCI: mediatek,mt7621: add missing child node reg To: Bjorn Helgaas Cc: Krzysztof Kozlowski , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 11, 2024 at 2:39=E2=80=AFPM Bjorn Helgaas = wrote: > > On Thu, Apr 11, 2024 at 08:13:18AM +0200, Sergio Paracuellos wrote: > > On Thu, Apr 11, 2024 at 8:01=E2=80=AFAM 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 i= s > > > > also a PCI host bridge? > > > > > > > > Does this mean a driver binds to the "parent" host bridge, enumerat= es > > > > the PCI devices below it, and finds a "child" host bridge? > > > > Yes, that is exactly what you can see on enumeration. > > > > The following is a typical boot trace where all bridges has a device al= so below: > > > > mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges: > > mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, usin= g [bus 00-ff] > > mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0060= 000000 > > mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000= 000000 > > mt7621-pci 1e140000.pcie: PCIE0 enabled > > mt7621-pci 1e140000.pcie: PCIE1 enabled > > mt7621-pci 1e140000.pcie: PCIE2 enabled > > mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00 > > 1e140000.pcie is a host bridge. It has some CPU-specific bus on the > upstream side, standard PCI (domain 0000, buses 00-ff) on the > downstream side. > > > pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400 > > pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400 > > pci 0000:00:02.0: [0e8d:0801] type 01 class 0x060400 > > > pci 0000:01:00.0: [1b21:0611] type 00 class 0x010185 > > > pci 0000:00:00.0: PCI bridge to [bus 01-ff] > > pci 0000:00:00.0: bridge window [io 0x0000-0x0fff] > > pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff] > > pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref] > > 00:00.0 looks like a PCIe Root Port to bus 01. This is not a host > bridge; it's just a standard PCI-to-PCI bridge with PCI on both the > upstream and downstream sides. > > > pci 0000:02:00.0: [1b21:0611] type 00 class 0x010185 > > > pci 0000:00:01.0: PCI bridge to [bus 02-ff] > > pci 0000:00:01.0: bridge window [io 0x0000-0x0fff] > > pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff] > > pci 0000:00:01.0: bridge window [mem 0x00000000-0x000fffff pref] > > 00:01.0 is another Root Port to bus 02. > > > pci 0000:03:00.0: [1b21:0611] type 00 class 0x010185 > > > pci 0000:00:02.0: PCI bridge to [bus 03-ff] > > pci 0000:00:02.0: bridge window [io 0x0000-0x0fff] > > pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff] > > pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff pref] > > pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03 > > And 00:02.0 is a third Root Port to bus 03. > > > pci 0000:00:00.0: PCI bridge to [bus 01] > > pci 0000:00:00.0: bridge window [io 0x0000-0x0fff] > > pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff] > > pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref] > > pci 0000:00:01.0: PCI bridge to [bus 02] > > pci 0000:00:01.0: bridge window [io 0x1000-0x1fff] > > pci 0000:00:01.0: bridge window [mem 0x60200000-0x602fffff] > > pci 0000:00:01.0: bridge window [mem 0x60300000-0x603fffff pref] > > pci 0000:00:02.0: PCI bridge to [bus 03] > > pci 0000:00:02.0: bridge window [io 0x2000-0x2fff] > > pci 0000:00:02.0: bridge window [mem 0x60400000-0x604fffff] > > > > > I think the question should be towards Mediatek folks. I don't know w= hat > > > 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+KzEwuDPzcmrDPdgJBFA2XdYTBv= T4R4MEOUB=3DWQ1g@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 looks like it is necessary since every port has its own configuration registers, phy, clock, reset and interrupt. Thanks, Sergio Paracuellos > Bjorn