* [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
@ 2025-04-29 3:30 Xu Yang
2025-04-29 3:30 ` [PATCH v2 2/3] phy: fsl-imx8mq-usb: improve some tuning parameters Xu Yang
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Xu Yang @ 2025-04-29 3:30 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam
Cc: jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
properties") add many tuning properties, but some parameter value doesn't
match the register description. It made some changes based on the original
value: add offset to a negative number so turn it to a non-negative number.
However, it's not easy to find an exact tuning value from register field
with such conversion.
Because device-tree supports negative parameter number, this will improve
some propertie's parameter.
Mainly include below properties:
- fsl,phy-tx-vref-tune-percent
- fsl,phy-tx-rise-tune-percent
- fsl,phy-comp-dis-tune-percent
The parameter value of above 3 properties are USB PHY specific. i.MX8MP
and i.MX95 USB PHY has different meanings. So this add restrictions for
them.
- fsl,phy-tx-vboost-level-microvolt
For this property, the parameter value is wrong in register description.
This will correct it according to true value.
For detailed info, please refer to i.MX8MP and i.MX95 latest reference
manual.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
Changes in v2:
- keep widest constraints
- use multipleOf for some properties
---
.../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
1 file changed, 49 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
index daee0c0fc915..71e5940ef4b8 100644
--- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
@@ -42,16 +42,17 @@ properties:
fsl,phy-tx-vref-tune-percent:
description:
- Tunes the HS DC level relative to the nominal level
- minimum: 94
- maximum: 124
+ Tunes the HS DC level relative to the nominal level. It varies
+ between different PHY versions
+ minimum: -1000
+ maximum: 875
fsl,phy-tx-rise-tune-percent:
description:
Adjusts the rise/fall time duration of the HS waveform relative to
- its nominal value
- minimum: 97
- maximum: 103
+ its nominal value. It varies between different PHY versions
+ minimum: -10
+ maximum: 20
fsl,phy-tx-preemp-amp-tune-microamp:
description:
@@ -63,15 +64,14 @@ properties:
fsl,phy-tx-vboost-level-microvolt:
description:
Adjust the boosted transmit launch pk-pk differential amplitude
- minimum: 880
- maximum: 1120
+ enum: [844, 1008, 1156]
fsl,phy-comp-dis-tune-percent:
description:
Adjust the voltage level used to detect a disconnect event at the host
- relative to the nominal value
- minimum: 91
- maximum: 115
+ relative to the nominal value. It varies between different PHY versions
+ minimum: -60
+ maximum: 45
fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
description:
@@ -112,6 +112,44 @@ allOf:
reg:
maxItems: 1
+ - if:
+ properties:
+ compatible:
+ enum:
+ - fsl,imx8mq-usb-phy
+ - fsl,imx8mp-usb-phy
+ then:
+ properties:
+ fsl,phy-tx-vref-tune-percent:
+ minimum: -6
+ maximum: 24
+ multipleOf: 2
+ fsl,phy-tx-rise-tune-percent:
+ enum: [-3, -1, 0, 3]
+ fsl,phy-comp-dis-tune-percent:
+ enum: [-9, -6, -3, 0, 4, 7, 11, 15]
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx95-usb-phy
+ then:
+ properties:
+ fsl,phy-tx-vref-tune-percent:
+ description: 100x the original
+ minimum: -1000
+ maximum: 875
+ multipleOf: 125
+ fsl,phy-tx-rise-tune-percent:
+ enum: [-10, 0, 15, 20]
+ fsl,phy-comp-dis-tune-percent:
+ description: 10x the original
+ minimum: -60
+ maximum: 45
+ multipleOf: 15
+
- if:
required:
- orientation-switch
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/3] phy: fsl-imx8mq-usb: improve some tuning parameters
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
@ 2025-04-29 3:30 ` Xu Yang
2025-04-29 3:30 ` [PATCH v2 3/3] phy: fsl-imx8mq-usb: add i.MX95 tuning support Xu Yang
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Xu Yang @ 2025-04-29 3:30 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam
Cc: jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
Since device tree support negative number, this will improve some
parameter parsing functions to handle negative number which is
corresponding to the original value of register description.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
Changes in v2:
- split out imx95 part to another patch
---
drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 55 +++++++++++-----------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index a974ef94de9a..6c564b608539 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -113,11 +113,11 @@ struct imx8mq_usb_phy {
struct tca_blk *tca;
u32 pcs_tx_swing_full;
u32 pcs_tx_deemph_3p5db;
- u32 tx_vref_tune;
- u32 tx_rise_tune;
+ s32 tx_vref_tune;
+ s32 tx_rise_tune;
u32 tx_preemp_amp_tune;
u32 tx_vboost_level;
- u32 comp_dis_tune;
+ s32 comp_dis_tune;
};
@@ -286,24 +286,24 @@ static void imx95_usb_phy_put_tca(struct imx8mq_usb_phy *imx_phy)
tca_blk_put_typec_switch(tca->sw);
}
-static u32 phy_tx_vref_tune_from_property(u32 percent)
+static u32 phy_tx_vref_tune_from_property(s32 percent)
{
- percent = clamp(percent, 94U, 124U);
+ percent = clamp(percent, -6, 24);
- return DIV_ROUND_CLOSEST(percent - 94U, 2);
+ return DIV_ROUND_CLOSEST(percent + 6, 2);
}
-static u32 phy_tx_rise_tune_from_property(u32 percent)
+static u32 phy_tx_rise_tune_from_property(s32 percent)
{
switch (percent) {
- case 0 ... 98:
+ case -3:
return 3;
- case 99:
+ case -1:
return 2;
- case 100 ... 101:
- return 1;
- default:
+ case 3:
return 0;
+ default:
+ return 1;
}
}
@@ -317,12 +317,12 @@ static u32 phy_tx_preemp_amp_tune_from_property(u32 microamp)
static u32 phy_tx_vboost_level_from_property(u32 microvolt)
{
switch (microvolt) {
- case 0 ... 960:
- return 0;
- case 961 ... 1160:
- return 2;
- default:
+ case 1156:
+ return 5;
+ case 844:
return 3;
+ default:
+ return 4;
}
}
@@ -331,27 +331,28 @@ static u32 phy_pcs_tx_deemph_3p5db_from_property(u32 decibel)
return min(decibel, 36U);
}
-static u32 phy_comp_dis_tune_from_property(u32 percent)
+static u32 phy_comp_dis_tune_from_property(s32 percent)
{
switch (percent) {
- case 0 ... 92:
+ case -9:
return 0;
- case 93 ... 95:
+ case -6:
return 1;
- case 96 ... 97:
+ case -3:
return 2;
- case 98 ... 102:
- return 3;
- case 103 ... 105:
+ case 4:
return 4;
- case 106 ... 109:
+ case 7:
return 5;
- case 110 ... 113:
+ case 11:
return 6;
- default:
+ case 15:
return 7;
+ default:
+ return 3;
}
}
+
static u32 phy_pcs_tx_swing_full_from_property(u32 percent)
{
percent = min(percent, 100U);
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/3] phy: fsl-imx8mq-usb: add i.MX95 tuning support
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
2025-04-29 3:30 ` [PATCH v2 2/3] phy: fsl-imx8mq-usb: improve some tuning parameters Xu Yang
@ 2025-04-29 3:30 ` Xu Yang
2025-04-29 5:55 ` [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Frank Li
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Xu Yang @ 2025-04-29 3:30 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam
Cc: jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
The i.MX8MP and i.MX95 USB3 PHY have different tuning parameter for same
tuning field, this will add i.MX95 tuning support.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
Changes in v2:
- new patch
---
drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 41 ++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index 6c564b608539..59b9b4704b03 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -293,6 +293,13 @@ static u32 phy_tx_vref_tune_from_property(s32 percent)
return DIV_ROUND_CLOSEST(percent + 6, 2);
}
+static u32 imx95_phy_tx_vref_tune_from_property(s32 percent)
+{
+ percent = clamp(percent, -1000, 875);
+
+ return DIV_ROUND_CLOSEST(percent + 1000, 125);
+}
+
static u32 phy_tx_rise_tune_from_property(s32 percent)
{
switch (percent) {
@@ -307,6 +314,20 @@ static u32 phy_tx_rise_tune_from_property(s32 percent)
}
}
+static u32 imx95_phy_tx_rise_tune_from_property(s32 percent)
+{
+ switch (percent) {
+ case -10:
+ return 3;
+ case 15:
+ return 1;
+ case 20:
+ return 0;
+ default:
+ return 2;
+ }
+}
+
static u32 phy_tx_preemp_amp_tune_from_property(u32 microamp)
{
microamp = min(microamp, 1800U);
@@ -353,6 +374,13 @@ static u32 phy_comp_dis_tune_from_property(s32 percent)
}
}
+static u32 imx95_phy_comp_dis_tune_from_property(s32 percent)
+{
+ percent = clamp(percent, -60, 45);
+
+ return DIV_ROUND_CLOSEST(percent + 60, 15);
+}
+
static u32 phy_pcs_tx_swing_full_from_property(u32 percent)
{
percent = min(percent, 100U);
@@ -363,10 +391,17 @@ static u32 phy_pcs_tx_swing_full_from_property(u32 percent)
static void imx8m_get_phy_tuning_data(struct imx8mq_usb_phy *imx_phy)
{
struct device *dev = imx_phy->phy->dev.parent;
+ bool is_imx95 = false;
+
+ if (device_is_compatible(dev, "fsl,imx95-usb-phy"))
+ is_imx95 = true;
if (device_property_read_u32(dev, "fsl,phy-tx-vref-tune-percent",
&imx_phy->tx_vref_tune))
imx_phy->tx_vref_tune = PHY_TUNE_DEFAULT;
+ else if (is_imx95)
+ imx_phy->tx_vref_tune =
+ imx95_phy_tx_vref_tune_from_property(imx_phy->tx_vref_tune);
else
imx_phy->tx_vref_tune =
phy_tx_vref_tune_from_property(imx_phy->tx_vref_tune);
@@ -374,6 +409,9 @@ static void imx8m_get_phy_tuning_data(struct imx8mq_usb_phy *imx_phy)
if (device_property_read_u32(dev, "fsl,phy-tx-rise-tune-percent",
&imx_phy->tx_rise_tune))
imx_phy->tx_rise_tune = PHY_TUNE_DEFAULT;
+ else if (is_imx95)
+ imx_phy->tx_rise_tune =
+ imx95_phy_tx_rise_tune_from_property(imx_phy->tx_rise_tune);
else
imx_phy->tx_rise_tune =
phy_tx_rise_tune_from_property(imx_phy->tx_rise_tune);
@@ -395,6 +433,9 @@ static void imx8m_get_phy_tuning_data(struct imx8mq_usb_phy *imx_phy)
if (device_property_read_u32(dev, "fsl,phy-comp-dis-tune-percent",
&imx_phy->comp_dis_tune))
imx_phy->comp_dis_tune = PHY_TUNE_DEFAULT;
+ else if (is_imx95)
+ imx_phy->comp_dis_tune =
+ imx95_phy_comp_dis_tune_from_property(imx_phy->comp_dis_tune);
else
imx_phy->comp_dis_tune =
phy_comp_dis_tune_from_property(imx_phy->comp_dis_tune);
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
2025-04-29 3:30 ` [PATCH v2 2/3] phy: fsl-imx8mq-usb: improve some tuning parameters Xu Yang
2025-04-29 3:30 ` [PATCH v2 3/3] phy: fsl-imx8mq-usb: add i.MX95 tuning support Xu Yang
@ 2025-04-29 5:55 ` Frank Li
2025-04-29 6:26 ` Xu Yang
2025-04-29 9:30 ` Xu Yang
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Frank Li @ 2025-04-29 5:55 UTC (permalink / raw)
To: Xu Yang
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam, jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
On Tue, Apr 29, 2025 at 11:30:07AM +0800, Xu Yang wrote:
> Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> properties") add many tuning properties, but some parameter value doesn't
> match the register description. It made some changes based on the original
> value: add offset to a negative number so turn it to a non-negative number.
> However, it's not easy to find an exact tuning value from register field
> with such conversion.
>
> Because device-tree supports negative parameter number, this will improve
> some propertie's parameter.
>
> Mainly include below properties:
> - fsl,phy-tx-vref-tune-percent
> - fsl,phy-tx-rise-tune-percent
> - fsl,phy-comp-dis-tune-percent
It should be standard unit. for example 0% to 100%. DT don't prefer you
direct use register value.
Frank
>
> The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> and i.MX95 USB PHY has different meanings. So this add restrictions for
> them.
>
> - fsl,phy-tx-vboost-level-microvolt
>
> For this property, the parameter value is wrong in register description.
> This will correct it according to true value.
>
> For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> manual.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>
> ---
> Changes in v2:
> - keep widest constraints
> - use multipleOf for some properties
> ---
> .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> 1 file changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> index daee0c0fc915..71e5940ef4b8 100644
> --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> @@ -42,16 +42,17 @@ properties:
>
> fsl,phy-tx-vref-tune-percent:
> description:
> - Tunes the HS DC level relative to the nominal level
> - minimum: 94
> - maximum: 124
> + Tunes the HS DC level relative to the nominal level. It varies
> + between different PHY versions
> + minimum: -1000
> + maximum: 875
>
> fsl,phy-tx-rise-tune-percent:
> description:
> Adjusts the rise/fall time duration of the HS waveform relative to
> - its nominal value
> - minimum: 97
> - maximum: 103
> + its nominal value. It varies between different PHY versions
> + minimum: -10
> + maximum: 20
>
> fsl,phy-tx-preemp-amp-tune-microamp:
> description:
> @@ -63,15 +64,14 @@ properties:
> fsl,phy-tx-vboost-level-microvolt:
> description:
> Adjust the boosted transmit launch pk-pk differential amplitude
> - minimum: 880
> - maximum: 1120
> + enum: [844, 1008, 1156]
>
> fsl,phy-comp-dis-tune-percent:
> description:
> Adjust the voltage level used to detect a disconnect event at the host
> - relative to the nominal value
> - minimum: 91
> - maximum: 115
> + relative to the nominal value. It varies between different PHY versions
> + minimum: -60
> + maximum: 45
>
> fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
> description:
> @@ -112,6 +112,44 @@ allOf:
> reg:
> maxItems: 1
>
> + - if:
> + properties:
> + compatible:
> + enum:
> + - fsl,imx8mq-usb-phy
> + - fsl,imx8mp-usb-phy
> + then:
> + properties:
> + fsl,phy-tx-vref-tune-percent:
> + minimum: -6
> + maximum: 24
> + multipleOf: 2
> + fsl,phy-tx-rise-tune-percent:
> + enum: [-3, -1, 0, 3]
> + fsl,phy-comp-dis-tune-percent:
> + enum: [-9, -6, -3, 0, 4, 7, 11, 15]
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - fsl,imx95-usb-phy
> + then:
> + properties:
> + fsl,phy-tx-vref-tune-percent:
> + description: 100x the original
> + minimum: -1000
> + maximum: 875
> + multipleOf: 125
> + fsl,phy-tx-rise-tune-percent:
> + enum: [-10, 0, 15, 20]
> + fsl,phy-comp-dis-tune-percent:
> + description: 10x the original
> + minimum: -60
> + maximum: 45
> + multipleOf: 15
> +
> - if:
> required:
> - orientation-switch
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 5:55 ` [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Frank Li
@ 2025-04-29 6:26 ` Xu Yang
2025-04-29 12:10 ` Frank Li
0 siblings, 1 reply; 10+ messages in thread
From: Xu Yang @ 2025-04-29 6:26 UTC (permalink / raw)
To: Frank Li
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam, jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
Hi Frank,
On Tue, Apr 29, 2025 at 01:55:26AM -0400, Frank Li wrote:
> On Tue, Apr 29, 2025 at 11:30:07AM +0800, Xu Yang wrote:
> > Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> > properties") add many tuning properties, but some parameter value doesn't
> > match the register description. It made some changes based on the original
> > value: add offset to a negative number so turn it to a non-negative number.
> > However, it's not easy to find an exact tuning value from register field
> > with such conversion.
> >
> > Because device-tree supports negative parameter number, this will improve
> > some propertie's parameter.
> >
> > Mainly include below properties:
> > - fsl,phy-tx-vref-tune-percent
> > - fsl,phy-tx-rise-tune-percent
> > - fsl,phy-comp-dis-tune-percent
>
> It should be standard unit. for example 0% to 100%. DT don't prefer you
> direct use register value.
Yes. The dtschema and driver already use standard unit.
This patch is going to correct the unintuitive expression.
Take tx-rise-tune as example, register field as below:
00b - + 3%
[21:20] 01b - 0 (default)
TXRISETUNE 10b - - 1%
11b - - 3%
The valid value of tx-rise-tune is [-3%, +3%]. However, the current dtschema
add an offset which caused the valid value to [97%, 103%].
fsl,phy-tx-rise-tune-percent:
minimum: 97
maximum: 103
When I first added tuning property to DTS, I thought I was reading the wrong
dtschema. Other users may meet such confuse too.
Thanks,
Xu Yang
>
> Frank
>
> >
> > The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> > and i.MX95 USB PHY has different meanings. So this add restrictions for
> > them.
> >
> > - fsl,phy-tx-vboost-level-microvolt
> >
> > For this property, the parameter value is wrong in register description.
> > This will correct it according to true value.
> >
> > For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> > manual.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> >
> > ---
> > Changes in v2:
> > - keep widest constraints
> > - use multipleOf for some properties
> > ---
> > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> > 1 file changed, 49 insertions(+), 11 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > index daee0c0fc915..71e5940ef4b8 100644
> > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > @@ -42,16 +42,17 @@ properties:
> >
> > fsl,phy-tx-vref-tune-percent:
> > description:
> > - Tunes the HS DC level relative to the nominal level
> > - minimum: 94
> > - maximum: 124
> > + Tunes the HS DC level relative to the nominal level. It varies
> > + between different PHY versions
> > + minimum: -1000
> > + maximum: 875
> >
> > fsl,phy-tx-rise-tune-percent:
> > description:
> > Adjusts the rise/fall time duration of the HS waveform relative to
> > - its nominal value
> > - minimum: 97
> > - maximum: 103
> > + its nominal value. It varies between different PHY versions
> > + minimum: -10
> > + maximum: 20
> >
> > fsl,phy-tx-preemp-amp-tune-microamp:
> > description:
> > @@ -63,15 +64,14 @@ properties:
> > fsl,phy-tx-vboost-level-microvolt:
> > description:
> > Adjust the boosted transmit launch pk-pk differential amplitude
> > - minimum: 880
> > - maximum: 1120
> > + enum: [844, 1008, 1156]
> >
> > fsl,phy-comp-dis-tune-percent:
> > description:
> > Adjust the voltage level used to detect a disconnect event at the host
> > - relative to the nominal value
> > - minimum: 91
> > - maximum: 115
> > + relative to the nominal value. It varies between different PHY versions
> > + minimum: -60
> > + maximum: 45
> >
> > fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
> > description:
> > @@ -112,6 +112,44 @@ allOf:
> > reg:
> > maxItems: 1
> >
> > + - if:
> > + properties:
> > + compatible:
> > + enum:
> > + - fsl,imx8mq-usb-phy
> > + - fsl,imx8mp-usb-phy
> > + then:
> > + properties:
> > + fsl,phy-tx-vref-tune-percent:
> > + minimum: -6
> > + maximum: 24
> > + multipleOf: 2
> > + fsl,phy-tx-rise-tune-percent:
> > + enum: [-3, -1, 0, 3]
> > + fsl,phy-comp-dis-tune-percent:
> > + enum: [-9, -6, -3, 0, 4, 7, 11, 15]
> > +
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - fsl,imx95-usb-phy
> > + then:
> > + properties:
> > + fsl,phy-tx-vref-tune-percent:
> > + description: 100x the original
> > + minimum: -1000
> > + maximum: 875
> > + multipleOf: 125
> > + fsl,phy-tx-rise-tune-percent:
> > + enum: [-10, 0, 15, 20]
> > + fsl,phy-comp-dis-tune-percent:
> > + description: 10x the original
> > + minimum: -60
> > + maximum: 45
> > + multipleOf: 15
> > +
> > - if:
> > required:
> > - orientation-switch
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
` (2 preceding siblings ...)
2025-04-29 5:55 ` [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Frank Li
@ 2025-04-29 9:30 ` Xu Yang
2025-04-29 13:10 ` Krzysztof Kozlowski
2025-04-29 15:10 ` Conor Dooley
5 siblings, 0 replies; 10+ messages in thread
From: Xu Yang @ 2025-04-29 9:30 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam
Cc: jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
On Tue, Apr 29, 2025 at 11:30:07AM +0800, Xu Yang wrote:
> Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> properties") add many tuning properties, but some parameter value doesn't
> match the register description. It made some changes based on the original
> value: add offset to a negative number so turn it to a non-negative number.
> However, it's not easy to find an exact tuning value from register field
> with such conversion.
>
> Because device-tree supports negative parameter number, this will improve
> some propertie's parameter.
>
> Mainly include below properties:
> - fsl,phy-tx-vref-tune-percent
> - fsl,phy-tx-rise-tune-percent
> - fsl,phy-comp-dis-tune-percent
>
> The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> and i.MX95 USB PHY has different meanings. So this add restrictions for
> them.
>
> - fsl,phy-tx-vboost-level-microvolt
>
> For this property, the parameter value is wrong in register description.
> This will correct it according to true value.
>
> For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> manual.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Please ignore this patchset since possible ABI break may happen. I will
rework it in v3.
Thanks,
Xu Yang
>
> ---
> Changes in v2:
> - keep widest constraints
> - use multipleOf for some properties
> ---
> .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> 1 file changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> index daee0c0fc915..71e5940ef4b8 100644
> --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> @@ -42,16 +42,17 @@ properties:
>
> fsl,phy-tx-vref-tune-percent:
> description:
> - Tunes the HS DC level relative to the nominal level
> - minimum: 94
> - maximum: 124
> + Tunes the HS DC level relative to the nominal level. It varies
> + between different PHY versions
> + minimum: -1000
> + maximum: 875
>
> fsl,phy-tx-rise-tune-percent:
> description:
> Adjusts the rise/fall time duration of the HS waveform relative to
> - its nominal value
> - minimum: 97
> - maximum: 103
> + its nominal value. It varies between different PHY versions
> + minimum: -10
> + maximum: 20
>
> fsl,phy-tx-preemp-amp-tune-microamp:
> description:
> @@ -63,15 +64,14 @@ properties:
> fsl,phy-tx-vboost-level-microvolt:
> description:
> Adjust the boosted transmit launch pk-pk differential amplitude
> - minimum: 880
> - maximum: 1120
> + enum: [844, 1008, 1156]
>
> fsl,phy-comp-dis-tune-percent:
> description:
> Adjust the voltage level used to detect a disconnect event at the host
> - relative to the nominal value
> - minimum: 91
> - maximum: 115
> + relative to the nominal value. It varies between different PHY versions
> + minimum: -60
> + maximum: 45
>
> fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
> description:
> @@ -112,6 +112,44 @@ allOf:
> reg:
> maxItems: 1
>
> + - if:
> + properties:
> + compatible:
> + enum:
> + - fsl,imx8mq-usb-phy
> + - fsl,imx8mp-usb-phy
> + then:
> + properties:
> + fsl,phy-tx-vref-tune-percent:
> + minimum: -6
> + maximum: 24
> + multipleOf: 2
> + fsl,phy-tx-rise-tune-percent:
> + enum: [-3, -1, 0, 3]
> + fsl,phy-comp-dis-tune-percent:
> + enum: [-9, -6, -3, 0, 4, 7, 11, 15]
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - fsl,imx95-usb-phy
> + then:
> + properties:
> + fsl,phy-tx-vref-tune-percent:
> + description: 100x the original
> + minimum: -1000
> + maximum: 875
> + multipleOf: 125
> + fsl,phy-tx-rise-tune-percent:
> + enum: [-10, 0, 15, 20]
> + fsl,phy-comp-dis-tune-percent:
> + description: 10x the original
> + minimum: -60
> + maximum: 45
> + multipleOf: 15
> +
> - if:
> required:
> - orientation-switch
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 6:26 ` Xu Yang
@ 2025-04-29 12:10 ` Frank Li
0 siblings, 0 replies; 10+ messages in thread
From: Frank Li @ 2025-04-29 12:10 UTC (permalink / raw)
To: Xu Yang
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam, jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
On Tue, Apr 29, 2025 at 02:26:40PM +0800, Xu Yang wrote:
> Hi Frank,
>
> On Tue, Apr 29, 2025 at 01:55:26AM -0400, Frank Li wrote:
> > On Tue, Apr 29, 2025 at 11:30:07AM +0800, Xu Yang wrote:
> > > Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> > > properties") add many tuning properties, but some parameter value doesn't
> > > match the register description. It made some changes based on the original
> > > value: add offset to a negative number so turn it to a non-negative number.
> > > However, it's not easy to find an exact tuning value from register field
> > > with such conversion.
> > >
> > > Because device-tree supports negative parameter number, this will improve
> > > some propertie's parameter.
> > >
> > > Mainly include below properties:
> > > - fsl,phy-tx-vref-tune-percent
> > > - fsl,phy-tx-rise-tune-percent
> > > - fsl,phy-comp-dis-tune-percent
> >
> > It should be standard unit. for example 0% to 100%. DT don't prefer you
> > direct use register value.
>
> Yes. The dtschema and driver already use standard unit.
> This patch is going to correct the unintuitive expression.
>
> Take tx-rise-tune as example, register field as below:
>
> 00b - + 3%
> [21:20] 01b - 0 (default)
> TXRISETUNE 10b - - 1%
> 11b - - 3%
>
> The valid value of tx-rise-tune is [-3%, +3%]. However, the current dtschema
> add an offset which caused the valid value to [97%, 103%].
>
I think [97%, 103%] make sense. (Normal value) * (fsl,phy-tx-vref-tune-percent)
Your formual will be (Normal value) * (100% + fsl,phy-tx-vref-tune-percent)
DT scheme don't care register implement.
Frank
> fsl,phy-tx-rise-tune-percent:
> minimum: 97
> maximum: 103
>
> When I first added tuning property to DTS, I thought I was reading the wrong
> dtschema. Other users may meet such confuse too.
>
> Thanks,
> Xu Yang
>
> >
> > Frank
> >
> > >
> > > The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> > > and i.MX95 USB PHY has different meanings. So this add restrictions for
> > > them.
> > >
> > > - fsl,phy-tx-vboost-level-microvolt
> > >
> > > For this property, the parameter value is wrong in register description.
> > > This will correct it according to true value.
> > >
> > > For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> > > manual.
> > >
> > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > >
> > > ---
> > > Changes in v2:
> > > - keep widest constraints
> > > - use multipleOf for some properties
> > > ---
> > > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> > > 1 file changed, 49 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > > index daee0c0fc915..71e5940ef4b8 100644
> > > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > > @@ -42,16 +42,17 @@ properties:
> > >
> > > fsl,phy-tx-vref-tune-percent:
> > > description:
> > > - Tunes the HS DC level relative to the nominal level
> > > - minimum: 94
> > > - maximum: 124
> > > + Tunes the HS DC level relative to the nominal level. It varies
> > > + between different PHY versions
> > > + minimum: -1000
> > > + maximum: 875
> > >
> > > fsl,phy-tx-rise-tune-percent:
> > > description:
> > > Adjusts the rise/fall time duration of the HS waveform relative to
> > > - its nominal value
> > > - minimum: 97
> > > - maximum: 103
> > > + its nominal value. It varies between different PHY versions
> > > + minimum: -10
> > > + maximum: 20
> > >
> > > fsl,phy-tx-preemp-amp-tune-microamp:
> > > description:
> > > @@ -63,15 +64,14 @@ properties:
> > > fsl,phy-tx-vboost-level-microvolt:
> > > description:
> > > Adjust the boosted transmit launch pk-pk differential amplitude
> > > - minimum: 880
> > > - maximum: 1120
> > > + enum: [844, 1008, 1156]
> > >
> > > fsl,phy-comp-dis-tune-percent:
> > > description:
> > > Adjust the voltage level used to detect a disconnect event at the host
> > > - relative to the nominal value
> > > - minimum: 91
> > > - maximum: 115
> > > + relative to the nominal value. It varies between different PHY versions
> > > + minimum: -60
> > > + maximum: 45
> > >
> > > fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
> > > description:
> > > @@ -112,6 +112,44 @@ allOf:
> > > reg:
> > > maxItems: 1
> > >
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + enum:
> > > + - fsl,imx8mq-usb-phy
> > > + - fsl,imx8mp-usb-phy
> > > + then:
> > > + properties:
> > > + fsl,phy-tx-vref-tune-percent:
> > > + minimum: -6
> > > + maximum: 24
> > > + multipleOf: 2
> > > + fsl,phy-tx-rise-tune-percent:
> > > + enum: [-3, -1, 0, 3]
> > > + fsl,phy-comp-dis-tune-percent:
> > > + enum: [-9, -6, -3, 0, 4, 7, 11, 15]
> > > +
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + contains:
> > > + enum:
> > > + - fsl,imx95-usb-phy
> > > + then:
> > > + properties:
> > > + fsl,phy-tx-vref-tune-percent:
> > > + description: 100x the original
> > > + minimum: -1000
> > > + maximum: 875
> > > + multipleOf: 125
> > > + fsl,phy-tx-rise-tune-percent:
> > > + enum: [-10, 0, 15, 20]
> > > + fsl,phy-comp-dis-tune-percent:
> > > + description: 10x the original
> > > + minimum: -60
> > > + maximum: 45
> > > + multipleOf: 15
> > > +
> > > - if:
> > > required:
> > > - orientation-switch
> > > --
> > > 2.34.1
> > >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
` (3 preceding siblings ...)
2025-04-29 9:30 ` Xu Yang
@ 2025-04-29 13:10 ` Krzysztof Kozlowski
2025-04-29 15:10 ` Conor Dooley
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-29 13:10 UTC (permalink / raw)
To: Xu Yang, vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo,
s.hauer, kernel, festevam
Cc: jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
On 29/04/2025 05:30, Xu Yang wrote:
> Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> properties") add many tuning properties, but some parameter value doesn't
> match the register description. It made some changes based on the original
> value: add offset to a negative number so turn it to a non-negative number.
> However, it's not easy to find an exact tuning value from register field
> with such conversion.
>
> Because device-tree supports negative parameter number, this will improve
> some propertie's parameter.
>
> Mainly include below properties:
> - fsl,phy-tx-vref-tune-percent
> - fsl,phy-tx-rise-tune-percent
> - fsl,phy-comp-dis-tune-percent
>
> The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> and i.MX95 USB PHY has different meanings. So this add restrictions for
> them.
>
> - fsl,phy-tx-vboost-level-microvolt
>
> For this property, the parameter value is wrong in register description.
> This will correct it according to true value.
>
> For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> manual.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>
> ---
> Changes in v2:
> - keep widest constraints
> - use multipleOf for some properties
> ---
> .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> 1 file changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> index daee0c0fc915..71e5940ef4b8 100644
> --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> @@ -42,16 +42,17 @@ properties:
>
> fsl,phy-tx-vref-tune-percent:
> description:
> - Tunes the HS DC level relative to the nominal level
> - minimum: 94
> - maximum: 124
> + Tunes the HS DC level relative to the nominal level. It varies
> + between different PHY versions
> + minimum: -1000
> + maximum: 875
Nothing improved here. You just sent v2 ignoring reviewers feedback.
NAK
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
` (4 preceding siblings ...)
2025-04-29 13:10 ` Krzysztof Kozlowski
@ 2025-04-29 15:10 ` Conor Dooley
2025-04-30 5:57 ` Xu Yang
5 siblings, 1 reply; 10+ messages in thread
From: Conor Dooley @ 2025-04-29 15:10 UTC (permalink / raw)
To: Xu Yang
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam, jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 4606 bytes --]
On Tue, Apr 29, 2025 at 11:30:07AM +0800, Xu Yang wrote:
> Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> properties") add many tuning properties, but some parameter value doesn't
> match the register description. It made some changes based on the original
> value: add offset to a negative number so turn it to a non-negative number.
> However, it's not easy to find an exact tuning value from register field
> with such conversion.
>
> Because device-tree supports negative parameter number, this will improve
> some propertie's parameter.
>
> Mainly include below properties:
> - fsl,phy-tx-vref-tune-percent
> - fsl,phy-tx-rise-tune-percent
> - fsl,phy-comp-dis-tune-percent
>
> The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> and i.MX95 USB PHY has different meanings. So this add restrictions for
> them.
It's hard for me to understand from this if you're actually changing the
meaning of the property. Will the current/old values continue to
function as they have been?
>
> - fsl,phy-tx-vboost-level-microvolt
>
> For this property, the parameter value is wrong in register description.
> This will correct it according to true value.
>
> For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> manual.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>
> ---
> Changes in v2:
> - keep widest constraints
> - use multipleOf for some properties
> ---
> .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> 1 file changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> index daee0c0fc915..71e5940ef4b8 100644
> --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> @@ -42,16 +42,17 @@ properties:
>
> fsl,phy-tx-vref-tune-percent:
> description:
> - Tunes the HS DC level relative to the nominal level
> - minimum: 94
> - maximum: 124
> + Tunes the HS DC level relative to the nominal level. It varies
> + between different PHY versions
> + minimum: -1000
> + maximum: 875
>
> fsl,phy-tx-rise-tune-percent:
> description:
> Adjusts the rise/fall time duration of the HS waveform relative to
> - its nominal value
> - minimum: 97
> - maximum: 103
> + its nominal value. It varies between different PHY versions
> + minimum: -10
> + maximum: 20
>
> fsl,phy-tx-preemp-amp-tune-microamp:
> description:
> @@ -63,15 +64,14 @@ properties:
> fsl,phy-tx-vboost-level-microvolt:
> description:
> Adjust the boosted transmit launch pk-pk differential amplitude
> - minimum: 880
> - maximum: 1120
> + enum: [844, 1008, 1156]
>
> fsl,phy-comp-dis-tune-percent:
> description:
> Adjust the voltage level used to detect a disconnect event at the host
> - relative to the nominal value
> - minimum: 91
> - maximum: 115
> + relative to the nominal value. It varies between different PHY versions
> + minimum: -60
> + maximum: 45
>
> fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
> description:
> @@ -112,6 +112,44 @@ allOf:
> reg:
> maxItems: 1
>
> + - if:
> + properties:
> + compatible:
> + enum:
> + - fsl,imx8mq-usb-phy
> + - fsl,imx8mp-usb-phy
> + then:
> + properties:
> + fsl,phy-tx-vref-tune-percent:
> + minimum: -6
> + maximum: 24
> + multipleOf: 2
> + fsl,phy-tx-rise-tune-percent:
> + enum: [-3, -1, 0, 3]
> + fsl,phy-comp-dis-tune-percent:
> + enum: [-9, -6, -3, 0, 4, 7, 11, 15]
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - fsl,imx95-usb-phy
> + then:
> + properties:
> + fsl,phy-tx-vref-tune-percent:
> + description: 100x the original
> + minimum: -1000
> + maximum: 875
> + multipleOf: 125
> + fsl,phy-tx-rise-tune-percent:
> + enum: [-10, 0, 15, 20]
> + fsl,phy-comp-dis-tune-percent:
> + description: 10x the original
> + minimum: -60
> + maximum: 45
> + multipleOf: 15
> +
> - if:
> required:
> - orientation-switch
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties
2025-04-29 15:10 ` Conor Dooley
@ 2025-04-30 5:57 ` Xu Yang
0 siblings, 0 replies; 10+ messages in thread
From: Xu Yang @ 2025-04-30 5:57 UTC (permalink / raw)
To: Conor Dooley
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam, jun.li, alexander.stein, linux-phy, devicetree, imx,
linux-arm-kernel
On Tue, Apr 29, 2025 at 04:10:13PM +0100, Conor Dooley wrote:
> On Tue, Apr 29, 2025 at 11:30:07AM +0800, Xu Yang wrote:
> > Commit b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning
> > properties") add many tuning properties, but some parameter value doesn't
> > match the register description. It made some changes based on the original
> > value: add offset to a negative number so turn it to a non-negative number.
> > However, it's not easy to find an exact tuning value from register field
> > with such conversion.
> >
> > Because device-tree supports negative parameter number, this will improve
> > some propertie's parameter.
> >
> > Mainly include below properties:
> > - fsl,phy-tx-vref-tune-percent
> > - fsl,phy-tx-rise-tune-percent
> > - fsl,phy-comp-dis-tune-percent
> >
> > The parameter value of above 3 properties are USB PHY specific. i.MX8MP
> > and i.MX95 USB PHY has different meanings. So this add restrictions for
> > them.
>
> It's hard for me to understand from this if you're actually changing the
> meaning of the property. Will the current/old values continue to
> function as they have been?
Unfortunately no. I am going to rework it according to KK's comments.
Sorry to bother you.
Thanks,
Xu Yang
>
> >
> > - fsl,phy-tx-vboost-level-microvolt
> >
> > For this property, the parameter value is wrong in register description.
> > This will correct it according to true value.
> >
> > For detailed info, please refer to i.MX8MP and i.MX95 latest reference
> > manual.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> >
> > ---
> > Changes in v2:
> > - keep widest constraints
> > - use multipleOf for some properties
> > ---
> > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 60 +++++++++++++++----
> > 1 file changed, 49 insertions(+), 11 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > index daee0c0fc915..71e5940ef4b8 100644
> > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml
> > @@ -42,16 +42,17 @@ properties:
> >
> > fsl,phy-tx-vref-tune-percent:
> > description:
> > - Tunes the HS DC level relative to the nominal level
> > - minimum: 94
> > - maximum: 124
> > + Tunes the HS DC level relative to the nominal level. It varies
> > + between different PHY versions
> > + minimum: -1000
> > + maximum: 875
> >
> > fsl,phy-tx-rise-tune-percent:
> > description:
> > Adjusts the rise/fall time duration of the HS waveform relative to
> > - its nominal value
> > - minimum: 97
> > - maximum: 103
> > + its nominal value. It varies between different PHY versions
> > + minimum: -10
> > + maximum: 20
> >
> > fsl,phy-tx-preemp-amp-tune-microamp:
> > description:
> > @@ -63,15 +64,14 @@ properties:
> > fsl,phy-tx-vboost-level-microvolt:
> > description:
> > Adjust the boosted transmit launch pk-pk differential amplitude
> > - minimum: 880
> > - maximum: 1120
> > + enum: [844, 1008, 1156]
> >
> > fsl,phy-comp-dis-tune-percent:
> > description:
> > Adjust the voltage level used to detect a disconnect event at the host
> > - relative to the nominal value
> > - minimum: 91
> > - maximum: 115
> > + relative to the nominal value. It varies between different PHY versions
> > + minimum: -60
> > + maximum: 45
> >
> > fsl,phy-pcs-tx-deemph-3p5db-attenuation-db:
> > description:
> > @@ -112,6 +112,44 @@ allOf:
> > reg:
> > maxItems: 1
> >
> > + - if:
> > + properties:
> > + compatible:
> > + enum:
> > + - fsl,imx8mq-usb-phy
> > + - fsl,imx8mp-usb-phy
> > + then:
> > + properties:
> > + fsl,phy-tx-vref-tune-percent:
> > + minimum: -6
> > + maximum: 24
> > + multipleOf: 2
> > + fsl,phy-tx-rise-tune-percent:
> > + enum: [-3, -1, 0, 3]
> > + fsl,phy-comp-dis-tune-percent:
> > + enum: [-9, -6, -3, 0, 4, 7, 11, 15]
> > +
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - fsl,imx95-usb-phy
> > + then:
> > + properties:
> > + fsl,phy-tx-vref-tune-percent:
> > + description: 100x the original
> > + minimum: -1000
> > + maximum: 875
> > + multipleOf: 125
> > + fsl,phy-tx-rise-tune-percent:
> > + enum: [-10, 0, 15, 20]
> > + fsl,phy-comp-dis-tune-percent:
> > + description: 10x the original
> > + minimum: -60
> > + maximum: 45
> > + multipleOf: 15
> > +
> > - if:
> > required:
> > - orientation-switch
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-04-30 6:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 3:30 [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Xu Yang
2025-04-29 3:30 ` [PATCH v2 2/3] phy: fsl-imx8mq-usb: improve some tuning parameters Xu Yang
2025-04-29 3:30 ` [PATCH v2 3/3] phy: fsl-imx8mq-usb: add i.MX95 tuning support Xu Yang
2025-04-29 5:55 ` [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb: improve some tuning properties Frank Li
2025-04-29 6:26 ` Xu Yang
2025-04-29 12:10 ` Frank Li
2025-04-29 9:30 ` Xu Yang
2025-04-29 13:10 ` Krzysztof Kozlowski
2025-04-29 15:10 ` Conor Dooley
2025-04-30 5:57 ` Xu Yang
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).