devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-11 18:15 [PATCH v2 0/2] mmc: dw_mmc: fix DW MMC cores with 32-bit bus on 64-bit Linux systems Sergey Lisov
@ 2023-03-11 18:15 ` Sergey Lisov
  2023-03-12 10:18   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 10+ messages in thread
From: Sergey Lisov @ 2023-03-11 18:15 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

Some Samsung Exynos boards using the arm64 architecture have DW MMC
controllers configured for a 32-bit data bus but a 64-bit FIFO. On these
systems the 64-bit FIFO registers must be accessed in two 32-bit halves.
---
 .../devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
index 8dfad89c7..d025b38ca 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
@@ -57,6 +57,13 @@ properties:
       force fifo watermark setting accordingly.
     $ref: /schemas/types.yaml#/definitions/flag
 
+  fifo-access-32bit:
+    description:
+      Specifies that this device requires accesses to its 64-bit registers
+      to be done as pairs of 32-bit accesses, even on architectures where
+      readq is available.
+    $ref: /schemas/types.yaml#/definitions/flag
+
   dmas:
     maxItems: 1
 
-- 
2.38.3



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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-11 18:15 ` [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property Sergey Lisov
@ 2023-03-12 10:18   ` Krzysztof Kozlowski
  2023-03-12 10:42     ` Krzysztof Kozlowski
  2023-03-12 10:49     ` Sergey Lisov
  0 siblings, 2 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 10:18 UTC (permalink / raw)
  To: Sergey Lisov, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

On 11/03/2023 19:15, Sergey Lisov wrote:
> Some Samsung Exynos boards using the arm64 architecture have DW MMC
> controllers configured for a 32-bit data bus but a 64-bit FIFO. On these
> systems the 64-bit FIFO registers must be accessed in two 32-bit halves.
> ---
>  .../devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml   | 7 +++++++
>  1 file changed, 7 insertions(+)

Missing changelog (I did not get cover letter, so no changelog there
either).

> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
> index 8dfad89c7..d025b38ca 100644
> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
> @@ -57,6 +57,13 @@ properties:
>        force fifo watermark setting accordingly.
>      $ref: /schemas/types.yaml#/definitions/flag
>  
> +  fifo-access-32bit:
> +    description:
> +      Specifies that this device requires accesses to its 64-bit registers
> +      to be done as pairs of 32-bit accesses, even on architectures where
> +      readq is available.
> +    $ref: /schemas/types.yaml#/definitions/flag

Anyway, I said last time this looks compatible-specific, so I don't
think we need another property.

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-12 10:18   ` Krzysztof Kozlowski
@ 2023-03-12 10:42     ` Krzysztof Kozlowski
  2023-03-12 10:49     ` Sergey Lisov
  1 sibling, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 10:42 UTC (permalink / raw)
  To: Sergey Lisov, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

On 12/03/2023 11:18, Krzysztof Kozlowski wrote:
> On 11/03/2023 19:15, Sergey Lisov wrote:
>> Some Samsung Exynos boards using the arm64 architecture have DW MMC
>> controllers configured for a 32-bit data bus but a 64-bit FIFO. On these
>> systems the 64-bit FIFO registers must be accessed in two 32-bit halves.
>> ---
>>  .../devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml   | 7 +++++++
>>  1 file changed, 7 insertions(+)
> 
> Missing changelog (I did not get cover letter, so no changelog there
> either).

Correction: I see the cover letter, but anyway without changelog :)


Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-12 10:18   ` Krzysztof Kozlowski
  2023-03-12 10:42     ` Krzysztof Kozlowski
@ 2023-03-12 10:49     ` Sergey Lisov
  1 sibling, 0 replies; 10+ messages in thread
From: Sergey Lisov @ 2023-03-12 10:49 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

> 
> Missing changelog (I did not get cover letter, so no changelog there
> either).
> 

Got it, will fix in the next revision.

> 
> Anyway, I said last time this looks compatible-specific, so I don't
> think we need another property.
> 
> Best regards,
> Krzysztof

I agree, but I'm afraid of introducing regressions by enabling this
workaround on systems that don't actually need it.


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
       [not found] <640dae27.2e0a0220.d5632.151c@mx.google.com>
@ 2023-03-12 10:53 ` Krzysztof Kozlowski
  2023-03-12 11:00   ` Sergey Lisov
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 10:53 UTC (permalink / raw)
  To: Sergey Lisov, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

On 12/03/2023 11:49, Sergey Lisov wrote:
>>
>> Anyway, I said last time this looks compatible-specific, so I don't
>> think we need another property.
>>
>> Best regards,
>> Krzysztof
> 
> I agree, but I'm afraid of introducing regressions by enabling this
> workaround on systems that don't actually need it.

I don't understand why would you enable it for systems which do not need it?

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-12 10:53 ` Krzysztof Kozlowski
@ 2023-03-12 11:00   ` Sergey Lisov
  0 siblings, 0 replies; 10+ messages in thread
From: Sergey Lisov @ 2023-03-12 11:00 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

> On 12/03/2023 11:49, Sergey Lisov wrote:
>>>
>>> Anyway, I said last time this looks compatible-specific, so I don't
>>> think we need another property.
>>>
>>> Best regards,
>>> Krzysztof
>> 
>> I agree, but I'm afraid of introducing regressions by enabling this
>> workaround on systems that don't actually need it.
> 
> I don't understand why would you enable it for systems which do not need it?

OK, then how do I find out which boards have the bug? My only idea is
"search for samsung,exynos7-dw-mshc through all devicetrees, find vendor
kernels for each of those boards, and check if they have the workaround".
Is it really that better than enabling it selectively only for
known-affected boards?


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
       [not found] <640db0e7.c20a0220.babe.16cb@mx.google.com>
@ 2023-03-12 11:13 ` Krzysztof Kozlowski
  2023-03-12 11:26   ` Sergey Lisov
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 11:13 UTC (permalink / raw)
  To: Sergey Lisov, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

On 12/03/2023 12:00, Sergey Lisov wrote:
>> On 12/03/2023 11:49, Sergey Lisov wrote:
>>>>
>>>> Anyway, I said last time this looks compatible-specific, so I don't
>>>> think we need another property.
>>>>
>>>> Best regards,
>>>> Krzysztof
>>>
>>> I agree, but I'm afraid of introducing regressions by enabling this
>>> workaround on systems that don't actually need it.
>>
>> I don't understand why would you enable it for systems which do not need it?
> 
> OK, then how do I find out which boards have the bug? My only idea is
> "search for samsung,exynos7-dw-mshc through all devicetrees, find vendor
> kernels for each of those boards, and check if they have the workaround".
> Is it really that better than enabling it selectively only for
> known-affected boards?

There is no way this is board specific. This is SoC specific. I
mentioned it last time.

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-12 11:13 ` Krzysztof Kozlowski
@ 2023-03-12 11:26   ` Sergey Lisov
  0 siblings, 0 replies; 10+ messages in thread
From: Sergey Lisov @ 2023-03-12 11:26 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

> There is no way this is board specific. This is SoC specific. I
> mentioned it last time.

The same compatible string ("samsung,exynos7-dw-mshc{,-smu}") is used by
several devices on different Exynos SoCs. And I was only able to find
a vendor kernel fork for one of them (exynos7885-jackpotlte, it has the
workaround, but it depends on a configuration option and I don't have the
config file for that device).


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
       [not found] <640db6ef.2e0a0220.9d4ba.1500@mx.google.com>
@ 2023-03-12 11:34 ` Krzysztof Kozlowski
  2023-03-12 11:48   ` Sergey Lisov
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 11:34 UTC (permalink / raw)
  To: Sergey Lisov, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

On 12/03/2023 12:26, Sergey Lisov wrote:
>> There is no way this is board specific. This is SoC specific. I
>> mentioned it last time.
> 
> The same compatible string ("samsung,exynos7-dw-mshc{,-smu}") is used by
> several devices on different Exynos SoCs.

... and should not be. It should come with a specific compatible
followed by this fallback. The specific compatible then will define
32-bit access.

> And I was only able to find
> a vendor kernel fork for one of them (exynos7885-jackpotlte, it has the
> workaround, but it depends on a configuration option and I don't have the
> config file for that device).

Vendor kernel have configs, I think that's requirement of GPL.

See jackpotlte_00_defconfig in my
samsung/galaxy-a8-2018-jackpotlte-sm-a530f-exynos7885-dump branch of
vendor-backup repo.

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property
  2023-03-12 11:34 ` [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property Krzysztof Kozlowski
@ 2023-03-12 11:48   ` Sergey Lisov
  0 siblings, 0 replies; 10+ messages in thread
From: Sergey Lisov @ 2023-03-12 11:48 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel

> ... and should not be. It should come with a specific compatible
> followed by this fallback. The specific compatible then will define
> 32-bit access.

OK, I'll then make a new revision with this baked into a compatible
string.


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

end of thread, other threads:[~2023-03-12 11:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <640db6ef.2e0a0220.9d4ba.1500@mx.google.com>
2023-03-12 11:34 ` [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property Krzysztof Kozlowski
2023-03-12 11:48   ` Sergey Lisov
     [not found] <640db0e7.c20a0220.babe.16cb@mx.google.com>
2023-03-12 11:13 ` Krzysztof Kozlowski
2023-03-12 11:26   ` Sergey Lisov
     [not found] <640dae27.2e0a0220.d5632.151c@mx.google.com>
2023-03-12 10:53 ` Krzysztof Kozlowski
2023-03-12 11:00   ` Sergey Lisov
2023-03-11 18:15 [PATCH v2 0/2] mmc: dw_mmc: fix DW MMC cores with 32-bit bus on 64-bit Linux systems Sergey Lisov
2023-03-11 18:15 ` [PATCH v2 1/2] dt-bindings: synopsys-dw-mshc-common: add "fifo-access-32bit" property Sergey Lisov
2023-03-12 10:18   ` Krzysztof Kozlowski
2023-03-12 10:42     ` Krzysztof Kozlowski
2023-03-12 10:49     ` Sergey Lisov

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