Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3615413pxb; Mon, 30 Aug 2021 06:40:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFfrHcJICI7Zg4ldIXWU/PHSfHh4VLyELLkk9l5LUYXtmPvhisjkwcILD2Mu6g8lHBTjYY X-Received: by 2002:a92:cb0f:: with SMTP id s15mr16136053ilo.59.1630330856829; Mon, 30 Aug 2021 06:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630330856; cv=none; d=google.com; s=arc-20160816; b=X10B2YOALiOkX34QnmkRQCWGr/79VLmZmDlkSfSAxBLKlPQyWuKBvMg/43cu6BsOUD TuoWdl3drbfTelsPbf1G6HZVxz2x4RewuuYwLVQau33o2Ox/931vqRFSLEcM6aQSuYSE EHRRj2nCBTuhscqhvr4meK2E6BwVJr2GmVqTEFPMLE3dpOepQXkOuDlm5bYSBgYJmPNe rJjY0h2SBF0ahFZlZuJ6SmpootWJgX60m7z7nA92SDeve19utl9swfcbIPc78WSHdQDC hTVi6oRLM4NFYDFhGSrfKnkdwwEgkeDlN+sId92Ar2Q22i+wKJ8JCZPYOBSz1PL25yJO wZhA== 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=/HFidGIZmRuHY79xFNqRZ/4XxqjhggtR+nv+mqzgiS8=; b=qgaE7IBjjslRE40bPK2vprv9SC3cxTvK9QkKlpi3N/j86IlSLaXj0q+r5DQUcsMOlK HFDZ5iNV2thvX07R7VHOf3UwYyJgf2J8plWH3df2bU7f0pCF8cPVtmAMH2ieNbZ6fl9u HDqY/HNTjQWkMsfyybE4nzyf/3HBl2Zm06y8WGLaGobJcwq6DTAEZCL0WtBmRA6KdXfq oNvjYX/M1AQu3NHzIzAzr53ts89egr1dYczWC3DxAuFyYvifZLVM0B2JF7t+F/t03bHc aIkqi7+nE2wA4Un0Dn82VJtKtqs4f4zKvKdpRrl3sRTMqavCuaih9A+r419m8m4ydWA1 yUPQ== 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 k11si15339407ili.81.2021.08.30.06.40.43; Mon, 30 Aug 2021 06:40:56 -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 S236718AbhH3Nkn (ORCPT + 99 others); Mon, 30 Aug 2021 09:40:43 -0400 Received: from mail-ot1-f48.google.com ([209.85.210.48]:43829 "EHLO mail-ot1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbhH3Nkm (ORCPT ); Mon, 30 Aug 2021 09:40:42 -0400 Received: by mail-ot1-f48.google.com with SMTP id x10-20020a056830408a00b004f26cead745so18375870ott.10; Mon, 30 Aug 2021 06:39:49 -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=/HFidGIZmRuHY79xFNqRZ/4XxqjhggtR+nv+mqzgiS8=; b=BBAKgFSpNP2ogRniyRzBuFL84KdWIOIRlQUxQL3SjrrM8ryBjQcqDMoJKyIWx1tgjX xVtR77hFqtAH1r2I+SUiNFlWrMDozlaOJIuJSmYXSjvQz9mEuuleVrXu3NpMXeVHVN53 NvG9C82utv7zTUnT+iB6L6W7WwBqHwdmEg6LQrDjDZcSKnU9avvAoE6mYnvRJz+QxdPy LPZILxZy9NaXtSYqDfkjVZwAxyrke2umjWGrUp5RzCc5ccYMN3ihbigZsi/aIoB1Ampl aWIlsKLo5D0d1ZX4HNDwG1Ob3CuaYEWSN5D7k4tjGmUleOh1SIvvcGgvTLVY0rz0EKUf HCPA== X-Gm-Message-State: AOAM533qwPPNUkAPJKFykG/ml53X3ZPX65ynxVjvjPM3oO3fjqyW8wG0 5WbpGJ9brUcF4oxNkB3Fi0DFTFlj8Q== X-Received: by 2002:a9d:2ec:: with SMTP id 99mr19319698otl.46.1630330788769; Mon, 30 Aug 2021 06:39:48 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id b24sm2954533oic.33.2021.08.30.06.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 06:39:48 -0700 (PDT) Received: (nullmailer pid 1929911 invoked by uid 1000); Mon, 30 Aug 2021 13:39:47 -0000 Date: Mon, 30 Aug 2021 08:39:47 -0500 From: Rob Herring To: Nicolas Saenz Julienne Cc: nsaenz@kernel.org, f.fainelli@gmail.com, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stefan.wahren@i2se.com Subject: Re: [PATCH] ARM: dts: bcm2711-rpi-4-b: Fix pcie0's unit address Message-ID: References: <20210830103909.323356-1-nsaenzju@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210830103909.323356-1-nsaenzju@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 30, 2021 at 12:39:09PM +0200, Nicolas Saenz Julienne wrote: > dtbs_check currently complains that: > > arch/arm/boot/dts/bcm2711-rpi-4-b.dts:220.10-231.4: Warning > (pci_device_reg): /scb/pcie@7d500000/pci@1,0: PCI unit address format > error, expected "0,0" > > Unsurprisingly pci@0,0 is the right address, as illustrated by its reg > property: > > &pcie0 { > pci@0,0 { > /* > * As defined in the IEEE Std 1275-1994 document, > * reg is a five-cell address encoded as (phys.hi > * phys.mid phys.lo size.hi size.lo). phys.hi > * should contain the device's BDF as 0b00000000 > * bbbbbbbb dddddfff 00000000. The other cells > * should be zero. > */ > reg = <0 0 0 0 0>; > }; > }; > > The bus is clearly 0. So fix it. s/bus/device/ The unit-address format is ',' (and function is optional). The bus number is not part of the unit-address because that is dynamic and then the path would not be fixed/known. The bus is part of 'reg' for true OpenFirmware, but for FDT I think it should always be 0 as the DT is static. Looks like the child node is wrong (both unit-address and reg) as well: usb@1,0 { reg = <0x10000 0 0 0 0>; resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>; }; It doesn't warn because the bridge node is also missing 'device_type = "pci";'. This is all fairly hard to get right (see recent hikey970 patches for a complex example). I'm thinking about writing a tool that generates a DT with PCI nodes by reading the PCI hierachy from sysfs. Rob