2022-04-18 15:44:23

by Aswath Govindraju

[permalink] [raw]
Subject: [PATCH 0/2] MMC: Add quirk to set the TESTCD bit

The following series of patches add support for setting TESTCD bit
when SDCD line is connected to the controller, in the sdhci_am654.c
driver.

Aswath Govindraju (1):
dt-bindings: mmc: sdhci-am654: Add flag to force setting to TESTCD bit

Vignesh Raghavendra (1):
drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit

.../devicetree/bindings/mmc/sdhci-am654.yaml | 7 ++++++
drivers/mmc/host/sdhci_am654.c | 23 ++++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)

--
2.17.1


2022-04-19 00:00:57

by Aswath Govindraju

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: mmc: sdhci-am654: Add flag to force setting to TESTCD bit

The ARASAN MMC controller on Keystone 3 class of devices needs the SDCD
line to be connected for proper functioning. Similar to the issue pointed
out in sdhci-of-arasan.c driver, commit 3794c542641f ("mmc:
sdhci-of-arasan: Set controller to test mode when no CD bit").

In cases where SDCD line is not connected, driver support has been added to
force the controller into test mode and set the TESTCD bit. In order to
implement this quirk the driver uses "ti,fails-without-test-cd" flag from
the device tree node. Therefore, update the bindings to document the above.

Signed-off-by: Aswath Govindraju <[email protected]>
---
Documentation/devicetree/bindings/mmc/sdhci-am654.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml b/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
index 0566493c4def..0ab07759b472 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
+++ b/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
@@ -186,6 +186,13 @@ properties:
description: Clock Delay Buffer Select
$ref: "/schemas/types.yaml#/definitions/uint32"

+ ti,fails-without-test-cd:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ When present, indicates that the CD line is not connected
+ and the controller is required to be forced into Test mode
+ to set the TESTCD bit.
+
required:
- compatible
- reg
--
2.17.1

2022-04-22 21:08:31

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: mmc: sdhci-am654: Add flag to force setting to TESTCD bit

On Mon, 18 Apr 2022 at 12:21, Aswath Govindraju <[email protected]> wrote:
>
> The ARASAN MMC controller on Keystone 3 class of devices needs the SDCD
> line to be connected for proper functioning. Similar to the issue pointed
> out in sdhci-of-arasan.c driver, commit 3794c542641f ("mmc:
> sdhci-of-arasan: Set controller to test mode when no CD bit").
>
> In cases where SDCD line is not connected, driver support has been added to
> force the controller into test mode and set the TESTCD bit. In order to
> implement this quirk the driver uses "ti,fails-without-test-cd" flag from
> the device tree node. Therefore, update the bindings to document the above.

Would you mind rephrasing this a bit. DT bindings is about describing
the HW, not about what the software should do.

Otherwise, this looks good to me.

Kind regards
Uffe

>
> Signed-off-by: Aswath Govindraju <[email protected]>
> ---
> Documentation/devicetree/bindings/mmc/sdhci-am654.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml b/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
> index 0566493c4def..0ab07759b472 100644
> --- a/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
> +++ b/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
> @@ -186,6 +186,13 @@ properties:
> description: Clock Delay Buffer Select
> $ref: "/schemas/types.yaml#/definitions/uint32"
>
> + ti,fails-without-test-cd:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + When present, indicates that the CD line is not connected
> + and the controller is required to be forced into Test mode
> + to set the TESTCD bit.
> +
> required:
> - compatible
> - reg
> --
> 2.17.1
>

2022-04-25 14:47:59

by Aswath Govindraju

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: mmc: sdhci-am654: Add flag to force setting to TESTCD bit

Hi Uffe,

On 21/04/22 17:40, Ulf Hansson wrote:
> On Mon, 18 Apr 2022 at 12:21, Aswath Govindraju <[email protected]> wrote:
>>
>> The ARASAN MMC controller on Keystone 3 class of devices needs the SDCD
>> line to be connected for proper functioning. Similar to the issue pointed
>> out in sdhci-of-arasan.c driver, commit 3794c542641f ("mmc:
>> sdhci-of-arasan: Set controller to test mode when no CD bit").
>>
>> In cases where SDCD line is not connected, driver support has been added to
>> force the controller into test mode and set the TESTCD bit. In order to
>> implement this quirk the driver uses "ti,fails-without-test-cd" flag from
>> the device tree node. Therefore, update the bindings to document the above.
>
> Would you mind rephrasing this a bit. DT bindings is about describing
> the HW, not about what the software should do.
>

Sure, will rephrase it in the respin to remove the aspects that indicate
the sw support added.

> Otherwise, this looks good to me.
>

Thank you for the review.

Regards,
Aswath

> Kind regards
> Uffe
>
>>
>> Signed-off-by: Aswath Govindraju <[email protected]>
>> ---
>> Documentation/devicetree/bindings/mmc/sdhci-am654.yaml | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml b/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
>> index 0566493c4def..0ab07759b472 100644
>> --- a/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
>> +++ b/Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
>> @@ -186,6 +186,13 @@ properties:
>> description: Clock Delay Buffer Select
>> $ref: "/schemas/types.yaml#/definitions/uint32"
>>
>> + ti,fails-without-test-cd:
>> + $ref: /schemas/types.yaml#/definitions/flag
>> + description:
>> + When present, indicates that the CD line is not connected
>> + and the controller is required to be forced into Test mode
>> + to set the TESTCD bit.
>> +
>> required:
>> - compatible
>> - reg
>> --
>> 2.17.1
>>