public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 3/4] mips: octeon: mrvl,octeon_ebb7304.dts: Add MMC DT node
Date: Fri, 12 Mar 2021 09:48:27 +0100	[thread overview]
Message-ID: <20210312084828.2647533-3-sr@denx.de> (raw)
In-Reply-To: <20210312084828.2647533-1-sr@denx.de>

Add the MMC DT node to the Octeon EBB7304 DT file including the
regulator node for the MMC power supply.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
 arch/mips/dts/mrvl,octeon-ebb7304.dts | 57 +++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/arch/mips/dts/mrvl,octeon-ebb7304.dts b/arch/mips/dts/mrvl,octeon-ebb7304.dts
index 993b4f6890..1bb34e1329 100644
--- a/arch/mips/dts/mrvl,octeon-ebb7304.dts
+++ b/arch/mips/dts/mrvl,octeon-ebb7304.dts
@@ -6,16 +6,36 @@
 /dts-v1/;
 
 #include "mrvl,cn73xx.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "cavium,ebb7304";
 	compatible = "cavium,ebb7304";
 
 	aliases {
+		mmc0 = &mmc0;
+		mmc1 = &mmc1;
 		serial0 = &uart0;
 		spi0 = &spi;
 	};
 
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* Power on GPIO 8, active high */
+		reg_mmc_3v3: regulator at 0 {
+			compatible = "regulator-fixed";
+			reg = <0>;
+			regulator-name = "mmc-3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
+			enable-active-high;
+		};
+	};
+
 	chosen {
 		stdout-path = &uart0;
 	};
@@ -137,3 +157,40 @@
 	 */
 	power = <&gpio 21 0>;
 };
+
+&mmc {
+	status = "okay";
+
+	/* The board has two MMC slots
+	 * If both are occupied, the speed must be reduced,
+	 * as extra data-line load increases slew time,
+	 * and dat-skew adjustment does not help significantly.
+	 */
+	mmc0: mmc-slot at 0 {
+		compatible = "cavium,octeon-6130-mmc-slot", "mmc-slot";
+		reg = <0>;
+		vqmmc-supply = <&reg_mmc_3v3>;
+		voltage-ranges = <3300 3300>;
+		//spi-max-frequency = <52000000>; // just one
+		spi-max-frequency = <37000000>; // both slots
+		/* bus width can be 1, 4 or 8 */
+		bus-width = <8>; /* new std property */
+		cavium,bus-max-width = <8>; /* custom property */
+		wp-gpios = <&gpio 22 0>; /* active high */
+		cd-gpios = <&gpio 23 1>; /* active low */
+	};
+
+	mmc1: mmc-slot at 1 {
+		compatible = "cavium,octeon-6130-mmc-slot", "mmc-slot";
+		reg = <1>;
+		vqmmc-supply = <&reg_mmc_3v3>;
+		voltage-ranges = <3300 3300>;
+		//spi-max-frequency = <52000000>; // just one
+		spi-max-frequency = <37000000>; // both slots
+		/* bus width can be 1, 4 or 8 */
+		bus-width = <8>; /* new std property */
+		cavium,bus-max-width = <8>; /* custom property */
+		wp-gpios = <&gpio 24 0>; /* active high */
+		cd-gpios = <&gpio 25 1>; /* active low */
+	};
+};
-- 
2.30.2

  parent reply	other threads:[~2021-03-12  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  8:48 [PATCH 1/4] mmc: octeontx_hsmmc: Add support for MIPS Octeon Stefan Roese
2021-03-12  8:48 ` [PATCH 2/4] mips: octeon: mrvl,cn73xx.dtsi: Add MMC DT node Stefan Roese
2021-03-12  8:48 ` Stefan Roese [this message]
2021-03-12  8:48 ` [PATCH 4/4] mips: octeon: octeon_ebb7304_defconfig: Enable MMC support Stefan Roese

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=20210312084828.2647533-3-sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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