[PATCH 0/3] Fix Odroid U3/X2 SD-card boot

Hi All
This patchset restores booting from SD-card on Exynos4412-based Odroid U3/X2 boards. It relies on the Exynos MMC device id auto-dectection and PMIC device name fixes: https://patchwork.ozlabs.org/patch/1223558/ https://patchwork.ozlabs.org/patch/1224228/
Best regards Marek Szyprowski Samsung R&D Institute Poland
Patch summary:
Marek Szyprowski (3): mmc: s5p_sdhci: Read generic MMC properties from DT arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2 arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card)
arch/arm/dts/exynos4412-odroid.dts | 3 ++- drivers/mmc/s5p_sdhci.c | 5 +++++ include/configs/odroid.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-)

Read generic MMC properties from device-tree. This allows to specify for example cd-inverted property and let MMC core to properly handle such case.
Signed-off-by: Marek Szyprowski m.szyprowski@samsung.com --- drivers/mmc/s5p_sdhci.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index 53efa968cf..b5fe828dd6 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -204,8 +204,13 @@ static int s5p_sdhci_probe(struct udevice *dev) if (ret) return ret;
+ ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + host->mmc = &plat->mmc; host->mmc->dev = dev; + ret = sdhci_setup_cfg(&plat->cfg, host, 0, 400000); if (ret) return ret;

Hi Marek,
On Thu, 16 Jan 2020 at 20:56, Marek Szyprowski m.szyprowski@samsung.com wrote:
Read generic MMC properties from device-tree. This allows to specify for example cd-inverted property and let MMC core to properly handle such case.
Signed-off-by: Marek Szyprowski m.szyprowski@samsung.com
Please add my Reviewed-by: Anand Moon linux.amoon@gmail.com
-Anand

Card detect line for SD-card on Odroid U3/X2 boards are active low, so add cd-inverted property to indicate this, as u-boot's GPIO driver doesn't support specifying line polarity. This restores S5P_SDHCI driver operation on Odroid U3/X2 boards.
Signed-off-by: Marek Szyprowski m.szyprowski@samsung.com --- arch/arm/dts/exynos4412-odroid.dts | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/dts/exynos4412-odroid.dts b/arch/arm/dts/exynos4412-odroid.dts index cc8e0dd041..e6c7222755 100644 --- a/arch/arm/dts/exynos4412-odroid.dts +++ b/arch/arm/dts/exynos4412-odroid.dts @@ -236,6 +236,7 @@ &sdhci2 { samsung,bus-width = <4>; samsung,timing = <1 2 3>; + cd-inverted; cd-gpios = <&gpk2 2 0>; status = "okay"; };

Hi Marek,
On Thu, 16 Jan 2020 at 20:56, Marek Szyprowski m.szyprowski@samsung.com wrote:
Card detect line for SD-card on Odroid U3/X2 boards are active low, so add cd-inverted property to indicate this, as u-boot's GPIO driver doesn't support specifying line polarity. This restores S5P_SDHCI driver operation on Odroid U3/X2 boards.
Signed-off-by: Marek Szyprowski m.szyprowski@samsung.com
Please add my Reviewed-by: Anand Moon linux.amoon@gmail.com
-Anand

Use MMC0 for eMMC and MMC2 for SD-card as other Exynos-based boards do. This allows to use common code to get MMC device id based on the XOM[7:5] pins.
Signed-off-by: Marek Szyprowski m.szyprowski@samsung.com --- arch/arm/dts/exynos4412-odroid.dts | 2 +- include/configs/odroid.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/exynos4412-odroid.dts b/arch/arm/dts/exynos4412-odroid.dts index e6c7222755..ce08e8dc1e 100644 --- a/arch/arm/dts/exynos4412-odroid.dts +++ b/arch/arm/dts/exynos4412-odroid.dts @@ -17,7 +17,7 @@ serial0 = "/serial@13800000"; console = "/serial@13810000"; mmc0 = &mshc_0; - mmc1 = &sdhci2; + mmc2 = &sdhci2; };
serial@13810000 { diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 77fca32fca..7989fb29d1 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -80,7 +80,7 @@ "tzsw raw 0x83f 0x138\0"
#define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ func(MMC, mmc, 0)
#include <config_distro_bootcmd.h>

Hi Marek,
On Thu, 16 Jan 2020 at 20:56, Marek Szyprowski m.szyprowski@samsung.com wrote:
Use MMC0 for eMMC and MMC2 for SD-card as other Exynos-based boards do. This allows to use common code to get MMC device id based on the XOM[7:5] pins.
Signed-off-by: Marek Szyprowski m.szyprowski@samsung.com
Please add my Reviewed-by: Anand Moon linux.amoon@gmail.com
-Anand

Hi Marek,
On Thu, 16 Jan 2020 at 20:56, Marek Szyprowski m.szyprowski@samsung.com wrote:
Hi All
This patchset restores booting from SD-card on Exynos4412-based Odroid U3/X2 boards. It relies on the Exynos MMC device id auto-dectection and PMIC device name fixes: https://patchwork.ozlabs.org/patch/1223558/ https://patchwork.ozlabs.org/patch/1224228/
Best regards Marek Szyprowski Samsung R&D Institute Poland
Thanks for this fix, I have am issue with my odroid u3 boards, All my board will not boot up until I connect UART to usb port. basically the fan spin but will not load the kernel. So it their a solution to this problem.
I tried the patch from Tobias Jakobi (odroid: defconfig: configure keyed autoboot) but this did not work at my end.
-Anand

Hi Anand
On 17.01.2020 06:00, Anand Moon wrote:
On Thu, 16 Jan 2020 at 20:56, Marek Szyprowski m.szyprowski@samsung.com wrote:
This patchset restores booting from SD-card on Exynos4412-based Odroid U3/X2 boards. It relies on the Exynos MMC device id auto-dectection and PMIC device name fixes: https://patchwork.ozlabs.org/patch/1223558/ https://patchwork.ozlabs.org/patch/1224228/
Best regards Marek Szyprowski Samsung R&D Institute Poland
Thanks for this fix, I have am issue with my odroid u3 boards, All my board will not boot up until I connect UART to usb port. basically the fan spin but will not load the kernel. So it their a solution to this problem.
I tried the patch from Tobias Jakobi (odroid: defconfig: configure keyed autoboot) but this did not work at my end.
I remember I observed a few times the lack of boot when uart adapter was not connect, but now I didn't manage to reproduce it.
Best regards

Hi Marek,
On 1/17/20 12:25 AM, Marek Szyprowski wrote:
Hi All
This patchset restores booting from SD-card on Exynos4412-based Odroid U3/X2 boards. It relies on the Exynos MMC device id auto-dectection and PMIC device name fixes: https://patchwork.ozlabs.org/patch/1223558/ https://patchwork.ozlabs.org/patch/1224228/
Thanks for patches. I will check this patch-set.
Best Regard, Jaehoon Chung
Best regards Marek Szyprowski Samsung R&D Institute Poland
Patch summary:
Marek Szyprowski (3): mmc: s5p_sdhci: Read generic MMC properties from DT arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2 arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card)
arch/arm/dts/exynos4412-odroid.dts | 3 ++- drivers/mmc/s5p_sdhci.c | 5 +++++ include/configs/odroid.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-)

On 17/01/2020 00:25, Marek Szyprowski wrote:
Hi All
This patchset restores booting from SD-card on Exynos4412-based Odroid U3/X2 boards. It relies on the Exynos MMC device id auto-dectection and PMIC device name fixes: https://patchwork.ozlabs.org/patch/1223558/ https://patchwork.ozlabs.org/patch/1224228/
Best regards Marek Szyprowski Samsung R&D Institute Poland
Patch summary:
Marek Szyprowski (3): mmc: s5p_sdhci: Read generic MMC properties from DT arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2 arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card)
arch/arm/dts/exynos4412-odroid.dts | 3 ++- drivers/mmc/s5p_sdhci.c | 5 +++++ include/configs/odroid.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-)
applied to u-boot-samsung.
Thanks, Minkyu Kang.
participants (4)
-
Anand Moon
-
Jaehoon Chung
-
Marek Szyprowski
-
Minkyu Kang