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(-)
--
2.17.1
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(-)
--
2.17.1
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.
Signed-off-by: Anand Moon <[email protected]>
---
[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(-)
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 0508e6891f41..15ab380e5fcf 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -231,7 +231,7 @@
ldo13_reg: LDO13 {
regulator-name = "vddq_mmc2";
- regulator-min-microvolt = <2800000>;
+ regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2800000>;
};
--
2.17.1
set the max-frequency to 200MHz for optimal performace.
Signed-off-by: Anand Moon <[email protected]>
---
This patch is new to this series.
microSD card.
root@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(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 15ab380e5fcf..a80b6c045154 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -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;
--
2.17.1
Set the max-frequency to 200MHz for optimal performace of eMMC.
Signed-off-by: Anand Moon <[email protected]>
---
eMMC
root@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(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index e522edb2bb82..1f2d3987dde1 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -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>;
};
--
2.17.1
Added support for UHS-I bus speed tuning for SDR50, DDR50 SDR104.
Signed-off-by: Anand Moon <[email protected]>
---
[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(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 2fac4baf1eb4..0508e6891f41 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -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 {
--
2.17.1
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
Suggested-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
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(-)
diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
index dda8ca2d2324..9a39a0d8ec86 100644
--- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
@@ -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 {
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index a80b6c045154..2aacfb669140 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -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;
--
2.17.1
On Sat, Sep 22, 2018 at 07:52:36AM +0000, Anand Moon wrote:
> 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
>
> Suggested-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Anand Moon <[email protected]>
> ---
> 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
> ---
> arch/arm/boot/dts/exynos5420-pinctrl.dtsi | 8 ++++++++
> arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 4 +++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
> index dda8ca2d2324..9a39a0d8ec86 100644
> --- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
> index a80b6c045154..2aacfb669140 100644
> --- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
> +++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
> @@ -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;
> --
> 2.17.1
>
On Sat, Sep 22, 2018 at 07:52:32AM +0000, Anand Moon wrote:
> 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
> 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(-)
>
> --
> 2.17.1
>
Hi Krzysztof,
On Thu, 27 Sep 2018 at 00:36, Krzysztof Kozlowski <[email protected]> wrote:
>
> On Sat, Sep 22, 2018 at 07:52:36AM +0000, Anand Moon wrote:
> > 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
> >
> > Suggested-by: Krzysztof Kozlowski <[email protected]>
> > Signed-off-by: Anand Moon <[email protected]>
> > ---
> > 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
>
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
On Thu, 27 Sep 2018 at 05:45, Anand Moon <[email protected]> wrote:
>
> Hi Krzysztof,
> On Thu, 27 Sep 2018 at 00:36, Krzysztof Kozlowski <[email protected]> wrote:
> >
> > On Sat, Sep 22, 2018 at 07:52:36AM +0000, Anand Moon wrote:
> > > 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
> > >
> > > Suggested-by: Krzysztof Kozlowski <[email protected]>
> > > Signed-off-by: Anand Moon <[email protected]>
> > > ---
> > > 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
> >
>
> 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