phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104
@ 2025-07-09 14:55 Luca Weiss
  2025-07-09 14:55 ` [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif Luca Weiss
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Luca Weiss @ 2025-07-09 14:55 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Luca Weiss, Neil Armstrong,
	Krzysztof Kozlowski

Add a new property qcom,tune-res-fsdif for the eUSB2 repeater and add
the compatible for the repeater on the PMIV0104 PMIC.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v2:
- Expand the dt-bindings qcom,tune-res-fsdif commit message regarding
  the register value in dt.
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20250625-sm7635-eusb-repeater-v1-0-19d85541eb4c@fairphone.com

---
Luca Weiss (4):
      dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif
      phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop
      dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for PMIV0104
      phy: qualcomm: phy-qcom-eusb2-repeater: Add support for PMIV0104

 .../devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml |  7 +++++++
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c            | 15 +++++++++++++++
 2 files changed, 22 insertions(+)
---
base-commit: d9946fe286439c2aeaa7953b8c316efe5b83d515
change-id: 20250620-sm7635-eusb-repeater-0d78f557290f
prerequisite-change-id: 20250616-eusb2-repeater-tuning-f56331c6b1fa:v2
prerequisite-patch-id: 5c504d171a4d1acd9ec376e01e0dd0fddbad92b8
prerequisite-patch-id: 0c97dcf5472fbed8ef4cffbd482f3169fe1e972d

Best regards,
-- 
Luca Weiss <luca.weiss@fairphone.com>


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

* [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif
  2025-07-09 14:55 [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Luca Weiss
@ 2025-07-09 14:55 ` Luca Weiss
  2025-07-10 22:21   ` Rob Herring (Arm)
  2025-07-09 14:55 ` [PATCH v2 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop Luca Weiss
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2025-07-09 14:55 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Luca Weiss

Document the FS Differential TX Output Resistance Tuning value found on
the eUSB2 repeater on Qualcomm PMICs. The tuning values have special
meanings, being different offsets of the resistance to the default value
in Ohms but the exact meaning is not relevant here, as the correct
tuning is determined by hardware engineers to make sure the electrical
properties are as expected.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
index 27f064a71c9fb8cb60e8333fb285f0510a4af94f..6bfd11657e2992735998063b3ca390e04a03930d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
@@ -52,6 +52,12 @@ properties:
     minimum: 0
     maximum: 7
 
+  qcom,tune-res-fsdif:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: FS Differential TX Output Resistance Tuning
+    minimum: 0
+    maximum: 7
+
 required:
   - compatible
   - reg

-- 
2.50.0


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

* [PATCH v2 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop
  2025-07-09 14:55 [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Luca Weiss
  2025-07-09 14:55 ` [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif Luca Weiss
@ 2025-07-09 14:55 ` Luca Weiss
  2025-07-09 14:55 ` [PATCH v2 3/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for PMIV0104 Luca Weiss
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Luca Weiss @ 2025-07-09 14:55 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Luca Weiss, Neil Armstrong

Support reading the FS Differential TX Output Resistance Tuning from
devicetree and writing the register, as required on some boards.

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
index d7493c2294ef23e37e484019a49ddf7b3d6a6a46..61594739e5b12706775622e1f76af6ad5d2d29bf 100644
--- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
+++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
@@ -136,6 +136,9 @@ static int eusb2_repeater_init(struct phy *phy)
 	if (!of_property_read_u8(np, "qcom,tune-usb2-preem", &val))
 		regmap_write(regmap, base + EUSB2_TUNE_IUSB2, val);
 
+	if (!of_property_read_u8(np, "qcom,tune-res-fsdif", &val))
+		regmap_write(regmap, base + EUSB2_TUNE_RES_FSDIF, val);
+
 	/* Wait for status OK */
 	ret = regmap_read_poll_timeout(regmap, base + EUSB2_RPTR_STATUS, poll_val,
 				       poll_val & RPTR_OK, 10, 5);

-- 
2.50.0


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

* [PATCH v2 3/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for PMIV0104
  2025-07-09 14:55 [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Luca Weiss
  2025-07-09 14:55 ` [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif Luca Weiss
  2025-07-09 14:55 ` [PATCH v2 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop Luca Weiss
@ 2025-07-09 14:55 ` Luca Weiss
  2025-07-09 14:55 ` [PATCH v2 4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Luca Weiss
  2025-08-12 16:41 ` [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Vinod Koul
  4 siblings, 0 replies; 8+ messages in thread
From: Luca Weiss @ 2025-07-09 14:55 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Luca Weiss, Krzysztof Kozlowski

Add a dt-bindings compatible string for the Qualcomm's PMIV0104 PMIC.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
index 6bfd11657e2992735998063b3ca390e04a03930d..5bf0d6c9c0256300d00f84307b7f6ccf669f17c4 100644
--- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
@@ -22,6 +22,7 @@ properties:
           - const: qcom,pm8550b-eusb2-repeater
       - enum:
           - qcom,pm8550b-eusb2-repeater
+          - qcom,pmiv0104-eusb2-repeater
           - qcom,smb2360-eusb2-repeater
 
   reg:

-- 
2.50.0


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

* [PATCH v2 4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for PMIV0104
  2025-07-09 14:55 [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Luca Weiss
                   ` (2 preceding siblings ...)
  2025-07-09 14:55 ` [PATCH v2 3/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for PMIV0104 Luca Weiss
@ 2025-07-09 14:55 ` Luca Weiss
  2025-07-11 12:27   ` Konrad Dybcio
  2025-08-12 16:41 ` [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Vinod Koul
  4 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2025-07-09 14:55 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Luca Weiss, Neil Armstrong

Add support for the eUSB2 repeater found on the PMIV0104. There is no
default init table for this PMIC, just the board-specific tuning
parameters are used on top of the default tuning values.

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
index 61594739e5b12706775622e1f76af6ad5d2d29bf..3d4cdc4c18becd8efd5015e698b836ad4d7cf18c 100644
--- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
+++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
@@ -82,6 +82,14 @@ static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
 	.num_vregs	= ARRAY_SIZE(pm8550b_vreg_l),
 };
 
+static const struct eusb2_repeater_cfg pmiv0104_eusb2_cfg = {
+	/* No PMIC-specific init sequence, only board level tuning via DT */
+	.init_tbl	= (struct eusb2_repeater_init_tbl_reg[]) {},
+	.init_tbl_num	= 0,
+	.vreg_list	= pm8550b_vreg_l,
+	.num_vregs	= ARRAY_SIZE(pm8550b_vreg_l),
+};
+
 static const struct eusb2_repeater_cfg smb2360_eusb2_cfg = {
 	.init_tbl	= smb2360_init_tbl,
 	.init_tbl_num	= ARRAY_SIZE(smb2360_init_tbl),
@@ -264,6 +272,10 @@ static const struct of_device_id eusb2_repeater_of_match_table[] = {
 		.compatible = "qcom,pm8550b-eusb2-repeater",
 		.data = &pm8550b_eusb2_cfg,
 	},
+	{
+		.compatible = "qcom,pmiv0104-eusb2-repeater",
+		.data = &pmiv0104_eusb2_cfg,
+	},
 	{
 		.compatible = "qcom,smb2360-eusb2-repeater",
 		.data = &smb2360_eusb2_cfg,

-- 
2.50.0


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

* Re: [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif
  2025-07-09 14:55 ` [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif Luca Weiss
@ 2025-07-10 22:21   ` Rob Herring (Arm)
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-07-10 22:21 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Conor Dooley, phone-devel, devicetree, Krzysztof Kozlowski,
	linux-phy, linux-kernel, Abel Vesa, linux-arm-msm,
	~postmarketos/upstreaming, Kishon Vijay Abraham I, Vinod Koul


On Wed, 09 Jul 2025 16:55:14 +0200, Luca Weiss wrote:
> Document the FS Differential TX Output Resistance Tuning value found on
> the eUSB2 repeater on Qualcomm PMICs. The tuning values have special
> meanings, being different offsets of the resistance to the default value
> in Ohms but the exact meaning is not relevant here, as the correct
> tuning is determined by hardware engineers to make sure the electrical
> properties are as expected.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH v2 4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for PMIV0104
  2025-07-09 14:55 ` [PATCH v2 4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Luca Weiss
@ 2025-07-11 12:27   ` Konrad Dybcio
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2025-07-11 12:27 UTC (permalink / raw)
  To: Luca Weiss, Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Neil Armstrong

On 7/9/25 4:55 PM, Luca Weiss wrote:
> Add support for the eUSB2 repeater found on the PMIV0104. There is no
> default init table for this PMIC, just the board-specific tuning
> parameters are used on top of the default tuning values.
> 
> Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
> index 61594739e5b12706775622e1f76af6ad5d2d29bf..3d4cdc4c18becd8efd5015e698b836ad4d7cf18c 100644
> --- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
> +++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
> @@ -82,6 +82,14 @@ static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
>  	.num_vregs	= ARRAY_SIZE(pm8550b_vreg_l),
>  };
>  
> +static const struct eusb2_repeater_cfg pmiv0104_eusb2_cfg = {
> +	/* No PMIC-specific init sequence, only board level tuning via DT */
> +	.init_tbl	= (struct eusb2_repeater_init_tbl_reg[]) {},
> +	.init_tbl_num	= 0,

NULL / omitted fields would be fine too fwiw

Konrad

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

* Re: [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104
  2025-07-09 14:55 [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Luca Weiss
                   ` (3 preceding siblings ...)
  2025-07-09 14:55 ` [PATCH v2 4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Luca Weiss
@ 2025-08-12 16:41 ` Vinod Koul
  4 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2025-08-12 16:41 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Neil Armstrong, Krzysztof Kozlowski


On Wed, 09 Jul 2025 16:55:13 +0200, Luca Weiss wrote:
> Add a new property qcom,tune-res-fsdif for the eUSB2 repeater and add
> the compatible for the repeater on the PMIV0104 PMIC.
> 
> 

Applied, thanks!

[1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif
      commit: 47e9b6f601932899280f725b0fdbc4d4f85e2719
[2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop
      commit: 8e086fe190b63ef1d0d31b300bfefb5d00217427
[3/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for PMIV0104
      commit: eb86c2ce4a89157da71d3a7953eac4dcde7d5527
[4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for PMIV0104
      commit: 8427a4ca85b36247cb2c055ec7507a78a19246ad

Best regards,
-- 
~Vinod



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

end of thread, other threads:[~2025-08-12 16:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 14:55 [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 Luca Weiss
2025-07-09 14:55 ` [PATCH v2 1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Document qcom,tune-res-fsdif Luca Weiss
2025-07-10 22:21   ` Rob Herring (Arm)
2025-07-09 14:55 ` [PATCH v2 2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Support tune-res-fsdif prop Luca Weiss
2025-07-09 14:55 ` [PATCH v2 3/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for PMIV0104 Luca Weiss
2025-07-09 14:55 ` [PATCH v2 4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Luca Weiss
2025-07-11 12:27   ` Konrad Dybcio
2025-08-12 16:41 ` [PATCH v2 0/4] Add support for eUSB2 repeater on PMIV0104 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).