From patchwork Thu Nov 30 19:18:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13474880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7570C4167B for ; Thu, 30 Nov 2023 19:19:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vvZ4LuDcPQ+/GXbVyOJEj1lf9OFobqgofVLIo0FW8Ps=; b=h35x/Jr8P1nQ3+ qOzP1Xppc04pW3aq7OCIwVq1JaHQjMEO7r6TsDqM5OnAFzktAlyH7bUiNp3xohdQU+nNpbAxS08b3 GalTre4fkJeWb/BV6B3TkZbzHI2KBNlSVAeVmOodnZFtU0Wfd8DwV7wd6VTGYq1pEXSTzEjLBO4Il xJK4chRlYU3c1xTxr2QyXd8YPuFcS7SRZEdN80y7wfJOW30zgG+J9S+VHHmXuvZcCysUgrDoIE8Uh BAXyqF/QzMF65UdVseYHMIxAuoqgyVO+o9NWHqqYRe6Il56XU8nsb8bu44ZWmuG5Ev11wIRWx0zBA jegmBeZ6w95QoD2oykmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8mYY-00Bi6M-2r; Thu, 30 Nov 2023 19:18:38 +0000 Received: from mail-oi1-f181.google.com ([209.85.167.181]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8mYW-00Bi5G-24 for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2023 19:18:38 +0000 Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3b83ed78a91so823211b6e.1 for ; 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=Mt3e7l9G39eKUza5X0k22g9Ru7Yg5P+9X8qsLoakDJl2MzuOS5sI6jn1/pOlriS9Nh 0tYQVe95doVI6tb2SKYdCcaXQ5PeypZ2HXCCJpeOgzMssHO4cgoyZwyGhxN/fmPPmGIj 2RQdMZPIM+sF+bum3gTpW5eXN9rLdi7RIB5YESbdIf1ohlS5cEMuA2C/uny4XB9bkHwq eW9NNPjgo+IoOasfRQIlhEtMCLyFyUZVJGTXCL4u54rhsVx3o5+L0tWbzAbjPNLik3hI Qxd1u6JGmdYvu9XbJrZ5wJlZ0aSVXuunRvqpERTOWBHaBn4bi6mijri04FI4ZWahM3xU GGmA== X-Gm-Message-State: AOJu0YxvQl4NcOyDeNzD0gpdxaYEN3cetohTsnjNFTRKEcJgSpyYaPXE 2JZbNW7wbjfs06sq+JRoPg== X-Google-Smtp-Source: AGHT+IHrxv80+4qIsq72TsqaG/MJf8+o6YE4t8B0J7LVU8Og1acit3wxdCuf69m8eCRuJxiNXT033Q== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231130_111836_698992_B1366A96 X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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]; };