devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360
@ 2024-02-20 19:41 Abel Vesa
  2024-02-20 19:41 ` [PATCH v2 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Abel Vesa @ 2024-02-20 19:41 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Abel Vesa,
	Krzysztof Kozlowski, Dmitry Baryshkov

This patchset adds support for the eUSB2 repeater provided
by the SMB2360 PMICs.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
Changes in v2:
- Re-worded the commit message for the driver patch to fit Dmitry's request
- Added Dmitry's R-b tag to the driver patch
- Changed the compatible entry in schema to enum, like Krzysztof suggested
- Added Krzysztof's A-b tag to the schema patch
- Link to v1: https://lore.kernel.org/r/20240209-phy-qualcomm-eusb2-repeater-smb2360-v1-0-af2ca4d95a67@linaro.org

---
Abel Vesa (2):
      dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for SMB2360
      phy: qualcomm: phy-qcom-eusb2-repeater: Add support for SMB2360

 .../bindings/phy/qcom,snps-eusb2-repeater.yaml          |  4 +++-
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c          | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
---
base-commit: 2d5c7b7eb345249cb34d42cbc2b97b4c57ea944e
change-id: 20231122-phy-qualcomm-eusb2-repeater-smb2360-a0fd60d382c4

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>


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

* [PATCH v2 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for SMB2360
  2024-02-20 19:41 [PATCH v2 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
@ 2024-02-20 19:41 ` Abel Vesa
  2024-02-20 19:42 ` [PATCH v2 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
  2024-03-28 19:19 ` [PATCH v2 0/2] phy: qcom: eusb2-repeater: " Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Abel Vesa @ 2024-02-20 19:41 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Abel Vesa,
	Krzysztof Kozlowski

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

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
index 24c733c10e0e..90d79491e281 100644
--- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
@@ -20,7 +20,9 @@ properties:
           - enum:
               - qcom,pm7550ba-eusb2-repeater
           - const: qcom,pm8550b-eusb2-repeater
-      - const: qcom,pm8550b-eusb2-repeater
+      - enum:
+          - qcom,pm8550b-eusb2-repeater
+          - qcom,smb2360-eusb2-repeater
 
   reg:
     maxItems: 1

-- 
2.34.1


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

* [PATCH v2 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for SMB2360
  2024-02-20 19:41 [PATCH v2 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
  2024-02-20 19:41 ` [PATCH v2 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
@ 2024-02-20 19:42 ` Abel Vesa
  2024-03-28 19:19 ` [PATCH v2 0/2] phy: qcom: eusb2-repeater: " Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Abel Vesa @ 2024-02-20 19:42 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Abel Vesa,
	Dmitry Baryshkov

The SMB2360 PMICs contain the same repeater as the PM8550B, but requiring
different settings, so add dedicated compatible for SMB2360.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
index a43e20abb10d..68cc8e24f383 100644
--- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
+++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
@@ -88,6 +88,12 @@ static const u32 pm8550b_init_tbl[NUM_TUNE_FIELDS] = {
 	[TUNE_USB2_PREEM] = 0x5,
 };
 
+static const u32 smb2360_init_tbl[NUM_TUNE_FIELDS] = {
+	[TUNE_IUSB2] = 0x5,
+	[TUNE_SQUELCH_U] = 0x3,
+	[TUNE_USB2_PREEM] = 0x2,
+};
+
 static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
 	.init_tbl	= pm8550b_init_tbl,
 	.init_tbl_num	= ARRAY_SIZE(pm8550b_init_tbl),
@@ -95,6 +101,13 @@ static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
 	.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),
+	.vreg_list	= pm8550b_vreg_l,
+	.num_vregs	= ARRAY_SIZE(pm8550b_vreg_l),
+};
+
 static int eusb2_repeater_init_vregs(struct eusb2_repeater *rptr)
 {
 	int num = rptr->cfg->num_vregs;
@@ -271,6 +284,10 @@ static const struct of_device_id eusb2_repeater_of_match_table[] = {
 		.compatible = "qcom,pm8550b-eusb2-repeater",
 		.data = &pm8550b_eusb2_cfg,
 	},
+	{
+		.compatible = "qcom,smb2360-eusb2-repeater",
+		.data = &smb2360_eusb2_cfg,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table);

-- 
2.34.1


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

* Re: [PATCH v2 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360
  2024-02-20 19:41 [PATCH v2 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
  2024-02-20 19:41 ` [PATCH v2 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
  2024-02-20 19:42 ` [PATCH v2 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
@ 2024-03-28 19:19 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2024-03-28 19:19 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Kishon Vijay Abraham I,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel,
	Krzysztof Kozlowski, Dmitry Baryshkov


On Tue, 20 Feb 2024 21:41:58 +0200, Abel Vesa wrote:
> This patchset adds support for the eUSB2 repeater provided
> by the SMB2360 PMICs.
> 
> 

Applied, thanks!

[1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for SMB2360
      commit: f8d27a7e0ae36c204bffe4992043b2bb42ca8580
[2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for SMB2360
      commit: 67076749e093ffb3c82ba6225d41c88f8c816472

Best regards,
-- 
~Vinod



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

end of thread, other threads:[~2024-03-28 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 19:41 [PATCH v2 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
2024-02-20 19:41 ` [PATCH v2 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
2024-02-20 19:42 ` [PATCH v2 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
2024-03-28 19:19 ` [PATCH v2 0/2] phy: qcom: eusb2-repeater: " 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).