From patchwork Sat Jan 13 05:42:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762656 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79B69134C2 for ; Sat, 13 Jan 2024 05:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hfdJfoz7" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2cd17a979bcso81300551fa.0 for ; Fri, 12 Jan 2024 21:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124564; x=1705729364; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1plu6Fal9qcn1Wtuu6vQETPtirp4Q/rK0fLCOiwCIQY=; b=hfdJfoz7oCk/cT+HhO9R0mWi6EHg6w6/bneEfBTVEsw4J/TIy6AKutcfhBJ8Wyywgj NcqX3Uy9AX8lvBLaqPVqlsfGRQu3gs6N/RdK4Fj026uen7OZhTzZMLKsV/FKR9VEYnBL n03zdubCxxsOkv4sCzpRp97HyZONo3hEdL+pRHhScYfunE36x9Kp5R2iLuUVQ5zA5w0q WU2oX280RGFrZNeZDlBuZJbruRMejKJygkCYr9vE2cp8Qj7toD54SEtMc6VWCVBXXtZ0 35zOmrWNi3ObYJo+Vo1WG/34fPXooVmp2gqvshutb5PJa8smHI2Nc4cvNkSLfNKIl8UO ZWHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124564; x=1705729364; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1plu6Fal9qcn1Wtuu6vQETPtirp4Q/rK0fLCOiwCIQY=; b=ZXthPxfMiot5eqIvufJLI6TsWOhsh/Lon4v2eNJZMEj1W97kobSMfZmlYxyqQS2PKb P09lwxwYcpZUk1coN+RjolJ7Yz+OUN0/ed00q8FFbFJzF/PX88R7A27EjQJZ01xbsJA2 xFtZiGmqFYuza+AspBpQN+N6OL3wE5Pp+QEAXfuzDlO6XlogA8/k1Igv+k52Asv343Ck WGqGFX013RIMz7zPQRGlHLeMi8WyGAVP7fQ5B5PW1WXjvAPqH3Klkf8EMumwOL0Mdf7q vPHcqergghAkuUJfssf4gNqLgiMdq/TcvcSNbDnd8aMICDGzVCl/4RRvp9ztkUSy8c4C qCvQ== X-Gm-Message-State: AOJu0Yx37HCGQCNrBC4zhUxcYs0/QN2/4WBfslDzZOZ1vBef+WPeZzZX UeTe7EDD37ybB+fZBrRwh18ZQ+Kbo1mQyg== X-Google-Smtp-Source: AGHT+IFd1jPpJPDKDRrkgYEFhTbv5z5l7BYXN+JECjDlZMmNU14o63+C2Gmf4IDFn8+YmejCRRIslQ== X-Received: by 2002:a2e:9614:0:b0:2cc:c895:7140 with SMTP id v20-20020a2e9614000000b002ccc8957140mr637588ljh.73.1705124563714; Fri, 12 Jan 2024 21:42:43 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:43 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:38 +0200 Subject: [PATCH 01/13] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-1-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1073; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=VO6sCRtukMYbFqUkroEE9VOEtJ3mqzFoVaUfeIJHtBE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLQLfTXIowNMw1HcfpGXvc8pKu+5bdoQQ0PL deZL6vAXBeJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0AAKCRCLPIo+Aiko 1c1BB/9X3V4VUltARNirVryclPWLymp+ODlBtn2/MwSLhsc4VHMGsr3DnsRZmZUwzjgFw4SXtwB 3N6Lx9lYkcDDwmjixCxUaC+84PZkqj0TgX3diLz3ioz4U+F3OUGLVMaoE6MJloAe9ISaJJLFI2r ipbJEbX7X5qK8g8HkJa4ngBTh49qG6HgPUsIftLwCAR/sNPcrI7NbxE4Jbpi81N65HFmmTcAMCE LNK6xeCXRkHGQF/IY3sofOkqqiq+7emxD+EIyUtPK5PkaAIoaIDTIeXHj2j+GOmZfMb9iPiHd22 3hk6RdL6gqy9ykUlI+/VhhkF7qLXmScxPILjdChVlxregXY1 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The VBUS register block on the PMI632 PMIC shares the design with the PM8150B one. Define corresponding compatible string, having the qcom,pm8150b-vbus-reg as a fallback. Signed-off-by: Dmitry Baryshkov --- .../devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml index 534f87e98716..66dcd5ce03e6 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml @@ -19,8 +19,13 @@ allOf: properties: compatible: - enum: - - qcom,pm8150b-vbus-reg + oneOf: + - enum: + - qcom,pm8150b-vbus-reg + - items: + - enum: + - qcom,pmi632-vbus-reg + - const: qcom,pm8150b-vbus-reg reg: maxItems: 1 From patchwork Sat Jan 13 05:42:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762655 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5BAA1428F for ; Sat, 13 Jan 2024 05:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TgjdBYMC" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2cd1a1c5addso82534751fa.1 for ; Fri, 12 Jan 2024 21:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124565; x=1705729365; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WJc3qa2P7/gJ3egsD0VQ5u3r1xsQIdR/8Y8k0L14qog=; b=TgjdBYMCAyNzcD3ajfk4SP2Yn+xsl8nlCWWaJrcPvVnkVcV6TCirlRUWPdOTShjjuK iYdSzTfDbVmBZdPVT/Iw3RB9Q1rNo8IaHtM+uweFkjm9i8G2JfWmt1AAnUEMSw3m33Od 0WvXlocBMbrV7Kk+neK3yQgW2cmUgge4NZQunQ7oJ5m4TXTibPztvEr52z6CrjPZ3Rd2 hiNf5QGWqfp4+wEsgpn6ZFFV7RQCpy/7+5KiSGpkNqBwbYMUafQJ624SVxtm/YJmglKz ts9spBbKyThaHIiOgSmNYhGNyN19MfJbmi+joL55CLNH78Z6nO/iE/vMPEmzbk8/WZBn MGmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124565; x=1705729365; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WJc3qa2P7/gJ3egsD0VQ5u3r1xsQIdR/8Y8k0L14qog=; b=w4ldmQTSwkUFfKSSBgB6tdSc26W9xyDevIhtHzroRYckfQ9RWX1APSQTI35D2zcCH8 Vb3EsMeV3OXCJuhYzwMk8KVMDwRdhHM+y6+EeXZDLL+PRZdXbMPaKDM9XG6HBspJIHgZ UCQsRbreS6pADqFuvB1fVtT4fE0z4Hf707zDCOS64tYWasZQMKSgRVUePiatgpXldPTN lBKFaFD9GP/fpRTHjY6suWFaji27GkFLegd8kKNf65bo5I7rHsVv2tni/kKm61z/z4IR RVi6+9RKBHzQHAUhqOl16YTh2nXDjXHQ3hGuWtTnqOuash2f9Nv2tbAb9a5yTiDIluFB E2yw== X-Gm-Message-State: AOJu0YwTKfAK53fAgIzvuJyZD5632GcN5bB0BHKa8ABAoIB0o0VWZ/aW 0XHb28nKHVrBFuBMakYowVRqgWoBHa1GJw== X-Google-Smtp-Source: AGHT+IHg/IVhYhNdlEVr2B2pJjuB1QvW5WTX5cjhcVwcHe4hP0XyYlBi0PveewvFrAbVPSlnP2/AUQ== X-Received: by 2002:a2e:3013:0:b0:2cd:5cb3:d7b9 with SMTP id w19-20020a2e3013000000b002cd5cb3d7b9mr1086542ljw.3.1705124565077; Fri, 12 Jan 2024 21:42:45 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:44 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:40 +0200 Subject: [PATCH 03/13] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: split from sc8280xp PHY schema Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-3-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5562; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=CnztgRTnoisu3CgikOKmKjlZnjUtPFGoAOLDjHVdlrc=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLQ351KMHbwQZRp5C//yQxdgLNwgvbQVVlMI yy+6HmOKVuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0AAKCRCLPIo+Aiko 1V7LB/4/bg+nB/j/wfc2b7DsP2M+qVHxc7ATURiiqGa22PFIdgsubBMA1njYX4ymoGt1tb6HhTJ Mi6k8urvu+K3Yu0uLsJT0uina4KoWFoRReJO328moYf/3lVjQ+uZYch4fUiqxwneY5JS8+eKY5J iR5URL/XvhHwPwstNFgGtbVMOI9AZdHwjOEkZ/85351GUm2FnHOTXnpp7x+QZKpMue5mJ789VaK Acam09R9YVtvMJzdrKGqKfsfPRgrhk5SvQsTO+kT1+kdqVfC24rjNTBWi8j81YiDHTKycYlf0i7 Qw61G4/noJMQJFprf+XgmaOQVGGBwFw6zJd9cBe1MvR6P9aQ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A In preparation to defining the USB-C handling on MSM8998, QCM2290 and SM6115 split existing QMP USB3 PHY schema into pure USB3 and USB-C schema definitions. Signed-off-by: Dmitry Baryshkov --- .../bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml | 132 +++++++++++++++++++++ .../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 22 ---- 2 files changed, 132 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml new file mode 100644 index 000000000000..868fabd44d72 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml @@ -0,0 +1,132 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,msm8998-qmp-usb3-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QMP PHY controller (USB, MSM8998) + +maintainers: + - Vinod Koul + +description: + The QMP PHY controller supports physical layer functionality for USB-C on + several Qualcomm chipsets. + +properties: + compatible: + enum: + - qcom,msm8998-qmp-usb3-phy + - qcom,qcm2290-qmp-usb3-phy + - qcom,sm6115-qmp-usb3-phy + + reg: + maxItems: 1 + + clocks: + maxItems: 4 + + clock-names: + maxItems: 4 + + resets: + maxItems: 2 + + reset-names: + items: + - const: phy + - const: phy_phy + + vdda-phy-supply: true + + vdda-pll-supply: true + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + - vdda-phy-supply + - vdda-pll-supply + - "#clock-cells" + - clock-output-names + - "#phy-cells" + +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8998-qmp-usb3-phy + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: aux + - const: ref + - const: cfg_ahb + - const: pipe + + - if: + properties: + compatible: + contains: + enum: + - qcom,qcm2290-qmp-usb3-phy + - qcom,sm6115-qmp-usb3-phy + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: cfg_ahb + - const: ref + - const: com_aux + - const: pipe + +additionalProperties: false + +examples: + - | + #include + #include + + phy@c010000 { + compatible = "qcom,msm8998-qmp-usb3-phy"; + reg = <0x0c010000 0x1000>; + + clocks = <&gcc GCC_USB3_PHY_AUX_CLK>, + <&gcc GCC_USB3_CLKREF_CLK>, + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, + <&gcc GCC_USB3_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; + + resets = <&gcc GCC_USB3_PHY_BCR>, + <&gcc GCC_USB3PHY_PHY_BCR>; + reset-names = "phy", + "phy_phy"; + + vdda-phy-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l2a_1p2>; + }; diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index 15d82c67f157..1e2d4ddc5391 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml @@ -20,15 +20,12 @@ properties: - qcom,ipq8074-qmp-usb3-phy - qcom,ipq9574-qmp-usb3-phy - qcom,msm8996-qmp-usb3-phy - - qcom,msm8998-qmp-usb3-phy - - qcom,qcm2290-qmp-usb3-phy - qcom,sa8775p-qmp-usb3-uni-phy - qcom,sc8280xp-qmp-usb3-uni-phy - qcom,sdm845-qmp-usb3-uni-phy - qcom,sdx55-qmp-usb3-uni-phy - qcom,sdx65-qmp-usb3-uni-phy - qcom,sdx75-qmp-usb3-uni-phy - - qcom,sm6115-qmp-usb3-phy - qcom,sm8150-qmp-usb3-uni-phy - qcom,sm8250-qmp-usb3-uni-phy - qcom,sm8350-qmp-usb3-uni-phy @@ -93,7 +90,6 @@ allOf: - qcom,ipq8074-qmp-usb3-phy - qcom,ipq9574-qmp-usb3-phy - qcom,msm8996-qmp-usb3-phy - - qcom,msm8998-qmp-usb3-phy - qcom,sdx55-qmp-usb3-uni-phy - qcom,sdx65-qmp-usb3-uni-phy - qcom,sdx75-qmp-usb3-uni-phy @@ -108,24 +104,6 @@ allOf: - const: cfg_ahb - const: pipe - - if: - properties: - compatible: - contains: - enum: - - qcom,qcm2290-qmp-usb3-phy - - qcom,sm6115-qmp-usb3-phy - then: - properties: - clocks: - maxItems: 4 - clock-names: - items: - - const: cfg_ahb - - const: ref - - const: com_aux - - const: pipe - - if: properties: compatible: From patchwork Sat Jan 13 05:42:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762654 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74B3618046 for ; Sat, 13 Jan 2024 05:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="i/1Ai3i7" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2ccb4adbffbso83420981fa.0 for ; Fri, 12 Jan 2024 21:42:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124566; x=1705729366; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/K+0DJkKOAkCr/6OujJMFc4kf8wuvqM0qNumbavVg68=; b=i/1Ai3i77M7BdHSEpy2dPwrdq/h64ikhKFMFNPjVCkEPOfV4lIX13DZ0HVj6Z1AYHh Jf2y65ijOY0yip+Yy6RA8MqzrpUFKrZ0ufojy5YKKF9wIUQddneSuvQzmlun+9qjde94 /1UXpUTO7qhhZhxkxvGi0pTAERA7sSXQT0P3APWHxHMEAkrz2S8LFEUNSTBZ2cwDReNC SJRrsAYpr+A1EXeC/Ux1eBWUuNjCFu6fLk2TZpW+rECb60yzTxzLC6DU2xr8z35VDQMZ GN81F+Z9FWvAIZapI+On0nr8vVCrtaPABmmYGSEagXyBIkIRkndgUxK/uhYqSHgBlvGK c2aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124566; x=1705729366; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/K+0DJkKOAkCr/6OujJMFc4kf8wuvqM0qNumbavVg68=; b=j/hz39D1NZUlZ4op5F8tllES1YWjJfu2D2KgAfjdMQBdAyJDSnpjeg6EJhhL0t75Ax z8aDZAHKOmbrH0UTyS0zGm/vVwuTI7nqt5L2EtMDv37hfEBkfdkSJkwJux+ub0ewLCe5 VLy1+DjvJVE9vKZtkW0P486ofZqSRDkg7iGKeD0PZ0ciAXrmHldvJkhlSMNKhhlxLyzs wb0iGxXH+IG0B0Da5jHmpxooHiRlBXOr+fwtMtlP/M+mLEDAC5cpy6mUYgmzrM70oSMz ugthDH7ZuKo3fbImEGqNbxY7I1E7T0Ad+H2e814qRaAhdbLVbby80FzGs+DZjHVBbMmU +zHg== X-Gm-Message-State: AOJu0YzQ3ZDrdLnsO8M6oSLHJzhT65tBzIBKCFZvNwI4JYNjaMPpE2tq DM0C7fP2MlzWu5xJrCuXxB08xdRHCsdxQQ== X-Google-Smtp-Source: AGHT+IFj9k9Z8RKCkHf+7mKSNLWGDLEp7aTc99Eq1DEglfVpyZ2uICLKxezJVxvpFHENnYxP1bVnXQ== X-Received: by 2002:a05:651c:332:b0:2cc:e3ae:1ca9 with SMTP id b18-20020a05651c033200b002cce3ae1ca9mr1077728ljp.1.1705124565809; Fri, 12 Jan 2024 21:42:45 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:45 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:41 +0200 Subject: [PATCH 04/13] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: support USB-C data Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-4-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1828; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=0IxH6ZQ/pvgkQeQ5Scy9Fo++yLl5788lBeDWb25jTG0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLQOENnNbCH86sIYE5VOHPTdZ2MUd2+oUBiu crA6iwxntGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0AAKCRCLPIo+Aiko 1RZGB/sFpJMDyj17cqJovnDxY1d2S70NXPtcQKawv5DDgI+yRR2rf5JTyFT/MkNIks2BndUh6JQ Z3ziloHRvLkxYqrzefaNBuQLymPa07JlD4zVET8FzP2r20MPcOwfoWZBcaHw1LPGgmJF3TqRsQ0 b+OpA2gNyZqiK/Zf91sOaSxvTbI6rmUX6F6XBKN+hDrWljgvHqxisA/Kw9pABV2J5A0hta4FSLA iTetdQ1tY9jz2ay6mMd5uZb30CUAdBz//YMmoNbTqQT2DbiwiYebLltUcLdnG0V1pv05HHc3v58 LaDenRPqj6o/IPnbxgoOBhoc8QJi3j62TEVxdmZrAQWM22tA X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Extend the Qualcomm USB-C QMP PHY schema with the USB-C related entry points: orientation-switch property and USB-C connection graph. Signed-off-by: Dmitry Baryshkov --- .../bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml index 868fabd44d72..da5d4cbca24c 100644 --- a/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml @@ -50,6 +50,22 @@ properties: "#phy-cells": const: 0 + orientation-switch: + description: + Flag the PHY as possible handler of USB Type-C orientation switching + type: boolean + + ports: + $ref: /schemas/graph.yaml#/properties/ports + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Output endpoint of the PHY + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Incoming endpoint from the USB controller + required: - compatible - reg @@ -129,4 +145,27 @@ examples: vdda-phy-supply = <&vreg_l1a_0p875>; vdda-pll-supply = <&vreg_l2a_1p2>; + + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + endpoint { + remote-endpoint = <&pmic_typec_mux_in>; + }; + }; + + port@1 { + reg = <1>; + + endpoint { + remote-endpoint = <&usb_dwc3_ss>; + }; + }; + }; }; From patchwork Sat Jan 13 05:42:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762653 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04F061A704 for ; Sat, 13 Jan 2024 05:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CDJB844q" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2cd7e348311so41122101fa.2 for ; Fri, 12 Jan 2024 21:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124569; x=1705729369; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=d12MD9AC8SeyHkBIK/5KAVEftigfYpJ4k/r4ZiuaTXE=; b=CDJB844qVVrsnwDnWTYTwOBGfUh5tuzBIiB078ZOrO3lZlrWFv2nkxjPbdDb3lL1P6 WP+XgoEdNBp2kr5gDXFMT0kdSnQEFM7C9LKwerlLE5To76jNxZdE6cdEz7oWhWJTsxN9 gURt/ydzkzhypsk+3QoSJHQmYOfeJGCu6vZebkfDFfLWufY3+aCDa6wyS4HR00+nRN5s 8ZLY0Vm0C7rHQk+Iowb0h/VBHdtwUFty6hz0g084Osz0OQGAl2CipAtXFeNwokOKPM5c JL52NWbYCDCzWYsB4pel51O7JznLmRnKbL/ShpGSwE3LpJklU7TjNrJZ6z+3eOIzPXQV l7pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124569; x=1705729369; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d12MD9AC8SeyHkBIK/5KAVEftigfYpJ4k/r4ZiuaTXE=; b=dljMvABs+ko9wmRB2AFb48bXrg8Gj6UNJOIDsCvCN+H53hOuk/xtvM13nq2xvHFvOh Myl+r2BmYLC2/7h2FfsTeOEc5DyF5Y6TLm1S3gbsz1rANB/AMq1kKi9H6pz24zuQJW/4 GSK0PLkHUSxgxas9aNkuNz8PIcJsqH8blHFra8JbhFDF1Ap10EmamIZn0n9H7/1PSTLC bbP3OxdaP8YDzwtGW7WvNA/bmYdI3uXbvBmCAvJy0Eky6QE+JXGcWBO3HP5Cok3seLre CLT0u8RpLUMa/jiV2u6ihC4ybw73qxzksvcwWeKfWM1ldtUofH5F+50pBhYPrm/JbyfP drew== X-Gm-Message-State: AOJu0Yy4dKrIMxkN6wFUbmRNciwOuElYpMZbg+ukAQNNSmRL+jvGQUc9 nMokU1tDRqJgZegOcGDBngb5HpLyh23iAdwoydP9Oa9/jwY4d3GU X-Google-Smtp-Source: AGHT+IE1XZUSX5Dg4+qeBwr+Xjedb52wdaLlYG+984QN1Q0lme9Azl0zD3oJFwvPOE3Dq9XMTYLPbw== X-Received: by 2002:a2e:5c44:0:b0:2cd:1d6e:74c9 with SMTP id q65-20020a2e5c44000000b002cd1d6e74c9mr1058842ljb.48.1705124569123; Fri, 12 Jan 2024 21:42:49 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:48 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:45 +0200 Subject: [PATCH 08/13] phy: qcom: qmp-usb: drop dual-lane handling Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-8-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=6405; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=b1GPB44WxYBgE/14iuMK/IlDCV3YUd+x1mI0t2kqyLU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLRFa0yDt5028ieyjf7t4ftPcBN4IXYyd65I 5+TzuPaxPaJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0QAKCRCLPIo+Aiko 1RYVB/wL0dfUw7xObMyvXwJCB2TcGZfkdqwHAheAySYsY5gLHdmQKDkHzfszqK+JUqn59qV5BhM 9eYm3OZbn2OR/4K7U3SrFe1ztahbz42/Cj9/0UybxxRfhQNQMiQAbBxWcIyidk3BfVUgMypT73T JWg1ppibivVWS9wT8mV74oYo41w2/XFPefQ8g3mET28Dgs6PBzu/g0S6MHM6co0MrnyQxjqMMOI WFGiM2wzoSuoIE5QTaoKQ28bI5VsBwRip6ITdy7iW8hjtnhADDY/qXwQcSUhlcpLBE8JoPcs4/R fs5sHSLk2WKZi2JMr1vFRjpBySG76Mz+XTdBStZHeN1YrhgJ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Now as all dual-lane PHYs have been migrated to a new driver, drop support for dual lanes configuration. If the PHY uses two lanes for USB, it is symthom that it should use either a combo USB+DP or a USB-C PHY driver. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 57 +-------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index c7698369d3dc..e62539ce99a6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1237,15 +1237,10 @@ struct qmp_usb_offsets { u16 pcs_usb; u16 tx; u16 rx; - /* for PHYs with >= 2 lanes */ - u16 tx2; - u16 rx2; }; /* struct qmp_phy_cfg - per-PHY initialization config */ struct qmp_phy_cfg { - int lanes; - const struct qmp_usb_offsets *offsets; /* Init sequence for PHY blocks - serdes, tx, rx, pcs */ @@ -1285,8 +1280,6 @@ struct qmp_usb { void __iomem *pcs_usb; void __iomem *tx; void __iomem *rx; - void __iomem *tx2; - void __iomem *rx2; struct clk *pipe_clk; struct clk_bulk_data *clks; @@ -1393,8 +1386,6 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = { }; static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v3, .serdes_tbl = ipq8074_usb3_serdes_tbl, @@ -1411,8 +1402,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { }; static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_ipq9574, .serdes_tbl = ipq9574_usb3_serdes_tbl, @@ -1429,8 +1418,6 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { }; static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v3, .serdes_tbl = msm8996_usb3_serdes_tbl, @@ -1447,8 +1434,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { }; static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v5, .serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl, @@ -1467,8 +1452,6 @@ static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v5, .serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl, @@ -1487,8 +1470,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v3, .serdes_tbl = qmp_v3_usb3_uniphy_serdes_tbl, @@ -1507,8 +1488,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v4, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, @@ -1530,8 +1509,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v4, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, @@ -1553,8 +1530,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v4, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, @@ -1576,8 +1551,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v5, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, @@ -1599,7 +1572,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = { - .lanes = 1, .offsets = &qmp_usb_offsets_v6, .serdes_tbl = sdx75_usb3_uniphy_serdes_tbl, @@ -1621,8 +1593,6 @@ static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v5, .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, @@ -1644,8 +1614,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { }; static const struct qmp_phy_cfg x1e80100_usb3_uniphy_cfg = { - .lanes = 1, - .offsets = &qmp_usb_offsets_v7, .serdes_tbl = x1e80100_usb3_uniphy_serdes_tbl, @@ -1780,11 +1748,6 @@ static int qmp_usb_power_on(struct phy *phy) qmp_usb_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1); qmp_usb_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1); - if (cfg->lanes >= 2) { - qmp_usb_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2); - qmp_usb_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2); - } - qmp_usb_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num); if (pcs_usb) @@ -2131,7 +2094,6 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) /* * Get memory resources for the PHY: * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. - * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. */ qmp->tx = devm_of_iomap(dev, np, 0, NULL); @@ -2149,19 +2111,7 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) if (cfg->pcs_usb_offset) qmp->pcs_usb = qmp->pcs + cfg->pcs_usb_offset; - if (cfg->lanes >= 2) { - qmp->tx2 = devm_of_iomap(dev, np, 3, NULL); - if (IS_ERR(qmp->tx2)) - return PTR_ERR(qmp->tx2); - - qmp->rx2 = devm_of_iomap(dev, np, 4, NULL); - if (IS_ERR(qmp->rx2)) - return PTR_ERR(qmp->rx2); - - qmp->pcs_misc = devm_of_iomap(dev, np, 5, NULL); - } else { - qmp->pcs_misc = devm_of_iomap(dev, np, 3, NULL); - } + qmp->pcs_misc = devm_of_iomap(dev, np, 3, NULL); if (IS_ERR(qmp->pcs_misc)) { dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); @@ -2213,11 +2163,6 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) qmp->tx = base + offs->tx; qmp->rx = base + offs->rx; - if (cfg->lanes >= 2) { - qmp->tx2 = base + offs->tx2; - qmp->rx2 = base + offs->rx2; - } - ret = qmp_usb_clk_init(qmp); if (ret) return ret; From patchwork Sat Jan 13 05:42:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762650 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85F821A71A for ; Sat, 13 Jan 2024 05:42:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="R5L5QXdh" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2cd17a979bcso81300781fa.0 for ; Fri, 12 Jan 2024 21:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124569; x=1705729369; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0ECF4xeGyS84BCoz/EcX50y2jLIrAgXZ1cOppZLqEXg=; b=R5L5QXdhCF03w4gog16PHiZzBEmx4hYuqRsdWywyyRLOxgjAxnVAVT6XleLLE5GeFU YIE5t+bfMWMlOIQwjl+likXGb65+9i52ES1w05pJLw179phWzNcCVFb+/7MgX3BhkcBQ RJ68h3l632gink+05GDjN7QN8qGZhBSmOAdOvSI5H4oCcVxbTeI7LOr4eMpQLJO8gfII pFQ7tn3rn4iFHBzRV9RB6wAIsn5U7eKM89CIjxbP5YOm1Lwk5WasrEGdsoyInQfvevqy iF9h7isAmvPrsKLxTS8m3akoJhkllk6j6KBlDcN228ODZDzz3phZ3fD51T7qPn9u/U39 2JYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124569; x=1705729369; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0ECF4xeGyS84BCoz/EcX50y2jLIrAgXZ1cOppZLqEXg=; b=RkizoSo98wYom4hb503oYRLx95ocleYyQOyBOG2zVbZVkZH9T+fPkW3IMta15SjNfE rctGLGlDYTsMrGdrjCfzcz9b58mzv7t6ruEY9O5FyGYRKGmTrNOdHEzu8WCcKtspepAS 0wZMOfvEqR99XNPBOflW6VfJm4E68bf1e0dLkyd8plUuIUeR3PNjioD1jG0mo//qaKOF euXVMEdsfgycJpxbUELWNSRnn3tht1ZyBlchpdZI/olM8dH2wV/QjguWyq8lydxAS1rx fRHQkkiM0QA0VACSu3vpCvd0k1BpZGJ+yGsElyn8+w1WBYE7kOz9DqzLzgT78P//LdyD T45w== X-Gm-Message-State: AOJu0Yw2io5PLdWJNeRGCN/H5Fy5tatmmU0wGOhhHhSX2dkTKSDF6yzK Yf9/+t2aMOGj9+RE8Lw0dmznREi9LEji2g== X-Google-Smtp-Source: AGHT+IFuZ8KYIlQ596YAkjwkadTsbP2Ny6UXmX4GYzvavxYOUXI1TIeDKlfdfg5Ug9C2wp2k4J2nUQ== X-Received: by 2002:a05:651c:213:b0:2cc:f993:e40c with SMTP id y19-20020a05651c021300b002ccf993e40cmr603714ljn.9.1705124569790; Fri, 12 Jan 2024 21:42:49 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:49 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:46 +0200 Subject: [PATCH 09/13] phy: qcom: qmp-usbc: drop single lane handling Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-9-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3148; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=UisAuRjDYlccXYZeHJj5rFNlGEZ17JayC7TRBBm7Sck=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLRZvq1ycb60O52UIrEeUpj+JTNyiI2HyQgL t4srEbZ8HuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0QAKCRCLPIo+Aiko 1VgCB/9HI43MbXB+YW97AUQohOOwQb6A2g8DOEiZ3Be8/tnFby3U3yFmq8DExU0DPviGQQ2NzpJ sp+FHuqqln53CNcUXj3s0UPK+LCXPGUqXDNDnJsxNdfvmS+ziI79NnPEf3Uc6nlk16e+rtnWsAE twP5mMgDb1o1qDVupT3EH9IC2evoA2QFm59fF8cIf8Ep3Uc9ss3frD92TuldIzi4aLw4NTXrM32 VCSzgdlgd9zg7oS2cOf8YTtFEBRIgrKx2OS3ASzSMqmU9szEVQQNta0YHymAuVC4rmESOsk8y82 6tQmcxBOmMetkC8Fdfl0DEwtvb8oOdiETYzAni9yVKUGOl6R X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A All USB-C PHYs use 2 lanes for the USB. Drop single lane handling in this driver. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 36 ++++++++++---------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c index fd2439175cdf..21faed7f648a 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c @@ -332,8 +332,6 @@ struct qmp_usbc_offsets { /* struct qmp_phy_cfg - per-PHY initialization config */ struct qmp_phy_cfg { - int lanes; - const struct qmp_usbc_offsets *offsets; /* Init sequence for PHY blocks - serdes, tx, rx, pcs */ @@ -444,8 +442,6 @@ static const struct qmp_usbc_offsets qmp_usbc_offsets_v3_qcm2290 = { }; static const struct qmp_phy_cfg msm8998_usb3phy_cfg = { - .lanes = 2, - .offsets = &qmp_usbc_offsets_v3_qcm2290, .serdes_tbl = msm8998_usb3_serdes_tbl, @@ -462,8 +458,6 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = { }; static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { - .lanes = 2, - .offsets = &qmp_usbc_offsets_v3_qcm2290, .serdes_tbl = qcm2290_usb3_serdes_tbl, @@ -596,10 +590,8 @@ static int qmp_usbc_power_on(struct phy *phy) qmp_usbc_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1); qmp_usbc_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1); - if (cfg->lanes >= 2) { - qmp_usbc_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2); - qmp_usbc_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2); - } + qmp_usbc_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2); + qmp_usbc_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2); qmp_usbc_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num); @@ -940,19 +932,15 @@ static int qmp_usbc_parse_dt_legacy(struct qmp_usbc *qmp, struct device_node *np if (cfg->pcs_usb_offset) qmp->pcs_usb = qmp->pcs + cfg->pcs_usb_offset; - if (cfg->lanes >= 2) { - qmp->tx2 = devm_of_iomap(dev, np, 3, NULL); - if (IS_ERR(qmp->tx2)) - return PTR_ERR(qmp->tx2); + qmp->tx2 = devm_of_iomap(dev, np, 3, NULL); + if (IS_ERR(qmp->tx2)) + return PTR_ERR(qmp->tx2); - qmp->rx2 = devm_of_iomap(dev, np, 4, NULL); - if (IS_ERR(qmp->rx2)) - return PTR_ERR(qmp->rx2); + qmp->rx2 = devm_of_iomap(dev, np, 4, NULL); + if (IS_ERR(qmp->rx2)) + return PTR_ERR(qmp->rx2); - qmp->pcs_misc = devm_of_iomap(dev, np, 5, NULL); - } else { - qmp->pcs_misc = devm_of_iomap(dev, np, 3, NULL); - } + qmp->pcs_misc = devm_of_iomap(dev, np, 5, NULL); if (IS_ERR(qmp->pcs_misc)) { dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); @@ -1004,10 +992,8 @@ static int qmp_usbc_parse_dt(struct qmp_usbc *qmp) qmp->tx = base + offs->tx; qmp->rx = base + offs->rx; - if (cfg->lanes >= 2) { - qmp->tx2 = base + offs->tx2; - qmp->rx2 = base + offs->rx2; - } + qmp->tx2 = base + offs->tx2; + qmp->rx2 = base + offs->rx2; ret = qmp_usbc_clk_init(qmp); if (ret) From patchwork Sat Jan 13 05:42:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762652 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F4A01B263 for ; Sat, 13 Jan 2024 05:42:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OZ9zstdI" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2ccec119587so87380171fa.0 for ; Fri, 12 Jan 2024 21:42:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124570; x=1705729370; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z5irpYM5MTpJq3VqIMDtY9CGRoQJVYlNPi44Y66fgdM=; b=OZ9zstdIbLrqrj4dUOR4sly9iF9tMXKCeus7RygTBeOvTCsyLFyl4h7zlv/ZBgjKQk jlqc6xSTvUMJQWGSKRRhkpWNpDk2+1NXyPqs4DmDnF2TILXpQoHt1vJBp8UK+BHEkS7j hjZzzmWCvQc79lLgmj4pfChvc05FosccuWeoRBsldQ37zZA/T4/h9LhcjOzD4qm/FSy3 tkhHYJ0GPOvZpeNGMDZ9UaE1s1DvNJVngPozudrRn4KyANapGeE0aXKs7eXPz1b4AKsU VvIGWKtfVsfQpJdThG8ryGfFrhoO893nE9uSQj5xZ6dB71r5w4wuS2SCPf2mkA/c4PwX 8R/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124570; x=1705729370; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z5irpYM5MTpJq3VqIMDtY9CGRoQJVYlNPi44Y66fgdM=; b=o0Rb7WkUPuBf26ToQT2HMitWUd01AvmtHXC3aRHpP5Ci0Uj6Ob0Lo45pYhJ8F4oOql GNHN05Uwes7yHl8R3qI6ljuLrxlcnalRAzSjveonhWBQeZ4C17ZpYM/K4QZRAMksp15k nixHdSOkx/me2opZS44ivKoz45dc5WVapYdemFaZcPVmbkRUPwsJlzrAFPlDG71e5aUm ujsdDVmg0LJmRe1rCmagyVMMYWuAydJoAJsCm2ZefRnRRLgB/wg0WHQ8nln4RlKyNdPN gawbXN8lRvDXTl84ZsOXO0wU93MCoO/3YrXbglRcdF6L2WxNqXudd/yzemN6bqW9cLIr +Leg== X-Gm-Message-State: AOJu0Yx611+rr31+GQkFPnGE37D6orq3beTRqgXLYeIEXB4D58jzMTPq ZYkVhCZzNtSmCuo5FMoN1WmoquqXwLAkfw== X-Google-Smtp-Source: AGHT+IHgLTCBUBb+cumPz42qHGnYZI45jV8ou7S+J/ZocJ/9+xC5j1fd9zLANoBkfFDBc7IR9hb5Vg== X-Received: by 2002:a2e:98d4:0:b0:2cc:fe03:4360 with SMTP id s20-20020a2e98d4000000b002ccfe034360mr1325938ljj.24.1705124570525; Fri, 12 Jan 2024 21:42:50 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:50 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:47 +0200 Subject: [PATCH 10/13] phy: qcom: qmp-usbc: add support for the Type-C handling Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-10-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5166; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=vrGMpxrK0VSYVpeyxHuCQp6gFuTsIdr2EtQDlSiiH6Y=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLR1IiCvPDQIJxTk7qswUkejvN9Hk5ieoTCU gqFwEGaw1OJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0QAKCRCLPIo+Aiko 1QJuCACb3srGHjAYjlfjgCSx4EPBnhy083HxD8b9m48H5Z32tNkKO13DRO4gTl/MF3ksLubXKua omVVcyFbxskE0BPiR1Y+WG73f600A+K9/WDgGEK1V1FnadjjDzM+EHoEEucYm5GdeLGVZbAEodc wU3GV2vD/wAsk8iukiphskvHhdAbwe1uwrwGVwvnLXpmiuyzvV4t2lS978vN8V0Up/1aHdQ1qWE lVu85OoovoHHrQMEFnW4TsBKCMskSOEhwklhCdYUuDfdU+QYp9lKlECPfanmWSjXJvwcQPSCOR+ Mnb6fqHrZWMxBs/MeJ6Fm2ks5c2C7/a7nuTks+YR0pPAKhHq X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The USB-C PHYs on the msm8998, QCM2290 and SM6115 platforms use special register to control which lanes of the Type-C port are used for the SuperSpeed USB connection. Mimic the qmp-combo driver and handle this register. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 97 +++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c index 21faed7f648a..9cddba30b52e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include "phy-qcom-qmp.h" #include "phy-qcom-qmp-pcs-misc-v3.h" @@ -381,11 +383,17 @@ struct qmp_usbc { struct reset_control_bulk_data *resets; struct regulator_bulk_data *vregs; + struct mutex phy_mutex; + enum phy_mode mode; + unsigned int usb_init_count; struct phy *phy; struct clk_fixed_rate pipe_clk_fixed; + + struct typec_switch_dev *sw; + enum typec_orientation orientation; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -516,6 +524,7 @@ static int qmp_usbc_init(struct phy *phy) struct qmp_usbc *qmp = phy_get_drvdata(phy); const struct qmp_phy_cfg *cfg = qmp->cfg; void __iomem *pcs = qmp->pcs; + u32 val = 0; int ret; ret = regulator_bulk_enable(cfg->num_vregs, qmp->vregs); @@ -542,6 +551,14 @@ static int qmp_usbc_init(struct phy *phy) qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], SW_PWRDN); +#define SW_PORTSELECT_VAL BIT(0) +#define SW_PORTSELECT_MUX BIT(1) + /* Use software based port select and switch on typec orientation */ + val = SW_PORTSELECT_MUX; + if (qmp->orientation == TYPEC_ORIENTATION_REVERSE) + val |= SW_PORTSELECT_VAL; + writel(val, qmp->pcs_misc); + return 0; err_assert_reset: @@ -646,23 +663,34 @@ static int qmp_usbc_power_off(struct phy *phy) static int qmp_usbc_enable(struct phy *phy) { + struct qmp_usbc *qmp = phy_get_drvdata(phy); int ret; + mutex_lock(&qmp->phy_mutex); + ret = qmp_usbc_init(phy); if (ret) - return ret; + goto out_unlock; ret = qmp_usbc_power_on(phy); - if (ret) + if (ret) { qmp_usbc_exit(phy); + goto out_unlock; + } + + qmp->usb_init_count++; +out_unlock: + mutex_unlock(&qmp->phy_mutex); return ret; } static int qmp_usbc_disable(struct phy *phy) { + struct qmp_usbc *qmp = phy_get_drvdata(phy); int ret; + qmp->usb_init_count--; ret = qmp_usbc_power_off(phy); if (ret) return ret; @@ -900,6 +928,61 @@ static int phy_pipe_clk_register(struct qmp_usbc *qmp, struct device_node *np) return devm_add_action_or_reset(qmp->dev, phy_clk_release_provider, np); } +#if IS_ENABLED(CONFIG_TYPEC) +static int qmp_usbc_typec_switch_set(struct typec_switch_dev *sw, + enum typec_orientation orientation) +{ + struct qmp_usbc *qmp = typec_switch_get_drvdata(sw); + + if (orientation == qmp->orientation || orientation == TYPEC_ORIENTATION_NONE) + return 0; + + mutex_lock(&qmp->phy_mutex); + qmp->orientation = orientation; + + if (qmp->usb_init_count) { + qmp_usbc_power_off(qmp->phy); + qmp_usbc_exit(qmp->phy); + + qmp_usbc_init(qmp->phy); + qmp_usbc_power_on(qmp->phy); + } + + mutex_unlock(&qmp->phy_mutex); + + return 0; +} + +static void qmp_usbc_typec_unregister(void *data) +{ + struct qmp_usbc *qmp = data; + + typec_switch_unregister(qmp->sw); +} + +static int qmp_usbc_typec_switch_register(struct qmp_usbc *qmp) +{ + struct typec_switch_desc sw_desc = {}; + struct device *dev = qmp->dev; + + sw_desc.drvdata = qmp; + sw_desc.fwnode = dev->fwnode; + sw_desc.set = qmp_usbc_typec_switch_set; + qmp->sw = typec_switch_register(dev, &sw_desc); + if (IS_ERR(qmp->sw)) { + dev_err(dev, "Unable to register typec switch: %pe\n", qmp->sw); + return PTR_ERR(qmp->sw); + } + + return devm_add_action_or_reset(dev, qmp_usbc_typec_unregister, qmp); +} +#else +static int qmp_usbc_typec_switch_register(struct qmp_usbc *qmp) +{ + return 0; +} +#endif + static int qmp_usbc_parse_dt_legacy(struct qmp_usbc *qmp, struct device_node *np) { struct platform_device *pdev = to_platform_device(qmp->dev); @@ -1027,16 +1110,24 @@ static int qmp_usbc_probe(struct platform_device *pdev) qmp->dev = dev; + qmp->orientation = TYPEC_ORIENTATION_NORMAL; + qmp->cfg = of_device_get_match_data(dev); if (!qmp->cfg) return -EINVAL; + mutex_init(&qmp->phy_mutex); + ret = qmp_usbc_vreg_init(qmp); if (ret) return ret; + ret = qmp_usbc_typec_switch_register(qmp); + if (ret) + return ret; + /* Check for legacy binding with child node. */ - np = of_get_next_available_child(dev->of_node, NULL); + np = of_get_child_by_name(dev->of_node, "phy"); if (np) { ret = qmp_usbc_parse_dt_legacy(qmp, np); } else { From patchwork Sat Jan 13 05:42:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 762651 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0091A1D522 for ; Sat, 13 Jan 2024 05:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VfjzK0rV" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2cd1ca52f31so82956471fa.3 for ; Fri, 12 Jan 2024 21:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705124572; x=1705729372; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=maqz8OOCJx2/2Q8p+D0KjTHVWD1DBWuVM7oX4CTcnm0=; b=VfjzK0rVpSsVzWl1s9DGwuu5+VgF7FS61qHUrmj/MlN8/LmLSN1AZ7OVjDn6sdBnFa NF1OM01BEnjjK0urYX/8R0oBoOx9ByVM6+40vN71PlGFCPodUOWU/xEn5Z8aPqmSo66j O+QYFk9iSzGql5NBAppkl/Eofm4lZvry0LeZkUUUrWwIODGpHkk+izMlFvvZIsJTwK8M WGt2pmpP3ufBUoqD7kXKsZTNwWKkl4iM258Ondz1w4QzrMqCLE3I7heBWjs88Mi9VMyB Fz7yDqSkwHrrIN9ZvhkfUG5DXiu0fTHXTPvC9FjpGyIjM23zg6R3MQ3Lq+WTxvLkzzcC zgIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705124572; x=1705729372; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=maqz8OOCJx2/2Q8p+D0KjTHVWD1DBWuVM7oX4CTcnm0=; b=NXOlEuPZLwR5/E846iShPZEoVwtCMf6fmBp3Uvm0qB1KkUwb+qMiCebrHeh6q8Qc2S wvXjWRE4fOWnSe8tCeVwCvnUvfy96+fsISSvC2HOHZ40OEP6AUsIrI8uTafo90wMV4ly 8fizXMkZeW8lXxTWrT7wbDNZvCIlEAYRMvCmHvt5/+OWmU2B5gb90E+YTrI0EG5n6nE5 K7SNFVAIwPUuCZL5aicyTDqn9BNMV7wIzG9BCOCLhhH0thz1WQTpBw/uimMzmvJn9d0f WEn2DLlxZlcevLwBAyoYowL01ulyqfr9jHyDz4c0UOPy6PzNrZy4g6NBzPj/l/gJVya7 SEqA== X-Gm-Message-State: AOJu0YzY9lMS0UQhDrRGEn+N96P6QyWz9B+yrovnofrrmtx+Qf49q4lE 3YMcHAUR/n80qalDWjZZ5pist6aH7ML/FQ== X-Google-Smtp-Source: AGHT+IFDeHpIKX8sZLltlk2rJ0XufBJkRveFWRaqQvNdBAgjYsprqO7l/OKZS3jBNPfBHCIS0NgyYw== X-Received: by 2002:a2e:9ed3:0:b0:2cd:1d93:115 with SMTP id h19-20020a2e9ed3000000b002cd1d930115mr1131444ljk.77.1705124572236; Fri, 12 Jan 2024 21:42:52 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r22-20020a2eb616000000b002cc71e9168csm677719ljn.129.2024.01.12.21.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 21:42:51 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 13 Jan 2024 07:42:49 +0200 Subject: [PATCH 12/13] arm64: dts: qcom: sm6115: drop pipe clock selection Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240113-pmi632-typec-v1-12-de7dfd459353@linaro.org> References: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Vinod Koul , Kishon Vijay Abraham I , Guenter Roeck , Heikki Krogerus , Philipp Zabel , Bhupesh Sharma Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org, Vladimir Zapolskiy X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1422; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=PoyicLEdV7BNvd9Kbg7da0oOR4R7+Utnj7Siv8A91PQ=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBloiLSvDsuwwJnb055Vspk3eCehqaZ6iqJZUpWE /oa9J0doPyJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaIi0gAKCRCLPIo+Aiko 1TT3B/4j9uDIml/uby302RFGIim5onN4fZITAgJi5BzYRNYrhVivYJZGckwa7lgZq+KhqAW9UJj in/pp+YCuRiluRiqqqKoj/UsGtCg7Vt1gKTuoOT9SHWZnOKG85aE0bNfb6GInCQP35IDjH9U8dq VNRE04ypv3ropnSofTmigJoSe4Nwl9qYtSUq1pSUwOnnM2rMxrXdLj2mfo/DD6zzjCDYospTS12 bJSs3ep4LybvkMHu9JrXLn+DDmmzwYWS6JyMuS6Ye/OVNltGYRiEDOqgfvCvb61fAVoV++E3Vxo 7yaz3QEovk27fdg3tGIpgogeITCjS2UBgFHDT9GZE54V2dqu X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A From: Vladimir Zapolskiy Stop selecting UTMI clock as the USB3 PIPE clock. This setting is incompatible with the USB host working in USB3 (SuperSpeed) mode. Fixes: 9dd5f6dba729 ("arm64: dts: qcom: sm6115: Add USB SS qmp phy node") Signed-off-by: Vladimir Zapolskiy [DB: fixed commit message, dropped dr_mode setting] Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ---- arch/arm64/boot/dts/qcom/sm6115.dtsi | 1 - 2 files changed, 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index 7c19f874fa71..52f31f3166c2 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -607,10 +607,6 @@ &usb { status = "okay"; }; -&usb_dwc3 { - maximum-speed = "super-speed"; -}; - &usb_hsphy { vdd-supply = <&vreg_l4a_0p9>; vdda-pll-supply = <&vreg_l12a_1p8>; diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 160e098f1075..76c429e8ebab 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -1600,7 +1600,6 @@ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>, interconnect-names = "usb-ddr", "apps-usb"; - qcom,select-utmi-as-pipe-clk; status = "disabled"; usb_dwc3: usb@4e00000 {