ARM: ux500: Update configurations for SD/SDIO/(e)MMC
Subsystems (3)
cover ARM: ux500: Update configurations for SD/SDIO/(e)MMC
From: Ulf Hansson <[email protected]>
This patchset includes especially enablement for UHS-I SD cards, but also some cleanups and additional enabling of SD/SDIO/(e)MMC features.
These changes shall also be adapted to the corresponding DT files, but that is left as a separate task and outside this patchset.
Ulf Hansson (6):
ARM: ux500: Enable 100MHz for SD/SDIO/MMC devices
ARM: ux500: Don't set plf ocr mask for SD/MMC device
ARM: ux500: Enable support for RPMB and Reliable Write for eMMC
ARM: ux500: Enable support for discard for MMC/SD
ARM: ux500: Set eMMC and WLAN card slot as non-removable
ARM: ux500: Enable support for UHS-I SD-cards
arch/arm/mach-ux500/board-mop500-sdi.c | 34 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.10
PATCH 1/6 ARM: ux500: Enable 100MHz for SD/SDIO/MMC devices
From: Ulf Hansson <[email protected]>
We are able to cope with an SDMMC clock of 100MHz so let's make use of the full frequency instead of the half.
--- arch/arm/mach-ux500/board-mop500-sdi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-ux500/board-mop500-sdi.c +4 -4
@@ -53,7 +53,7 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {struct mmci_platform_data mop500_sdi0_data = { .ocr_mask =MMC_VDD_29_30 , - .f_max =50000000 , + .f_max =100000000 , .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_SD_HIGHSPEED |MMC_CAP_MMC_HIGHSPEED ,
@@ -106,7 +106,7 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = {struct mmci_platform_data mop500_sdi1_data = { .ocr_mask =MMC_VDD_29_30 , - .f_max =50000000 , + .f_max =100000000 , .capabilities =MMC_CAP_4_BIT_DATA , .gpio_cd =-1 , .gpio_wp =-1 ,
@@ -143,7 +143,7 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {struct mmci_platform_data mop500_sdi2_data = { .ocr_mask =MMC_VDD_165_195 , - .f_max =50000000 , + .f_max =100000000 , .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA |MMC_CAP_MMC_HIGHSPEED , .gpio_cd =-1 ,
@@ -181,7 +181,7 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {struct mmci_platform_data mop500_sdi4_data = { .ocr_mask =MMC_VDD_29_30 , - .f_max =50000000 , + .f_max =100000000 , .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA |MMC_CAP_MMC_HIGHSPEED , .gpio_cd =-1 ,
Signature · 1 line
1.7.10
PATCH 1/6 ARM: ux500: Enable 100MHz for SD/SDIO/MMC devices
Quoted 6 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
We are able to cope with an SDMMC clock of 100MHz so let's make use of the full frequency instead of the half.
Signed-off-by Ulf Hansson <[email protected]>
Patch applied to my ux500-core changes tree.
Yours,
Linus Walleij
PATCH 2/6 ARM: ux500: Don't set plf ocr mask for SD/MMC device
In reply to Ulf HanssonFrom: Ulf Hansson <[email protected]>
The mmci host driver overrides platform ocr mask when a vmmc regulator can be used. This is the case for sdi0(SD-card) and for sdi4(eMMC). Thus it is pointless of specifing these mask and why we do remove them.
--- arch/arm/mach-ux500/board-mop500-sdi.c | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-ux500/board-mop500-sdi.c +0 -2
@@ -52,7 +52,6 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {#endif struct mmci_platform_data mop500_sdi0_data = { - .ocr_mask =MMC_VDD_29_30 , .f_max =100000000 , .capabilities =MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
@@ -180,7 +179,6 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {#endif struct mmci_platform_data mop500_sdi4_data = { - .ocr_mask =MMC_VDD_29_30 , .f_max =100000000 , .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA |MMC_CAP_MMC_HIGHSPEED ,
Signature · 1 line
1.7.10
PATCH 2/6 ARM: ux500: Don't set plf ocr mask for SD/MMC device
Quoted 7 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
The mmci host driver overrides platform ocr mask when a vmmc regulator can be used. This is the case for sdi0(SD-card) and for sdi4(eMMC). Thus it is pointless of specifing these mask and why we do remove them.
Signed-off-by Ulf Hansson <[email protected]>
This rids some boot noise as well, thanks!
Patch applied for ux500-core.
Yours,
Linus Walleij
PATCH 3/6 ARM: ux500: Enable support for RPMB and Reliable Write for eMMC
In reply to Ulf HanssonFrom: Ulf Hansson <[email protected]>
By adding MMC_CAP_CMD23 for the eMMC devices, we can support RPMB and Reliable Write. Additionally it will mean CMD12 will not be sent to end a successful data transfer.
--- arch/arm/mach-ux500/board-mop500-sdi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm/mach-ux500/board-mop500-sdi.c +8 -4
@@ -143,8 +143,10 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {struct mmci_platform_data mop500_sdi2_data = { .ocr_mask =MMC_VDD_165_195 , .f_max =100000000 , - .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA | -MMC_CAP_MMC_HIGHSPEED , + .capabilities =MMC_CAP_4_BIT_DATA | +MMC_CAP_8_BIT_DATA | +MMC_CAP_MMC_HIGHSPEED | +MMC_CAP_CMD23 , .gpio_cd =-1 , .gpio_wp =-1 , #ifdef CONFIG_STE_DMA40
@@ -180,8 +182,10 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {struct mmci_platform_data mop500_sdi4_data = { .f_max =100000000 , - .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA | -MMC_CAP_MMC_HIGHSPEED , + .capabilities =MMC_CAP_4_BIT_DATA | +MMC_CAP_8_BIT_DATA | +MMC_CAP_MMC_HIGHSPEED | +MMC_CAP_CMD23 , .gpio_cd =-1 , .gpio_wp =-1 , #ifdef CONFIG_STE_DMA40
Signature · 1 line
1.7.10
PATCH 3/6 ARM: ux500: Enable support for RPMB and Reliable Write for eMMC
Quoted 7 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
By adding
MMC_CAP_CMD23for the eMMC devices, we can support RPMB and Reliable Write. Additionally it will mean CMD12 will not be sent to end a successful data transfer.Signed-off-by Ulf Hansson <[email protected]>
Patch applied to ux500-core, thanks,
but Houston, we have a problem:
I wanted to enable this also for the device tree boot path. But currently there are no bindings to state in the DT boot that CMD23 is supported.
Could you create another patch that:
- Add bindings to Documentation/devicetree/bindings/mmc/mmc.txt for indicating that a host controller supports CMD23
- Patch the ux500 DTS files to enable it.
- Write a patch to mmci.c to augment mmci_dt_populate_generic_pdata() to read the binding and augment the caps from the device tree.
There is also a complicated refactoring that need to happen any of these days:
- Augment the MMC core and all drivers using DT boots to parse any standard caps from the device tree insteaf of putting code like mmci_dt_populate_generic_pdata() into every driver.
Yours,
Linus Walleij
PATCH 3/6 ARM: ux500: Enable support for RPMB and Reliable Write for eMMC
Quoted 8 lines · Linus Walleij
Quoted 6 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
By adding
MMC_CAP_CMD23for the eMMC devices, we can support RPMB and Reliable Write. Additionally it will mean CMD12 will not be sent to end a successful data transfer.
Quoted 8 lines
Quoted 1 line
Signed-off-by Ulf Hansson <[email protected]>Patch applied to ux500-core, thanks,
but Houston, we have a problem:I wanted to enable this also for the device tree boot path. But currently there are no bindings to state in the DT boot that CMD23 is supported.
I should have realized that you were digging into this and should have added such information in the commit msg/patch info. Sorry for that. Anyway, I guess you see why I wanted to totally split the DT from non-DT patches. :-)
Quoted 10 lines
Could you create another patch that:
- Add bindings to
Documentation/devicetree/bindings/mmc/mmc.txtfor indicating that a host controller supports CMD23
- Patch the ux500 DTS files to enable it.
- Write a patch tommci.cto augmentmmci_dt_populate_generic_pdata()to read the binding and augment the caps from the device tree.
Quoted 7 lines
There is also a complicated refactoring that need to happen any of these days:
- Augment the MMC core and all drivers using DT boots to parse any standard caps from the device tree insteaf of putting code like
mmci_dt_populate_generic_pdata()into every driver.
Some parts of this is already done, the mmc common DT parse function is called "mmc_of_parse". As of today it does not support CMD23 cap though.
mmci should switch to use this function and drop the mmci specific dt function.
Kind regards
Ulf Hansson
Quoted 3 lines
Yours,
Linus Walleij
PATCH 4/6 ARM: ux500: Enable support for discard for MMC/SD
In reply to Ulf HanssonFrom: Ulf Hansson <[email protected]>
By enabling MMC_CAP_ERASE for the SD/MMC devices the mmc block layer will now act on DISCARD requests.
--- arch/arm/mach-ux500/board-mop500-sdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-ux500/board-mop500-sdi.c +4 -1
@@ -55,7 +55,8 @@ struct mmci_platform_data mop500_sdi0_data = { .f_max = 100000000, .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_SD_HIGHSPEED | - MMC_CAP_MMC_HIGHSPEED, +MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_ERASE, .gpio_wp = -1, .sigdir =MCI_ST_FBCLKEN | MCI_ST_CMDDIREN |
@@ -146,6 +147,7 @@ struct mmci_platform_data mop500_sdi2_data = { .capabilities = MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA |MMC_CAP_MMC_HIGHSPEED | +MMC_CAP_ERASE | MMC_CAP_CMD23, .gpio_cd = -1, .gpio_wp = -1,
@@ -185,6 +187,7 @@ struct mmci_platform_data mop500_sdi4_data = { .capabilities = MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA |MMC_CAP_MMC_HIGHSPEED | +MMC_CAP_ERASE | MMC_CAP_CMD23, .gpio_cd = -1, .gpio_wp = -1,
Signature · 1 line
1.7.10
PATCH 4/6 ARM: ux500: Enable support for discard for MMC/SD
Quoted 6 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
By enabling
MMC_CAP_ERASEfor the SD/MMC devices the mmc block layer will now act on DISCARD requests.Signed-off-by Ulf Hansson <[email protected]>
Patch applied for ux500-core.
On the DT boot path this has the same problems and comments as for patch 3: not supported on DT boots.
Yours,
Linus Walleij
PATCH 5/6 ARM: ux500: Set eMMC and WLAN card slot as non-removable
In reply to Ulf HanssonFrom: Ulf Hansson <[email protected]>
For several reasons, the mmc protocol layer expects devices being non-removable to use MMC_CAP_NONREMOVABLE, so then we adapt to this expectation.
--- arch/arm/mach-ux500/board-mop500-sdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-ux500/board-mop500-sdi.c +4 -1
@@ -107,7 +107,8 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = {struct mmci_platform_data mop500_sdi1_data = { .ocr_mask =MMC_VDD_29_30 , .f_max =100000000 , - .capabilities =MMC_CAP_4_BIT_DATA , + .capabilities =MMC_CAP_4_BIT_DATA | +MMC_CAP_NONREMOVABLE , .gpio_cd =-1 , .gpio_wp =-1 , #ifdef CONFIG_STE_DMA40
@@ -146,6 +147,7 @@ struct mmci_platform_data mop500_sdi2_data = { .f_max = 100000000, .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA | +MMC_CAP_NONREMOVABLE |MMC_CAP_MMC_HIGHSPEED |MMC_CAP_ERASE | MMC_CAP_CMD23,
@@ -186,6 +188,7 @@ struct mmci_platform_data mop500_sdi4_data = { .f_max = 100000000, .capabilities =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA | +MMC_CAP_NONREMOVABLE |MMC_CAP_MMC_HIGHSPEED |MMC_CAP_ERASE | MMC_CAP_CMD23,
Signature · 1 line
1.7.10
PATCH 5/6 ARM: ux500: Set eMMC and WLAN card slot as non-removable
Quoted 7 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
For several reasons, the mmc protocol layer expects devices being non-removable to use
MMC_CAP_NONREMOVABLE, so then we adapt to this expectation.Signed-off-by Ulf Hansson <[email protected]>
Patch applied for ux500-core.
On the DT boot path this has the same problems and comments as patches 3 & 4.
Yours,
Linus Walleij
PATCH 6/6 ARM: ux500: Enable support for UHS-I SD-cards
In reply to Ulf HanssonFrom: Ulf Hansson <[email protected]>
By setting the host capabilities MMC_CAP_UHS_SDR12|25 for the SD card device we enable support for UHS cards. The supported mode is SDR12 and SDR25.
--- arch/arm/mach-ux500/board-mop500-sdi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-ux500/board-mop500-sdi.c +3 -1
@@ -56,7 +56,9 @@ struct mmci_platform_data mop500_sdi0_data = { .capabilities = MMC_CAP_4_BIT_DATA |MMC_CAP_SD_HIGHSPEED |MMC_CAP_MMC_HIGHSPEED | - MMC_CAP_ERASE, +MMC_CAP_ERASE | +MMC_CAP_UHS_SDR12 | + MMC_CAP_UHS_SDR25, .gpio_wp = -1, .sigdir =MCI_ST_FBCLKEN | MCI_ST_CMDDIREN |
Signature · 1 line
1.7.10
PATCH 6/6 ARM: ux500: Enable support for UHS-I SD-cards
Quoted 7 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
By setting the host capabilities MMC_CAP_UHS_SDR12|25 for the SD card device we enable support for UHS cards. The supported mode is SDR12 and SDR25.
Signed-off-by Ulf Hansson <[email protected]>
Patch applied for ux500-core.
On the DT boot path this patch has the same problems and comments as patches 3,4,5.
Yours,
Linus Walleij
cover ARM: ux500: Update configurations for SD/SDIO/(e)MMC
In reply to Ulf HanssonQuoted 16 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
This patchset includes especially enablement for UHS-I SD cards, but also some cleanups and additional enabling of SD/SDIO/(e)MMC features.
These changes shall also be adapted to the corresponding DT files, but that is left as a separate task and outside this patchset.
Ulf Hansson (6):
ARM: ux500: Enable 100MHz for SD/SDIO/MMC devices
ARM: ux500: Don't set plf ocr mask for SD/MMC device
ARM: ux500: Enable support for RPMB and Reliable Write for eMMC
ARM: ux500: Enable support for discard for MMC/SD
ARM: ux500: Set eMMC and WLAN card slot as non-removable
ARM: ux500: Enable support for UHS-I SD-cards
Quoted 3 lines
arch/arm/mach-ux500/board-mop500-sdi.c | 34 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-)
All patches look good to me, although you should probably try to use the full 72 char limit per line in all of your commit messages.
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
cover ARM: ux500: Update configurations for SD/SDIO/(e)MMC
Quoted 18 lines · Lee Jones
Quoted 16 lines · Ulf Hansson
From: Ulf Hansson <[email protected]>
This patchset includes especially enablement for UHS-I SD cards, but also some cleanups and additional enabling of SD/SDIO/(e)MMC features.
These changes shall also be adapted to the corresponding DT files, but that is left as a separate task and outside this patchset.
Ulf Hansson (6):
ARM: ux500: Enable 100MHz for SD/SDIO/MMC devices
ARM: ux500: Don't set plf ocr mask for SD/MMC device
ARM: ux500: Enable support for RPMB and Reliable Write for eMMC
ARM: ux500: Enable support for discard for MMC/SD
ARM: ux500: Set eMMC and WLAN card slot as non-removable
ARM: ux500: Enable support for UHS-I SD-cards
Quoted 6 lines
Quoted 3 lines
arch/arm/mach-ux500/board-mop500-sdi.c | 34 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-)All patches look good to me, although you should probably try to use the full 72 char limit per line in all of your commit messages.
Whoops! In case you couldn't tell that was an:
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog