U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linusw@kernel.org>
To: u-boot@lists.u-boot-project.org, Tom Rini <trini@konsulko.com>,
	 Stefan Hansson <newbyte@postmarketos.org>,
	 Stephan Gerhold <stephan.gerhold@linaro.org>
Cc: Linus Walleij <linusw@kernel.org>
Subject: [PATCH v2 2/8] mmc: arm_pl180: Configure Ux500 signal direction
Date: Mon, 17 Aug 2026 11:31:51 +0200	[thread overview]
Message-ID: <20260817-ux500-external-sdcard-v2-2-ca9a110bd9c6@kernel.org> (raw)
In-Reply-To: <20260817-ux500-external-sdcard-v2-0-ca9a110bd9c6@kernel.org>

The Ux500 MMCI variant can control external level-shifter signal
directions through the power register. Parse the standard ST MMCI
device tree properties and set the corresponding direction and
feedback-clock bits.

This is required by the external SD card slot on Samsung Janice, where
commands cannot reach the card unless the direction controls are set.

Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 drivers/mmc/arm_pl180_mmci.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index f00b0ff0dc95..af21b814641e 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -427,6 +427,19 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
 		host->version2 = false; /* ARM variant */
 	}
 
+	if (dev_read_bool(dev, "st,sig-dir-dat0"))
+		host->pwr_init |= SDI_PWR_DAT0DIREN;
+	if (dev_read_bool(dev, "st,sig-dir-dat2"))
+		host->pwr_init |= SDI_PWR_DAT2DIREN;
+	if (dev_read_bool(dev, "st,sig-dir-dat31"))
+		host->pwr_init |= SDI_PWR_DAT31DIREN;
+	if (dev_read_bool(dev, "st,sig-dir-dat74"))
+		host->pwr_init |= SDI_PWR_DAT74DIREN;
+	if (dev_read_bool(dev, "st,sig-dir-cmd"))
+		host->pwr_init |= SDI_PWR_CMDDIREN;
+	if (dev_read_bool(dev, "st,sig-pin-fbclk"))
+		host->pwr_init |= SDI_PWR_FBCLKEN;
+
 	gpio_request_by_name(dev, "cd-gpios", 0, &host->cd_gpio, GPIOD_IS_IN);
 
 	ret = mmc_of_parse(dev, cfg);

-- 
2.55.0


  parent reply	other threads:[~2026-08-17 13:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  9:31 [PATCH v2 0/8] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
2026-08-17  9:31 ` [PATCH v2 1/8] pinctrl: Add compact Nomadik pin controller Linus Walleij
2026-08-17 15:57   ` Stephan Gerhold
2026-08-17  9:31 ` Linus Walleij [this message]
2026-08-17 15:59   ` [PATCH v2 2/8] mmc: arm_pl180: Configure Ux500 signal direction Stephan Gerhold
2026-08-17  9:31 ` [PATCH v2 3/8] mmc: arm_pl180: Set initial supply voltages Linus Walleij
2026-08-17 16:15   ` Stephan Gerhold
2026-08-17  9:31 ` [PATCH v2 4/8] power: regulator: Add AB8500 AUX3 support Linus Walleij
2026-08-17 16:21   ` Stephan Gerhold
2026-08-17  9:31 ` [PATCH v2 5/8] configs: stemmy: Enable SD card regulators Linus Walleij
2026-08-17 16:24   ` Stephan Gerhold
2026-08-17  9:31 ` [PATCH v2 6/8] configs: stemmy: Boot EFI from external SD card Linus Walleij
2026-08-17 16:29   ` Stephan Gerhold
2026-08-17  9:31 ` [PATCH v2 7/8] arm: u8500: Switch Stemmy to upstream Janice device tree Linus Walleij
2026-08-17 16:45   ` Stephan Gerhold
2026-08-17 20:54     ` Linus Walleij
2026-08-18 10:39       ` Stephan Gerhold
2026-08-18 13:31         ` Linus Walleij
2026-08-19  8:53         ` Linus Walleij
2026-08-17  9:31 ` [PATCH v2 8/8] arm: u8500: Give Golden panel regulators unique names Linus Walleij
2026-08-17 16:47   ` Stephan Gerhold
2026-08-17 20:36     ` Linus Walleij
2026-08-17 21:14       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260817-ux500-external-sdcard-v2-2-ca9a110bd9c6@kernel.org \
    --to=linusw@kernel.org \
    --cc=newbyte@postmarketos.org \
    --cc=stephan.gerhold@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox