Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1785511rwd; Mon, 15 May 2023 03:04:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5U7DVb9LkAnhw0zVGi4KuFdkgx+Y+BzoesD1XFnZEK0l/WN3wKvL1RLYhZMuaU+a33OCkP X-Received: by 2002:a05:6a00:2393:b0:63b:5c82:e21a with SMTP id f19-20020a056a00239300b0063b5c82e21amr42386794pfc.1.1684145046811; Mon, 15 May 2023 03:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684145046; cv=none; d=google.com; s=arc-20160816; b=Ec8jD3Rjb5sTNZQIyamikXVAAAoaxlYhJ6+alY35rqs6SVPDtN/kMFngLyjtlX4KWX kTaOF9zMfHVUfgLubYolCBnLOajYUKfJK7qB/ZOC2ohQJh1uKuF0hJVd4o3yPMJvEMoe 9bySGyC1dNCVt6fkDeWVtu+DjnCljTf9C3EB/VAQZrQoqnD6Ac4eKgtny9eiomCLQE7X 4gzwC+ctiO10O5CTWrxxTy/xDP5/linljl3B46XPJ3Gi+ZmrX0TnHkmvghO2yp9Du6ML bzMN92xbRk2Gl3qRMtjV/lVf2Xvgcr0gMZ6Y0MXev0vXYvc1FxLFTio7pBGfoC+282d+ 3moA== 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=IF6RYhi9196ABKVQuykto9HSRX1UUNxAVL8RwbebD6Y=; b=JOG7laCUo5ewUANwzdT24InnRrGAKYDDq/F+D609Ro2W0vjay88KBybbZfD+RD6igQ QXXnrHZjO59dBRWXQDaolbC3xxFWka1Ed/9zbjHwh3UcXCZFXfvSs1kSCbMGJF3vNrL9 4m84RTduATgqTV6Z7InVufd/06heaCIiwmKADl09dFqexGgUrzln9jggS+J3EkXVyPSK QVAC7Y6PstJpqGjjZQdjb3jwtmCzjcCVIMmknWZMXpoY6aoIzAa4vTJqWgUkv6mt+EmC CprkYkn2Vynp/mNPx7EgmfGOxuYGUkesNXRcSQ+tgEaMzfKG1e4z3ImPWDi3hIqaki5X 9SnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sL8H4oQe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020aa7982f000000b0063b731e3938si16561709pfl.2.2023.05.15.03.03.53; Mon, 15 May 2023 03:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sL8H4oQe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239520AbjEOJxK (ORCPT + 99 others); Mon, 15 May 2023 05:53:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240913AbjEOJwb (ORCPT ); Mon, 15 May 2023 05:52:31 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A25726B6 for ; Mon, 15 May 2023 02:51:39 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-55a214572e8so186389797b3.0 for ; Mon, 15 May 2023 02:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684144297; x=1686736297; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IF6RYhi9196ABKVQuykto9HSRX1UUNxAVL8RwbebD6Y=; b=sL8H4oQe5XjWXMsicnXlIlhqp+6Cqc1VH3jd+E2QPvjxjnzEICur1g0y3vq9Gac8c6 lQgwUGSgMMcoXvNSGe9Q+Dlxi0sa7t38U3OO2LWXxraPi41oLlNjiINIKquBHEpCx/9Y rPWvhzUffBEWis4dvDBrW1+Lbd3DI3kYPzm8eM8qKbqk9mBq5MfqyyaufUJd9+AY932x fzCgQdilG0ljG1+DX1LATkCYF5ONMY15CEYldT4wwSXNxcDVS1ET3s+SQMoIrV9dLecE vLpChenSJffNxxKWPk2o8lfMRTqJx8n8JBk6TZoXDiAwgqJRgHYjd92miZIM+WgN47Pu POeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684144297; x=1686736297; 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=IF6RYhi9196ABKVQuykto9HSRX1UUNxAVL8RwbebD6Y=; b=bv+WzgWJUnEmQ0svjL4NOIpW0MzfkiEpffsvHpAC2WI/Kz1h+sX6chOYDU/GSTwkI0 vaSHEQjLTwZ+779w78haIVmsNM0lXTh6YifJ5HoW9dd5+D1tNio00X+hojC6U5oP0H6q HT1Xk+OFPkmJglLD3nWDGMXHpMiWW1fpTqEQ8osgxZU+WTbpXpXhXh8MUvGGVDLCN72R QXokgTBy4yrk6vD9SYsSdj4hkJf/qQ5l+58LM26EvkUJgPDoOuZob6MD5Xu863TtP4jY rcdfNH1Rva1wrnfB+Zft3lmxBZtdjX1/K46TlZxVt7987ZmSJXLsfJxHSwKHYLm60yGu tgOQ== X-Gm-Message-State: AC+VfDwR/91NYPNGuTFWpiMZMcb8JSyQARGc7Zo4wKITw4k9nfoS3Hpi 2B7jOmLohQRNj3FB3Y+7nPRNEjUedYLCqWz/akdlzw== X-Received: by 2002:a81:658a:0:b0:55d:8768:4081 with SMTP id z132-20020a81658a000000b0055d87684081mr29351285ywb.7.1684144297357; Mon, 15 May 2023 02:51:37 -0700 (PDT) MIME-Version: 1.0 References: <20230421124938.21974-1-quic_devipriy@quicinc.com> <20230421124938.21974-5-quic_devipriy@quicinc.com> <97315104-d9cc-27f8-8c52-b99080179269@quicinc.com> In-Reply-To: <97315104-d9cc-27f8-8c52-b99080179269@quicinc.com> From: Dmitry Baryshkov Date: Mon, 15 May 2023 12:51:26 +0300 Message-ID: Subject: Re: [PATCH V3 4/6] arm64: dts: qcom: ipq9574: Add PCIe PHYs and controller nodes To: Devi Priya 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, mturquette@baylibre.com, sboyd@kernel.org, mani@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-clk@vger.kernel.org, quic_srichara@quicinc.com, quic_sjaganat@quicinc.com, quic_kathirav@quicinc.com, quic_arajkuma@quicinc.com, quic_anusha@quicinc.com, quic_ipkumar@quicinc.com 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_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 May 2023 at 12:36, Devi Priya wrote: > > > > On 5/8/2023 5:10 PM, Dmitry Baryshkov wrote: > > On 08/05/2023 13:53, Devi Priya wrote: > >> > >> > >> On 4/22/2023 5:49 AM, Dmitry Baryshkov wrote: > >>> On Fri, 21 Apr 2023 at 15:50, Devi Priya > >>> wrote: > >>>> > >>>> Add PCIe0, PCIe1, PCIe2, PCIe3 (and corresponding PHY) devices > >>>> found on IPQ9574 platform. The PCIe0 & PCIe1 are 1-lane Gen3 > >>>> host whereas PCIe2 & PCIe3 are 2-lane Gen3 host. > >>>> > >>>> Co-developed-by: Anusha Rao > >>>> Signed-off-by: Anusha Rao > >>>> Signed-off-by: Devi Priya > >>>> --- > >>>> Changes in V3: > >>>> - Fixed up the PCI I/O port ranges > >>>> > >>>> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 375 > >>>> +++++++++++++++++++++++++- > >>>> 1 file changed, 370 insertions(+), 5 deletions(-) > >>>> > >>>> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi > >>>> b/arch/arm64/boot/dts/qcom/ipq9574.dtsi > >>>> index e757b57957cf..953a839a1141 100644 > >>>> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi > >>>> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi > >>>> @@ -6,8 +6,8 @@ > >>>> * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights > >>>> reserved. > >>>> */ > >>>> > >>>> -#include > >>>> #include > >>>> +#include > >>>> #include > >>>> > >>>> / { > >>>> @@ -116,6 +116,58 @@ > >>>> #size-cells = <1>; > >>>> ranges = <0 0 0 0xffffffff>; > >>>> > >>>> + pcie0_phy: phy@84000 { > >>>> + compatible = > >>>> "qcom,ipq9574-qmp-gen3x1-pcie-phy"; > >>>> + reg = <0x00084000 0x1000>; > >>>> + > >>>> + clocks = <&gcc GCC_PCIE0_AUX_CLK>, > >>>> + <&gcc GCC_PCIE0_AHB_CLK>, > >>>> + <&gcc GCC_ANOC_PCIE0_1LANE_M_CLK>, > >>>> + <&gcc GCC_SNOC_PCIE0_1LANE_S_CLK>, > >>>> + <&gcc GCC_PCIE0_PIPE_CLK>; > >>>> + clock-names = "aux", "cfg_ahb", "anoc_lane", > >>>> "snoc_lane", "pipe"; > >>>> + > >>>> + assigned-clocks = <&gcc GCC_PCIE0_AUX_CLK>; > >>>> + assigned-clock-rates = <20000000>; > >>>> + > >>>> + resets = <&gcc GCC_PCIE0_PHY_BCR>, > >>>> + <&gcc GCC_PCIE0PHY_PHY_BCR>; > >>>> + reset-names = "phy", "common"; > >>>> + > >>>> + #clock-cells = <0>; > >>>> + clock-output-names = "gcc_pcie0_pipe_clk_src"; > >>>> + > >>>> + #phy-cells = <0>; > >>>> + status = "disabled"; > >>>> + > >>>> + }; > >>>> + > >>>> + pcie2_phy: phy@8c000 { > >>>> + compatible = > >>>> "qcom,ipq9574-qmp-gen3x2-pcie-phy"; > >>>> + reg = <0x0008c000 0x2000>; > >>>> + > >>>> + clocks = <&gcc GCC_PCIE2_AUX_CLK>, > >>>> + <&gcc GCC_PCIE2_AHB_CLK>, > >>>> + <&gcc GCC_ANOC_PCIE2_2LANE_M_CLK>, > >>>> + <&gcc GCC_SNOC_PCIE2_2LANE_S_CLK>, > >>>> + <&gcc GCC_PCIE2_PIPE_CLK>; > >>>> + clock-names = "aux", "cfg_ahb", "anoc_lane", > >>>> "snoc_lane", "pipe"; > >>>> + > >>>> + assigned-clocks = <&gcc GCC_PCIE2_AUX_CLK>; > >>>> + assigned-clock-rates = <20000000>; > >>>> + > >>>> + resets = <&gcc GCC_PCIE2_PHY_BCR>, > >>>> + <&gcc GCC_PCIE2PHY_PHY_BCR>; > >>>> + reset-names = "phy", "common"; > >>>> + > >>>> + #clock-cells = <0>; > >>>> + clock-output-names = "gcc_pcie2_pipe_clk_src"; > >>>> + > >>>> + #phy-cells = <0>; > >>>> + status = "disabled"; > >>>> + > >>>> + }; > >>>> + > >>>> rng: rng@e3000 { > >>>> compatible = "qcom,prng-ee"; > >>>> reg = <0x000e3000 0x1000>; > >>>> @@ -123,6 +175,58 @@ > >>>> clock-names = "core"; > >>>> }; > >>>> > >>>> + pcie3_phy: phy@f4000 { > >>>> + compatible = > >>>> "qcom,ipq9574-qmp-gen3x2-pcie-phy"; > >>>> + reg = <0x000f4000 0x2000>; > >>>> + > >>>> + clocks = <&gcc GCC_PCIE3_AUX_CLK>, > >>>> + <&gcc GCC_PCIE3_AHB_CLK>, > >>>> + <&gcc GCC_ANOC_PCIE3_2LANE_M_CLK>, > >>>> + <&gcc GCC_SNOC_PCIE3_2LANE_S_CLK>, > >>>> + <&gcc GCC_PCIE3_PIPE_CLK>; > >>>> + clock-names = "aux", "cfg_ahb", "anoc_lane", > >>>> "snoc_lane", "pipe"; > >>>> + > >>>> + assigned-clocks = <&gcc GCC_PCIE3_AUX_CLK>; > >>>> + assigned-clock-rates = <20000000>; > >>>> + > >>>> + resets = <&gcc GCC_PCIE3_PHY_BCR>, > >>>> + <&gcc GCC_PCIE3PHY_PHY_BCR>; > >>>> + reset-names = "phy", "common"; > >>>> + > >>>> + #clock-cells = <0>; > >>>> + clock-output-names = "gcc_pcie3_pipe_clk_src"; > >>>> + > >>>> + #phy-cells = <0>; > >>>> + status = "disabled"; > >>>> + > >>>> + }; > >>>> + > >>>> + pcie1_phy: phy@fc000 { > >>>> + compatible = > >>>> "qcom,ipq9574-qmp-gen3x1-pcie-phy"; > >>>> + reg = <0x000fc000 0x1000>; > >>>> + > >>>> + clocks = <&gcc GCC_PCIE1_AUX_CLK>, > >>>> + <&gcc GCC_PCIE1_AHB_CLK>, > >>>> + <&gcc GCC_ANOC_PCIE1_1LANE_M_CLK>, > >>>> + <&gcc GCC_SNOC_PCIE1_1LANE_S_CLK>, > >>>> + <&gcc GCC_PCIE1_PIPE_CLK>; > >>>> + clock-names = "aux", "cfg_ahb", "anoc_lane", > >>>> "snoc_lane", "pipe"; > >>>> + > >>>> + assigned-clocks = <&gcc GCC_PCIE1_AUX_CLK>; > >>>> + assigned-clock-rates = <20000000>; > >>>> + > >>>> + resets = <&gcc GCC_PCIE1_PHY_BCR>, > >>>> + <&gcc GCC_PCIE1PHY_PHY_BCR>; > >>>> + reset-names = "phy", "common"; > >>>> + > >>>> + #clock-cells = <0>; > >>>> + clock-output-names = "gcc_pcie1_pipe_clk_src"; > >>>> + > >>>> + #phy-cells = <0>; > >>>> + status = "disabled"; > >>>> + > >>>> + }; > >>>> + > >>>> tlmm: pinctrl@1000000 { > >>>> compatible = "qcom,ipq9574-tlmm"; > >>>> reg = <0x01000000 0x300000>; > >>>> @@ -146,10 +250,10 @@ > >>>> reg = <0x01800000 0x80000>; > >>>> clocks = <&xo_board_clk>, > >>>> <&sleep_clk>, > >>>> - <0>, > >>>> - <0>, > >>>> - <0>, > >>>> - <0>, > >>>> + <&pcie0_phy>, > >>>> + <&pcie1_phy>, > >>>> + <&pcie2_phy>, > >>>> + <&pcie3_phy>, > >>>> <0>; > >>>> #clock-cells = <1>; > >>>> #reset-cells = <1>; > >>>> @@ -478,6 +582,267 @@ > >>>> status = "disabled"; > >>>> }; > >>>> }; > >>>> + > >>>> + pcie1: pci@10000000 { > >>>> + compatible = "qcom,pcie-ipq9574"; > >>>> + reg = <0x10000000 0xf1d>, > >>>> + <0x10000F20 0xa8>, > >>>> + <0x10001000 0x1000>, > >>>> + <0x000F8000 0x4000>, > >>>> + <0x10100000 0x1000>; > >>>> + reg-names = "dbi", "elbi", "atu", "parf", > >>>> "config"; > >>>> + device_type = "pci"; > >>>> + linux,pci-domain = <2>; > >>>> + bus-range = <0x00 0xff>; > >>>> + num-lanes = <1>; > >>>> + #address-cells = <3>; > >>>> + #size-cells = <2>; > >>>> + > >>>> + ranges = <0x01000000 0x0 0x00000000 > >>>> 0x10200000 0x0 0x100000>, /* I/O */ > >>>> + <0x02000000 0x0 0x10300000 > >>>> 0x10300000 0x0 0x7d00000>; /* MEM */ > >>>> + > >>>> + #interrupt-cells = <1>; > >>>> + interrupt-map-mask = <0 0 0 0x7>; > >>>> + interrupt-map = <0 0 0 1 &intc 0 35 > >>>> IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > >>>> + <0 0 0 2 &intc 0 49 > >>>> IRQ_TYPE_LEVEL_HIGH>, /* int_b */ > >>>> + <0 0 0 3 &intc 0 84 > >>>> IRQ_TYPE_LEVEL_HIGH>, /* int_c */ > >>>> + <0 0 0 4 &intc 0 85 > >>>> IRQ_TYPE_LEVEL_HIGH>; /* int_d */ > >>>> + > >>> > >>> No iommu-map? > >> We do not enable the IOMMU stage1 translation for PCIe and the registers > >> have secure access only from TrustZone (It enables only stage2 for > >> Access control) > > > > So, no SMMU protection for PCIe transactions? This sounds like a step > > backwards. > Yes, we are not using stage1 translations. We = software or we = hardware? If there is a hardware interface to SMMU, please describe it here. -- With best wishes Dmitry