From patchwork Fri Jan 13 16:44:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 13101153 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 975E5C54EBE for ; Fri, 13 Jan 2023 16:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbjAMQsI (ORCPT ); Fri, 13 Jan 2023 11:48:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbjAMQrR (ORCPT ); Fri, 13 Jan 2023 11:47:17 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6637F58D12; Fri, 13 Jan 2023 08:45:03 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id l22so23904329eja.12; Fri, 13 Jan 2023 08:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wGVN3rLMqJQGbw0wWLclIhoV7qmP5/8gcNfX7fkrepc=; b=gJ8+B0Wi77XymiL/mpPDCUfVYHG0jWaZZhwS+lctfzbnfDK4etJHm7PctM2Fqsi6AU wPF7w4kJlbBfNrrBSf/gj1ixHYlLKhAqVbqZ1RoOulmJ9sqSMsLV8ZDzfSuwlEoZWUpv N3++2HOnLeaBsIKH5/E59POv5Z8XoYanAt8U5UU32NHR6ZlHX3j4GORTfQ0Km2Ai886W F59dxMePI/m/GZHSPhuaMzAKGpSAqoo5Ra+WHrqjcI5/pZIDFiBK4BiglnZiZfZwLZdC 58a7HiMaj9fm1BvKCFR2/qlaSkb0up/+Pte4KAaq1QOYQyi7j38DwztZQtYCAQ/3ZwTc a7Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wGVN3rLMqJQGbw0wWLclIhoV7qmP5/8gcNfX7fkrepc=; b=spSXWbcKYrV2uPgDfMYFfkHF/iAhceejxTUstNMDQLxgdSJzF65mi5zhENMK4k1CQa zuvkLG1ItT9O7oAdjOUaD7ETlCLvX6nrp061o3oBBltDpJ2NTFu2xZzX7b9LlnlrFE4B VT3FF3B3c5s653p4IJPbN36EJNqKxrDjJFOxQcjttUjB4icG5VOpu4LJVsiw+qfmOlBx XLsafAHO1BtPrWaqXqbtF1C7/0tPaO5V4aoNZqTHa7mRjkGy1pXHT/KjWKc/MzohpRTD jT588jx1zgut83tK7LSDbFgMMG3kW1UhNTsn6AnME+b+Ue5EDtmtwXTXXcBT0hpzV23D LHRQ== X-Gm-Message-State: AFqh2kquO4vQEO70IPRWqPWkEmHh9xv47+qmJZmZQvI8QWCZwT9ZFAld UbVrkGi/IE88KTlv+so0CPI= X-Google-Smtp-Source: AMrXdXv/TZzs4qGoekuus1X3gQapC74nHEU7+ObqEH43hfzMqlRplFO8iZRR3i+I3baT3olfTmayPA== X-Received: by 2002:a17:907:9814:b0:857:1e36:3b7b with SMTP id ji20-20020a170907981400b008571e363b7bmr16733593ejc.11.1673628301934; Fri, 13 Jan 2023 08:45:01 -0800 (PST) Received: from fedora.. (dh207-97-147.xnet.hr. [88.207.97.147]) by smtp.googlemail.com with ESMTPSA id sb25-20020a1709076d9900b007b2a58e31dasm8777831ejc.145.2023.01.13.08.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 08:45:01 -0800 (PST) From: Robert Marko To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, bhelgaas@google.com, lpieralisi@kernel.org, robh@kernel.org, kw@linux.com, krzysztof.kozlowski+dt@linaro.org, mani@kernel.org, svarbanov@mm-sol.com, shawn.guo@linaro.org, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko Subject: [PATCH v2 8/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe node Date: Fri, 13 Jan 2023 17:44:48 +0100 Message-Id: <20230113164449.906002-8-robimarko@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230113164449.906002-1-robimarko@gmail.com> References: <20230113164449.906002-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org IPQ8074 comes in 2 silicon versions: * v1 with 2x Gen2 PCIe ports and QMP PHY-s * v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-s v2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC. Finish the PCIe fixup by using the correct compatible, adding missing ATU register space, declaring max-link-speed, use correct ranges, add missing clocks and resets. Fixes: 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes") Signed-off-by: Robert Marko --- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 30 +++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi index 5ef4383ab18b..74eecca4f9e3 100644 --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi @@ -854,16 +854,18 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */ }; pcie0: pci@20000000 { - compatible = "qcom,pcie-ipq8074"; + compatible = "qcom,pcie-ipq8074-gen3"; reg = <0x20000000 0xf1d>, <0x20000f20 0xa8>, - <0x00080000 0x2000>, + <0x20001000 0x1000>, + <0x00080000 0x4000>, <0x20100000 0x1000>; - reg-names = "dbi", "elbi", "parf", "config"; + reg-names = "dbi", "elbi", "atu", "parf", "config"; device_type = "pci"; linux,pci-domain = <0>; bus-range = <0x00 0xff>; num-lanes = <1>; + max-link-speed = <3>; #address-cells = <3>; #size-cells = <2>; @@ -871,9 +873,9 @@ pcie0: pci@20000000 { phy-names = "pciephy"; ranges = <0x81000000 0 0x20200000 0x20200000 - 0 0x100000 /* downstream I/O */ - 0x82000000 0 0x20300000 0x20300000 - 0 0xd00000>; /* non-prefetchable memory */ + 0 0x10000>, /* downstream I/O */ + <0x82000000 0 0x20220000 0x20220000 + 0 0xfde0000>; /* non-prefetchable memory */ interrupts = ; interrupt-names = "msi"; @@ -891,28 +893,30 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */ clocks = <&gcc GCC_SYS_NOC_PCIE0_AXI_CLK>, <&gcc GCC_PCIE0_AXI_M_CLK>, <&gcc GCC_PCIE0_AXI_S_CLK>, - <&gcc GCC_PCIE0_AHB_CLK>, - <&gcc GCC_PCIE0_AUX_CLK>; - + <&gcc GCC_PCIE0_AXI_S_BRIDGE_CLK>, + <&gcc GCC_PCIE0_RCHNG_CLK>; clock-names = "iface", "axi_m", "axi_s", - "ahb", - "aux"; + "axi_bridge", + "rchng"; + resets = <&gcc GCC_PCIE0_PIPE_ARES>, <&gcc GCC_PCIE0_SLEEP_ARES>, <&gcc GCC_PCIE0_CORE_STICKY_ARES>, <&gcc GCC_PCIE0_AXI_MASTER_ARES>, <&gcc GCC_PCIE0_AXI_SLAVE_ARES>, <&gcc GCC_PCIE0_AHB_ARES>, - <&gcc GCC_PCIE0_AXI_MASTER_STICKY_ARES>; + <&gcc GCC_PCIE0_AXI_MASTER_STICKY_ARES>, + <&gcc GCC_PCIE0_AXI_SLAVE_STICKY_ARES>; reset-names = "pipe", "sleep", "sticky", "axi_m", "axi_s", "ahb", - "axi_m_sticky"; + "axi_m_sticky", + "axi_s_sticky"; status = "disabled"; }; };