[U-Boot] [PATCH 4/5] mmc: uniphier-sd: sync with Linux

Masahiro Yamada yamada.masahiro at socionext.com
Mon Sep 10 03:58:35 UTC 2018


Sync with the driver code and the binding recently merged in Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

 arch/arm/dts/uniphier-ld20.dtsi    |  2 +-
 arch/arm/dts/uniphier-ld4.dtsi     | 14 +++++++-------
 arch/arm/dts/uniphier-pinctrl.dtsi |  7 +------
 arch/arm/dts/uniphier-pro4-ref.dts |  4 ----
 arch/arm/dts/uniphier-pro4.dtsi    | 23 ++++++++++-------------
 arch/arm/dts/uniphier-pro5.dtsi    | 15 +++++++--------
 arch/arm/dts/uniphier-pxs2.dtsi    | 15 +++++++--------
 arch/arm/dts/uniphier-pxs3.dtsi    |  8 ++++++--
 arch/arm/dts/uniphier-sld8.dtsi    | 14 +++++++-------
 drivers/mmc/uniphier-sd.c          |  4 +++-
 10 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/arch/arm/dts/uniphier-ld20.dtsi b/arch/arm/dts/uniphier-ld20.dtsi
index 35867ab..9970497 100644
--- a/arch/arm/dts/uniphier-ld20.dtsi
+++ b/arch/arm/dts/uniphier-ld20.dtsi
@@ -529,7 +529,7 @@
 		};
 
 		sd: sdhc at 5a400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v3.1.1";
 			status = "disabled";
 			reg = <0x5a400000 0x800>;
 			interrupts = <0 76 4>;
diff --git a/arch/arm/dts/uniphier-ld4.dtsi b/arch/arm/dts/uniphier-ld4.dtsi
index e3d3138..f505f64 100644
--- a/arch/arm/dts/uniphier-ld4.dtsi
+++ b/arch/arm/dts/uniphier-ld4.dtsi
@@ -225,13 +225,13 @@
 		};
 
 		sd: sdhc at 5a400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a400000 0x200>;
 			interrupts = <0 76 4>;
-			pinctrl-names = "default", "1.8v";
+			pinctrl-names = "default", "uhs";
 			pinctrl-0 = <&pinctrl_sd>;
-			pinctrl-1 = <&pinctrl_sd_1v8>;
+			pinctrl-1 = <&pinctrl_sd_uhs>;
 			clocks = <&mio_clk 0>;
 			reset-names = "host", "bridge";
 			resets = <&mio_rst 0>, <&mio_rst 3>;
@@ -243,19 +243,19 @@
 		};
 
 		emmc: sdhc at 5a500000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a500000 0x200>;
 			interrupts = <0 78 4>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_emmc>;
 			clocks = <&mio_clk 1>;
-			reset-names = "host", "bridge";
-			resets = <&mio_rst 1>, <&mio_rst 4>;
+			reset-names = "host", "bridge", "hw";
+			resets = <&mio_rst 1>, <&mio_rst 4>, <&mio_rst 6>;
 			bus-width = <8>;
-			non-removable;
 			cap-mmc-highspeed;
 			cap-mmc-hw-reset;
+			non-removable;
 		};
 
 		usb0: usb at 5a800100 {
diff --git a/arch/arm/dts/uniphier-pinctrl.dtsi b/arch/arm/dts/uniphier-pinctrl.dtsi
index 2dc86d2..aeb47b0 100644
--- a/arch/arm/dts/uniphier-pinctrl.dtsi
+++ b/arch/arm/dts/uniphier-pinctrl.dtsi
@@ -121,7 +121,7 @@
 		function = "sd";
 	};
 
-	pinctrl_sd_1v8: sd-1v8 {
+	pinctrl_sd_uhs: sd-uhs {
 		groups = "sd";
 		function = "sd";
 	};
@@ -131,11 +131,6 @@
 		function = "sd1";
 	};
 
-	pinctrl_sd1_1v8: sd1-1v8 {
-		groups = "sd1";
-		function = "sd1";
-	};
-
 	pinctrl_system_bus: system-bus {
 		groups = "system_bus", "system_bus_cs1";
 		function = "system_bus";
diff --git a/arch/arm/dts/uniphier-pro4-ref.dts b/arch/arm/dts/uniphier-pro4-ref.dts
index 198add3..06065eb 100644
--- a/arch/arm/dts/uniphier-pro4-ref.dts
+++ b/arch/arm/dts/uniphier-pro4-ref.dts
@@ -70,10 +70,6 @@
 	status = "okay";
 };
 
-&sd1 {
-	status = "okay";
-};
-
 &usb2 {
 	status = "okay";
 };
diff --git a/arch/arm/dts/uniphier-pro4.dtsi b/arch/arm/dts/uniphier-pro4.dtsi
index 3cd9b72..8974844 100644
--- a/arch/arm/dts/uniphier-pro4.dtsi
+++ b/arch/arm/dts/uniphier-pro4.dtsi
@@ -259,13 +259,13 @@
 		};
 
 		sd: sdhc at 5a400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a400000 0x200>;
 			interrupts = <0 76 4>;
-			pinctrl-names = "default", "1.8v";
+			pinctrl-names = "default", "uhs";
 			pinctrl-0 = <&pinctrl_sd>;
-			pinctrl-1 = <&pinctrl_sd_1v8>;
+			pinctrl-1 = <&pinctrl_sd_uhs>;
 			clocks = <&mio_clk 0>;
 			reset-names = "host", "bridge";
 			resets = <&mio_rst 0>, <&mio_rst 3>;
@@ -277,36 +277,33 @@
 		};
 
 		emmc: sdhc at 5a500000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a500000 0x200>;
 			interrupts = <0 78 4>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_emmc>;
 			clocks = <&mio_clk 1>;
-			reset-names = "host", "bridge";
-			resets = <&mio_rst 1>, <&mio_rst 4>;
+			reset-names = "host", "bridge", "hw";
+			resets = <&mio_rst 1>, <&mio_rst 4>, <&mio_rst 6>;
 			bus-width = <8>;
-			non-removable;
 			cap-mmc-highspeed;
 			cap-mmc-hw-reset;
+			non-removable;
 		};
 
 		sd1: sdhc at 5a600000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a600000 0x200>;
 			interrupts = <0 85 4>;
-			pinctrl-names = "default", "1.8v";
+			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_sd1>;
-			pinctrl-1 = <&pinctrl_sd1_1v8>;
 			clocks = <&mio_clk 2>;
+			reset-names = "host", "bridge";
 			resets = <&mio_rst 2>, <&mio_rst 5>;
 			bus-width = <4>;
 			cap-sd-highspeed;
-			sd-uhs-sdr12;
-			sd-uhs-sdr25;
-			sd-uhs-sdr50;
 		};
 
 		usb2: usb at 5a800100 {
diff --git a/arch/arm/dts/uniphier-pro5.dtsi b/arch/arm/dts/uniphier-pro5.dtsi
index 6aea9af..6e0ea79 100644
--- a/arch/arm/dts/uniphier-pro5.dtsi
+++ b/arch/arm/dts/uniphier-pro5.dtsi
@@ -480,30 +480,29 @@
 		};
 
 		emmc: sdhc at 68400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v3.1";
 			status = "disabled";
 			reg = <0x68400000 0x800>;
 			interrupts = <0 78 4>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_emmc>;
 			clocks = <&sd_clk 1>;
-			reset-names = "host";
-			resets = <&sd_rst 1>;
+			reset-names = "host", "hw";
+			resets = <&sd_rst 1>, <&sd_rst 6>;
 			bus-width = <8>;
-			non-removable;
 			cap-mmc-highspeed;
 			cap-mmc-hw-reset;
-			no-3-3-v;
+			non-removable;
 		};
 
 		sd: sdhc at 68800000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v3.1";
 			status = "disabled";
 			reg = <0x68800000 0x800>;
 			interrupts = <0 76 4>;
-			pinctrl-names = "default", "1.8v";
+			pinctrl-names = "default", "uhs";
 			pinctrl-0 = <&pinctrl_sd>;
-			pinctrl-1 = <&pinctrl_sd_1v8>;
+			pinctrl-1 = <&pinctrl_sd_uhs>;
 			clocks = <&sd_clk 0>;
 			reset-names = "host";
 			resets = <&sd_rst 0>;
diff --git a/arch/arm/dts/uniphier-pxs2.dtsi b/arch/arm/dts/uniphier-pxs2.dtsi
index 48782a5..63c1c2c 100644
--- a/arch/arm/dts/uniphier-pxs2.dtsi
+++ b/arch/arm/dts/uniphier-pxs2.dtsi
@@ -423,30 +423,29 @@
 		};
 
 		emmc: sdhc at 5a000000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v3.1.1";
 			status = "disabled";
 			reg = <0x5a000000 0x800>;
 			interrupts = <0 78 4>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_emmc>;
 			clocks = <&sd_clk 1>;
-			reset-names = "host";
-			resets = <&sd_rst 1>;
+			reset-names = "host", "hw";
+			resets = <&sd_rst 1>, <&sd_rst 6>;
 			bus-width = <8>;
-			non-removable;
 			cap-mmc-highspeed;
 			cap-mmc-hw-reset;
-			no-3-3-v;
+			non-removable;
 		};
 
 		sd: sdhc at 5a400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v3.1.1";
 			status = "disabled";
 			reg = <0x5a400000 0x800>;
 			interrupts = <0 76 4>;
-			pinctrl-names = "default", "1.8v";
+			pinctrl-names = "default", "uhs";
 			pinctrl-0 = <&pinctrl_sd>;
-			pinctrl-1 = <&pinctrl_sd_1v8>;
+			pinctrl-1 = <&pinctrl_sd_uhs>;
 			clocks = <&sd_clk 0>;
 			reset-names = "host";
 			resets = <&sd_rst 0>;
diff --git a/arch/arm/dts/uniphier-pxs3.dtsi b/arch/arm/dts/uniphier-pxs3.dtsi
index c6ec63c..daf7453 100644
--- a/arch/arm/dts/uniphier-pxs3.dtsi
+++ b/arch/arm/dts/uniphier-pxs3.dtsi
@@ -342,17 +342,21 @@
 		};
 
 		sd: sdhc at 5a400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v3.1.1";
 			status = "disabled";
 			reg = <0x5a400000 0x800>;
 			interrupts = <0 76 4>;
-			pinctrl-names = "default";
+			pinctrl-names = "default", "uhs";
 			pinctrl-0 = <&pinctrl_sd>;
+			pinctrl-1 = <&pinctrl_sd_uhs>;
 			clocks = <&sd_clk 0>;
 			reset-names = "host";
 			resets = <&sd_rst 0>;
 			bus-width = <4>;
 			cap-sd-highspeed;
+			sd-uhs-sdr12;
+			sd-uhs-sdr25;
+			sd-uhs-sdr50;
 		};
 
 		soc_glue: soc-glue at 5f800000 {
diff --git a/arch/arm/dts/uniphier-sld8.dtsi b/arch/arm/dts/uniphier-sld8.dtsi
index 35c2f85..437265b 100644
--- a/arch/arm/dts/uniphier-sld8.dtsi
+++ b/arch/arm/dts/uniphier-sld8.dtsi
@@ -229,13 +229,13 @@
 		};
 
 		sd: sdhc at 5a400000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a400000 0x200>;
 			interrupts = <0 76 4>;
-			pinctrl-names = "default", "1.8v";
+			pinctrl-names = "default", "uhs";
 			pinctrl-0 = <&pinctrl_sd>;
-			pinctrl-1 = <&pinctrl_sd_1v8>;
+			pinctrl-1 = <&pinctrl_sd_uhs>;
 			clocks = <&mio_clk 0>;
 			reset-names = "host", "bridge";
 			resets = <&mio_rst 0>, <&mio_rst 3>;
@@ -247,19 +247,19 @@
 		};
 
 		emmc: sdhc at 5a500000 {
-			compatible = "socionext,uniphier-sdhc";
+			compatible = "socionext,uniphier-sd-v2.91";
 			status = "disabled";
 			reg = <0x5a500000 0x200>;
 			interrupts = <0 78 4>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_emmc>;
 			clocks = <&mio_clk 1>;
-			reset-names = "host", "bridge";
-			resets = <&mio_rst 1>, <&mio_rst 4>;
+			reset-names = "host", "bridge", "hw";
+			resets = <&mio_rst 1>, <&mio_rst 4>, <&mio_rst 6>;
 			bus-width = <8>;
-			non-removable;
 			cap-mmc-highspeed;
 			cap-mmc-hw-reset;
+			non-removable;
 		};
 
 		usb0: usb at 5a800100 {
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index ad5dbb3..813c284 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -25,7 +25,9 @@ static const struct dm_mmc_ops uniphier_sd_ops = {
 };
 
 static const struct udevice_id uniphier_sd_match[] = {
-	{ .compatible = "socionext,uniphier-sdhc", .data = 0 },
+	{ .compatible = "socionext,uniphier-sd-v2.91" },
+	{ .compatible = "socionext,uniphier-sd-v3.1" },
+	{ .compatible = "socionext,uniphier-sd-v3.1.1" },
 	{ /* sentinel */ }
 };
 
-- 
2.7.4



More information about the U-Boot mailing list