Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2034978rdb; Tue, 3 Oct 2023 08:23:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDBINBQmYJvl9D5tQjw4ICnNRVeYGBy/p4w7fqxlAzO9N0ZkpT/KazqVA4TVK29eY3hwkL X-Received: by 2002:a17:903:11d2:b0:1c7:2697:ec10 with SMTP id q18-20020a17090311d200b001c72697ec10mr16295169plh.56.1696346599465; Tue, 03 Oct 2023 08:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696346599; cv=none; d=google.com; s=arc-20160816; b=FClnVySumed7xBYQqe7A+rHjFLwhbH52h0xYIB6prMVIJKlAJBQtfP244fUD6E5NBd 5AnyHKZB0AdQ/M82g1d/jbK0jFesJTt9ry4ObLHDtaeUilcmYET5wC8jNHvIARXVFpeI 3491N33705qSioil0Hy9lUHB2soKtGMaPm3Z5whRuoEaROIocsrAFN8I9+l3gJ5EIzw5 9nuaxEUnC6j/Z6yNbLGBbANYpdoimgQkS+tnn4z4g5oIkjcBoxVHQxtKvnbQUP5hhCJY QnurFs11V+UNqjJcPpDiPKD2dz3UVr7fdslCtZwSJmN7/KqvftD2qSZ3AFs/g/tQ5WpP kjkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AyCUhxsC/xRzFI1DSiEJgfkyYQMNQ9zjzH0+8vXmLBg=; fh=T0ezwWBOupXa4ECS+G8e30oiJE/2bbA4ovhY0lqldCg=; b=IJIu8pfdA7CZSWJyswhN+JJwau6Ow3BKzSTAObyPmlG7DGrFUyNwZKLmR8hbh8NfCN uy/b70XXeArlb7u82rRYRniFJzzi/q4T1cjBbXr1m6ogVoYrnxKdkmLSStZrl6IW43U/ Ku3KVzPjAM8V+QBe0lAXHzTsM3RfEs3Y9iKH0Bu+RI9KW6NkBTYbf1tzQeYyO0b3aUS/ XSj3dMMFsgwD1qcOsR7+X00DAfNoG7wpoefc9y7DPkkA8R4ZQOAqvlfWkFQMcF7Z+8Bm ZusZDFhX/C4oBTVlSapn5vjtzOQH918iPOjSJhA+8aBRbxAX2OtREiiTm6s8w2Csr5rs 1C5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K++eX539; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id lh4-20020a170903290400b001c59b6ed118si1498355plb.157.2023.10.03.08.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K++eX539; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 728D2811F113; Tue, 3 Oct 2023 08:23:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231391AbjJCPXR (ORCPT + 99 others); Tue, 3 Oct 2023 11:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbjJCPXQ (ORCPT ); Tue, 3 Oct 2023 11:23:16 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8605CA7 for ; Tue, 3 Oct 2023 08:23:12 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-59f4bc88f9fso11914477b3.2 for ; Tue, 03 Oct 2023 08:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696346591; x=1696951391; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AyCUhxsC/xRzFI1DSiEJgfkyYQMNQ9zjzH0+8vXmLBg=; b=K++eX539O7clRjv33R/SyQvfn1y/rLk1g+8DrLizmADn8MQFy9Hi5M5/ymJebRyAXd t359xbhsZihSpuyLsgt15d8OkvsLICGHeB+Ueata9QGrWKCN4/6gwtv8cQC9tJo7pX0y W2LwaIXTLKVV8uhUwNkHy5gB6BJcKeFLlW3Xh42CsiC3dEVAgW8FrXtkI1rL54iIXCD3 cUlkOD2+sLLb5lRlF18QGZYc87TFnjaR5AVNNMFcraCYVgbYi7EEYSIkGjan27NdKJoX rjygKFgrn3hOonPhhUsq+37Hn6c+ypYH/EXrW69UoRwW6G90f3ta+WkF5bkJol2uUNTU hCSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696346591; x=1696951391; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AyCUhxsC/xRzFI1DSiEJgfkyYQMNQ9zjzH0+8vXmLBg=; b=N5gDZcrUo0WHRDPBpMJ2YSGE4lXLcATkkA/Oysi4ES/HpRZ3lKgJqdZ9e+HdC4fh2H OZC4nABM+rZgVGxCaIRrlilyQRx77ZcBxooEfL5dH7GOp6sMMsmzCbofNsRocgceTrRi WtYXbBt5s0ydWn6VNuWnvGDxxl3DM4pI7r4zZYldHT7JqSOHPWYykuHzE5kloRVH8oKI hqReakFORrlGXJVR0yGlaz6zo3GUXzfdU+kbNv4ueH8KgR5p7qqy1WtCmek4ppEQ2gR2 qgfahd64KmwNt1iUXCUbXbJi5lsLlQZXImIvEr+Au304HRILI4f7WUpNckDWxwn7Xusr FYUg== X-Gm-Message-State: AOJu0YxQg4zcpWMTdPEsOQgqsCc53SzOqZTC31fR+CqALdJcNt3u193A IUC6A/uM5LvdiF3ObAPKBkya7p7oa8Roa3176nh3Xg== X-Received: by 2002:a0d:d587:0:b0:59f:4c52:2f5d with SMTP id x129-20020a0dd587000000b0059f4c522f5dmr14784646ywd.2.1696346591660; Tue, 03 Oct 2023 08:23:11 -0700 (PDT) MIME-Version: 1.0 References: <20231003120846.28626-1-quic_nsekar@quicinc.com> <20231003120846.28626-6-quic_nsekar@quicinc.com> In-Reply-To: <20231003120846.28626-6-quic_nsekar@quicinc.com> From: Dmitry Baryshkov Date: Tue, 3 Oct 2023 18:23:00 +0300 Message-ID: Subject: Re: [PATCH 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes To: Nitheesh Sekar Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, vkoul@kernel.org, kishon@kernel.org, mani@kernel.org, p.zabel@pengutronix.de, quic_srichara@quicinc.com, quic_varada@quicinc.com, quic_ipkumar@quicinc.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:23:18 -0700 (PDT) On Tue, 3 Oct 2023 at 15:10, Nitheesh Sekar wrote: > > Add phy and controller nodes for PCIe_x2 and PCIe_x1. > PCIe_x2 is 2-lane Gen2 and PCIe_x1 is 1-lane Gen2. > > Signed-off-by: Nitheesh Sekar > --- > arch/arm64/boot/dts/qcom/ipq5018.dtsi | 186 +++++++++++++++++++++++++- > 1 file changed, 184 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > index 38ffdc3cbdcd..0818fdd1e693 100644 > --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi > +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > > / { > interrupt-parent = <&intc>; > @@ -94,6 +95,38 @@ > #size-cells = <1>; > ranges = <0 0 0 0xffffffff>; > > + pcie_x1phy: phy@7e000{ > + compatible = "qcom,ipq5018-uniphy-pcie-gen2x1"; > + reg = <0x0007e000 0x800>; > + #phy-cells = <0>; > + #clock-cells = <0>; > + clocks = <&gcc GCC_PCIE1_PIPE_CLK>; > + clock-names = "pipe_clk"; > + clock-output-names = "pcie1_pipe_clk"; > + assigned-clocks = <&gcc GCC_PCIE1_PIPE_CLK>; > + assigned-clock-rates = <125000000>; > + resets = <&gcc GCC_PCIE1_PHY_BCR>, > + <&gcc GCC_PCIE1PHY_PHY_BCR>; > + reset-names = "phy", "phy_phy"; > + status = "disabled"; > + }; > + > + pcie_x2phy: phy@86000{ > + compatible = "qcom,ipq5018-uniphy-pcie-gen2x2"; > + reg = <0x00086000 0x800>; > + #phy-cells = <0>; > + #clock-cells = <0>; > + clocks = <&gcc GCC_PCIE0_PIPE_CLK>; > + clock-names = "pipe_clk"; > + clock-output-names = "pcie0_pipe_clk"; > + assigned-clocks = <&gcc GCC_PCIE0_PIPE_CLK>; > + assigned-clock-rates = <125000000>; Can this go into the PHY driver? > + resets = <&gcc GCC_PCIE0_PHY_BCR>, > + <&gcc GCC_PCIE0PHY_PHY_BCR>; > + reset-names = "phy", "phy_phy"; > + status = "disabled"; > + }; > + > tlmm: pinctrl@1000000 { > compatible = "qcom,ipq5018-tlmm"; > reg = <0x01000000 0x300000>; > @@ -117,8 +150,8 @@ > reg = <0x01800000 0x80000>; > clocks = <&xo_board_clk>, > <&sleep_clk>, > - <0>, > - <0>, > + <&pcie_x2phy>, > + <&pcie_x1phy>, > <0>, > <0>, > <0>, > @@ -246,6 +279,155 @@ > status = "disabled"; > }; > }; > + > + pcie_x1: pci@80000000 { > + compatible = "qcom,pcie-ipq5018"; > + reg = <0x80000000 0xf1d Each address/size tuple should be a separate <> entry. > + 0x80000F20 0xa8 lowercase > + 0x80001000 0x1000 > + 0x78000 0x3000 Would you notice why this line stands away from the rest of entries here? > + 0x80100000 0x1000>; > + reg-names = "dbi", "elbi", "atu", "parf", "config"; > + device_type = "pci"; > + linux,pci-domain = <0>; > + bus-range = <0x00 0xff>; > + num-lanes = <1>; > + max-link-speed = <2>; > + #address-cells = <3>; > + #size-cells = <2>; > + > + phys = <&pcie_x1phy>; > + phy-names ="pciephy"; > + > + ranges = <0x81000000 0 0x80200000 0x80200000 > + 0 0x00100000 /* downstream I/O */ > + 0x82000000 0 0x80300000 0x80300000 > + 0 0x10000000>; /* non-prefetchable memory */ > + > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 0x7>; > + interrupt-map = <0 0 0 1 &intc 0 142 > + IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > + <0 0 0 2 &intc 0 143 > + IRQ_TYPE_LEVEL_HIGH>, /* int_b */ > + <0 0 0 3 &intc 0 144 > + IRQ_TYPE_LEVEL_HIGH>, /* int_c */ > + <0 0 0 4 &intc 0 145 > + IRQ_TYPE_LEVEL_HIGH>; /* int_d */ > + > + interrupts = ; > + interrupt-names = "global_irq"; > + > + clocks = <&gcc GCC_SYS_NOC_PCIE1_AXI_CLK>, > + <&gcc GCC_PCIE1_AXI_M_CLK>, > + <&gcc GCC_PCIE1_AXI_S_CLK>, > + <&gcc GCC_PCIE1_AHB_CLK>, > + <&gcc GCC_PCIE1_AUX_CLK>, > + <&gcc GCC_PCIE1_AXI_S_BRIDGE_CLK>; > + > + clock-names = "iface", > + "axi_m", > + "axi_s", > + "ahb", > + "aux", > + "axi_bridge"; > + > + resets = <&gcc GCC_PCIE1_PIPE_ARES>, > + <&gcc GCC_PCIE1_SLEEP_ARES>, > + <&gcc GCC_PCIE1_CORE_STICKY_ARES>, > + <&gcc GCC_PCIE1_AXI_MASTER_ARES>, > + <&gcc GCC_PCIE1_AXI_SLAVE_ARES>, > + <&gcc GCC_PCIE1_AHB_ARES>, > + <&gcc GCC_PCIE1_AXI_MASTER_STICKY_ARES>, > + <&gcc GCC_PCIE1_AXI_SLAVE_STICKY_ARES>; > + > + reset-names = "pipe", > + "sleep", > + "sticky", > + "axi_m", > + "axi_s", > + "ahb", > + "axi_m_sticky", > + "axi_s_sticky"; > + > + msi-map = <0x0 &v2m0 0x0 0xff8>; > + status = "disabled"; > + }; > + > + pcie_x2: pci@a0000000 { > + compatible = "qcom,pcie-ipq5018"; > + reg = <0xa0000000 0xf1d > + 0xa0000F20 0xa8 > + 0xa0001000 0x1000 > + 0x80000 0x3000 > + 0xa0100000 0x1000>; > + reg-names = "dbi", "elbi", "atu", "parf", "config"; > + device_type = "pci"; > + linux,pci-domain = <1>; > + bus-range = <0x00 0xff>; > + num-lanes = <2>; > + max-link-speed = <2>; > + #address-cells = <3>; > + #size-cells = <2>; > + > + phys = <&pcie_x2phy>; > + phy-names ="pciephy"; > + > + ranges = <0x81000000 0 0xa0200000 0xa0200000 > + 0 0x00100000 /* downstream I/O */ > + 0x82000000 0 0xa0300000 0xa0300000 > + 0 0x10000000>; /* non-prefetchable memory */ > + > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 0x7>; > + interrupt-map = <0 0 0 1 &intc 0 75 > + IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > + <0 0 0 2 &intc 0 78 > + IRQ_TYPE_LEVEL_HIGH>, /* int_b */ > + <0 0 0 3 &intc 0 79 > + IRQ_TYPE_LEVEL_HIGH>, /* int_c */ > + <0 0 0 4 &intc 0 83 > + IRQ_TYPE_LEVEL_HIGH>; /* int_d */ > + > + interrupts = ; > + interrupt-names = "global_irq"; > + > + 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>; > + > + clock-names = "iface", > + "axi_m", > + "axi_s", > + "ahb", > + "aux", > + "axi_bridge"; > + > + 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_SLAVE_STICKY_ARES>; > + > + reset-names = "pipe", > + "sleep", > + "sticky", > + "axi_m", > + "axi_s", > + "ahb", > + "axi_m_sticky", > + "axi_s_sticky"; > + > + msi-map = <0x0 &v2m0 0x0 0xff8>; > + status = "disabled"; > + }; > + > }; > > timer { > -- > 2.17.1 > -- With best wishes Dmitry