[PATCH 3/4] mips: octeon: mrvl,octeon_ebb7304.dts: Add MMC DT node

Stefan Roese sr at denx.de
Fri Mar 12 09:48:27 CET 2021


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 at denx.de>
Cc: Aaron Williams <awilliams at marvell.com>
Cc: Chandrakala Chavva <cchavva at marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck at 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



More information about the U-Boot mailing list