Message ID | 20230516133011.108093-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp442667vqo; Tue, 16 May 2023 06:52:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42bOMwnLuNg4mQz+wmzk0h9KbL0T6g4ThJ6wVt7e97oEHelzYcxq5h5Rl7shUeFt5kLdd0 X-Received: by 2002:a05:6a20:8f13:b0:101:2160:ff89 with SMTP id b19-20020a056a208f1300b001012160ff89mr35489854pzk.38.1684245124386; Tue, 16 May 2023 06:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684245124; cv=none; d=google.com; s=arc-20160816; b=dHULCpCPLXRWQPM2tnaimp16WjmBmKKPV9Yu+7KCLZtvWUmkL3/YucL6zWN9Fcj4/P LNGq0b3MUqXzGPIeTDVBcoZa4NdZ5DBmvdlZnUW75uQq0TNrMI9qGaqLFjdCFbaaRuVC gmPt1K1/RXcDBeAYwhzxodlddsVedbfq0FXg772oFIhE/HQGQY5nTJWZt4jvwP1b/+Vz 5ChjOxItOXb1Xj0sKYjIaOz4Dj8EsF5H2nFE7eDI74KrFowjq+68Q04RNjA/S5qbqy5P klWnC0r2Is5Ip57ORptwxVILIjemEcQAAEhzMtphc5H/HSne4K41dWRNyAV/ZWvDzqHy peKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1OcGSqk/DzAlyGZla680yYvSgvRKBujmsZ040c4Ko60=; b=Iw5ynOudkgxlHEQkc17C0gn2IvMDnYT3Xwb4hnljDn0ZANgVUM/qRek/hCOEHKWWmI 4HkfVbZtF1HQZDNCgWD3cl+Wo7rfsA6D1bBeKTEfvJBsNOVctHPcLK5Mh/oS3iV/hNQo sYikMMTniJlAKrF/sZrMkVFtvEypIp+hmyMIzA/f5NgMLQc13AGwp7ed6VkaIsZMMs4l oK2RlUgOO+NnSWqPns+XAhr2c1rOi1VxOqd9YykJQKjww5EBmC2HHTOxrGlniPe4cHmT cKwXB1N04nmeiZUomq66g4m9Y2Qd2zEzy59Yfb69qZdYK/ywPJIO0zlSB2Zg2FrQBo2o 3gPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W3dtwd2q; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e29-20020a63745d000000b0053438e687basi2063773pgn.840.2023.05.16.06.51.49; Tue, 16 May 2023 06:52:04 -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=W3dtwd2q; 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 S232392AbjEPNaZ (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Tue, 16 May 2023 09:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231624AbjEPNaW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 16 May 2023 09:30:22 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 999A71981 for <linux-kernel@vger.kernel.org>; Tue, 16 May 2023 06:30:20 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-50bcb00a4c2so21596246a12.1 for <linux-kernel@vger.kernel.org>; Tue, 16 May 2023 06:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684243819; x=1686835819; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1OcGSqk/DzAlyGZla680yYvSgvRKBujmsZ040c4Ko60=; b=W3dtwd2qeJogeV3HpSiBreUc25ST5e86KFo2+Ux1qmGjtmZbievC1u2/LmFSaTuZmd RG7nRskFzAqBD79LQt7qZ3uB3jC0jYLoDqnGqLcGrXN4Z4YoTnYGJMAlMcNlERI7MwaY J5M6D/zPz/ZQJKU3KgqSRvzeStwjx+BVkhiD52EBGgPgrZSNbk1zfhetoAhnzwuMEdKc 8ptso/lkqpwSRzOjP3pjt2d48y6kDmkWmBnpb61Ik7nq4dlSBY8ddGhOCWn8p8cJmqHx 5lkRVnkf2ODzI23juatkUVbdsv+HjUZ3Oaiw7j+EKEhW23dgK51IJKCm+A7L6tgII+j5 K7uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684243819; x=1686835819; 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=1OcGSqk/DzAlyGZla680yYvSgvRKBujmsZ040c4Ko60=; b=IVKmVeTPA/4N3FxFXJCtR3QQ3lvEcs9sPBxmgE5QBKnE7rBPQGsZBgQbqjcW7vZPLR gcxx+I/vkCYfwRB/d+n/9tttIZkxigk6g+luaHH8Z5TfLSMOybHovzeDxTbcG6wJA+Ui FwrAnuTeM0wK0t12D5qTZV8hrjvSw+vgXCsa6EH1vOKaor+Jji7coVeFckLDX07yXGJG xQPAjejfuBYWHNvvrwq2kMd7453xAyKNYR5GRVMrhiuvaanUkDHJ8/ocAvAAEaaM6hMN 58ZsI+L+apBZHd3G7t/PrUGzWSQIzvQdfwireBlGWrsemkoNnKRvoOHRH3gIibvwrFls b0Kg== X-Gm-Message-State: AC+VfDyJXqahD1SHIqFvoryP3C7y7C/3WaAc8Jb9NZWpCr+c7yLUmBA2 WRgI4vev8WGxYEdpE6RIj/0reg== X-Received: by 2002:aa7:ce0a:0:b0:506:af22:1271 with SMTP id d10-20020aa7ce0a000000b00506af221271mr30055544edv.0.1684243819087; Tue, 16 May 2023 06:30:19 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:77d1:16a1:abe1:84fc]) by smtp.gmail.com with ESMTPSA id r23-20020aa7d157000000b0050bfed94702sm8273461edo.77.2023.05.16.06.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 06:30:18 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH 1/2] arm64: dts: qcom: sm8550-qrd: add PCIe0 Date: Tue, 16 May 2023 15:30:10 +0200 Message-Id: <20230516133011.108093-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,URIBL_BLOCKED autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766059015729749883?= X-GMAIL-MSGID: =?utf-8?q?1766059015729749883?= |
Series |
[1/2] arm64: dts: qcom: sm8550-qrd: add PCIe0
|
|
Commit Message
Krzysztof Kozlowski
May 16, 2023, 1:30 p.m. UTC
Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected,
thus skip pcie_1_phy_aux_clk input clock to GCC.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 32 +++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Comments
On 16/05/2023 15:30, Krzysztof Kozlowski wrote: > Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected, > thus skip pcie_1_phy_aux_clk input clock to GCC. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 32 +++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On 16/05/2023 15:30, Krzysztof Kozlowski wrote: > Add missing parts of USB stack to enable USB OTG mode. The QRD8550 > comes with one USB Type-C port. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 52 ++++++++++++++++++++++++- > 1 file changed, 51 insertions(+), 1 deletion(-) Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On Tue, 16 May 2023 at 16:30, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected, > thus skip pcie_1_phy_aux_clk input clock to GCC. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 32 +++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > index ccc58e6b45bd..e7a2bc5d788b 100644 > --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > @@ -385,6 +385,38 @@ vreg_l3g_1p2: ldo3 { > }; > }; > > +&gcc { > + clocks = <&bi_tcxo_div2>, <&sleep_clk>, > + <&pcie0_phy>, > + <&pcie1_phy>, > + <0>, > + <&ufs_mem_phy 0>, > + <&ufs_mem_phy 1>, > + <&ufs_mem_phy 2>, > + <&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; > +}; Is there any reason to disable the PCIe1 PHY AUX clock here? I mean, the PCIe1 is still enabled in the hardware. > + > +&pcie_1_phy_aux_clk { > + status = "disabled"; > +}; > + > +&pcie0 { > + wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; > + perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; > + > + pinctrl-0 = <&pcie0_default_state>; > + pinctrl-names = "default"; > + > + status = "okay"; > +}; > + > +&pcie0_phy { > + vdda-phy-supply = <&vreg_l1e_0p88>; > + vdda-pll-supply = <&vreg_l3e_1p2>; > + > + status = "okay"; > +}; > + > &qupv3_id_0 { > status = "okay"; > }; > -- > 2.34.1 >
On 16/05/2023 18:39, Dmitry Baryshkov wrote: > On Tue, 16 May 2023 at 16:30, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected, >> thus skip pcie_1_phy_aux_clk input clock to GCC. >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 32 +++++++++++++++++++++++++ >> 1 file changed, 32 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> index ccc58e6b45bd..e7a2bc5d788b 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> @@ -385,6 +385,38 @@ vreg_l3g_1p2: ldo3 { >> }; >> }; >> >> +&gcc { >> + clocks = <&bi_tcxo_div2>, <&sleep_clk>, >> + <&pcie0_phy>, >> + <&pcie1_phy>, >> + <0>, >> + <&ufs_mem_phy 0>, >> + <&ufs_mem_phy 1>, >> + <&ufs_mem_phy 2>, >> + <&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; >> +}; > > Is there any reason to disable the PCIe1 PHY AUX clock here? I mean, > the PCIe1 is still enabled in the hardware. I was thinking about this. The AUX clock seems to be an external clock, although I could not find it in schematics. I assume that on QRD8550 it could be missing, if it is really external. OTOH, downstream DTS did not seem to care... Best regards, Krzysztof
On Tue, 16 May 2023 at 19:43, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 16/05/2023 18:39, Dmitry Baryshkov wrote: > > On Tue, 16 May 2023 at 16:30, Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected, > >> thus skip pcie_1_phy_aux_clk input clock to GCC. > >> > >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >> --- > >> arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 32 +++++++++++++++++++++++++ > >> 1 file changed, 32 insertions(+) > >> > >> diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > >> index ccc58e6b45bd..e7a2bc5d788b 100644 > >> --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > >> +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > >> @@ -385,6 +385,38 @@ vreg_l3g_1p2: ldo3 { > >> }; > >> }; > >> > >> +&gcc { > >> + clocks = <&bi_tcxo_div2>, <&sleep_clk>, > >> + <&pcie0_phy>, > >> + <&pcie1_phy>, > >> + <0>, > >> + <&ufs_mem_phy 0>, > >> + <&ufs_mem_phy 1>, > >> + <&ufs_mem_phy 2>, > >> + <&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; > >> +}; > > > > Is there any reason to disable the PCIe1 PHY AUX clock here? I mean, > > the PCIe1 is still enabled in the hardware. > > I was thinking about this. The AUX clock seems to be an external clock, > although I could not find it in schematics. I assume that on QRD8550 it > could be missing, if it is really external. OTOH, downstream DTS did not > seem to care... I might be completely wrong here, but I think that AUX clock is yet another clock provided by the PHY to the GCC, which we were just ignoring for now. For example, for sm8450 we have <0> there. I don't see it as an external clock, so I think it is internal to the SoC.
On 16/05/2023 19:15, Dmitry Baryshkov wrote: > On Tue, 16 May 2023 at 19:43, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 16/05/2023 18:39, Dmitry Baryshkov wrote: >>> On Tue, 16 May 2023 at 16:30, Krzysztof Kozlowski >>> <krzysztof.kozlowski@linaro.org> wrote: >>>> >>>> Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected, >>>> thus skip pcie_1_phy_aux_clk input clock to GCC. >>>> >>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>>> --- >>>> arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 32 +++++++++++++++++++++++++ >>>> 1 file changed, 32 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >>>> index ccc58e6b45bd..e7a2bc5d788b 100644 >>>> --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >>>> +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >>>> @@ -385,6 +385,38 @@ vreg_l3g_1p2: ldo3 { >>>> }; >>>> }; >>>> >>>> +&gcc { >>>> + clocks = <&bi_tcxo_div2>, <&sleep_clk>, >>>> + <&pcie0_phy>, >>>> + <&pcie1_phy>, >>>> + <0>, >>>> + <&ufs_mem_phy 0>, >>>> + <&ufs_mem_phy 1>, >>>> + <&ufs_mem_phy 2>, >>>> + <&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; >>>> +}; >>> >>> Is there any reason to disable the PCIe1 PHY AUX clock here? I mean, >>> the PCIe1 is still enabled in the hardware. >> >> I was thinking about this. The AUX clock seems to be an external clock, >> although I could not find it in schematics. I assume that on QRD8550 it >> could be missing, if it is really external. OTOH, downstream DTS did not >> seem to care... > > I might be completely wrong here, but I think that AUX clock is yet > another clock provided by the PHY to the GCC, which we were just > ignoring for now. For example, for sm8450 we have <0> there. I don't > see it as an external clock, so I think it is internal to the SoC. Hm, in that case it would make sense to keep it here. It's frequency, with some safe choice, could also go to DTSI. Best regards, Krzysztof
On Tue, 16 May 2023 15:30:10 +0200, Krzysztof Kozlowski wrote: > Add PCIe0 nodes used with WCN7851 device. The PCIe1 is not connected, > thus skip pcie_1_phy_aux_clk input clock to GCC. > > Applied, thanks! [1/2] arm64: dts: qcom: sm8550-qrd: add PCIe0 commit: b8ae83eb0c9648a3f9c386cfb191e31139050143 [2/2] arm64: dts: qcom: sm8550-qrd: add USB OTG commit: d97a6332c5841df4fb03aef996a7139465d68ca8 Best regards,
diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index ccc58e6b45bd..e7a2bc5d788b 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -385,6 +385,38 @@ vreg_l3g_1p2: ldo3 { }; }; +&gcc { + clocks = <&bi_tcxo_div2>, <&sleep_clk>, + <&pcie0_phy>, + <&pcie1_phy>, + <0>, + <&ufs_mem_phy 0>, + <&ufs_mem_phy 1>, + <&ufs_mem_phy 2>, + <&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; +}; + +&pcie_1_phy_aux_clk { + status = "disabled"; +}; + +&pcie0 { + wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + + pinctrl-0 = <&pcie0_default_state>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&pcie0_phy { + vdda-phy-supply = <&vreg_l1e_0p88>; + vdda-pll-supply = <&vreg_l3e_1p2>; + + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; };