Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30083626rwd; Thu, 6 Jul 2023 00:11:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGmqQJoOL+5Rpx0JbIhWwHFQzvaXzgqqwRITlrVRIn0YWxJoKkHAISBJf1/1tRuAaehdwA8 X-Received: by 2002:a05:6871:88f:b0:17a:c612:ae0d with SMTP id r15-20020a056871088f00b0017ac612ae0dmr1509326oaq.49.1688627475618; Thu, 06 Jul 2023 00:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688627475; cv=none; d=google.com; s=arc-20160816; b=qAEmT9S7CWGGWrjzbIfSdZ+P5EhajzPideYX8o+Ypuaxa+pXFvBG8wIIoUtJdwVMyM BTcSf5zkhU+KGPN+Ibvcj8UQ6rRc3uDjnyBwQu3vNkzFhy3kcfmvLgxvDJcFyLMd8HQV 853jkq4vUpWmb2NuQf+lyVZ4mPNbjM6kCA9H5zK/XhyJfzDA/5qNCWXF0SAeuWXE1PG0 yk43krz9hV+I76yaB9UIyDK3EuTA6XrhDwnUtORVqHp55zSPF0A9uojDJ26yPUTAwCm9 UhU3as76Bxeaz/XrhOjwVOMbt/muBUnZaUzssGclriiBB/VIDzhze1y8BVbFmMqnAcJa 8C2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SzbDaaEINzDnrrek3iEpxYi20fNioqu6biTa2NhS4fM=; fh=0CgVfI+xt4B2jHq1emTnC0K3gjB2BalbHNjhjaTk9II=; b=Y2Y43Jr91ciU83tQwc5n/+OEUyGnP7ZNp2/4nzZcxE+KwcJ9S0rmwHQV6lPFzOqdfx ccT+C1Gk+xNt0DoxkunAOtsoIcgjTewSoyKO7Nh9WTmdVJZCS8SM5j+54XbEytLbxF8r SfbLZ0Q0P1txhBZfHUDt899H3HSvF91ZXIQn6Yt32sJzU1Ie0higoExnNjd/Q9b5mFjt ZWgp/tVpAVluPGq7jtzZHxX/+kgF6tbCgmR//WvBllMiynpId93mBCV950naxDTUV/0E vi6m6gy8piQxhM65lUMb1+bPtv4eNl8nHzZKSgbseOLqJmH+v2FrD6RIocRE5LYL3Lyq +47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=injOkU3h; 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 b7-20020a656687000000b0054fd5b1776dsi882033pgw.266.2023.07.06.00.11.03; Thu, 06 Jul 2023 00:11:15 -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=injOkU3h; 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 S233590AbjGFGif (ORCPT + 99 others); Thu, 6 Jul 2023 02:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233477AbjGFGid (ORCPT ); Thu, 6 Jul 2023 02:38:33 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59D3819B for ; Wed, 5 Jul 2023 23:38:31 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-98df3dea907so37026366b.3 for ; Wed, 05 Jul 2023 23:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688625510; x=1691217510; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SzbDaaEINzDnrrek3iEpxYi20fNioqu6biTa2NhS4fM=; b=injOkU3hL1jr16jkt15zpH4C98XjRlyqXP/5gdSh5opjm4kgxt5ZAmgiHuyttMjyZ/ 9BOZopijMVK9aU5RzZ7LNcTb60k+mZS7DSaWtc5lNZrLWPMnjYgDG4SCofm4H2MP9WyL P8gxsmzz8YGk4AKKinmgL1w3QTtAOXVrArmnVaQhqZBMfYz1m9UVrJOTqigc8YQsxx2E ij6rTNP55i7lVjsZO+1MyqDgG3rtM2qibI9GxJSfDf8zZLsObPJBszBm3I4T1XJYRPxj jTpYju0/9f4DN1joM4Di1jS5Y/2m5bwWCH3ZbhuQO5Vm3Ld+/BgfxS7IUut7TecoWJBr P1zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688625510; x=1691217510; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SzbDaaEINzDnrrek3iEpxYi20fNioqu6biTa2NhS4fM=; b=cPfqSRwwzDupEy0+FDHPfQmYs0m0PHXaCt/K5kj9Jx1j9Xb2jj5amvhfHkbyI2eEIm gP/Vk8ZS+5LoSmBsrkbtQhzqx/hmdaLyXVf//lzRS8Fr06v2Emwok0MQ7GvxZW6Mmplj PCzGpdeeeBz+UpiON4hCrYD4ZvAjR3hV/50cPerLAUxMBLDvDJUFo/UUP3skm2/E2Z6u FnBuiA1lD24NlsmBuIeo44NY8ouSI2R5LgWMaW7Cw6f7+8gaJUNDbAfVghtB5n23BQg/ ryAoZFJixmggVKk7dYFvWeW9qk/UFeXaL2P+qkFznsEZ1ssLKNzObdwvO20StBw7HXf1 c8DQ== X-Gm-Message-State: ABy/qLYUfgoud6Tb7RrxMD1oShm6Cj9EtzmNRZzJhllUEHRKuLHZTLcL 7xd2jTwO8lza3NLTXZ/OvD4HPA== X-Received: by 2002:a17:906:7a17:b0:991:f427:2fe8 with SMTP id d23-20020a1709067a1700b00991f4272fe8mr699401ejo.2.1688625509779; Wed, 05 Jul 2023 23:38:29 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id m9-20020a1709060d8900b00985bdb7dd5fsm381746eji.201.2023.07.05.23.38.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 23:38:29 -0700 (PDT) Message-ID: <59414ba3-dee2-33c1-0752-ec3fbc369b99@linaro.org> Date: Thu, 6 Jul 2023 08:38:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1 5/6] arm64: dts: qcom: sa8775p: Add pcie0 and pcie1 nodes Content-Language: en-US To: Mrinmay Sarkar , agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Rob Herring , Bjorn Helgaas , Vinod Koul , Kishon Vijay Abraham I , 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 References: <1688545032-17748-1-git-send-email-quic_msarkar@quicinc.com> <1688545032-17748-6-git-send-email-quic_msarkar@quicinc.com> From: Krzysztof Kozlowski In-Reply-To: <1688545032-17748-6-git-send-email-quic_msarkar@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 05/07/2023 10:17, Mrinmay Sarkar wrote: > Add pcie dtsi nodes for two controllers found on sa8775p platform. > > Signed-off-by: Mrinmay Sarkar > --- > arch/arm64/boot/dts/qcom/sa8775p.dtsi | 201 +++++++++++++++++++++++++- > 1 file changed, 199 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi > index b130136acffe..88749cbaea8b 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi > +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi > @@ -481,8 +481,8 @@ gcc: clock-controller@100000 { > <0>, > <0>, > <0>, > - <0>, > - <0>, > + <&pcie0_phy>, > + <&pcie1_phy>, > <0>, > <0>, > <0>; > @@ -2315,4 +2315,201 @@ arch_timer: timer { > , > ; > }; > + > + pcie0: pci@1c00000{ > + device_type = "pci"; > + compatible = "qcom,pcie-sa8775p"; > + reg = <0x0 0x01c00000 0x0 0x3000>, > + <0x0 0x40000000 0x0 0xf20>, > + <0x0 0x40000f20 0x0 0xa8>, > + <0x0 0x40001000 0x0 0x4000>, > + <0x0 0x40100000 0x0 0x100000>, > + <0x0 0x01c03000 0x0 0x1000>; > + reg-names = "parf", "dbi", "elbi", "atu", "config", "mhi"; > + > + #address-cells = <3>; > + #size-cells = <2>; > + ranges = <0x01000000 0x0 0x40200000 0x0 0x40200000 0x0 0x100000>, > + <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>; > + bus-range = <0x00 0xff>; > + > + linux,pci-domain = <0>; > + num-lanes = <2>; > + > + interrupts = ; > + interrupt-names = "msi"; > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 0x7>; > + interrupt-map = <0 0 0 1 &intc GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH>, > + <0 0 0 2 &intc GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>, > + <0 0 0 3 &intc GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>, > + <0 0 0 4 &intc GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>; > + > + clocks = <&gcc GCC_PCIE_0_AUX_CLK>, > + <&gcc GCC_PCIE_0_CFG_AHB_CLK>, > + <&gcc GCC_PCIE_0_MSTR_AXI_CLK>, > + <&gcc GCC_PCIE_0_SLV_AXI_CLK>, > + <&gcc GCC_PCIE_0_SLV_Q2A_AXI_CLK>; > + > + clock-names = "aux", > + "cfg", > + "bus_master", > + "bus_slave", > + "slave_q2a"; > + > + assigned-clocks = <&gcc GCC_PCIE_0_AUX_CLK>; > + assigned-clock-rates = <19200000>; > + > + interconnects = <&pcie_anoc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>; > + interconnect-names = "pcie-mem"; > + > + resets = <&gcc GCC_PCIE_0_BCR>; > + reset-names = "pci"; > + power-domains = <&gcc PCIE_0_GDSC>; > + > + phys = <&pcie0_phy>; > + phy-names = "pciephy"; > + > + iommus = <&pcie_smmu 0x0000 0x1>; > + iommu-map = <0x0 &pcie_smmu 0x0000 0x1>, > + <0x100 &pcie_smmu 0x0001 0x1>; > + > + perst-gpios = <&tlmm 2 1>; > + wake-gpios = <&tlmm 0 0>; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&pcie0_default_state>; > + > + status = "disabled"; > + }; > + > + pcie0_phy: phy@1c04000 { > + compatible = "qcom,sa8775p-qmp-gen4x2-pcie-phy"; > + reg = <0x0 0x1c04000 0x0 0x2000>; > + > + clocks = <&gcc GCC_PCIE_0_AUX_CLK>, > + <&gcc GCC_PCIE_0_CFG_AHB_CLK>, > + <&gcc GCC_PCIE_CLKREF_EN>, > + <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>, > + <&gcc GCC_PCIE_0_PHY_AUX_CLK>, > + <&gcc GCC_PCIE_0_PIPE_CLK>, > + <&gcc GCC_PCIE_0_PIPEDIV2_CLK>; > + > + clock-names = "aux", "cfg_ahb", "ref", "rchng", "phy_aux", > + "pipe", "pipediv2"; > + > + assigned-clocks = <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>; > + assigned-clock-rates = <100000000>; > + > + power-domains = <&gcc PCIE_0_GDSC>; > + > + resets = <&gcc GCC_PCIE_0_PHY_BCR>; > + reset-names = "phy"; > + > + #clock-cells = <0>; > + clock-output-names = "pcie_0_pipe_clk"; > + > + #phy-cells = <0>; > + > + status = "disabled"; > + }; > + > + pcie1: pci@1c10000{ > + device_type = "pci"; compatible is always first property, then reg, then reg-names, then ranges. Always. > + compatible = "qcom,pcie-sa8775p"; > + reg = <0x0 0x01c10000 0x0 0x3000>, > + <0x0 0x60000000 0x0 0xf20>, > + <0x0 0x60000f20 0x0 0xa8>, > + <0x0 0x60001000 0x0 0x4000>, > + <0x0 0x60100000 0x0 0x100000>, > + <0x0 0x01c13000 0x0 0x1000>; > + reg-names = "parf", "dbi", "elbi", "atu", "config", "mhi"; > + > + #address-cells = <3>; > + #size-cells = <2>; > + ranges = <0x01000000 0x0 0x60200000 0x0 0x60200000 0x0 0x100000>, > + <0x02000000 0x0 0x60300000 0x0 0x60300000 0x0 0x1fd00000>; > + bus-range = <0x00 0xff>; > + > + linux,pci-domain = <1>; > + num-lanes = <4>; > + > + interrupts = ; > + interrupt-names = "msi"; > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 0x7>; > + interrupt-map = <0 0 0 1 &intc GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, > + <0 0 0 2 &intc GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, > + <0 0 0 3 &intc GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, > + <0 0 0 4 &intc GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>; > + > + clocks = <&gcc GCC_PCIE_1_AUX_CLK>, > + <&gcc GCC_PCIE_1_CFG_AHB_CLK>, > + <&gcc GCC_PCIE_1_MSTR_AXI_CLK>, > + <&gcc GCC_PCIE_1_SLV_AXI_CLK>, > + <&gcc GCC_PCIE_1_SLV_Q2A_AXI_CLK>; > + > + clock-names = "aux", > + "cfg", > + "bus_master", > + "bus_slave", > + "slave_q2a"; > + > + assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>; > + assigned-clock-rates = <19200000>; > + > + interconnects = <&pcie_anoc MASTER_PCIE_1 0 &mc_virt SLAVE_EBI1 0>; > + interconnect-names = "pcie-mem"; > + > + resets = <&gcc GCC_PCIE_1_BCR>; > + reset-names = "pci"; > + power-domains = <&gcc PCIE_1_GDSC>; > + > + phys = <&pcie1_phy>; > + phy-names = "pciephy"; > + > + iommus = <&pcie_smmu 0x0080 0x1>; > + iommu-map = <0x0 &pcie_smmu 0x0080 0x1>, > + <0x100 &pcie_smmu 0x0081 0x1>; > + > + perst-gpios = <&tlmm 4 1>; > + wake-gpios = <&tlmm 5 0>; Use proper defines. > + > + pinctrl-names = "default"; > + pinctrl-0 = <&pcie1_default_state>; > + > + status = "disabled"; > + }; > + > + pcie1_phy: phy@1c14000 { > + compatible = "qcom,sa8775p-qmp-gen4x4-pcie-phy"; > + reg = <0x0 0x1c14000 0x0 0x4000>; > + > + clocks = <&gcc GCC_PCIE_1_AUX_CLK>, > + <&gcc GCC_PCIE_1_CFG_AHB_CLK>, > + <&gcc GCC_PCIE_CLKREF_EN>, > + <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>, > + <&gcc GCC_PCIE_1_PHY_AUX_CLK>, > + <&gcc GCC_PCIE_1_PIPE_CLK>, > + <&gcc GCC_PCIE_1_PIPEDIV2_CLK>; > + > + clock-names = "aux", "cfg_ahb", "ref", "rchng", "phy_aux", > + "pipe", "pipediv2"; > + > + assigned-clocks = <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>; > + assigned-clock-rates = <100000000>; > + > + power-domains = <&gcc PCIE_1_GDSC>; > + > + resets = <&gcc GCC_PCIE_1_PHY_BCR>; > + reset-names = "phy"; > + > + #clock-cells = <0>; > + clock-output-names = "pcie_1_pipe_clk"; > + > + #phy-cells = <0>; > + > + status = "disabled"; > + No stray blank lines. > + }; > }; Best regards, Krzysztof