From: Frieder Schrempf <frieder@fris.de>
To: Fabio Estevam <festevam@gmail.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Stefano Babic <sbabic@denx.de>,
u-boot@lists.denx.de
Cc: Heiko Thiery <heiko.thiery@gmail.com>,
Adam Ford <aford173@gmail.com>, Fabio Estevam <festevam@denx.de>,
"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Subject: [PATCH 11/14] imx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card IO voltage
Date: Wed, 13 Jul 2022 11:52:22 +0200 [thread overview]
Message-ID: <20220713095229.43274-12-frieder@fris.de> (raw)
In-Reply-To: <20220713095229.43274-1-frieder@fris.de>
From: Frieder Schrempf <frieder.schrempf@kontron.de>
It turns out that it is not necessary to declare the VSELECT signal as
GPIO and let the PMIC driver set it to a fixed high level. This switches
the voltage between 3.3V and 1.8V by setting the PMIC register for LDO5
accordingly.
Instead we can do it like other boards already do and simply mux the
VSELECT signal of the USDHC interface to the pin. This makes sure that
the correct voltage is selected by setting the PMIC's SD_VSEL input
to high or low accordingly.
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi | 5 -----
arch/arm/dts/imx8mm-kontron-n801x-s.dts | 3 +++
arch/arm/dts/imx8mm-kontron-n801x-som.dtsi | 2 --
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
index 2c62f05cec1..a42881d1a89 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
@@ -62,11 +62,6 @@
&pinctrl_pmic {
u-boot,dm-spl;
- fsl,pins = <
- MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x141
- /* Disable Pullup for SD_VSEL */
- MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x41
- >;
};
&pinctrl_uart3 {
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s.dts b/arch/arm/dts/imx8mm-kontron-n801x-s.dts
index cb8102bb8db..bc46426ad8f 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-s.dts
+++ b/arch/arm/dts/imx8mm-kontron-n801x-s.dts
@@ -321,6 +321,7 @@
MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
>;
};
@@ -333,6 +334,7 @@
MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
>;
};
@@ -345,6 +347,7 @@
MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
>;
};
};
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-som.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-som.dtsi
index a981a6b4ac0..2d0661cce89 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-som.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-som.dtsi
@@ -82,7 +82,6 @@
pinctrl-0 = <&pinctrl_pmic>;
interrupt-parent = <&gpio1>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
- sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
regulators {
reg_vdd_soc: BUCK1 {
@@ -225,7 +224,6 @@
pinctrl_pmic: pmicgrp {
fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x141
- MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x141
>;
};
--
2.37.0
next prev parent reply other threads:[~2022-07-13 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 9:52 [PATCH 00/14] imx: kontron-sl-mx8mm: Improvements and OSM board support Frieder Schrempf
2022-07-13 9:52 ` [PATCH 01/14] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees Frieder Schrempf
2022-07-13 9:52 ` [PATCH 02/14] imx: kontron-sl-mx8mm: Add redundant environment Frieder Schrempf
2022-07-13 9:52 ` [PATCH 03/14] imx: kontron-sl-mx8mm: Enable environment in MMC Frieder Schrempf
2022-07-13 9:52 ` [PATCH 04/14] imx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXT Frieder Schrempf
2022-07-13 9:52 ` [PATCH 05/14] imx: kontron-sl-mx8mm: Enable bootaux command Frieder Schrempf
2022-07-13 9:52 ` [PATCH 06/14] imx: kontron-sl-mx8mm: lpddr4_timing.c: Add spaces for proper alignment Frieder Schrempf
2022-07-13 9:52 ` [PATCH 07/14] imx: kontron-sl-mx8mm: Remove 100mt DDR setpoint Frieder Schrempf
2022-07-13 9:52 ` [PATCH 08/14] imx: kontron-sl-mx8mm: Use new LPDDR4 config parameters Frieder Schrempf
2022-07-13 9:52 ` [PATCH 09/14] imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types Frieder Schrempf
2022-07-13 9:52 ` [PATCH 10/14] imx: kontron-sl-mx8mm: Adjust board and SoM model strings Frieder Schrempf
2022-07-13 9:52 ` Frieder Schrempf [this message]
2022-07-14 15:23 ` [PATCH 11/14] imx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card IO voltage Heiko Thiery
2022-07-13 9:52 ` [PATCH 12/14] imx: kontron-sl-mx8mm: Use voltage rail names from schematic for PMIC regulator-names Frieder Schrempf
2022-07-13 9:52 ` [PATCH 13/14] imx: kontron-sl-mx8mm: Simplify code in spl.c Frieder Schrempf
2022-07-13 9:52 ` [PATCH 14/14] imx: kontron-sl-mx8mm: Add support for Kontron Electronics SoM SL i.MX8MM OSM-S Frieder Schrempf
2022-07-25 13:03 ` [PATCH 00/14] imx: kontron-sl-mx8mm: Improvements and OSM board support Stefano Babic
2022-08-01 10:31 ` Frieder Schrempf
2022-08-01 11:23 ` Stefano Babic
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=20220713095229.43274-12-frieder@fris.de \
--to=frieder@fris.de \
--cc=aford173@gmail.com \
--cc=festevam@denx.de \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=heiko.thiery@gmail.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
/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