omap_hsmmc: add cd/wp gpio request, mmc dt fixes and enable mmc dm for dra74/dra72 evms
Subsystems (2)
cover omap_hsmmc: add cd/wp gpio request, mmc dt fixes and enable mmc dm for dra74/dra72 evms
When omap_hsmmc was converted to DM, card detect and write protect gpios request were not implemented due to gpio failures [3], now as it is working adding cd/wp gpio request in probe. Also fixing the gpio active level in DT as done in kernel DT and enabling of DM_MMC for dra74 amd dra72 evm configs
With this patch when card is remove and trying mmc rescan gives error message like card is not present instead of select voltage failed as earlier.
Pushed a branch for others for testing [1] and logs at [2]
[1] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-mmc-gpio
[2] - http://pastebin.ubuntu.com/15611123/
[3] - http://lists.denx.de/pipermail/u-boot/2015-September/227962.html
Mugunthan V N (5):
drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is
defined
ARM: dts: am43xx: fix cd-gpios definition as per hardware design and
dt binding docs
ARM: dts: dra7xx: am57xx: fix cd-gpios definition as per hardware
design and dt binding docs
configs: dra72_evm: enable mmc driver model
configs: dra74_evm: enable mmc driver model
arch/arm/dts/am437x-gp-evm.dts | 2 +- arch/arm/dts/am437x-sk-evm.dts | 2 +- arch/arm/dts/am57xx-beagle-x15.dts | 2 +- arch/arm/dts/dra7-evm.dts | 5 +++++ arch/arm/dts/dra72-evm.dts | 2 +- configs/dra72_evm_defconfig | 1 + configs/dra74_evm_defconfig | 1 + drivers/mmc/omap_hsmmc.c | 5 +++++ 8 files changed, 16 insertions(+), 4 deletions(-)
Signature · 1 line
2.8.0.rc3.9.g44915db
PATCH 1/5 drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
Add request gpio for CD and WP gpios, so that the gpio can be used for the respective purposes.
--- drivers/mmc/omap_hsmmc.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mmc/omap_hsmmc.c +5 -0
@@ -820,6 +820,11 @@ static int omap_hsmmc_probe(struct udevice *dev)if (mmc ==NULL )return -1 ; +#ifdef OMAP_HSMMC_USE_GPIO +gpio_request_by_name (dev,"cd-gpios" ,0 , &priv->cd_gpio,GPIOD_IS_IN ); +gpio_request_by_name (dev,"wp-gpios" ,0 , &priv->wp_gpio,GPIOD_IS_IN ); +#endif + upriv->mmc = mmc;return 0 ;
Signature · 1 line
2.8.0.rc3.9.g44915db
PATCH 1/5 drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
Quoted 4 lines · Mugunthan V N
Add request gpio for CD and WP gpios, so that the gpio can be used for the respective purposes.
Signed-off-by Mugunthan V N <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160404/aa0b2205/attachment.sig>
PATCH 1/5 drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
In reply to Mugunthan V NHi Muganthan,
Quoted 13 lines · Mugunthan V N
Add request gpio for CD and WP gpios, so that the gpio can be used for the respective purposes.
Signed-off-by Mugunthan V N <[email protected]>--- drivers/mmc/omap_hsmmc.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mmc/omap_hsmmc.c +0
-0
drivers/mmc/omap_hsmmc.c static int omap_hsmmc_probe(struct udevice *dev) · line 825
Quoted 6 lines
drivers/mmc/omap_hsmmc.c +3
-0@@ -820,6 +820,11 @@ static int omap_hsmmc_probe(struct udevice *dev)if (mmc ==NULL )return -1 ; +#ifdef OMAP_HSMMC_USE_GPIO +gpio_request_by_name (dev,"cd-gpios" ,0 , &priv->cd_gpio,GPIOD_IS_IN ); +gpio_request_by_name (dev,"wp-gpios" ,0 , &priv->wp_gpio,GPIOD_IS_IN );
Please check errors here.
Quoted 8 lines
drivers/mmc/omap_hsmmc.c +2
-1+#endif + upriv->mmc = mmc;return 0 ; --2.8.0.rc3.9.g44915db
Regards,
Simon
PATCH 1/5 drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
Quoted 19 lines · Simon Glass
Hi Muganthan,
Quoted 16 lines · Mugunthan V N
Add request gpio for CD and WP gpios, so that the gpio can be used for the respective purposes.
Signed-off-by Mugunthan V N <[email protected]>--- drivers/mmc/omap_hsmmc.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mmc/omap_hsmmc.c +0
-0@@ -820,6 +820,11 @@ static int omap_hsmmc_probe(struct udevice *dev)if (mmc ==NULL )return -1 ;
Quoted 5 lines
drivers/mmc/omap_hsmmc.c static int omap_hsmmc_probe(struct udevice *dev) · line 825
Quoted 3 lines
drivers/mmc/omap_hsmmc.c +3
-0+#ifdef OMAP_HSMMC_USE_GPIO +gpio_request_by_name (dev,"cd-gpios" ,0 , &priv->cd_gpio,GPIOD_IS_IN ); +gpio_request_by_name (dev,"wp-gpios" ,0 , &priv->wp_gpio,GPIOD_IS_IN );Please check errors here.
... in a follow-up patch, I have this queued currently. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160420/74526f1c/attachment.sig>
PATCH 1/5 drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
In reply to Mugunthan V NQuoted 5 lines · Mugunthan V N
Add request gpio for CD and WP gpios, so that the gpio can be used for the respective purposes.
Signed-off-by Mugunthan V N <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/f1bb3d7e/attachment.sig>
PATCH 2/5 ARM: dts: am43xx: fix cd-gpios definition as per hardware design and dt binding docs
In reply to Mugunthan V NAs per mmc device tree binding documentation card detect gpio has to be active low signal. When a hardware is designed with active high card detect, gpio polarity has to be changed with cd-inverted dt property.
In AM43xx the card detect gpio is designed as active low gpio. So correcting the dt card detect gpio definition.
--- arch/arm/dts/am437x-gp-evm.dts | 2 +- arch/arm/dts/am437x-sk-evm.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/am437x-gp-evm.dts +1 -1
@@ -573,7 +573,7 @@ bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins>; - cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; &mmc3 {
arch/arm/dts/am437x-sk-evm.dts +1 -1
@@ -536,7 +536,7 @@ vmmc-supply = <&dcdc4>; bus-width = <4>; - cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; &usb2_phy1 {
Signature · 1 line
2.8.0.rc3.9.g44915db
PATCH 2/5 ARM: dts: am43xx: fix cd-gpios definition as per hardware design and dt binding docs
Quoted 9 lines · Mugunthan V N
As per mmc device tree binding documentation card detect gpio has to be active low signal. When a hardware is designed with active high card detect, gpio polarity has to be changed with cd-inverted dt property.
In AM43xx the card detect gpio is designed as active low gpio. So correcting the dt card detect gpio definition.
Signed-off-by Mugunthan V N <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160404/40009aa2/attachment.sig>
PATCH 2/5 ARM: dts: am43xx: fix cd-gpios definition as per hardware design and dt binding docs
In reply to Mugunthan V NQuoted 10 lines · Mugunthan V N
As per mmc device tree binding documentation card detect gpio has to be active low signal. When a hardware is designed with active high card detect, gpio polarity has to be changed with cd-inverted dt property.
In AM43xx the card detect gpio is designed as active low gpio. So correcting the dt card detect gpio definition.
Signed-off-by Mugunthan V N <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/c58f89dd/attachment.sig>
PATCH 3/5 ARM: dts: dra7xx: am57xx: fix cd-gpios definition as per hardware design and dt binding docs
In reply to Mugunthan V NAs per mmc device tree binding documentation card detect gpio has to be active low signal. When a hardware is designed with active high card detect, gpio polarity has to be changed with cd-inverted dt property.
In DRA72x and AM57xx EVMs the card detect gpio is designed as active low gpio. So correcting the dt card detect gpio definition.
Also adding card-detect gpio for DRA74x EVM.
--- arch/arm/dts/am57xx-beagle-x15.dts | 2 +- arch/arm/dts/dra7-evm.dts | 5 +++++ arch/arm/dts/dra72-evm.dts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-)
arch/arm/dts/am57xx-beagle-x15.dts +1 -1
@@ -586,7 +586,7 @@ vmmc_aux-supply = <&vdd_3v3>; pbias-supply = <&pbias_mmc_reg>; bus-width = <4>; - cd-gpios = <&gpio6 27 0>; /* gpio 219 */ + cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */ }; &mmc2 {
arch/arm/dts/dra7-evm.dts +5 -0
@@ -469,6 +469,11 @@ status = "okay"; vmmc-supply = <&ldo1_reg>; bus-width = <4>; + /* + * SDCD signal is not being used here - using the fact that GPIO mode + * is always hardwired. + */ + cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; }; &mmc2 {
arch/arm/dts/dra72-evm.dts +1 -1
@@ -503,7 +503,7 @@ * SDCD signal is not being used here - using the fact that GPIO mode * is a viable alternative */ - cd-gpios = <&gpio6 27 0>; + cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; }; &mmc2 {
Signature · 1 line
2.8.0.rc3.9.g44915db
PATCH 3/5 ARM: dts: dra7xx: am57xx: fix cd-gpios definition as per hardware design and dt binding docs
Quoted 5 lines · Mugunthan V N
As per mmc device tree binding documentation card detect gpio has to be active low signal. When a hardware is designed with active high card detect, gpio polarity has to be changed with cd-inverted dt property.
Quoted 7 lines
In DRA72x and AM57xx EVMs the card detect gpio is designed as active low gpio. So correcting the dt card detect gpio definition.
Also adding card-detect gpio for DRA74x EVM.
Signed-off-by Mugunthan V N <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160404/4497d49c/attachment.sig>
PATCH 3/5 ARM: dts: dra7xx: am57xx: fix cd-gpios definition as per hardware design and dt binding docs
In reply to Mugunthan V NQuoted 5 lines · Mugunthan V N
As per mmc device tree binding documentation card detect gpio has to be active low signal. When a hardware is designed with active high card detect, gpio polarity has to be changed with cd-inverted dt property.
Quoted 8 lines
In DRA72x and AM57xx EVMs the card detect gpio is designed as active low gpio. So correcting the dt card detect gpio definition.
Also adding card-detect gpio for DRA74x EVM.
Signed-off-by Mugunthan V N <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/54747616/attachment.sig>
PATCH 4/5 configs: dra72_evm: enable mmc driver model
In reply to Mugunthan V Nenable mmc driver model for dra72 evm as omap_hsmmc supports driver model
--- configs/dra72_evm_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/dra72_evm_defconfig +1 -0
@@ -25,3 +25,4 @@ CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_GADGET=y +CONFIG_DM_MMC=y
Signature · 1 line
2.8.0.rc3.9.g44915db
PATCH 4/5 configs: dra72_evm: enable mmc driver model
Quoted 4 lines · Mugunthan V N
enable mmc driver model for dra72 evm as
omap_hsmmcsupports driver modelSigned-off-by Mugunthan V N <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160404/f6c0742e/attachment.sig>
PATCH 4/5 configs: dra72_evm: enable mmc driver model
In reply to Mugunthan V NQuoted 5 lines · Mugunthan V N
enable mmc driver model for dra72 evm as
omap_hsmmcsupports driver modelSigned-off-by Mugunthan V N <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/9643af37/attachment.sig>
PATCH 5/5 configs: dra74_evm: enable mmc driver model
In reply to Mugunthan V Nenable mmc driver model for dra74 evm as omap_hsmmc supports driver model
--- configs/dra74_evm_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/dra74_evm_defconfig +1 -0
@@ -24,3 +24,4 @@ CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_GADGET=y +CONFIG_DM_MMC=y
Signature · 1 line
2.8.0.rc3.9.g44915db
PATCH 5/5 configs: dra74_evm: enable mmc driver model
Quoted 4 lines · Mugunthan V N
enable mmc driver model for dra74 evm as
omap_hsmmcsupports driver modelSigned-off-by Mugunthan V N <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160404/cd898d86/attachment.sig>
PATCH 5/5 configs: dra74_evm: enable mmc driver model
In reply to Mugunthan V NQuoted 5 lines · Mugunthan V N
enable mmc driver model for dra74 evm as
omap_hsmmcsupports driver modelSigned-off-by Mugunthan V N <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/dfe6d555/attachment.sig>