2023-01-08 19:58:53

by Lux Aliaga

[permalink] [raw]
Subject: [PATCH v6 0/6] arm64: dts: qcom: sm6125: UFS and xiaomi-laurel-sprout support

Introduce Universal Flash Storage support on SM6125 and add support for the Xiaomi Mi A3 based on the former platform. Uses the name xiaomi-laurel-sprout instead of the official codename (laurel_sprout) due to naming limitations in the kernel.

Changes since v5:
- Drop "non-removable" property from ufs_mem_hc for sm6125 platform
- Drop "status" and "autorepeat" properties from gpio-keys node for xiaomi-laurel-sprout
- Rename "key-vol-up" node to "key-volume-up" for xiaomi-laurel-sprout
- Drop "gpio-key,wakeup" property from key-volume-up node for xiaomi-laurel-sprout
- Set "linux,input-type" and "wakeup-source" properties on key-volume-up node for xiaomi-laurel-sprout
- Change "key_vol_up" node name to "vol-up-n-state" and its label to "vol_up_n" in PM6125 GPIO node for xiaomi-laurel-sprout
- Use labels instead of node names for PM6125 ADC channels in xiaomi laurel-sprout
- Set "regulator-allow-set-load" properties on l4, l5, l10, l11, l18 and l24 regulators on xiaomi-laurel-sprout

v5: https://lore.kernel.org/linux-devicetree/[email protected]/




2023-01-08 20:00:52

by Lux Aliaga

[permalink] [raw]
Subject: [PATCH v6 1/6] dt-bindings: ufs: qcom: Add SM6125 compatible string

Document the compatible for UFS found on the SM6125.

Signed-off-by: Lux Aliaga <[email protected]>
Reviewed-by: Martin Botka <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index b517d76215e3..42422f3471b3 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -29,6 +29,7 @@ properties:
- qcom,sc8280xp-ufshc
- qcom,sdm845-ufshc
- qcom,sm6115-ufshc
+ - qcom,sm6125-ufshc
- qcom,sm6350-ufshc
- qcom,sm8150-ufshc
- qcom,sm8250-ufshc
@@ -185,6 +186,7 @@ allOf:
contains:
enum:
- qcom,sm6115-ufshc
+ - qcom,sm6125-ufshc
then:
properties:
clocks:
--
2.39.0

2023-01-08 20:03:49

by Lux Aliaga

[permalink] [raw]
Subject: [PATCH v6 3/6] phy: qcom-qmp: Add SM6125 UFS PHY support

The SM6125 UFS PHY is compatible with the one from SM6115. Add a
compatible for it and modify the config from SM6115 to make them
compatible with the SC8280XP binding

Signed-off-by: Lux Aliaga <[email protected]>
Reviewed-by: Martin Botka <[email protected]>
---
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index 318eea35b972..f33c84578940 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -693,6 +693,8 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
.lanes = 1,

+ .offsets = &qmp_ufs_offsets_v5,
+
.serdes_tbl = sm6115_ufsphy_serdes_tbl,
.serdes_tbl_num = ARRAY_SIZE(sm6115_ufsphy_serdes_tbl),
.tx_tbl = sm6115_ufsphy_tx_tbl,
@@ -1172,6 +1174,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
}, {
.compatible = "qcom,sm6115-qmp-ufs-phy",
.data = &sm6115_ufsphy_cfg,
+ }, {
+ .compatible = "qcom,sm6125-qmp-ufs-phy",
+ .data = &sm6115_ufsphy_cfg,
}, {
.compatible = "qcom,sm6350-qmp-ufs-phy",
.data = &sdm845_ufsphy_cfg,
--
2.39.0

2023-01-08 20:26:40

by Lux Aliaga

[permalink] [raw]
Subject: [PATCH v6 2/6] dt-bindings: phy: Add QMP UFS PHY compatible for SM6125

Document the QMP UFS PHY compatible for SM6125.

Signed-off-by: Lux Aliaga <[email protected]>
Reviewed-by: Martin Botka <[email protected]>
Acked-by: Dhruva Gole <[email protected]>
---
.../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
index dde86a19f792..a7af57931f32 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
@@ -17,6 +17,7 @@ properties:
compatible:
enum:
- qcom,sc8280xp-qmp-ufs-phy
+ - qcom,sm6125-qmp-ufs-phy

reg:
maxItems: 1
--
2.39.0

2023-01-09 12:32:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v6 2/6] dt-bindings: phy: Add QMP UFS PHY compatible for SM6125

On 08/01/2023 20:53, Lux Aliaga wrote:
> Document the QMP UFS PHY compatible for SM6125.
>
> Signed-off-by: Lux Aliaga <[email protected]>
> Reviewed-by: Martin Botka <[email protected]>
> Acked-by: Dhruva Gole <[email protected]>

Acked-by: Krzysztof Kozlowski <[email protected]>
Krzysztof

2023-01-10 12:09:02

by Marijn Suijten

[permalink] [raw]
Subject: Re: [PATCH v6 0/6] arm64: dts: qcom: sm6125: UFS and xiaomi-laurel-sprout support

On 2023-01-08 16:53:30, Lux Aliaga wrote:
> Introduce Universal Flash Storage support on SM6125 and add support for the Xiaomi Mi A3 based on the former platform. Uses the name xiaomi-laurel-sprout instead of the official codename (laurel_sprout)

Don't forget to wrap these lines properly, same for the changelog below.

> due to naming limitations in the kernel.

I doubt it's a limitation, more like a convention.

> Changes since v5:
> - Drop "non-removable" property from ufs_mem_hc for sm6125 platform
> - Drop "status" and "autorepeat" properties from gpio-keys node for xiaomi-laurel-sprout
> - Rename "key-vol-up" node to "key-volume-up" for xiaomi-laurel-sprout
> - Drop "gpio-key,wakeup" property from key-volume-up node for xiaomi-laurel-sprout

No, you /replaced/ this deprecated property with wakeup-source, which
has the same meaning.

> - Set "linux,input-type" and "wakeup-source" properties on key-volume-up node for xiaomi-laurel-sprout

No, you /removed/ linux,input-type because its value 1 for EV_KEY is
already the default.

> - Change "key_vol_up" node name to "vol-up-n-state" and its label to "vol_up_n" in PM6125 GPIO node for xiaomi-laurel-sprout
> - Use labels instead of node names for PM6125 ADC channels in xiaomi laurel-sprout
> - Set "regulator-allow-set-load" properties on l4, l5, l10, l11, l18 and l24 regulators on xiaomi-laurel-sprout
>
> v5: https://lore.kernel.org/linux-devicetree/[email protected]/
>
>
>

No need for excessive newlines here.

- Marijn

2023-01-13 18:35:02

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v6 3/6] phy: qcom-qmp: Add SM6125 UFS PHY support

On 08-01-23, 16:53, Lux Aliaga wrote:
> The SM6125 UFS PHY is compatible with the one from SM6115. Add a
> compatible for it and modify the config from SM6115 to make them
> compatible with the SC8280XP binding

Applied, thanks

--
~Vinod

2023-01-13 18:35:30

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v6 2/6] dt-bindings: phy: Add QMP UFS PHY compatible for SM6125

On 08-01-23, 16:53, Lux Aliaga wrote:
> Document the QMP UFS PHY compatible for SM6125.

Applied, thanks

--
~Vinod

2023-01-13 19:44:43

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v6 3/6] phy: qcom-qmp: Add SM6125 UFS PHY support

On Sun, 8 Jan 2023 at 21:54, Lux Aliaga <[email protected]> wrote:
>
> The SM6125 UFS PHY is compatible with the one from SM6115. Add a
> compatible for it and modify the config from SM6115 to make them
> compatible with the SC8280XP binding
>
> Signed-off-by: Lux Aliaga <[email protected]>
> Reviewed-by: Martin Botka <[email protected]>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> index 318eea35b972..f33c84578940 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> @@ -693,6 +693,8 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
> static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
> .lanes = 1,
>
> + .offsets = &qmp_ufs_offsets_v5,

Please don't randomly reuse generation-specific structures. This
structure is clearly related to v5, while the PHY is from the v2
generation.

> +
> .serdes_tbl = sm6115_ufsphy_serdes_tbl,
> .serdes_tbl_num = ARRAY_SIZE(sm6115_ufsphy_serdes_tbl),
> .tx_tbl = sm6115_ufsphy_tx_tbl,
> @@ -1172,6 +1174,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
> }, {
> .compatible = "qcom,sm6115-qmp-ufs-phy",
> .data = &sm6115_ufsphy_cfg,
> + }, {
> + .compatible = "qcom,sm6125-qmp-ufs-phy",
> + .data = &sm6115_ufsphy_cfg,
> }, {
> .compatible = "qcom,sm6350-qmp-ufs-phy",
> .data = &sdm845_ufsphy_cfg,
> --
> 2.39.0
>


--
With best wishes
Dmitry

2023-02-09 14:35:03

by Lux Aliaga

[permalink] [raw]
Subject: Re: [PATCH v6 3/6] phy: qcom-qmp: Add SM6125 UFS PHY support

On 13/01/2023 16:31, Dmitry Baryshkov wrote:

> On Sun, 8 Jan 2023 at 21:54, Lux Aliaga <[email protected]> wrote:
>> The SM6125 UFS PHY is compatible with the one from SM6115. Add a
>> compatible for it and modify the config from SM6115 to make them
>> compatible with the SC8280XP binding
>>
>> Signed-off-by: Lux Aliaga <[email protected]>
>> Reviewed-by: Martin Botka <[email protected]>
>> ---
>> drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
>> index 318eea35b972..f33c84578940 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
>> @@ -693,6 +693,8 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
>> static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
>> .lanes = 1,
>>
>> + .offsets = &qmp_ufs_offsets_v5,
> Please don't randomly reuse generation-specific structures. This
> structure is clearly related to v5, while the PHY is from the v2
> generation.

I'm a bit confused here. When referencing back to downstream the driver
used has the suffix "v3-660". Should I use that suffix to name these
offsets? Because I'm not too sure if this is from the v2 generation due
to how it's named there.

>> +
>> .serdes_tbl = sm6115_ufsphy_serdes_tbl,
>> .serdes_tbl_num = ARRAY_SIZE(sm6115_ufsphy_serdes_tbl),
>> .tx_tbl = sm6115_ufsphy_tx_tbl,
>> @@ -1172,6 +1174,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
>> }, {
>> .compatible = "qcom,sm6115-qmp-ufs-phy",
>> .data = &sm6115_ufsphy_cfg,
>> + }, {
>> + .compatible = "qcom,sm6125-qmp-ufs-phy",
>> + .data = &sm6115_ufsphy_cfg,
>> }, {
>> .compatible = "qcom,sm6350-qmp-ufs-phy",
>> .data = &sdm845_ufsphy_cfg,
>> --
>> 2.39.0
>>
>
--
Lux Aliaga
https://nixgoat.me/