The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] USB PHY support for Exynos990 SoCs
@ 2025-02-14 17:21 Igor Belwon
  2025-02-14 17:21 ` [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible Igor Belwon
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Igor Belwon @ 2025-02-14 17:21 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Marek Szyprowski,
	Sylwester Nawrocki, Alim Akhtar
  Cc: Krzysztof Kozlowski, linux-phy, devicetree, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, Igor Belwon

Hi all!

This patchset adds support for the USB 2.0 PHY of the Exynos990 SoC.
This SoC has a combo PHY that supports highspeed, superspeed USB and
DisplayPort, however due to my inability to test the superspeed part of
the combo phy (device always enumerated as high-speed, even on the
vendor kernels/bootloaders) only the highspeed part is brought up.

These changes have been tested and confirmed working (with the USB_ETH
gadget and telnet/ssh in a ramdisk) on a device from the hubble family
(x1s) and also a device from the canvas family (c1s).

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
Igor Belwon (2):
      dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible
      phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy

 .../bindings/phy/samsung,usb3-drd-phy.yaml         |  2 ++
 drivers/phy/samsung/phy-exynos5-usbdrd.c           | 32 ++++++++++++++++++++++
 include/linux/soc/samsung/exynos-regs-pmu.h        |  3 ++
 3 files changed, 37 insertions(+)
---
base-commit: 5cbcf2652f4cd84eac21f5e88fe2a0baecc601fb
change-id: 20250214-exynos990-dwusb-3b1005929bd1

Best regards,
-- 
Igor Belwon <igor.belwon@mentallysanemainliners.org>


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

* [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible
  2025-02-14 17:21 [PATCH 0/2] USB PHY support for Exynos990 SoCs Igor Belwon
@ 2025-02-14 17:21 ` Igor Belwon
  2025-02-19  7:29   ` Krzysztof Kozlowski
  2025-02-14 17:21 ` [PATCH 2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy Igor Belwon
  2025-06-15 16:52 ` [PATCH 0/2] USB PHY support for Exynos990 SoCs Vinod Koul
  2 siblings, 1 reply; 6+ messages in thread
From: Igor Belwon @ 2025-02-14 17:21 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Marek Szyprowski,
	Sylwester Nawrocki, Alim Akhtar
  Cc: Krzysztof Kozlowski, linux-phy, devicetree, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, Igor Belwon

Add a compatible for the exynos990-usbdrd-phy. The PHY is compatible
with the older exynos5420 design (two clocks) when running in highspeed mode.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
 Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml
index 27295acbba7674f6cdc402f18ff4c505bd8760f6..b9ba92b8975d3e88162b938624558b3fca9f4faf 100644
--- a/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml
@@ -31,6 +31,7 @@ properties:
       - samsung,exynos5433-usbdrd-phy
       - samsung,exynos7-usbdrd-phy
       - samsung,exynos850-usbdrd-phy
+      - samsung,exynos990-usbdrd-phy
 
   clocks:
     minItems: 2
@@ -185,6 +186,7 @@ allOf:
               - samsung,exynos5250-usbdrd-phy
               - samsung,exynos5420-usbdrd-phy
               - samsung,exynos850-usbdrd-phy
+              - samsung,exynos990-usbdrd-phy
     then:
       properties:
         clocks:

-- 
2.47.2


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

* [PATCH 2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy
  2025-02-14 17:21 [PATCH 0/2] USB PHY support for Exynos990 SoCs Igor Belwon
  2025-02-14 17:21 ` [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible Igor Belwon
@ 2025-02-14 17:21 ` Igor Belwon
  2025-02-19  7:31   ` Krzysztof Kozlowski
  2025-06-15 16:52 ` [PATCH 0/2] USB PHY support for Exynos990 SoCs Vinod Koul
  2 siblings, 1 reply; 6+ messages in thread
From: Igor Belwon @ 2025-02-14 17:21 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Marek Szyprowski,
	Sylwester Nawrocki, Alim Akhtar
  Cc: Krzysztof Kozlowski, linux-phy, devicetree, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, Igor Belwon

The Exynos990 usbdrd PHY is a combo PHY which supports USB SS, HS and
DisplayPort outputs. This commit adds support only for UTMI+ (USB HS).

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
 drivers/phy/samsung/phy-exynos5-usbdrd.c    | 32 +++++++++++++++++++++++++++++
 include/linux/soc/samsung/exynos-regs-pmu.h |  3 +++
 2 files changed, 35 insertions(+)

diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
index ff2436f11d6842b2503b2a603eb7a512d2f85018..a68926ac3b6a00282e51e552cb9ffdad95ab5152 100644
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
@@ -1584,6 +1584,35 @@ static const struct exynos5_usbdrd_phy_drvdata exynos850_usbdrd_phy = {
 	.n_regulators		= ARRAY_SIZE(exynos5_regulator_names),
 };
 
+static const struct exynos5_usbdrd_phy_tuning exynos990_tunes_utmi_postinit[] = {
+	PHY_TUNING_ENTRY_PHY(EXYNOS850_DRD_HSPPARACON,
+			     (HSPPARACON_TXVREF |
+			      HSPPARACON_TXPREEMPAMP | HSPPARACON_SQRX |
+			      HSPPARACON_COMPDIS),
+			     (FIELD_PREP_CONST(HSPPARACON_TXVREF, 7) |
+			      FIELD_PREP_CONST(HSPPARACON_TXPREEMPAMP, 3) |
+			      FIELD_PREP_CONST(HSPPARACON_SQRX, 5) |
+			      FIELD_PREP_CONST(HSPPARACON_COMPDIS, 7))),
+	PHY_TUNING_ENTRY_LAST
+};
+
+static const struct exynos5_usbdrd_phy_tuning *exynos990_tunes[PTS_MAX] = {
+	[PTS_UTMI_POSTINIT] = exynos990_tunes_utmi_postinit,
+};
+
+static const struct exynos5_usbdrd_phy_drvdata exynos990_usbdrd_phy = {
+	.phy_cfg		= phy_cfg_exynos850,
+	.phy_ops		= &exynos850_usbdrd_phy_ops,
+	.phy_tunes		= exynos990_tunes,
+	.pmu_offset_usbdrd0_phy	= EXYNOS990_PHY_CTRL_USB20,
+	.clk_names		= exynos5_clk_names,
+	.n_clks			= ARRAY_SIZE(exynos5_clk_names),
+	.core_clk_names		= exynos5_core_clk_names,
+	.n_core_clks		= ARRAY_SIZE(exynos5_core_clk_names),
+	.regulator_names	= exynos5_regulator_names,
+	.n_regulators		= ARRAY_SIZE(exynos5_regulator_names),
+};
+
 static const struct exynos5_usbdrd_phy_config phy_cfg_gs101[] = {
 	{
 		.id		= EXYNOS5_DRDPHY_UTMI,
@@ -1781,6 +1810,9 @@ static const struct of_device_id exynos5_usbdrd_phy_of_match[] = {
 	}, {
 		.compatible = "samsung,exynos850-usbdrd-phy",
 		.data = &exynos850_usbdrd_phy
+	}, {
+		.compatible = "samsung,exynos990-usbdrd-phy",
+		.data = &exynos990_usbdrd_phy
 	},
 	{ },
 };
diff --git a/include/linux/soc/samsung/exynos-regs-pmu.h b/include/linux/soc/samsung/exynos-regs-pmu.h
index ce1a3790d6fb0400021f5cc22394afedfb742152..4b2c44640b17c6c87acf26a82fd9c5003b65d433 100644
--- a/include/linux/soc/samsung/exynos-regs-pmu.h
+++ b/include/linux/soc/samsung/exynos-regs-pmu.h
@@ -657,6 +657,9 @@
 #define EXYNOS5433_PAD_RETENTION_UFS_OPTION			(0x3268)
 #define EXYNOS5433_PAD_RETENTION_FSYSGENIO_OPTION		(0x32A8)
 
+/* For Exynos990 */
+#define EXYNOS990_PHY_CTRL_USB20				(0x72C)
+
 /* For Tensor GS101 */
 #define GS101_SYSIP_DAT0					(0x810)
 #define GS101_SYSTEM_CONFIGURATION				(0x3A00)

-- 
2.47.2


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

* Re: [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible
  2025-02-14 17:21 ` [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible Igor Belwon
@ 2025-02-19  7:29   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-19  7:29 UTC (permalink / raw)
  To: Igor Belwon, Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Marek Szyprowski,
	Sylwester Nawrocki, Alim Akhtar
  Cc: linux-phy, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc

On 14/02/2025 18:21, Igor Belwon wrote:
> Add a compatible for the exynos990-usbdrd-phy. The PHY is compatible
> with the older exynos5420 design (two clocks) when running in highspeed mode.
> 
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---
>  Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml | 2 ++
>  1 file changed, 2 insertions(+)


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

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

* Re: [PATCH 2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy
  2025-02-14 17:21 ` [PATCH 2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy Igor Belwon
@ 2025-02-19  7:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-19  7:31 UTC (permalink / raw)
  To: Igor Belwon, Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Marek Szyprowski,
	Sylwester Nawrocki, Alim Akhtar
  Cc: linux-phy, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc

On 14/02/2025 18:21, Igor Belwon wrote:
> The Exynos990 usbdrd PHY is a combo PHY which supports USB SS, HS and
> DisplayPort outputs. This commit adds support only for UTMI+ (USB HS).
> 
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---
>  drivers/phy/samsung/phy-exynos5-usbdrd.c    | 32 +++++++++++++++++++++++++++++
>  include/linux/soc/samsung/exynos-regs-pmu.h |  3 +++
>  2 files changed, 35 insertions(+)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

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

* Re: [PATCH 0/2] USB PHY support for Exynos990 SoCs
  2025-02-14 17:21 [PATCH 0/2] USB PHY support for Exynos990 SoCs Igor Belwon
  2025-02-14 17:21 ` [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible Igor Belwon
  2025-02-14 17:21 ` [PATCH 2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy Igor Belwon
@ 2025-06-15 16:52 ` Vinod Koul
  2 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2025-06-15 16:52 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Marek Szyprowski, Sylwester Nawrocki, Alim Akhtar,
	Igor Belwon
  Cc: Krzysztof Kozlowski, linux-phy, devicetree, linux-kernel,
	linux-arm-kernel, linux-samsung-soc


On Fri, 14 Feb 2025 18:21:06 +0100, Igor Belwon wrote:
> This patchset adds support for the USB 2.0 PHY of the Exynos990 SoC.
> This SoC has a combo PHY that supports highspeed, superspeed USB and
> DisplayPort, however due to my inability to test the superspeed part of
> the combo phy (device always enumerated as high-speed, even on the
> vendor kernels/bootloaders) only the highspeed part is brought up.
> 
> These changes have been tested and confirmed working (with the USB_ETH
> gadget and telnet/ssh in a ramdisk) on a device from the hubble family
> (x1s) and also a device from the canvas family (c1s).
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible
      commit: 9f77d234c1f41e78a99f124bf6fee59dc2e3d46f
[2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy
      commit: 385a766bed48c5bcf620061f24e864dafeca671a

Best regards,
-- 
~Vinod



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

end of thread, other threads:[~2025-06-15 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 17:21 [PATCH 0/2] USB PHY support for Exynos990 SoCs Igor Belwon
2025-02-14 17:21 ` [PATCH 1/2] dt-bindings: phy: samsung,usb3-drd-phy: Add exynos990 compatible Igor Belwon
2025-02-19  7:29   ` Krzysztof Kozlowski
2025-02-14 17:21 ` [PATCH 2/2] phy: exynos5-usbdrd: Add support for the Exynos990 usbdrd phy Igor Belwon
2025-02-19  7:31   ` Krzysztof Kozlowski
2025-06-15 16:52 ` [PATCH 0/2] USB PHY support for Exynos990 SoCs Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox