Skip to contentSkip to conversation

mmc: sunxi: Handle the 'New Timings'

PATCH Superseded Mark Rutland 4 participants 6 messages Aug 1, 2016 – Aug 23, 2016 1 message not in the archive MMC, SD and SDIO

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 mmc: sunxi: Handle the 'New Timings'

Quoted 3 lines · Jean-Francois Moine

Some MMC devices as mmc2 in the A83T or mmc1 and mmc2 in the H3 have a 'New Timings' mode.
Set this capacity in the DT and use it when possible.

What exactly is this "New Timings" mode?

Why do we wnat to set it? Improved performance, power?

Is it *necessary* to use it?

Quoted 13 lines

---
I don't know if this mode works or is needed at 25MHz.

---
 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt |  1 +
 drivers/mmc/host/sunxi-mmc.c                        | 21 +++++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +0 -0
index 4bf41d8..a541bf4 100644

Documentation/devicetree/bindings/mmc/sunxi-mmc.txt Optional properties: · line 22

Quoted 4 lines
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +1 -0
@@ -19,6 +19,7 @@ Optional properties:
  - reset-names : must contain "ahb"
  - for cd, bus-width and additional generic mmc parameters
    please refer to mmc.txt within this directory
+ - allwinner,new-timings: the controller may accept the "New Timings" mode

It's not at all clear to me what this means. This needs a better description.

Which devices have this? Can we determine this based on compatible string?

Mark.

#2 lore raw

PATCH v2 1/1 mmc: sunxi: Handle the 'New Timings'

Quoted 10 lines · On Mon, 1 Aug 2016 16:30:19 +0100 Mark Rutland <[email protected]> wrote:
Quoted 3 lines · Jean-Francois Moine

Some MMC devices as mmc2 in the A83T or mmc1 and mmc2 in the H3 have a 'New Timings' mode.
Set this capacity in the DT and use it when possible.

What exactly is this "New Timings" mode?

Why do we wnat to set it? Improved performance, power?

Is it *necessary* to use it?

This mode is described at least in the Allwinner's documentation of the A83T, A64 and H3.

Quoted 1 line

From my tests, it is required to access the eMMC of the Banana Pi M3

(mmc2).

Quoted 21 lines
Quoted 13 lines

---
I don't know if this mode works or is needed at 25MHz.

---
 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt |  1 +
 drivers/mmc/host/sunxi-mmc.c                        | 21 +++++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +0 -0
index 4bf41d8..a541bf4 100644

Documentation/devicetree/bindings/mmc/sunxi-mmc.txt Optional properties: · line 22

Quoted 4 lines
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +1 -0
@@ -19,6 +19,7 @@ Optional properties:
  - reset-names : must contain "ahb"
  - for cd, bus-width and additional generic mmc parameters
    please refer to mmc.txt within this directory
+ - allwinner,new-timings: the controller may accept the "New Timings" mode

It's not at all clear to me what this means. This needs a better description.

Quoted 2 lines

Which devices have this? Can we determine this based on compatible string?

No, only some devices of the SoCs have this capability: the mmc2 of the A83T, the smhc0 and smhc1 of the A64, and the mmc1 and mmc2 of the H3.

Signature · 2 lines
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#3 lore raw

PATCH v2 1/1 mmc: sunxi: Handle the 'New Timings'

Quoted 8 lines · Jean-Francois Moine
Quoted 5 lines · On Mon, 1 Aug 2016 16:30:19 +0100 Mark Rutland <[email protected]> wrote:
Quoted 3 lines · Jean-Francois Moine

Some MMC devices as mmc2 in the A83T or mmc1 and mmc2 in the H3 have a 'New Timings' mode.
Set this capacity in the DT and use it when possible.

Quoted 8 lines
Quoted 5 lines

What exactly is this "New Timings" mode?

Why do we wnat to set it? Improved performance, power?

Is it *necessary* to use it?

This mode is described at least in the Allwinner's documentation of the A83T, A64 and H3.

Is this publicly available? If not, can the gist of it be described?

Quoted 2 lines

From my tests, it is required to access the eMMC of the Banana Pi M3 (mmc2).

Ok.

Quoted 21 lines
Quoted 21 lines
Quoted 13 lines

---
I don't know if this mode works or is needed at 25MHz.

---
 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt |  1 +
 drivers/mmc/host/sunxi-mmc.c                        | 21 +++++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +0 -0
index 4bf41d8..a541bf4 100644

Documentation/devicetree/bindings/mmc/sunxi-mmc.txt Optional properties: · line 22

Quoted 4 lines
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +1 -0
@@ -19,6 +19,7 @@ Optional properties:
  - reset-names : must contain "ahb"
  - for cd, bus-width and additional generic mmc parameters
    please refer to mmc.txt within this directory
+ - allwinner,new-timings: the controller may accept the "New Timings" mode

It's not at all clear to me what this means. This needs a better description.

Quoted 5 lines
Quoted 2 lines

Which devices have this? Can we determine this based on compatible string?

No, only some devices of the SoCs have this capability: the mmc2 of the A83T, the smhc0 and smhc1 of the A64, and the mmc1 and mmc2 of the H3.

Ok.

Thanks,
Mark.

#4 lore raw

PATCH v2 1/1 mmc: sunxi: Handle the 'New Timings'

Quoted 4 lines · On Tue, 2 Aug 2016 12:20:48 +0100 Mark Rutland <[email protected]> wrote:
Quoted 2 lines

This mode is described at least in the Allwinner's documentation of the A83T, A64 and H3.

Is this publicly available? If not, can the gist of it be described?

The links are in the kernel Documentation/arm/sunxi/README

Signature · 2 lines
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#5 lore raw

PATCH v2 1/1 mmc: sunxi: Handle the 'New Timings'

02.08.2016, 19:48, "Jean-Francois Moine" <[email protected]>:

Quoted 9 lines
Quoted 4 lines · On Tue, 2 Aug 2016 12:20:48 +0100 Mark Rutland <[email protected]> wrote:

?> This mode is described at least in the Allwinner's documentation of the ?> A83T, A64 and H3.

?Is this publicly available? If not, can the gist of it be described?

The links are in the kernel Documentation/arm/sunxi/README

All the SoCs you mentioned here have no data sheet link in the file. I may submit a patch to fix this.

Quoted 9 lines

--
Ken ar c'henta? | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#6 lore raw

PATCH v2 1/1 mmc: sunxi: Handle the 'New Timings'

In reply to Mark Rutland

Hi Mark,

Quoted 8 lines · Mark Rutland
Quoted 3 lines · Jean-Francois Moine

Some MMC devices as mmc2 in the A83T or mmc1 and mmc2 in the H3 have a 'New Timings' mode.
Set this capacity in the DT and use it when possible.

What exactly is this "New Timings" mode?

Why do we wnat to set it? Improved performance, power?

Allwinner calls it under a rather generic name: "new mode" (which is of course the opposite of the old mode).

In the old mode, the rate and phase controls were all handled by the functional clock feeding the MMC controller.

In the new mode, the MMC controller itself is able to do some sort of auto-calibration to adjust the rate and phase of the clock output on the MMC bus.

Quoted 1 line

Is it *necessary* to use it?

Yes. Allwinner recommends to use it to enhance the compatibility with MMC cards, and they say that it also improves the performances, even though no one really checked. The main point for us at the moment is that some eMMCs at least require the new mode to operate properly.

Quoted 21 lines
Quoted 13 lines

---
I don't know if this mode works or is needed at 25MHz.

---
 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt |  1 +
 drivers/mmc/host/sunxi-mmc.c                        | 21 +++++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +0 -0
index 4bf41d8..a541bf4 100644

Documentation/devicetree/bindings/mmc/sunxi-mmc.txt Optional properties: · line 22

Quoted 4 lines
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +1 -0
@@ -19,6 +19,7 @@ Optional properties:
  - reset-names : must contain "ahb"
  - for cd, bus-width and additional generic mmc parameters
    please refer to mmc.txt within this directory
+ - allwinner,new-timings: the controller may accept the "New Timings" mode

It's not at all clear to me what this means. This needs a better description.

Quoted 2 lines

Which devices have this? Can we determine this based on compatible string?

On some SoCs, yes, on some, no.

The older SoCs (everything up to A80) only have the old mode, so the compatible works there. The newer SoCs (H3, A64) support the new mode on all their MMC controllers, so the compatible works too. However, in the SoC Jean-Francois is currently working on, the A83T, the new mode is only found in one (over three) controller.

So I really think we need a property to express this, at least in the A83T case.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160823/43972904/attachment.sig>