public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Faiz Abbas <faiz_abbas@ti.com>
To: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Cc: <will@kernel.org>, <robh+dt@kernel.org>, <nm@ti.com>,
	<t-kristo@ti.com>, <faiz_abbas@ti.com>
Subject: [PATCH 6/8] arm64: dts: ti: k3-j7200-common-proc-board: Add support SD card UHS modes
Date: Fri, 2 Oct 2020 00:35:39 +0530	[thread overview]
Message-ID: <20201001190541.6364-7-faiz_abbas@ti.com> (raw)
In-Reply-To: <20201001190541.6364-1-faiz_abbas@ti.com>

Add support for UHS modes for the SD card connected at sdhci1. This
involves adding regulators for voltage switching and power cycling the
SD card and removing the no-1-8-v property.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 .../dts/ti/k3-j7200-common-proc-board.dts     | 32 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi     |  1 -
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
index 50d330245a42..02112c2a63e9 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
@@ -7,12 +7,36 @@
 
 #include "k3-j7200-som-p0.dtsi"
 #include <dt-bindings/net/ti-dp83867.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	chosen {
 		stdout-path = "serial2:115200n8";
 		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
 	};
+
+	vdd_mmc1: fixedregulator-sd {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_mmc1";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		enable-active-high;
+		gpios = <&exp2 2 GPIO_ACTIVE_HIGH>;
+	};
+
+	vdd_sd_dv: gpio-regulator-vdd-sd-dv {
+		compatible = "regulator-gpio";
+		regulator-name = "vdd_sd_dv";
+		pinctrl-names = "default";
+		pinctrl-0 = <&vdd_sd_dv_pins_default>;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		gpios = <&main_gpio0 55 GPIO_ACTIVE_HIGH>;
+		states = <1800000 0x0
+			  3300000 0x1>;
+	};
 };
 
 &wkup_pmx0 {
@@ -68,6 +92,12 @@
 			J721E_IOPAD(0xe4, PIN_INPUT, 8) /* (V1) TIMER_IO0.MMC1_SDCD */
 		>;
 	};
+
+	vdd_sd_dv_pins_default: vdd_sd_dv_pins_default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0xd0, PIN_INPUT, 7) /* (T5) SPI0_D1.GPIO0_55 */
+		>;
+	};
 };
 
 &wkup_uart0 {
@@ -196,6 +226,8 @@
 
 &main_sdhci1 {
 	/* SD card */
+	vmmc-supply = <&vdd_mmc1>;
+	vqmmc-supply = <&vdd_sd_dv>;
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	pinctrl-names = "default";
 	ti,driver-strength-ohm = <50>;
diff --git a/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
index f21f22237e0f..7307a94f7f3e 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi
@@ -392,7 +392,6 @@
 		ti,otap-del-sel-sdr50 = <0xc>;
 		ti,otap-del-sel-sdr104 = <0x5>;
 		ti,otap-del-sel-ddr50 = <0xc>;
-		no-1-8-v;
 		dma-coherent;
 	};
 
-- 
2.17.1


  parent reply	other threads:[~2020-10-01 19:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 19:05 [PATCH 0/8] Add support for UHS modes in TI's J721e and J7200 boards Faiz Abbas
2020-10-01 19:05 ` [PATCH 1/8] arm64: dts: ti: k3-j7200-main: Add gpio nodes in main domain Faiz Abbas
2020-10-01 19:05 ` [PATCH 2/8] arm64: dts: ti: k3-j7200: Add gpio nodes in wakeup domain Faiz Abbas
2020-10-01 19:05 ` [PATCH 3/8] arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio modules Faiz Abbas
2020-10-01 19:05 ` [PATCH 4/8] arm64: dts: ti: k3-j721e-main: Add output tap delay values Faiz Abbas
2020-10-01 19:05 ` [PATCH 5/8] arm64: dts: ti: k3-j721e-common-proc-board: Add support SD card UHS modes Faiz Abbas
2020-10-01 19:05 ` Faiz Abbas [this message]
2020-10-01 19:13 ` [PATCH 0/8] Add support for UHS modes in TI's J721e and J7200 boards Nishanth Menon
2020-10-02  4:44   ` Faiz Abbas
2020-10-02 12:49     ` Nishanth Menon
2020-10-02 16:09       ` Faiz Abbas
2020-10-26 14:55         ` Nishanth Menon

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=20201001190541.6364-7-faiz_abbas@ti.com \
    --to=faiz_abbas@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=will@kernel.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