Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp543634rdb; Thu, 30 Nov 2023 11:18:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/OlkZQ61u9yvoeUEMvW4krLiOT9FgH3IeimvleNLYTlyIbxe9XnqQUvTuUr6BP7j5fk3Q X-Received: by 2002:a05:6a20:7da0:b0:18c:9175:eae6 with SMTP id v32-20020a056a207da000b0018c9175eae6mr16454321pzj.24.1701371922509; Thu, 30 Nov 2023 11:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701371922; cv=none; d=google.com; s=arc-20160816; b=Bn1ozjTpJMtzSAawDC1jEhR3XqEPJh/cwiHl6ggq4VeO8sTbipPCXotYAXS0z4Oe1B DF3TDHGzLN0c4DkO6NoOJqD+xLfVzWiuKAGddV2UK/mvixAPk4x7AGeZ5wBHw3dytD/B 83hzHEBz6PmJ9/vuagUREZrsSC6adxT9oJphcbOmu42c/Lub2zrpyXp0tXlz6SU+4d5m dgh8NNI5KOM/w0dLGrQos2jLBRJUVpJCVxeIKQh8QpwRvlt3tEe0vKBj09d2xQr7mqVw cis80O/gSgYe+rkM8goPAdtRF1pYgvI1Knd/z0rMOgwBqEZeJ1phtCftVGYAXMB85p6p Adbw== 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 :message-id:date:subject:cc:to:from; bh=8JeC+bxbswOpfRxMX3LTa+uNsaqclwQLJC93WcWVC8Y=; fh=ApFHQIn7LlkqQHcAL7lls8Vu3S1UDMXS3MkwpIF2OXI=; b=mc8B74e4fZ+GZnoS0UqQbY3w8xVdW1P5cuqc4rVU+fajLtcCIewYttz94Ci4VCtpWL Iefp8m0Tj2dN5/DsBDOgoyS2pR15tOtAu6kS1Dl6xuYvy5Mtwx5DHxdguJP1JgkJ51JZ PI9su696RuYTr71TdJe2Y9HT/8wRuUvOAj5LBiEQv8g0xqvf6BxZPGgtP0UzZHzgzDjn mF/NLrifzbeSWaPKYVz2oxoYUV1vsgq4Lvul2OiTU2QlEFwVAo2eUwvP35mmdm4pwqFS 7Cbw7waBQSLTOsra93TU8dIOOBUvrPKJE7ewujYPwVihZqWAfBA2QfdER9/5N3mjui/E 5Wiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f17-20020a056a0022d100b006c507a60e2dsi1848794pfj.177.2023.11.30.11.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:18:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EB33E80DA9B9; Thu, 30 Nov 2023 11:18:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376330AbjK3TSY (ORCPT + 99 others); Thu, 30 Nov 2023 14:18:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232316AbjK3TSX (ORCPT ); Thu, 30 Nov 2023 14:18:23 -0500 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB64B1A4; Thu, 30 Nov 2023 11:18:29 -0800 (PST) Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3b88f6c3719so831176b6e.0; Thu, 30 Nov 2023 11:18:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701371909; x=1701976709; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8JeC+bxbswOpfRxMX3LTa+uNsaqclwQLJC93WcWVC8Y=; b=GMC/aIMd2m4vIV5LHCqI+UJTje5MxygfNbg/eSGGUx7IpvmgPPlpjIw+M1bO9I31OE xM/ajePI9B2MgiGQVCOLpz52N0PYzYgsbVyBHtb2c/ZX4keeDaJZ80bbgMoppNKZ/PeP NlcQ+Mb2yHwZpajEz+zt3eNSyM+OMlAzFJ0TZtA3Lor4ZXF5lXXwPax74jhFHrXyLHIB OY6hktj50DStY15lm4rGIFMRDMaZ92nLf2H5DVuX597vCcH2+x/6sRz0/4PgvbomLkS4 xH6kQoQZnDfhjVKRKo15sbZudxlgVIuhSKlaBXQrTy4+mwQJIT/skNSoZt9iROMM8ri3 Hpyg== X-Gm-Message-State: AOJu0Yy20HEDt7rgJgw86iHndXZqh16AZMZexDKi+fHNLWQZQOFdxPHR KY/c2/FCX3rjUHDF7b7vWQ== X-Received: by 2002:a05:6808:1310:b0:3b8:4585:b39b with SMTP id y16-20020a056808131000b003b84585b39bmr688121oiv.5.1701371908856; Thu, 30 Nov 2023 11:18:28 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id ev25-20020a056808291900b003b2f2724c48sm274641oib.11.2023.11.30.11.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:18:28 -0800 (PST) Received: (nullmailer pid 2424005 invoked by uid 1000); Thu, 30 Nov 2023 19:18:27 -0000 From: Rob Herring To: Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Tim Harvey Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: imx8mm-venice: Fix PCI bus nodes Date: Thu, 30 Nov 2023 13:18:14 -0600 Message-ID: <20231130191815.2421978-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 11:18:39 -0800 (PST) The imx8mm-venice boards PCI bus nodes are a complete mess. The unit-addresses are wrong. The PCI bridge nodes are incomplete missing "device_type" and "ranges" and just wrong for "#address-cells" and "#size-cells" values. All of these issues are reported warnings if anyone bothered to pay attention. Sigh. The kernel may have happened to work because it only looks at "reg" to assign the DT nodes to PCI devices. Based on that, I'm assuming "reg" is correctly matching the devices present, and the unit-addresses are wrong. Presumably the bootloader fills in "local-mac-address" with something valid. Hopefully it too uses "reg" rather than the path. Fixes: afb424b99e0f ("arm64: dts: imx8mm-venice*: add PCIe support") Signed-off-by: Rob Herring --- .../dts/freescale/imx8mm-venice-gw72xx.dtsi | 28 +++++++++++-------- .../dts/freescale/imx8mm-venice-gw73xx.dtsi | 28 +++++++++++-------- .../dts/freescale/imx8mm-venice-gw7902.dts | 12 ++++---- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi index 3a0a10e835a2..ff461b004dc5 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi @@ -150,25 +150,29 @@ &pcie0 { <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; - pcie@0,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@1,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@2,3 { + pcie@3 { + device_type = "pci"; reg = <0x1800 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - eth1: pcie@5,0 { + eth1: ethernet@0 { reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; local-mac-address = [00 00 00 00 00 00]; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi index d79fe9f62b95..6f5a6d91c95e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi @@ -177,25 +177,29 @@ &pcie0 { <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; - pcie@0,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@1,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@2,4 { + pcie@4 { + device_type = "pci"; reg = <0x2000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - eth1: pcie@6,0 { + eth1: ethernet@0 { reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; local-mac-address = [00 00 00 00 00 00]; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts index 06a394a41d7c..4bb22fdc5d2e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts @@ -633,15 +633,15 @@ &pcie0 { <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; - pcie@0,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - eth1: pcie@1,0 { + eth1: ethernet@0 { reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; local-mac-address = [00 00 00 00 00 00]; }; -- 2.42.0