Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp338413pxt; Wed, 4 Aug 2021 12:30:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ6Qv0N7bPOND5Ty1u4UW/zlwcEqJhxv0Yb+EzbHcYdQ/CC3y4op+WnL2ApkC+j1mMtkqE X-Received: by 2002:a17:907:2058:: with SMTP id pg24mr740345ejb.315.1628105424040; Wed, 04 Aug 2021 12:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628105424; cv=none; d=google.com; s=arc-20160816; b=qQ9yoJBz3hNctdihfBVYiDWue/yr2SjTur15ovnQnnLLgH45C4/7FaiXBTDra5xixt F6K/ON3or9/tO7qjcXp/dZWij4zJ9IWh+4QPFUItl24Ckxy+VlUqwEkP9TcAn9ztEWAn 9BEBaqm9HY830H/m1yBRRKmkUmP1DD9kt8UKXfMhWbH9bPjGO0Ig2SQ3Dkj4qNASeK5R 6lh0UJqTb2b7WxU3auv1Ds3YWGCxhC5T+5N9wRaPkRzzn6UCUPEtVK9ZqietfvhT48JE Z2djcnk3myHIALUoZy/bU97QDU84/KAprbR6V7WRYj6N33Hrx2jh1DjvGubBRWJE6zyh hVUw== 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; bh=VKjRz072HGEgP1rwlJIh26JWC9tcVy1uWT48FAiuTh0=; b=LTK9Qx7hGMRYZaXUlY2nVZu84wm6R0i25N3fJRzROt82FVivG0bqBh3Mvs05kCgqK/ VTsmt85EXh0urXCnEHH0qlUxIL7b5nNn9klwggfY75jiAdCc+rbVtPExIG9KV7K8cc/d rKZTRcg0gCIJu1JzbIJ+ZXbzKACJdkkjwoUClxG12etZL95XoeXUoBcr2DPhteXvWjtb cuX8nWG96aWUMdCYNjexlAUOQ2bshRh0v1jL6DenxMjhIzlft7MFYluKH3RolX0OiDIy gMe8xyR+oeryFfRTPeiV/Gtvqo8Jgp/8WWoytbmVq+0Phd4sifC8zqI9MXfR1B+45hJw Ye6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi20si2672434ejb.575.2021.08.04.12.29.59; Wed, 04 Aug 2021 12:30:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236787AbhHDQ3Q (ORCPT + 99 others); Wed, 4 Aug 2021 12:29:16 -0400 Received: from mail-io1-f43.google.com ([209.85.166.43]:37731 "EHLO mail-io1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237669AbhHDQ3K (ORCPT ); Wed, 4 Aug 2021 12:29:10 -0400 Received: by mail-io1-f43.google.com with SMTP id l20so908482iom.4; Wed, 04 Aug 2021 09:28:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VKjRz072HGEgP1rwlJIh26JWC9tcVy1uWT48FAiuTh0=; b=m4E2wfH91B5GM7A0QgkhuCeAtSnNHY/dJ8SW0/UBiK1AdQsiVysV0f6GUXYhzcnSaq LZOnpc32XR71YT63yOwst/WOm/yhJAxuTJtI/S8FTJgVwXn4YrjrKbU0Teh/X2QzHxda ACdmLHNyk70Rz0+bR+BYp0Ct/nd2bhDvFHgAvszd8rUDpO7Zo1WsFWHnoSKa0Mz/FDBV ynkno4QwGIELfAT0tV2Aw2sEpmL8oSK7shHfZ3gf5ZvXoLlUOjRUqCG+If45wJTJ3ouV USfmzodoUq8U9hTTVKyrKqOTrHZsRVBsI5QoIeDyWnGGryb/JxpKqINUNwOtcqAvwSCl Ig+A== X-Gm-Message-State: AOAM530qNy6ZZmnAdiuypeO8uM42ZYiXitysLCp2S9uu3PVBwr6AXDkG UGnT9SwM2sanYI1CEGPpwQ== X-Received: by 2002:a02:7348:: with SMTP id a8mr302327jae.116.1628094536294; Wed, 04 Aug 2021 09:28:56 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id u16sm1764975iob.41.2021.08.04.09.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 09:28:55 -0700 (PDT) Received: (nullmailer pid 1331554 invoked by uid 1000); Wed, 04 Aug 2021 16:28:53 -0000 Date: Wed, 4 Aug 2021 10:28:53 -0600 From: Rob Herring To: Mauro Carvalho Chehab Cc: Linuxarm , mauro.chehab@huawei.com, Binghui Wang , Gustavo Pimentel , Jingoo Han , Xiaowei Song , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , PCI , linux-phy@lists.infradead.org Subject: Re: [PATCH v3 0/4] DT schema changes for HiKey970 PCIe hardware to work Message-ID: References: <20210804085045.3dddbb9c@coco.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210804085045.3dddbb9c@coco.lan> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04, 2021 at 08:50:45AM +0200, Mauro Carvalho Chehab wrote: > Em Tue, 3 Aug 2021 16:11:42 -0600 > Rob Herring escreveu: > > > On Mon, Aug 2, 2021 at 10:39 PM Mauro Carvalho Chehab > > wrote: > > > > > > Hi Rob, > > > > > > That's the third version of the DT bindings for Kirin 970 PCIE and its > > > corresponding PHY. > > > > > > It is identical to v2, except by: > > > - pcie@7,0 { // Lane 7: Ethernet > > > + pcie@7,0 { // Lane 6: Ethernet > > > > Can you check whether you have DT node links in sysfs for the PCI > > devices? If you don't, then something is wrong still in the topology > > or the PCI core is failing to set the DT node pointer in struct > > device. Though you don't rely on that currently, we want the topology > > to match. It's possible this never worked on arm/arm64 as mainly > > powerpc relied on this. > > > > I'd like some way to validate the DT matches the PCI topology. We > > could have a tool that generates the DT structure based on the PCI > > topology. > > The of_node node link is on those places: > > $ find /sys/devices/platform/soc/f4000000.pcie/ -name of_node > /sys/devices/platform/soc/f4000000.pcie/of_node > /sys/devices/platform/soc/f4000000.pcie/pci0000:00/0000:00:00.0/of_node > /sys/devices/platform/soc/f4000000.pcie/pci0000:00/0000:00:00.0/pci_bus/0000:01/of_node > /sys/devices/platform/soc/f4000000.pcie/pci0000:00/pci_bus/0000:00/of_node Looks like we're missing some... It's not immediately obvious to me what's wrong here. Only the root bus is getting it's DT node set. The relevant code is pci_scan_device(), pci_set_of_node() and pci_set_bus_of_node(). Give me a few days to try to reproduce and debug it. In the mean time, I applied the series but haven't pushed it out. Rob