From patchwork Tue May 16 13:30:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 683649 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 8B55FC77B7F for ; Tue, 16 May 2023 13:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231624AbjEPNa0 (ORCPT ); Tue, 16 May 2023 09:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232749AbjEPNaX (ORCPT ); Tue, 16 May 2023 09:30:23 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D86026BF for ; Tue, 16 May 2023 06:30:20 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-50bc2feb320so21584212a12.3 for ; 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=DcVogHfw1+pPsAYKQchNWCBtQU2y53lvNSNuUq1VAg7f291+OrINuhnf1TBJLShR8j vt4jDDAFwKrVz2ZWbCRyNBETpk7CNipHLPuhQzFGz4XONY8P02fC1nx14qHHF44R2Dnq 5ZwFyF6aDGLpOmrdW6wL/bbF9E7RExES4VPWazxmOBvf5aNdkCEjyfkXzOkg/TcKwIcf 1I+4oNgbcO2HhuTYIvG2yw4VWYjCkrMKGcD+orW9VcWsqVay+PlTJZTngJZ2bMNFcoAz NY/3wuvIUowEyFHOip98T2FQu9RuCeeIMOba0dTd/aGfalBhz8dNRMutdKFrH3AGOh7i nZ1w== X-Gm-Message-State: AC+VfDzp8orlKTMrHsYoIHER12Xs5DJIvbJBM3cLENHuDbcHq983N4ET GdIzpCHRDvGcVLOQDLbdoeDX7A== X-Google-Smtp-Source: ACHHUZ75anCrFz5at1pEffdeVzFNgO/uUjV3kl3HsDgTwKQgZSFTxzefkZDqDbzHp/aEt+dSbVxbNw== 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 To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- 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>; +}; + +&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"; }; From patchwork Tue May 16 13:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 682699 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 0E912C7EE2A for ; Tue, 16 May 2023 13:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233072AbjEPNaZ (ORCPT ); Tue, 16 May 2023 09:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233387AbjEPNaX (ORCPT ); Tue, 16 May 2023 09:30:23 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E114F30D2 for ; Tue, 16 May 2023 06:30:21 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-50bc1612940so25401756a12.2 for ; Tue, 16 May 2023 06:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684243820; x=1686835820; 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=hNOdUh9izb+8S/FC6G+97iSwe6d7rWiNQT3JqGUTaVU=; b=m+rpTHXuvREksVCHIc/xlMGI3QzBRwlzS62RNwNsXn6aUrs1MNgTquZIuqjsXLBZXL +DjyGosBSZqwaFPIXolSWhpY61xx3HeyzjxCtJxLEUstJKFHeu+v5ftmWK413CR9XjWf ajc+NGGn55LH1yURmpBt1DvgCuzacRZU+LLPUYN+MucXyTID1G3rxNxoCGIIYldb4m2j i6J55Z9wRcF4c4yShKvF9Vi7uVUXHX+Rd2wlhUQytE9ShF5EjGq7Hn1decddUXVU5idw hhcfzPYxNMG2gF8LOU8Kg8BLv9d9WKuxz0+6KvCrzCM7uM+RsAya/L/SbmvL1ny7u0Wi +VYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684243820; x=1686835820; 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=hNOdUh9izb+8S/FC6G+97iSwe6d7rWiNQT3JqGUTaVU=; b=EJIFr7yVPPuvS/UMNDKVHzLhq9CfpV+LiJ6KW8pB4A4Zy5a1zD6TJK19m+3F0TUwIg 3xLYm+SRi5WoYtCy3OR7+y98stTqPRmmb/5Z1wm4GpJsE0U8/Zq5BrlaTrFLUxyDct/J zr8UwgeDvI/aOiLabcI5RXcyR5dF63xj2gSo8gukg7z/zRk/TbRfsJQVNRybT2e2y+EU P4iguvTSybc01CitqCyOiLRGlYNmhovSnkipnSWxfaToVccdiQMyl4JVAyIg0pjDgsvJ nnKNzPpDjdd18mEcfTBW+yHrS2ugohOKkrZbFNBbCMug2wt4JWB4yubeluGnpECC1a40 j5DA== X-Gm-Message-State: AC+VfDxrIBEe7ziBsqEM+LNDfyDKrt4zMtDesDAZWuSuwm6JGBGWY7eP W2F56+Q3JzdC5qk6EBKCoyxc6Q== X-Google-Smtp-Source: ACHHUZ7Ne3KfRRdIDK0kHnAIbgOj9VBc4GGF4d8sn02nISCeSe2Sk1GSx3Qwzmhh/XHAH8AXIkTJsg== X-Received: by 2002:a05:6402:12d9:b0:50b:d77d:53aa with SMTP id k25-20020a05640212d900b0050bd77d53aamr27557423edx.38.1684243820192; Tue, 16 May 2023 06:30:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 06:30:19 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] arm64: dts: qcom: sm8550-qrd: add USB OTG Date: Tue, 16 May 2023 15:30:11 +0200 Message-Id: <20230516133011.108093-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230516133011.108093-1-krzysztof.kozlowski@linaro.org> References: <20230516133011.108093-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 52 ++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index e7a2bc5d788b..88b7d3ecdbc9 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -53,6 +53,40 @@ chosen { stdout-path = "serial0:115200n8"; }; + pmic-glink { + compatible = "qcom,sm8550-pmic-glink", "qcom,pmic-glink"; + #address-cells = <1>; + #size-cells = <0>; + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pmic_glink_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_ss_in: endpoint { + remote-endpoint = <&usb_1_dwc3_ss>; + }; + }; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -417,6 +451,11 @@ &pcie0_phy { status = "okay"; }; +&pm8550b_eusb2_repeater { + vdd18-supply = <&vreg_l15b_1p8>; + vdd3-supply = <&vreg_l5b_3p1>; +}; + &qupv3_id_0 { status = "okay"; }; @@ -505,13 +544,24 @@ &usb_1 { }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; +}; + +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + +&usb_1_dwc3_ss { + remote-endpoint = <&pmic_glink_ss_in>; }; &usb_1_hsphy { vdd-supply = <&vreg_l1e_0p88>; vdda12-supply = <&vreg_l3e_1p2>; + phys = <&pm8550b_eusb2_repeater>; + status = "okay"; };