2022-10-10 01:19:03

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 6.0 39/44] mmc: sdhci-msm: add compatible string check for sdm670

From: Richard Acayan <[email protected]>

[ Upstream commit 4de95950d970c71a9e82a24573bb7a44fd95baa1 ]

The Snapdragon 670 has the same quirk as Snapdragon 845 (needing to
restore the dll config). Add a compatible string check to detect the need
for this.

Signed-off-by: Richard Acayan <[email protected]>
Reviewed-by: Bhupesh Sharma <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/mmc/host/sdhci-msm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index dc2991422a87..3a091a387ecb 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2441,6 +2441,7 @@ static const struct of_device_id sdhci_msm_dt_match[] = {
*/
{.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
{.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
+ {.compatible = "qcom,sdm670-sdhci", .data = &sdm845_sdhci_var},
{.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
{.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
{},
--
2.35.1


2022-10-11 00:00:20

by Richard Acayan

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 6.0 39/44] mmc: sdhci-msm: add compatible string check for sdm670

> From: Richard Acayan <[email protected]>
>
> [ Upstream commit 4de95950d970c71a9e82a24573bb7a44fd95baa1 ]
>
> The Snapdragon 670 has the same quirk as Snapdragon 845 (needing to
> restore the dll config). Add a compatible string check to detect the need
> for this.
>
> Signed-off-by: Richard Acayan <[email protected]>
> Reviewed-by: Bhupesh Sharma <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Ulf Hansson <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>
> ---
> drivers/mmc/host/sdhci-msm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index dc2991422a87..3a091a387ecb 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -2441,6 +2441,7 @@ static const struct of_device_id sdhci_msm_dt_match[] = {
> */
> {.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
> {.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
> + {.compatible = "qcom,sdm670-sdhci", .data = &sdm845_sdhci_var},

Supporting device trees which are invalid under 6.0 schema? It's not a bug fix,
it's a feature.

Documentation/devicetree/bindings/mmc/sdhci-msm.yaml:17-49, at tag v6.0:

properties:
compatible:
oneOf:
- enum:
- qcom,sdhci-msm-v4
deprecated: true
- items:
- enum:
- qcom,apq8084-sdhci
- qcom,msm8226-sdhci
- qcom,msm8953-sdhci
- qcom,msm8974-sdhci
- qcom,msm8916-sdhci
- qcom,msm8992-sdhci
- qcom,msm8994-sdhci
- qcom,msm8996-sdhci
- qcom,msm8998-sdhci
- const: qcom,sdhci-msm-v4 # for sdcc versions less than 5.0
- items:
- enum:
- qcom,qcs404-sdhci
- qcom,sc7180-sdhci
- qcom,sc7280-sdhci
- qcom,sdm630-sdhci
- qcom,sdm845-sdhci
- qcom,sdx55-sdhci
- qcom,sdx65-sdhci
- qcom,sm6125-sdhci
- qcom,sm6350-sdhci
- qcom,sm8150-sdhci
- qcom,sm8250-sdhci
- qcom,sm8450-sdhci
- const: qcom,sdhci-msm-v5 # for sdcc version 5.0

I'm new to this, so I apologize if I don't understand stable kernel development.

> {.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
> {.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
> {},
> --
> 2.35.1

2022-10-13 18:53:44

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 6.0 39/44] mmc: sdhci-msm: add compatible string check for sdm670

On Mon, Oct 10, 2022 at 07:43:53PM -0400, Richard Acayan wrote:
>> From: Richard Acayan <[email protected]>
>>
>> [ Upstream commit 4de95950d970c71a9e82a24573bb7a44fd95baa1 ]
>>
>> The Snapdragon 670 has the same quirk as Snapdragon 845 (needing to
>> restore the dll config). Add a compatible string check to detect the need
>> for this.
>>
>> Signed-off-by: Richard Acayan <[email protected]>
>> Reviewed-by: Bhupesh Sharma <[email protected]>
>> Acked-by: Krzysztof Kozlowski <[email protected]>
>> Link: https://lore.kernel.org/r/[email protected]
>> Signed-off-by: Ulf Hansson <[email protected]>
>> Signed-off-by: Sasha Levin <[email protected]>
>> ---
>> drivers/mmc/host/sdhci-msm.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
>> index dc2991422a87..3a091a387ecb 100644
>> --- a/drivers/mmc/host/sdhci-msm.c
>> +++ b/drivers/mmc/host/sdhci-msm.c
>> @@ -2441,6 +2441,7 @@ static const struct of_device_id sdhci_msm_dt_match[] = {
>> */
>> {.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
>> {.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
>> + {.compatible = "qcom,sdm670-sdhci", .data = &sdm845_sdhci_var},
>
>Supporting device trees which are invalid under 6.0 schema? It's not a bug fix,
>it's a feature.

Does this not enable hardware to work properly? We take quirks/device
enablement into stable tree as well.

--
Thanks,
Sasha

2022-10-14 01:06:38

by Richard Acayan

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 6.0 39/44] mmc: sdhci-msm: add compatible string check for sdm670

> On Mon, Oct 10, 2022 at 07:43:53PM -0400, Richard Acayan wrote:
>>> From: Richard Acayan <[email protected]>
>>>
>>> [ Upstream commit 4de95950d970c71a9e82a24573bb7a44fd95baa1 ]
>>>
>>> The Snapdragon 670 has the same quirk as Snapdragon 845 (needing to
>>> restore the dll config). Add a compatible string check to detect the need
>>> for this.
>>>
>>> Signed-off-by: Richard Acayan <[email protected]>
>>> Reviewed-by: Bhupesh Sharma <[email protected]>
>>> Acked-by: Krzysztof Kozlowski <[email protected]>
>>> Link: https://lore.kernel.org/r/[email protected]
>>> Signed-off-by: Ulf Hansson <[email protected]>
>>> Signed-off-by: Sasha Levin <[email protected]>
>>> ---
>>> drivers/mmc/host/sdhci-msm.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
>>> index dc2991422a87..3a091a387ecb 100644
>>> --- a/drivers/mmc/host/sdhci-msm.c
>>> +++ b/drivers/mmc/host/sdhci-msm.c
>>> @@ -2441,6 +2441,7 @@ static const struct of_device_id sdhci_msm_dt_match[] = {
>>> */
>>> {.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
>>> {.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
>>> + {.compatible = "qcom,sdm670-sdhci", .data = &sdm845_sdhci_var},
>>
>>Supporting device trees which are invalid under 6.0 schema? It's not a bug fix,
>>it's a feature.
>
> Does this not enable hardware to work properly? We take quirks/device
> enablement into stable tree as well.

It does, given that there are no device tree dependency issues. Thanks for the
clarification.