devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp
@ 2022-02-25  3:40 Bjorn Andersson
  2022-02-25  3:40 ` [PATCH 2/2] phy: qcom-snps: Add sc8280xp support Bjorn Andersson
  2022-03-02 14:28 ` [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Andersson @ 2022-02-25  3:40 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski, Wesley Cheng
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel

Add compatible for the femto USB PHY found in sc8180x, sc8280xp and the
generic 5nm form of the latter.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 .../devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml        | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml
index 0dfe6914ec87..1ce251de0855 100644
--- a/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml
@@ -15,8 +15,11 @@ description: |
 properties:
   compatible:
     enum:
+      - qcom,usb-snps-hs-5nm-phy
       - qcom,usb-snps-hs-7nm-phy
       - qcom,sc7280-usb-hs-phy
+      - qcom,sc8180x-usb-hs-phy
+      - qcom,sc8280xp-usb-hs-phy
       - qcom,sm8150-usb-hs-phy
       - qcom,sm8250-usb-hs-phy
       - qcom,sm8350-usb-hs-phy
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] phy: qcom-snps: Add sc8280xp support
  2022-02-25  3:40 [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp Bjorn Andersson
@ 2022-02-25  3:40 ` Bjorn Andersson
  2022-03-02 14:28 ` [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2022-02-25  3:40 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vinod Koul, Wesley Cheng
  Cc: Rob Herring, Krzysztof Kozlowski, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

The Qualcomm sc8280xp platform comes with a 5nm femto USB PHY which, in
contrast to previously seen platforms, has the SIDDQ bit in the COMMON0
register default to high.

So make the driver match on the 5nm compatible and make sure to clear
the SIDDQ bit on phy_init.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
index 7e61202aa234..5d203784f75d 100644
--- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
+++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
@@ -32,6 +32,7 @@
 #define POR					BIT(1)
 
 #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0	(0x54)
+#define SIDDQ					BIT(2)
 #define RETENABLEN				BIT(3)
 #define FSEL_MASK				GENMASK(6, 4)
 #define FSEL_DEFAULT				(0x3 << 4)
@@ -233,6 +234,9 @@ static int qcom_snps_hsphy_init(struct phy *phy)
 	qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_UTMI_CTRL0,
 					SLEEPM, SLEEPM);
 
+	qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0,
+				   SIDDQ, 0);
+
 	qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_UTMI_CTRL5,
 					POR, 0);
 
@@ -275,6 +279,7 @@ static const struct phy_ops qcom_snps_hsphy_gen_ops = {
 
 static const struct of_device_id qcom_snps_hsphy_of_match_table[] = {
 	{ .compatible	= "qcom,sm8150-usb-hs-phy", },
+	{ .compatible	= "qcom,usb-snps-hs-5nm-phy", },
 	{ .compatible	= "qcom,usb-snps-hs-7nm-phy", },
 	{ .compatible	= "qcom,usb-snps-femto-v2-phy",	},
 	{ }
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp
  2022-02-25  3:40 [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp Bjorn Andersson
  2022-02-25  3:40 ` [PATCH 2/2] phy: qcom-snps: Add sc8280xp support Bjorn Andersson
@ 2022-03-02 14:28 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-03-02 14:28 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Wesley Cheng, linux-arm-msm, linux-phy, devicetree, linux-kernel

On 24-02-22, 19:40, Bjorn Andersson wrote:
> Add compatible for the femto USB PHY found in sc8180x, sc8280xp and the
> generic 5nm form of the latter.

Applied all, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-02 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-25  3:40 [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp Bjorn Andersson
2022-02-25  3:40 ` [PATCH 2/2] phy: qcom-snps: Add sc8280xp support Bjorn Andersson
2022-03-02 14:28 ` [PATCH 1/2] dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).