All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix Odroid U3/X2 SD-card boot
       [not found] <CGME20200116152549eucas1p15d2ffca2e2cbf74e1511cf64ab176552@eucas1p1.samsung.com>
@ 2020-01-16 15:25 ` Marek Szyprowski
       [not found]   ` <CGME20200116152551eucas1p1aff5ccdaf570f0d8e9c8cde024de7d59@eucas1p1.samsung.com>
                     ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Marek Szyprowski @ 2020-01-16 15:25 UTC (permalink / raw)
  To: u-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(-)

-- 
2.17.1

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

* [PATCH 1/3] mmc: s5p_sdhci: Read generic MMC properties from DT
       [not found]   ` <CGME20200116152551eucas1p1aff5ccdaf570f0d8e9c8cde024de7d59@eucas1p1.samsung.com>
@ 2020-01-16 15:25     ` Marek Szyprowski
  2020-01-17  4:55       ` Anand Moon
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Szyprowski @ 2020-01-16 15:25 UTC (permalink / raw)
  To: u-boot

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;
-- 
2.17.1

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

* [PATCH 2/3] arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2
       [not found]   ` <CGME20200116152552eucas1p178c4eb1d2ba573ffe95395af6d75a1b3@eucas1p1.samsung.com>
@ 2020-01-16 15:25     ` Marek Szyprowski
  2020-01-17  4:56       ` Anand Moon
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Szyprowski @ 2020-01-16 15:25 UTC (permalink / raw)
  To: u-boot

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";
 };
-- 
2.17.1

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

* [PATCH 3/3] arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card)
       [not found]   ` <CGME20200116152552eucas1p28abff4ee2e73ce168ec2f4081aa22574@eucas1p2.samsung.com>
@ 2020-01-16 15:25     ` Marek Szyprowski
  2020-01-17  4:57       ` Anand Moon
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Szyprowski @ 2020-01-16 15:25 UTC (permalink / raw)
  To: u-boot

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 at 13800000";
 		console = "/serial at 13810000";
 		mmc0 = &mshc_0;
-		mmc1 = &sdhci2;
+		mmc2 = &sdhci2;
 	};
 
 	serial at 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>
-- 
2.17.1

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

* [PATCH 1/3] mmc: s5p_sdhci: Read generic MMC properties from DT
  2020-01-16 15:25     ` [PATCH 1/3] mmc: s5p_sdhci: Read generic MMC properties from DT Marek Szyprowski
@ 2020-01-17  4:55       ` Anand Moon
  0 siblings, 0 replies; 11+ messages in thread
From: Anand Moon @ 2020-01-17  4:55 UTC (permalink / raw)
  To: u-boot

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

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

* [PATCH 2/3] arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2
  2020-01-16 15:25     ` [PATCH 2/3] arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2 Marek Szyprowski
@ 2020-01-17  4:56       ` Anand Moon
  0 siblings, 0 replies; 11+ messages in thread
From: Anand Moon @ 2020-01-17  4:56 UTC (permalink / raw)
  To: u-boot

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

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

* [PATCH 3/3] arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card)
  2020-01-16 15:25     ` [PATCH 3/3] arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card) Marek Szyprowski
@ 2020-01-17  4:57       ` Anand Moon
  0 siblings, 0 replies; 11+ messages in thread
From: Anand Moon @ 2020-01-17  4:57 UTC (permalink / raw)
  To: u-boot

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

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

* [PATCH 0/3] Fix Odroid U3/X2 SD-card boot
  2020-01-16 15:25 ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Marek Szyprowski
                     ` (2 preceding siblings ...)
       [not found]   ` <CGME20200116152552eucas1p28abff4ee2e73ce168ec2f4081aa22574@eucas1p2.samsung.com>
@ 2020-01-17  5:00   ` Anand Moon
  2020-01-17 13:42     ` Marek Szyprowski
  2020-01-18  1:57   ` Jaehoon Chung
  2020-01-28  9:14   ` Minkyu Kang
  5 siblings, 1 reply; 11+ messages in thread
From: Anand Moon @ 2020-01-17  5:00 UTC (permalink / raw)
  To: u-boot

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

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

* [PATCH 0/3] Fix Odroid U3/X2 SD-card boot
  2020-01-17  5:00   ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Anand Moon
@ 2020-01-17 13:42     ` Marek Szyprowski
  0 siblings, 0 replies; 11+ messages in thread
From: Marek Szyprowski @ 2020-01-17 13:42 UTC (permalink / raw)
  To: u-boot

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

-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

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

* [PATCH 0/3] Fix Odroid U3/X2 SD-card boot
  2020-01-16 15:25 ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Marek Szyprowski
                     ` (3 preceding siblings ...)
  2020-01-17  5:00   ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Anand Moon
@ 2020-01-18  1:57   ` Jaehoon Chung
  2020-01-28  9:14   ` Minkyu Kang
  5 siblings, 0 replies; 11+ messages in thread
From: Jaehoon Chung @ 2020-01-18  1:57 UTC (permalink / raw)
  To: u-boot

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(-)
> 

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

* [PATCH 0/3] Fix Odroid U3/X2 SD-card boot
  2020-01-16 15:25 ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Marek Szyprowski
                     ` (4 preceding siblings ...)
  2020-01-18  1:57   ` Jaehoon Chung
@ 2020-01-28  9:14   ` Minkyu Kang
  5 siblings, 0 replies; 11+ messages in thread
From: Minkyu Kang @ 2020-01-28  9:14 UTC (permalink / raw)
  To: u-boot

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.

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

end of thread, other threads:[~2020-01-28  9:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200116152549eucas1p15d2ffca2e2cbf74e1511cf64ab176552@eucas1p1.samsung.com>
2020-01-16 15:25 ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Marek Szyprowski
     [not found]   ` <CGME20200116152551eucas1p1aff5ccdaf570f0d8e9c8cde024de7d59@eucas1p1.samsung.com>
2020-01-16 15:25     ` [PATCH 1/3] mmc: s5p_sdhci: Read generic MMC properties from DT Marek Szyprowski
2020-01-17  4:55       ` Anand Moon
     [not found]   ` <CGME20200116152552eucas1p178c4eb1d2ba573ffe95395af6d75a1b3@eucas1p1.samsung.com>
2020-01-16 15:25     ` [PATCH 2/3] arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2 Marek Szyprowski
2020-01-17  4:56       ` Anand Moon
     [not found]   ` <CGME20200116152552eucas1p28abff4ee2e73ce168ec2f4081aa22574@eucas1p2.samsung.com>
2020-01-16 15:25     ` [PATCH 3/3] arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card) Marek Szyprowski
2020-01-17  4:57       ` Anand Moon
2020-01-17  5:00   ` [PATCH 0/3] Fix Odroid U3/X2 SD-card boot Anand Moon
2020-01-17 13:42     ` Marek Szyprowski
2020-01-18  1:57   ` Jaehoon Chung
2020-01-28  9:14   ` Minkyu Kang

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.