linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360
@ 2024-02-09 15:14 Abel Vesa
  2024-02-09 15:14 ` [PATCH 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
  2024-02-09 15:14 ` [PATCH 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
  0 siblings, 2 replies; 5+ messages in thread
From: Abel Vesa @ 2024-02-09 15:14 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

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

Signed-off-by: Abel Vesa <abel.vesa@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          |  1 +
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c          | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
---
base-commit: 445a555e0623387fa9b94e68e61681717e70200a
change-id: 20231122-phy-qualcomm-eusb2-repeater-smb2360-a0fd60d382c4

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


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for SMB2360
  2024-02-09 15:14 [PATCH 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
@ 2024-02-09 15:14 ` Abel Vesa
  2024-02-11 16:27   ` Krzysztof Kozlowski
  2024-02-09 15:14 ` [PATCH 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
  1 sibling, 1 reply; 5+ messages in thread
From: Abel Vesa @ 2024-02-09 15:14 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

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

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 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 24c733c10e0e..6be20c157568 100644
--- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
@@ -21,6 +21,7 @@ properties:
               - qcom,pm7550ba-eusb2-repeater
           - const: qcom,pm8550b-eusb2-repeater
       - const: qcom,pm8550b-eusb2-repeater
+      - const: qcom,smb2360-eusb2-repeater
 
   reg:
     maxItems: 1

-- 
2.34.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for SMB2360
  2024-02-09 15:14 [PATCH 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
  2024-02-09 15:14 ` [PATCH 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
@ 2024-02-09 15:14 ` Abel Vesa
  2024-02-09 15:30   ` Dmitry Baryshkov
  1 sibling, 1 reply; 5+ messages in thread
From: Abel Vesa @ 2024-02-09 15:14 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

The SMB2360 PMICs contain the same eUSB2 repeater as the PM8550B,
so add dedicated compatible for SMB82360.

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


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support for SMB2360
  2024-02-09 15:14 ` [PATCH 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
@ 2024-02-09 15:30   ` Dmitry Baryshkov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 15:30 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Fri, 9 Feb 2024 at 17:14, Abel Vesa <abel.vesa@linaro.org> wrote:
>
> The SMB2360 PMICs contain the same eUSB2 repeater as the PM8550B,
> so add dedicated compatible for SMB82360.

"...same repeater as the PM8550B, but requiring different settings..."

With that fixed:
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
>
>


-- 
With best wishes
Dmitry

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible for SMB2360
  2024-02-09 15:14 ` [PATCH 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
@ 2024-02-11 16:27   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-11 16:27 UTC (permalink / raw)
  To: Abel Vesa, 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

On 09/02/2024 16:14, Abel Vesa wrote:
> Add a dt-bindings compatible string for the Qualcomm's SMB2360 PMIC.
> 
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
>  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 24c733c10e0e..6be20c157568 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> @@ -21,6 +21,7 @@ properties:
>                - qcom,pm7550ba-eusb2-repeater
>            - const: qcom,pm8550b-eusb2-repeater
>        - const: qcom,pm8550b-eusb2-repeater
> +      - const: qcom,smb2360-eusb2-repeater

Make it an enum with previous entry. Same effect, but it is easier to
read, especially in limited diffs, and more obvious.

Anyway:

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

Best regards,
Krzysztof


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2024-02-11 16:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-09 15:14 [PATCH 0/2] phy: qcom: eusb2-repeater: Add support for SMB2360 Abel Vesa
2024-02-09 15:14 ` [PATCH 1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add compatible " Abel Vesa
2024-02-11 16:27   ` Krzysztof Kozlowski
2024-02-09 15:14 ` [PATCH 2/2] phy: qualcomm: phy-qcom-eusb2-repeater: Add support " Abel Vesa
2024-02-09 15:30   ` Dmitry Baryshkov

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).