Skip to contentSkip to conversation

Add support for UHS-I on Exynos5422 odroid boards

PATCH Superseded Anand Moon 2 participants 11 messages Sep 22, 2018 – Sep 27, 2018

Subsystems (3)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Anand Moon

author
#0 lore raw

v4 cover Add support for UHS-I on Exynos5422 odroid boards

This is series v4 since my previous patches were incomplete with driver changes missing.

v4 changes.
squash cd-gpios and wp-gpio changes into single patch. change the subject prefix to "ARM: dts: exynos:"

These changes add UHS-I tuning for dw_mmc-exynos driver.

Rebased on Krzysztof branch next/dt
[0] git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git

Anand Moon (6):
ARM: dts: exynos: Added UHS-I bus speed support
ARM: dts: exynos: fix regulator min values of LDO13 for Odroid XU3/XU4
ARM: dts: exynos: update maximum frequency for sdcard to 200MHz
ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card
ARM: dts: exynos: update maximum frequency for emmc to 200MHz
mmc: dw_mmc-exynos: Add tuning for sdr and ddr timing for USH-I mode

 arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  8 ++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      | 10 ++++++++--
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  1 +
 drivers/mmc/host/dw_mmc-exynos.c                   | 11 +++++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

v4 cover Add support for UHS-I on Exynos5422 odroid boards

This is series v4 since my previous patches were incomplete with driver changes missing.

v4 changes.
squash cd-gpios and wp-gpio changes into single patch. change the subject prefix to "ARM: dts: exynos:"

These changes add UHS-I tuning for dw_mmc-exynos driver.

Rebased on Krzysztof branch next/dt
[0] git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git

Anand Moon (6):
ARM: dts: exynos: Added UHS-I bus speed support
ARM: dts: exynos: fix regulator min values of LDO13 for Odroid XU3/XU4
ARM: dts: exynos: update maximum frequency for sdcard to 200MHz
ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card
ARM: dts: exynos: update maximum frequency for emmc to 200MHz
mmc: dw_mmc-exynos: Add tuning for sdr and ddr timing for USH-I mode

 arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  8 ++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      | 10 ++++++++--
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  1 +
 drivers/mmc/host/dw_mmc-exynos.c                   | 11 +++++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
#2 lore raw
Quoted 12 lines · Anand Moon

This is series v4 since my previous patches were incomplete with driver changes missing.

v4 changes.
squash cd-gpios and wp-gpio changes into single patch. change the subject prefix to "ARM: dts: exynos:"

These changes add UHS-I tuning for dw_mmc-exynos driver.

Rebased on Krzysztof branch next/dt
[0] git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git

Except the one about CD and WP pins (where I replied), they look ok. It would be nice if you get tested-by tags for them.

Best regards,
Krzysztof

Quoted 17 lines

Anand Moon (6):
ARM: dts: exynos: Added UHS-I bus speed support
ARM: dts: exynos: fix regulator min values of LDO13 for Odroid XU3/XU4
ARM: dts: exynos: update maximum frequency for sdcard to 200MHz
ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card
ARM: dts: exynos: update maximum frequency for emmc to 200MHz
mmc: dw_mmc-exynos: Add tuning for sdr and ddr timing for USH-I mode

 arch/arm/boot/dts/exynos5420-pinctrl.dtsi          |  8 ++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      | 10 ++++++++--
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  1 +
 drivers/mmc/host/dw_mmc-exynos.c                   | 11 +++++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
author
#3 lore raw

PATCH v4 1/6 ARM: dts: exynos: Added UHS-I bus speed support

In reply to Anand Moon

Added support for UHS-I bus speed tuning for SDR50, DDR50 SDR104.

---
[0] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-October/376263.html
Changes from above.
Fix the subject and commit message.
drop sd-uhs-sdr12 and sd-uhs-sdr25 as host driver is not enable as of now.

---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +3 -0
index 2fac4baf1eb4..0508e6891f41 100644
@@ -503,6 +503,9 @@
 	cap-sd-highspeed;
 	vmmc-supply = <&ldo19_reg>;
 	vqmmc-supply = <&ldo13_reg>;
+	sd-uhs-sdr50;
+	sd-uhs-sdr104;
+	sd-uhs-ddr50;
 };
 
 &nocp_mem0_0 {
Signature · 1 line
2.17.1
author
#4 lore raw

PATCH v4 2/6 ARM: dts: exynos: fix regulator min values of LDO13 for Odroid XU3/XU4

In reply to Anand Moon

Looking at the schematic sd_2 min/max range from 1.8V/2.8V so fix the regulator min value to 1.8V. Without these changes sdcard will failed to detect on booting when UHS-I tuning is enabled.

---
[0] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-October/376262.html
Fixed the commit message.
drop the ramp-delay changes.
drop the vmmc-supply/vqmmc-supply changes.

---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +1 -1
index 0508e6891f41..15ab380e5fcf 100644
@@ -231,7 +231,7 @@
 
 			ldo13_reg: LDO13 {
 				regulator-name = "vddq_mmc2";
-				regulator-min-microvolt = <2800000>;
+				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <2800000>;
 			};
 
Signature · 1 line
2.17.1
author
#5 lore raw

PATCH v4 3/6 ARM: dts: exynos: update maximum frequency for sdcard to 200MHz

In reply to Anand Moon

set the max-frequency to 200MHz for optimal performace.

---
This patch is new to this series.

microSD card.
root at odroid:~# sudo cat /sys/kernel/debug/mmc1/ios

clock:          200000000 Hz
actual clock:   200000000 Hz
vdd:            16 (2.8 ~ 2.9 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type:    0 (driver type B)
---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +1 -0
index 15ab380e5fcf..a80b6c045154 100644
@@ -501,6 +501,7 @@
 	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
 	bus-width = <4>;
 	cap-sd-highspeed;
+	max-frequency = <200000000>;
 	vmmc-supply = <&ldo19_reg>;
 	vqmmc-supply = <&ldo13_reg>;
 	sd-uhs-sdr50;
Signature · 1 line
2.17.1
author
#6 lore raw

PATCH v4 4/6 ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card

In reply to Anand Moon

Add the card-detect and write-protect GPIO pins for OdroidXU3/XU4 SD card by adding pinctrl setting for wp-gpio pin and set it to active low.

This also removes debug messages:
dwmmc_exynos 12220000.mmc: No GPIO consumer cd found dwmmc_exynos 12220000.mmc: No GPIO consumer wp found

---
Fix the commit message and squash it with cd-gpios and wp-gpio patches into single patch as suggested by Krzysztof.

---
 arch/arm/boot/dts/exynos5420-pinctrl.dtsi     | 8 ++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/exynos5420-pinctrl.dtsi +8 -0
index dda8ca2d2324..9a39a0d8ec86 100644
@@ -289,6 +289,14 @@
 		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
 		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV4>;
 	};
+
+	sd2_wp: sd2-wp {
+		samsung,pins = "gpc4-0";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+		/* Pin is floating so pull it up to disable write-protect */
+		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
+		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV4>;
+	};
 };
 
 &pinctrl_2 {
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +3 -1
index a80b6c045154..2aacfb669140 100644
@@ -498,10 +498,12 @@
 	samsung,dw-mshc-sdr-timing = <0 4>;
 	samsung,dw-mshc-ddr-timing = <0 2>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
+	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_wp &sd2_bus1 &sd2_bus4>;
 	bus-width = <4>;
 	cap-sd-highspeed;
 	max-frequency = <200000000>;
+	cd-gpios = <&gpc2 2 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&gpc4 0 GPIO_ACTIVE_LOW>;
 	vmmc-supply = <&ldo19_reg>;
 	vqmmc-supply = <&ldo13_reg>;
 	sd-uhs-sdr50;
Signature · 1 line
2.17.1
#7 lore raw

Re: [PATCHv4 4/6] ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card

Quoted 8 lines · Anand Moon

Add the card-detect and write-protect GPIO pins for OdroidXU3/XU4 SD card by adding pinctrl setting for wp-gpio pin and set it to active low.

This also removes debug messages:
dwmmc_exynos 12220000.mmc: No GPIO consumer cd found dwmmc_exynos 12220000.mmc: No GPIO consumer wp found

Quoted 5 lines

---
Fix the commit message and squash it with cd-gpios and wp-gpio patches into single patch as suggested by Krzysztof.

As Marek pointed to my Odroid XU patch, there is no point of adding cd-gpios and wp-gpios properties.

Adding pin configuration for wp pin is also not needed. Reset values are working properly. However there might be meaning of adding it just in case - if bootloader decided to touch it...

Best regards,
Krzysztof

Quoted 45 lines
---
 arch/arm/boot/dts/exynos5420-pinctrl.dtsi     | 8 ++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/exynos5420-pinctrl.dtsi +8 -0
index dda8ca2d2324..9a39a0d8ec86 100644
@@ -289,6 +289,14 @@
 		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
 		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV4>;
 	};
+
+	sd2_wp: sd2-wp {
+		samsung,pins = "gpc4-0";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+		/* Pin is floating so pull it up to disable write-protect */
+		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
+		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV4>;
+	};
 };
 
 &pinctrl_2 {
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +3 -1
index a80b6c045154..2aacfb669140 100644
@@ -498,10 +498,12 @@
 	samsung,dw-mshc-sdr-timing = <0 4>;
 	samsung,dw-mshc-ddr-timing = <0 2>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
+	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_wp &sd2_bus1 &sd2_bus4>;
 	bus-width = <4>;
 	cap-sd-highspeed;
 	max-frequency = <200000000>;
+	cd-gpios = <&gpc2 2 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&gpc4 0 GPIO_ACTIVE_LOW>;
 	vmmc-supply = <&ldo19_reg>;
 	vqmmc-supply = <&ldo13_reg>;
 	sd-uhs-sdr50;
Signature · 1 line
2.17.1
author
#8 lore raw

Re: [PATCHv4 4/6] ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card

Hi Krzysztof,

Quoted 19 lines · Krzysztof Kozlowski
Quoted 8 lines · Anand Moon

Add the card-detect and write-protect GPIO pins for OdroidXU3/XU4 SD card by adding pinctrl setting for wp-gpio pin and set it to active low.

This also removes debug messages:
dwmmc_exynos 12220000.mmc: No GPIO consumer cd found dwmmc_exynos 12220000.mmc: No GPIO consumer wp found

Quoted 5 lines

---
Fix the commit message and squash it with cd-gpios and wp-gpio patches into single patch as suggested by Krzysztof.

As Marek pointed to my Odroid XU patch, there is no point of adding cd-gpios and wp-gpios properties.

Quoted 7 lines

Adding pin configuration for wp pin is also not needed. Reset values are working properly. However there might be meaning of adding it just in case - if bootloader decided to touch it...

Best regards,
Krzysztof

Do I need to send the all the patches again or just resend this as per your patch for Odroid XU.
with dropping the cd-gpios and wp-gpios changes.

Best Regards
-Anand

#9 lore raw

Re: [PATCHv4 4/6] ARM: dts: exynos: Add CD and WP pins to Odroid XU3/XU4 SD card

Quoted 26 lines · Anand Moon

Hi Krzysztof,

Quoted 23 lines · Krzysztof Kozlowski
Quoted 8 lines · Anand Moon

Add the card-detect and write-protect GPIO pins for OdroidXU3/XU4 SD card by adding pinctrl setting for wp-gpio pin and set it to active low.

This also removes debug messages:
dwmmc_exynos 12220000.mmc: No GPIO consumer cd found dwmmc_exynos 12220000.mmc: No GPIO consumer wp found

Quoted 5 lines

---
Fix the commit message and squash it with cd-gpios and wp-gpio patches into single patch as suggested by Krzysztof.

As Marek pointed to my Odroid XU patch, there is no point of adding cd-gpios and wp-gpios properties.

Adding pin configuration for wp pin is also not needed. Reset values are working properly. However there might be meaning of adding it just in case - if bootloader decided to touch it...

Quoted 7 lines
Quoted 3 lines

Best regards,
Krzysztof

Do I need to send the all the patches again or just resend this as per your patch for Odroid XU.
with dropping the cd-gpios and wp-gpios changes.

I am fine with both (resend all or only this).

Best regards,
Krzysztof

author
#10 lore raw

PATCH v4 5/6 ARM: dts: exynos: update maximum frequency for emmc to 200MHz

In reply to Anand Moon

Set the max-frequency to 200MHz for optimal performace of eMMC.

---
eMMC

root at odroid:~# sudo cat /sys/kernel/debug/mmc0/ios

clock:          200000000 Hz
actual clock:   200000000 Hz
vdd:            7 (1.65 - 1.95 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      3 (8 bits)
timing spec:    10 (mmc HS400)
signal voltage: 1 (1.80 V)
driver type:    0 (driver type B)
---
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1 -0
index e522edb2bb82..1f2d3987dde1 100644
@@ -392,6 +392,7 @@
 	cap-mmc-highspeed;
 	mmc-hs200-1_8v;
 	mmc-hs400-1_8v;
+	max-frequency = <200000000>;
 	vmmc-supply = <&ldo18_reg>;
 	vqmmc-supply = <&ldo3_reg>;
 };
Signature · 1 line
2.17.1