All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] mx6slevk: Call gpio_request()
@ 2017-10-10 16:43 Fabio Estevam
  2017-10-10 16:43 ` [U-Boot] [PATCH 2/2] mx6slevk: Remove some DM drivers Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2017-10-10 16:43 UTC (permalink / raw)
  To: u-boot

We should call gpio_request() prior to reading the GPIO value.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Applied on top of:

https://patchwork.ozlabs.org/patch/820477/

and

https://patchwork.ozlabs.org/patch/820298/

 board/freescale/mx6slevk/mx6slevk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index e9a9bbf..ab72765 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -309,12 +309,15 @@ int board_mmc_getcd(struct mmc *mmc)
 
 	switch (cfg->esdhc_base) {
 	case USDHC1_BASE_ADDR:
+		gpio_request(USDHC1_CD_GPIO, "cd1_gpio");
 		ret = !gpio_get_value(USDHC1_CD_GPIO);
 		break;
 	case USDHC2_BASE_ADDR:
+		gpio_request(USDHC2_CD_GPIO, "cd2_gpio");
 		ret = !gpio_get_value(USDHC2_CD_GPIO);
 		break;
 	case USDHC3_BASE_ADDR:
+		gpio_request(USDHC3_CD_GPIO, "cd3_gpio");
 		ret = !gpio_get_value(USDHC3_CD_GPIO);
 		break;
 	}
-- 
2.7.4

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

* [U-Boot] [PATCH 2/2] mx6slevk: Remove some DM drivers
  2017-10-10 16:43 [U-Boot] [PATCH 1/2] mx6slevk: Call gpio_request() Fabio Estevam
@ 2017-10-10 16:43 ` Fabio Estevam
  2017-10-11  0:50   ` Peng Fan
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2017-10-10 16:43 UTC (permalink / raw)
  To: u-boot

While having DM driver is a good thing, currently this defconfig
is completely broken in a way that SD cards can not even be detected.

Remove some of the DM drivers to avoid the regression for now
and allow booting a kernel stored in the SD card again.

Re-adding the DM drivers can be revisited later.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Applied on top of:

https://patchwork.ozlabs.org/patch/820477/

and

https://patchwork.ozlabs.org/patch/820298/

 configs/mx6slevk_defconfig | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index c876c6b..51735ec 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -3,7 +3,7 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6SLEVK=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_DEFAULT_DEVICE_TREE="imx6sl-evk"
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_I2C"
 CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
@@ -29,21 +29,12 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
 # CONFIG_BLK is not set
-CONFIG_DM_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_DM_MMC=y
 CONFIG_CMD_PART=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
-CONFIG_DM_PMIC=y
-CONFIG_DM_PMIC_PFUZE100=y
-CONFIG_DM_REGULATOR=y
-CONFIG_DM_REGULATOR_PFUZE100=y
-CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-- 
2.7.4

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

* [U-Boot] [PATCH 2/2] mx6slevk: Remove some DM drivers
  2017-10-10 16:43 ` [U-Boot] [PATCH 2/2] mx6slevk: Remove some DM drivers Fabio Estevam
@ 2017-10-11  0:50   ` Peng Fan
  2017-10-11  4:18     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2017-10-11  0:50 UTC (permalink / raw)
  To: u-boot


Hi Fabio,

> -----Original Message-----
> From: Fabio Estevam [mailto:fabio.estevam at nxp.com]
> Sent: Wednesday, October 11, 2017 12:44 AM
> To: sbabic at denx.de
> Cc: Peng Fan <peng.fan@nxp.com>; u-boot at lists.denx.de; Fabio Estevam
> <fabio.estevam@nxp.com>
> Subject: [PATCH 2/2] mx6slevk: Remove some DM drivers
> 
> While having DM driver is a good thing, currently this defconfig is completely
> broken in a way that SD cards can not even be detected.
> 
> Remove some of the DM drivers to avoid the regression for now and allow
> booting a kernel stored in the SD card again.
> 
> Re-adding the DM drivers can be revisited later.

When adding DM support, I have tested on my board. What issue do you see?

Thanks,
Peng.

> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Applied on top of:
> 
> https://patchwork.ozlabs.org/patch/820477/
> 
> and
> 
> https://patchwork.ozlabs.org/patch/820298/
> 
>  configs/mx6slevk_defconfig | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig index
> c876c6b..51735ec 100644
> --- a/configs/mx6slevk_defconfig
> +++ b/configs/mx6slevk_defconfig
> @@ -3,7 +3,7 @@ CONFIG_ARCH_MX6=y
>  CONFIG_TARGET_MX6SLEVK=y
>  # CONFIG_CMD_BMODE is not set
>  CONFIG_DEFAULT_DEVICE_TREE="imx6sl-evk"
> -
> CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imx
> image.cfg,MX6SL"
> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/im
> ximage.cfg,MX6SL,SYS_I2C"
>  CONFIG_BOOTDELAY=3
>  CONFIG_BOARD_EARLY_INIT_F=y
>  CONFIG_HUSH_PARSER=y
> @@ -29,21 +29,12 @@ CONFIG_OF_CONTROL=y
>  CONFIG_ENV_IS_IN_MMC=y
>  CONFIG_DM=y
>  # CONFIG_BLK is not set
> -CONFIG_DM_GPIO=y
> -CONFIG_DM_I2C=y
> -CONFIG_DM_MMC=y
>  CONFIG_CMD_PART=y
>  CONFIG_SPI_FLASH=y
>  CONFIG_SPI_FLASH_STMICRO=y
>  CONFIG_PHYLIB=y
>  CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX6=y
> -CONFIG_DM_PMIC=y
> -CONFIG_DM_PMIC_PFUZE100=y
> -CONFIG_DM_REGULATOR=y
> -CONFIG_DM_REGULATOR_PFUZE100=y
> -CONFIG_DM_REGULATOR_FIXED=y
> -CONFIG_DM_REGULATOR_GPIO=y
>  CONFIG_DM_THERMAL=y
>  CONFIG_USB=y
>  CONFIG_USB_STORAGE=y
> --
> 2.7.4

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

* [U-Boot] [PATCH 2/2] mx6slevk: Remove some DM drivers
  2017-10-11  0:50   ` Peng Fan
@ 2017-10-11  4:18     ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2017-10-11  4:18 UTC (permalink / raw)
  To: u-boot

Hi Peng,

On Tue, Oct 10, 2017 at 9:50 PM, Peng Fan <peng.fan@nxp.com> wrote:

> When adding DM support, I have tested on my board. What issue do you see?

SD card is not detected, so I cannot load the zImage with mainline U-Boot.

Please test it using the latest U-Boot mainline.

Thanks

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

end of thread, other threads:[~2017-10-11  4:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 16:43 [U-Boot] [PATCH 1/2] mx6slevk: Call gpio_request() Fabio Estevam
2017-10-10 16:43 ` [U-Boot] [PATCH 2/2] mx6slevk: Remove some DM drivers Fabio Estevam
2017-10-11  0:50   ` Peng Fan
2017-10-11  4:18     ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.