linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] arm64: dts: meson: mmc clean-up
@ 2019-04-18 12:27 Jerome Brunet
  2019-04-18 12:27 ` [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable Jerome Brunet
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

The patchset is bunch of clean-up found while debugging meson mmc.

* The first 2 patches address the libretech-cc which actually uses 1.8v
  eMMC modules.
* Patch 3 is a pin bias fixup depending on mmc pins.
* Patch 4 lower the mmc max frequencies on gx chips. It was not easy
  to spot but, according to the datasheet, the maximum UHS rate
  supported by these chips is 100MHz (SDR50). This explains why we
  never really managed to get a stable SDR104. SDIO is limited to HS.
* Patch 5 adds missing pinctrl definition on the vim2
* Patch 6 remove hs400 from the supported modes of the vim2. This mode is
  mode reliable enough with HW/SW ATM.

When/If the series on the mmc drivers goes through, I'll send the
following updates:
* Push odroid-c2 eMMC max rate from 100Mhz to 200Mhz. With the new tuning
  method, this mode is finally stable on the OC2 (so far...)
* Enable SD UHS modes on the odroid-c2
* Enable SD UHS DDR50 on the nanopi k2

Jerome Brunet (6):
  arm64: dts: meson: libretech-cc: set eMMC as removable
  arm64: dts: meson: libretech-cc: switch eMMC to 1.8v
  arm64: dts: meson: fix mmc pin bias
  arm64: dts: meson: fix mmc v2 chips max frequencies
  arm64: dts: meson: vim2: add missing clk-gate pinctrl
  arm64: dts: meson: vim2: remove sd hs and hs400 modes from emmc

 .../arm64/boot/dts/amlogic/meson-axg-s400.dts |  4 +--
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi    | 31 ++++++++++++----
 .../boot/dts/amlogic/meson-gx-p23x-q20x.dtsi  |  4 +--
 .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts |  5 ++-
 .../dts/amlogic/meson-gxbb-nexbox-a95x.dts    |  2 +-
 .../boot/dts/amlogic/meson-gxbb-p20x.dtsi     |  2 +-
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi |  4 +--
 .../boot/dts/amlogic/meson-gxbb-wetek.dtsi    |  4 +--
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi   | 35 +++++++++++++------
 .../boot/dts/amlogic/meson-gxl-s805x-p241.dts |  2 +-
 .../amlogic/meson-gxl-s905x-libretech-cc.dts  | 14 ++++----
 .../amlogic/meson-gxl-s905x-nexbox-a95x.dts   |  2 +-
 .../dts/amlogic/meson-gxl-s905x-p212.dtsi     |  4 +--
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi    | 35 +++++++++++++------
 .../dts/amlogic/meson-gxm-khadas-vim2.dts     | 15 ++++----
 .../boot/dts/amlogic/meson-gxm-nexbox-a1.dts  |  2 +-
 .../boot/dts/amlogic/meson-gxm-rbox-pro.dts   |  4 +--
 17 files changed, 109 insertions(+), 60 deletions(-)

-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
@ 2019-04-18 12:27 ` Jerome Brunet
  2019-04-18 20:21   ` Martin Blumenstingl
  2019-04-18 12:27 ` [PATCH 2/6] arm64: dts: meson: libretech-cc: switch eMMC to 1.8v Jerome Brunet
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

The eMMC on this board is add-on module which is not mandatory. Removing
'non-removable' property should prevent some errors when booting a board
w/o an eMMC module present.

Fixes: 72fb2c852188 ("ARM64: dts: meson-gxl-s905x-libretech-cc: fixup board definition")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index 255cede7b447..d4d5e3e5439d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -255,7 +255,6 @@
 	cap-mmc-highspeed;
 	mmc-ddr-3_3v;
 	max-frequency = <50000000>;
-	non-removable;
 	disable-wp;
 
 	mmc-pwrseq = <&emmc_pwrseq>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/6] arm64: dts: meson: libretech-cc: switch eMMC to 1.8v
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
  2019-04-18 12:27 ` [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable Jerome Brunet
@ 2019-04-18 12:27 ` Jerome Brunet
  2019-04-18 19:46   ` Martin Blumenstingl
  2019-04-18 12:27 ` [PATCH 3/6] arm64: dts: meson: fix mmc pin bias Jerome Brunet
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

While some 3.3v eMMC 4.0 are available from libretech, Only the 1.8v 5.0
modules are recommended and supported for the aml-s905x-cc.

the 1.8v is provided by LDOs on the eMMC card, from vcc 3.3v

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index d4d5e3e5439d..b0f22cdb586c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -115,11 +115,13 @@
 		regulator-max-microvolt = <1800000>;
 	};
 
+	/* This is provided by LDOs on the eMMC daugther card */
 	vddio_boot: regulator-vddio_boot {
 		compatible = "regulator-fixed";
 		regulator-name = "VDDIO_BOOT";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vcc_3v3>;
 	};
 };
 
@@ -253,8 +255,9 @@
 
 	bus-width = <8>;
 	cap-mmc-highspeed;
-	mmc-ddr-3_3v;
-	max-frequency = <50000000>;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
+	max-frequency = <200000000>;
 	disable-wp;
 
 	mmc-pwrseq = <&emmc_pwrseq>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/6] arm64: dts: meson: fix mmc pin bias
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
  2019-04-18 12:27 ` [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable Jerome Brunet
  2019-04-18 12:27 ` [PATCH 2/6] arm64: dts: meson: libretech-cc: switch eMMC to 1.8v Jerome Brunet
@ 2019-04-18 12:27 ` Jerome Brunet
  2019-04-18 12:27 ` [PATCH 4/6] arm64: dts: meson: fix mmc v2 chips max frequencies Jerome Brunet
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

Clk pin does not require bias, data strobe should be pulled low.
The rest of the pin (data and cmd) are pulled up.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../arm64/boot/dts/amlogic/meson-axg-s400.dts |  4 +--
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi    | 31 ++++++++++++----
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi   | 35 +++++++++++++------
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi    | 35 +++++++++++++------
 4 files changed, 76 insertions(+), 29 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 75fe1a2c49d0..4cd2d5951822 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -482,8 +482,8 @@
 
 /* emmc storage */
 &sd_emmc_c {
-	status = "disabled";
-	pinctrl-0 = <&emmc_pins>;
+	status = "okay";
+	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
 	pinctrl-1 = <&emmc_clk_gate_pins>;
 	pinctrl-names = "default", "clk-gate";
 
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 34704fecf756..38169c85e91f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -299,7 +299,7 @@
 				};
 
 				emmc_pins: emmc {
-					mux {
+					mux-0 {
 						groups = "emmc_nand_d0",
 							 "emmc_nand_d1",
 							 "emmc_nand_d2",
@@ -308,14 +308,26 @@
 							 "emmc_nand_d5",
 							 "emmc_nand_d6",
 							 "emmc_nand_d7",
-							 "emmc_clk",
-							 "emmc_cmd",
-							 "emmc_ds";
+							 "emmc_cmd";
+						function = "emmc";
+						bias-pull-up;
+					};
+
+					mux-1 {
+						groups = "emmc_clk";
 						function = "emmc";
 						bias-disable;
 					};
 				};
 
+				emmc_ds_pins: emmc_ds {
+					mux {
+						groups = "emmc_ds";
+						function = "emmc";
+						bias-pull-down;
+					};
+				};
+
 				emmc_clk_gate_pins: emmc_clk_gate {
 					mux {
 						groups = "BOOT_8";
@@ -559,13 +571,18 @@
 				};
 
 				sdio_pins: sdio {
-					mux {
+					mux-0 {
 						groups = "sdio_d0",
 							 "sdio_d1",
 							 "sdio_d2",
 							 "sdio_d3",
-							 "sdio_cmd",
-							 "sdio_clk";
+							 "sdio_cmd";
+						function = "sdio";
+						bias-pull-up;
+					};
+
+					mux-1 {
+						groups = "sdio_clk";
 						function = "sdio";
 						bias-disable;
 					};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index a60d3652beee..f734faaf7b78 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -381,10 +381,15 @@
 		};
 
 		emmc_pins: emmc {
-			mux {
+			mux-0 {
 				groups = "emmc_nand_d07",
-				       "emmc_cmd",
-				       "emmc_clk";
+				       "emmc_cmd";
+				function = "emmc";
+				bias-pull-up;
+			};
+
+			mux-1 {
+				groups = "emmc_clk";
 				function = "emmc";
 				bias-disable;
 			};
@@ -394,7 +399,7 @@
 			mux {
 				groups = "emmc_ds";
 				function = "emmc";
-				bias-disable;
+				bias-pull-down;
 			};
 		};
 
@@ -436,13 +441,18 @@
 		};
 
 		sdcard_pins: sdcard {
-			mux {
+			mux-0 {
 				groups = "sdcard_d0",
 				       "sdcard_d1",
 				       "sdcard_d2",
 				       "sdcard_d3",
-				       "sdcard_cmd",
-				       "sdcard_clk";
+				       "sdcard_cmd";
+				function = "sdcard";
+				bias-pull-up;
+			};
+
+			mux-1 {
+				groups = "sdcard_clk";
 				function = "sdcard";
 				bias-disable;
 			};
@@ -457,13 +467,18 @@
 		};
 
 		sdio_pins: sdio {
-			mux {
+			mux-0 {
 				groups = "sdio_d0",
 				       "sdio_d1",
 				       "sdio_d2",
 				       "sdio_d3",
-				       "sdio_cmd",
-				       "sdio_clk";
+				       "sdio_cmd";
+				function = "sdio";
+				bias-pull-up;
+			};
+
+			mux-1 {
+				groups = "sdio_clk";
 				function = "sdio";
 				bias-disable;
 			};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 3093ae421b17..c959456bacc6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -326,10 +326,15 @@
 		};
 
 		emmc_pins: emmc {
-			mux {
+			mux-0 {
 				groups = "emmc_nand_d07",
-				       "emmc_cmd",
-				       "emmc_clk";
+				       "emmc_cmd";
+				function = "emmc";
+				bias-pull-up;
+			};
+
+			mux-1 {
+				groups = "emmc_clk";
 				function = "emmc";
 				bias-disable;
 			};
@@ -339,7 +344,7 @@
 			mux {
 				groups = "emmc_ds";
 				function = "emmc";
-				bias-disable;
+				bias-pull-down;
 			};
 		};
 
@@ -381,13 +386,18 @@
 		};
 
 		sdcard_pins: sdcard {
-			mux {
+			mux-0 {
 				groups = "sdcard_d0",
 				       "sdcard_d1",
 				       "sdcard_d2",
 				       "sdcard_d3",
-				       "sdcard_cmd",
-				       "sdcard_clk";
+				       "sdcard_cmd";
+				function = "sdcard";
+				bias-pull-up;
+			};
+
+			mux-1 {
+				groups = "sdcard_clk";
 				function = "sdcard";
 				bias-disable;
 			};
@@ -402,13 +412,18 @@
 		};
 
 		sdio_pins: sdio {
-			mux {
+			mux-0 {
 				groups = "sdio_d0",
 				       "sdio_d1",
 				       "sdio_d2",
 				       "sdio_d3",
-				       "sdio_cmd",
-				       "sdio_clk";
+				       "sdio_cmd";
+				function = "sdio";
+				bias-pull-up;
+			};
+
+			mux-1 {
+				groups = "sdio_clk";
 				function = "sdio";
 				bias-disable;
 			};
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/6] arm64: dts: meson: fix mmc v2 chips max frequencies
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
                   ` (2 preceding siblings ...)
  2019-04-18 12:27 ` [PATCH 3/6] arm64: dts: meson: fix mmc pin bias Jerome Brunet
@ 2019-04-18 12:27 ` Jerome Brunet
  2019-04-18 12:27 ` [PATCH 5/6] arm64: dts: meson: vim2: add missing clk-gate pinctrl Jerome Brunet
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

According the datasheets, emmc v2 chips (gxbb and gxl) don't support
more that 100Mhz in UHS-1 SD modes and HS in SDIO.

Align the max-frequency to 100MHz for UHS-1 and 50MHz for HS

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi          | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts         | 5 ++---
 arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts       | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi             | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi         | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi            | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts         | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi        | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts        | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts          | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts           | 4 ++--
 13 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
index 016641a41694..a9b778571cf5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
@@ -164,7 +164,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -184,7 +184,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
index ade2ee09ae96..be81f8958717 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
@@ -273,7 +273,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <200000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -301,8 +301,7 @@
 	sd-uhs-sdr12;
 	sd-uhs-sdr25;
 	sd-uhs-sdr50;
-	sd-uhs-sdr104;
-	max-frequency = <200000000>;
+	max-frequency = <100000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
index 25105ac96d55..3c54f26eef15 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
@@ -235,7 +235,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index 0be0f2a5d2fe..e8f925871edf 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -165,7 +165,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index ad4d50bd9d77..623bcb6594b1 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -126,7 +126,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -151,7 +151,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
index 2d2db783c44c..b0d74ab619b0 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
@@ -183,7 +183,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -208,7 +208,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts
index 70433e023fda..3a1484e5b8e1 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts
@@ -160,7 +160,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index b0f22cdb586c..4b8ce738e213 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -237,7 +237,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
index 9cbdb85fb591..26907ac82930 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
@@ -180,7 +180,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
index bc811a2faf42..e3c16f50814b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
@@ -114,7 +114,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -134,7 +134,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 3f086ed7de05..27beb813015b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -329,7 +329,7 @@
 	#size-cells = <0>;
 
 	bus-width = <4>;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -353,7 +353,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
index 25f3b6b14043..96fdb1856b7b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
@@ -144,7 +144,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
index 7fa20a8ede17..3d499675c9a8 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
@@ -143,7 +143,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 
 	non-removable;
 	disable-wp;
@@ -167,7 +167,7 @@
 
 	bus-width = <4>;
 	cap-sd-highspeed;
-	max-frequency = <100000000>;
+	max-frequency = <50000000>;
 	disable-wp;
 
 	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/6] arm64: dts: meson: vim2: add missing clk-gate pinctrl
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
                   ` (3 preceding siblings ...)
  2019-04-18 12:27 ` [PATCH 4/6] arm64: dts: meson: fix mmc v2 chips max frequencies Jerome Brunet
@ 2019-04-18 12:27 ` Jerome Brunet
  2019-04-18 20:21   ` Martin Blumenstingl
  2019-04-18 12:27 ` [PATCH 6/6] arm64: dts: meson: vim2: remove sd hs and hs400 modes from emmc Jerome Brunet
  2019-05-03 22:04 ` [PATCH 0/6] arm64: dts: meson: mmc clean-up Kevin Hilman
  6 siblings, 1 reply; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

For some reason the vim2 is missing the clk-gate pinctrl setting all
the other board have. Just add this missing bit

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 27beb813015b..766194ab0aa8 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -324,7 +324,8 @@
 &sd_emmc_a {
 	status = "okay";
 	pinctrl-0 = <&sdio_pins>;
-	pinctrl-names = "default";
+	pinctrl-1 = <&sdio_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
 	#address-cells = <1>;
 	#size-cells = <0>;
 
@@ -349,7 +350,8 @@
 &sd_emmc_b {
 	status = "okay";
 	pinctrl-0 = <&sdcard_pins>;
-	pinctrl-names = "default";
+	pinctrl-1 = <&sdcard_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
 
 	bus-width = <4>;
 	cap-sd-highspeed;
@@ -366,7 +368,8 @@
 &sd_emmc_c {
 	status = "okay";
 	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
-	pinctrl-names = "default";
+	pinctrl-1 = <&emmc_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
 
 	bus-width = <8>;
 	cap-sd-highspeed;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/6] arm64: dts: meson: vim2: remove sd hs and hs400 modes from emmc
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
                   ` (4 preceding siblings ...)
  2019-04-18 12:27 ` [PATCH 5/6] arm64: dts: meson: vim2: add missing clk-gate pinctrl Jerome Brunet
@ 2019-04-18 12:27 ` Jerome Brunet
  2019-05-03 22:04 ` [PATCH 0/6] arm64: dts: meson: mmc clean-up Kevin Hilman
  6 siblings, 0 replies; 11+ messages in thread
From: Jerome Brunet @ 2019-04-18 12:27 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

sd highspeed mode make no sense for an eMMC and HS400 is not working
at the moment.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 766194ab0aa8..c5f3f90a42ae 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -372,14 +372,12 @@
 	pinctrl-names = "default", "clk-gate";
 
 	bus-width = <8>;
-	cap-sd-highspeed;
 	cap-mmc-highspeed;
 	max-frequency = <200000000>;
 	non-removable;
 	disable-wp;
 	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
-	mmc-hs400-1_8v;
 
 	mmc-pwrseq = <&emmc_pwrseq>;
 	vmmc-supply = <&vcc_3v3>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/6] arm64: dts: meson: libretech-cc: switch eMMC to 1.8v
  2019-04-18 12:27 ` [PATCH 2/6] arm64: dts: meson: libretech-cc: switch eMMC to 1.8v Jerome Brunet
@ 2019-04-18 19:46   ` Martin Blumenstingl
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Blumenstingl @ 2019-04-18 19:46 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: devicetree, Kevin Hilman, linux-kernel, patchwork-bot+notify,
	linux-amlogic, linux-arm-kernel

On Thu, Apr 18, 2019 at 2:27 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> While some 3.3v eMMC 4.0 are available from libretech, Only the 1.8v 5.0
> modules are recommended and supported for the aml-s905x-cc.
>
> the 1.8v is provided by LDOs on the eMMC card, from vcc 3.3v
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

(I don't have an eMMC module for my Libretech-CC so I can't add a Tested-by)

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 5/6] arm64: dts: meson: vim2: add missing clk-gate pinctrl
  2019-04-18 12:27 ` [PATCH 5/6] arm64: dts: meson: vim2: add missing clk-gate pinctrl Jerome Brunet
@ 2019-04-18 20:21   ` Martin Blumenstingl
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Blumenstingl @ 2019-04-18 20:21 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: devicetree, Kevin Hilman, linux-kernel, patchwork-bot+notify,
	linux-amlogic, linux-arm-kernel

On Thu, Apr 18, 2019 at 2:28 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> For some reason the vim2 is missing the clk-gate pinctrl setting all
> the other board have. Just add this missing bit
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable
  2019-04-18 12:27 ` [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable Jerome Brunet
@ 2019-04-18 20:21   ` Martin Blumenstingl
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Blumenstingl @ 2019-04-18 20:21 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: devicetree, Kevin Hilman, linux-kernel, patchwork-bot+notify,
	linux-amlogic, linux-arm-kernel

On Thu, Apr 18, 2019 at 2:27 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> The eMMC on this board is add-on module which is not mandatory. Removing
> 'non-removable' property should prevent some errors when booting a board
> w/o an eMMC module present.
>
> Fixes: 72fb2c852188 ("ARM64: dts: meson-gxl-s905x-libretech-cc: fixup board definition")
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/6] arm64: dts: meson: mmc clean-up
  2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
                   ` (5 preceding siblings ...)
  2019-04-18 12:27 ` [PATCH 6/6] arm64: dts: meson: vim2: remove sd hs and hs400 modes from emmc Jerome Brunet
@ 2019-05-03 22:04 ` Kevin Hilman
  6 siblings, 0 replies; 11+ messages in thread
From: Kevin Hilman @ 2019-05-03 22:04 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: devicetree, linux-kernel, patchwork-bot+notify, linux-amlogic,
	linux-arm-kernel, Jerome Brunet

Jerome Brunet <jbrunet@baylibre.com> writes:

> The patchset is bunch of clean-up found while debugging meson mmc.
>
> * The first 2 patches address the libretech-cc which actually uses 1.8v
>   eMMC modules.
> * Patch 3 is a pin bias fixup depending on mmc pins.
> * Patch 4 lower the mmc max frequencies on gx chips. It was not easy
>   to spot but, according to the datasheet, the maximum UHS rate
>   supported by these chips is 100MHz (SDR50). This explains why we
>   never really managed to get a stable SDR104. SDIO is limited to HS.
> * Patch 5 adds missing pinctrl definition on the vim2
> * Patch 6 remove hs400 from the supported modes of the vim2. This mode is
>   mode reliable enough with HW/SW ATM.

Queued for v5.3 (branch: v5.3/dt64)

Kevin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-05-03 22:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 12:27 [PATCH 0/6] arm64: dts: meson: mmc clean-up Jerome Brunet
2019-04-18 12:27 ` [PATCH 1/6] arm64: dts: meson: libretech-cc: set eMMC as removable Jerome Brunet
2019-04-18 20:21   ` Martin Blumenstingl
2019-04-18 12:27 ` [PATCH 2/6] arm64: dts: meson: libretech-cc: switch eMMC to 1.8v Jerome Brunet
2019-04-18 19:46   ` Martin Blumenstingl
2019-04-18 12:27 ` [PATCH 3/6] arm64: dts: meson: fix mmc pin bias Jerome Brunet
2019-04-18 12:27 ` [PATCH 4/6] arm64: dts: meson: fix mmc v2 chips max frequencies Jerome Brunet
2019-04-18 12:27 ` [PATCH 5/6] arm64: dts: meson: vim2: add missing clk-gate pinctrl Jerome Brunet
2019-04-18 20:21   ` Martin Blumenstingl
2019-04-18 12:27 ` [PATCH 6/6] arm64: dts: meson: vim2: remove sd hs and hs400 modes from emmc Jerome Brunet
2019-05-03 22:04 ` [PATCH 0/6] arm64: dts: meson: mmc clean-up Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).