Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3624742pxb; Mon, 30 Aug 2021 06:55:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuW8EEpBOQ0WzyXYueDaas2C/VaFTfy68J5IVNZ9n1pif55MgzzjYe+Ck7eXs0+nEq6WWa X-Received: by 2002:a17:906:8481:: with SMTP id m1mr25693225ejx.459.1630331702668; Mon, 30 Aug 2021 06:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630331702; cv=none; d=google.com; s=arc-20160816; b=z/65k7Du1SRiBXbjafdrmzTVoO7/paoQBJkMshgeedm6aRXnQ0WD2LwKaSqnBRQD5G KDNvpceYwq0m8HtYCEdUAIGTM4pEeVGaTILIZ3W+5DpDqpqt0NJclL9GGlmoPrKgwDht Qc/SeEdZ/vxmvaDLfSNUe1c9Q03L/ACMnV466oc9DuuQ/2AzybZGEWEtn4VPi6785HSt uYcm/6KVGOz8H/ECrB31JJFlEojykpiwx7UEVfLQXbq4znX+WsrhV+rgARuzpsUyaqZK XThgcyIBGuhbAFjpZnmL2gXf86Pdo+qUJLO3fZF1M0Xf0a33Vkef1smWrvwDz9xxyMAr ociQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=3QR26H90I5oa/Aq9g2W/STFicF2YahgcF3x4I6vga0I=; b=M3g6P0YnAczRG+r0hXwRPzCZ+JEpw6jtlWnUQeb8IZplaQHpYMTTvSQcL0sL8DyLhX xkVRJeuGmsIvESl0GOLlRl5ulW6PNe80RXlvaUsysiAfURL6J8mjbvGlxTeABWu/IK8i Anrxa36fqpctSzh0kYQmIYN5iQfJ1K/buckD3n+SzjVN6Y5QlzOg4XPQT7fgDezVtyHm bGHOp03FOfGuHLJ1uRtnvnUOsBN1UBgbZ1sMHofSF2SHeuhDJMUSP2VI3OtKzSWtjPsz reqSFRdXhqpMQjFsKQBd2TzkOla2bVRGnsOqVkNPSXuBDNE1460sb7D3Ei0ZA2wzvo6o fs8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S/k9zRw6"; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 9si14520301ejo.527.2021.08.30.06.54.37; Mon, 30 Aug 2021 06:55:02 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S/k9zRw6"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236802AbhH3Nxy (ORCPT + 99 others); Mon, 30 Aug 2021 09:53:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46853 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233874AbhH3Nxx (ORCPT ); Mon, 30 Aug 2021 09:53:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630331579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3QR26H90I5oa/Aq9g2W/STFicF2YahgcF3x4I6vga0I=; b=S/k9zRw6K75t1gDFPMhswnsnyLWnJvu8nq+OeEpBfH3gcYA1awHfpxHJ7O8VewG15lEK8B bTZfoLdq08HI/QdvdlHWDs1dbO+dT5QASwY0SChQqZFcnOhmnxzj/sTQVmWLA0eT6yu0Mn kJc4QAOc6ZyRFfOxL2b3RyDUIALdU0I= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-523-Hu_ttGf_MNif7ihmnGQo_w-1; Mon, 30 Aug 2021 09:52:58 -0400 X-MC-Unique: Hu_ttGf_MNif7ihmnGQo_w-1 Received: by mail-wm1-f72.google.com with SMTP id f19-20020a1c1f13000000b002e6bd83c344so15808wmf.3 for ; Mon, 30 Aug 2021 06:52:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=3QR26H90I5oa/Aq9g2W/STFicF2YahgcF3x4I6vga0I=; b=OHtbBkX8/QDPI0pyEGM+tYZslwjCr7mnImgXb+YK552VeqJiiVgwUf8JV7hWTXRxOJ VUs6MVzepz74o0Bnjw59XuyIHMrQzAbTeYIdKEvMrtbJf6/ipmBnCdsgKH+Rnhu5Ir1I gO8fCfSdbkKelT2kNgPEVpz7yNiMH6N0KbbaocPockUIZRk7DSionyVatua7tkQU9vvH /oJoXnjbN1gCVdMLjaaTWoW5GK00qfNTkdNTDC4itp/a6/C/P5EoFo6ZzBUqHPbfcz9K mFbYcgocEVfWvpelFUdu4IwpkN4Drf5tvSVJoSu3KldKRQ90IrCjl+7I62jaY7Hn9190 ienQ== X-Gm-Message-State: AOAM532jryBiax7YMWSijKtbUzq4qETpjAGnCSGIinwXvtFvV+9M02Gn Lt2Xy1yJsYgiOpiz64Qo5h2O+vPYTVus0nVFxQcxXMj/6Jd96DKeyLGMLCdZQA42Xjg5RsuIplc X4qF4dxJm8UdNpou0VXSm3Mdc X-Received: by 2002:a5d:5452:: with SMTP id w18mr25817928wrv.221.1630331577193; Mon, 30 Aug 2021 06:52:57 -0700 (PDT) X-Received: by 2002:a5d:5452:: with SMTP id w18mr25817911wrv.221.1630331577024; Mon, 30 Aug 2021 06:52:57 -0700 (PDT) Received: from ?IPv6:2a0c:5a80:3c08:b500:afb2:5ebc:3fd2:26de? ([2a0c:5a80:3c08:b500:afb2:5ebc:3fd2:26de]) by smtp.gmail.com with ESMTPSA id w9sm13490938wmc.19.2021.08.30.06.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 06:52:56 -0700 (PDT) Message-ID: Subject: Re: [PATCH] ARM: dts: bcm2711-rpi-4-b: Fix pcie0's unit address From: nsaenzju@redhat.com To: Rob Herring Cc: 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 Date: Mon, 30 Aug 2021 15:52:54 +0200 In-Reply-To: References: <20210830103909.323356-1-nsaenzju@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-08-30 at 08:39 -0500, Rob Herring wrote: > 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. Thanks for the review, I'll fix all those. That tool would be very helpful. -- Nicolás Sáenz