mbox series

[0/6] mmc: core: Enable mmc hosts to specify support for eMMC DDR 3.3V

Message ID 1485357143-23280-1-git-send-email-ulf.hansson@linaro.org
Headers show
Series mmc: core: Enable mmc hosts to specify support for eMMC DDR 3.3V | expand

Message

Ulf Hansson Jan. 25, 2017, 3:12 p.m. UTC
It's been reported that some mmc hosts don't support a VCCQ (signal voltage) of
1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC spec, an
eMMC card must support both if any, which makes the mmc host being the
potential limitation. Therefore, let's invent a new mmc cap, MMC_CAP_3_3V_DDR,
and a new corresponding DT binding, which tells whether 3.3V is supported for
the VCCQ.

In the context of these changes, I took the opportunity to make some clean-ups
of some related code.

Ulf Hansson (6):
  mmc: core: Remove redundant code in mmc_set_signal_voltage()
  mmc: core: Clarify usage of mmc_set_signal_voltage()
  mmc: core: Rename __mmc_set_signal_voltage() to
    mmc_set_signal_voltage()
  mmc: core: Invent MMC_CAP_3_3V_DDR
  mmc: dt: Document binding for eMMC DDR 3.3V I/O voltage support
  mmc: core: Extend mmc_of_parse() to check for mmc-ddr-3_3v

 Documentation/devicetree/bindings/mmc/mmc.txt |  1 +
 drivers/mmc/core/core.c                       | 19 ++++++-------------
 drivers/mmc/core/core.h                       |  4 ++--
 drivers/mmc/core/host.c                       |  2 ++
 drivers/mmc/core/mmc.c                        | 27 +++++++++++++++------------
 drivers/mmc/core/sd.c                         |  3 +--
 drivers/mmc/core/sdio.c                       |  3 +--
 include/linux/mmc/host.h                      | 21 ++++++++++-----------
 8 files changed, 38 insertions(+), 42 deletions(-)

-- 
1.9.1

Comments

Shawn Lin Jan. 27, 2017, 2:27 a.m. UTC | #1
On 2017/1/25 23:12, Ulf Hansson wrote:
> It's been reported that some mmc hosts don't support a VCCQ (signal voltage) of

> 1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC spec, an

> eMMC card must support both if any, which makes the mmc host being the

> potential limitation. Therefore, let's invent a new mmc cap, MMC_CAP_3_3V_DDR,

> and a new corresponding DT binding, which tells whether 3.3V is supported for

> the VCCQ.

>

> In the context of these changes, I took the opportunity to make some clean-ups

> of some related code.

>


This patchset looks good. Just a nit, maybe we could take this chance
to improve the patch 3 as we touch it now:)

s/mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180) == 0/
!mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180), and so on:)

Anyway,
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>


> Ulf Hansson (6):

>   mmc: core: Remove redundant code in mmc_set_signal_voltage()

>   mmc: core: Clarify usage of mmc_set_signal_voltage()

>   mmc: core: Rename __mmc_set_signal_voltage() to

>     mmc_set_signal_voltage()

>   mmc: core: Invent MMC_CAP_3_3V_DDR

>   mmc: dt: Document binding for eMMC DDR 3.3V I/O voltage support

>   mmc: core: Extend mmc_of_parse() to check for mmc-ddr-3_3v

>

>  Documentation/devicetree/bindings/mmc/mmc.txt |  1 +

>  drivers/mmc/core/core.c                       | 19 ++++++-------------

>  drivers/mmc/core/core.h                       |  4 ++--

>  drivers/mmc/core/host.c                       |  2 ++

>  drivers/mmc/core/mmc.c                        | 27 +++++++++++++++------------

>  drivers/mmc/core/sd.c                         |  3 +--

>  drivers/mmc/core/sdio.c                       |  3 +--

>  include/linux/mmc/host.h                      | 21 ++++++++++-----------

>  8 files changed, 38 insertions(+), 42 deletions(-)

>



-- 
Best Regards
Shawn Lin

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Jan. 27, 2017, 8:57 a.m. UTC | #2
On 27 January 2017 at 03:27, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> On 2017/1/25 23:12, Ulf Hansson wrote:

>>

>> It's been reported that some mmc hosts don't support a VCCQ (signal

>> voltage) of

>> 1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC

>> spec, an

>> eMMC card must support both if any, which makes the mmc host being the

>> potential limitation. Therefore, let's invent a new mmc cap,

>> MMC_CAP_3_3V_DDR,

>> and a new corresponding DT binding, which tells whether 3.3V is supported

>> for

>> the VCCQ.

>>

>> In the context of these changes, I took the opportunity to make some

>> clean-ups

>> of some related code.

>>

>

> This patchset looks good. Just a nit, maybe we could take this chance

> to improve the patch 3 as we touch it now:)

>

> s/mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180) == 0/

> !mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180), and so on:)


Good idea! I found three places in mmc_power_up() which I fixed up.

I postpone to send a new version, to wait for further comments. If
none, I will just amend the change in patch3/6.

>

> Anyway,

> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>


Thanks for reviewing!

[...]

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Glauber Jan. 27, 2017, 12:06 p.m. UTC | #3
On Wed, Jan 25, 2017 at 04:12:17PM +0100, Ulf Hansson wrote:
> It's been reported that some mmc hosts don't support a VCCQ (signal voltage) of

> 1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC spec, an

> eMMC card must support both if any, which makes the mmc host being the

> potential limitation. Therefore, let's invent a new mmc cap, MMC_CAP_3_3V_DDR,

> and a new corresponding DT binding, which tells whether 3.3V is supported for

> the VCCQ.

> 

> In the context of these changes, I took the opportunity to make some clean-ups

> of some related code.


Works fine with the new Cavium driver (enables DDR mode for the eMMC).

Tested-by: Jan Glauber <jglauber@cavium.com>


> Ulf Hansson (6):

>   mmc: core: Remove redundant code in mmc_set_signal_voltage()

>   mmc: core: Clarify usage of mmc_set_signal_voltage()

>   mmc: core: Rename __mmc_set_signal_voltage() to

>     mmc_set_signal_voltage()

>   mmc: core: Invent MMC_CAP_3_3V_DDR

>   mmc: dt: Document binding for eMMC DDR 3.3V I/O voltage support

>   mmc: core: Extend mmc_of_parse() to check for mmc-ddr-3_3v

> 

>  Documentation/devicetree/bindings/mmc/mmc.txt |  1 +

>  drivers/mmc/core/core.c                       | 19 ++++++-------------

>  drivers/mmc/core/core.h                       |  4 ++--

>  drivers/mmc/core/host.c                       |  2 ++

>  drivers/mmc/core/mmc.c                        | 27 +++++++++++++++------------

>  drivers/mmc/core/sd.c                         |  3 +--

>  drivers/mmc/core/sdio.c                       |  3 +--

>  include/linux/mmc/host.h                      | 21 ++++++++++-----------

>  8 files changed, 38 insertions(+), 42 deletions(-)

> 

> -- 

> 1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Jan. 27, 2017, 2:58 p.m. UTC | #4
On 25 January 2017 at 16:12, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> It's been reported that some mmc hosts don't support a VCCQ (signal voltage) of

> 1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC spec, an

> eMMC card must support both if any, which makes the mmc host being the

> potential limitation. Therefore, let's invent a new mmc cap, MMC_CAP_3_3V_DDR,

> and a new corresponding DT binding, which tells whether 3.3V is supported for

> the VCCQ.

>

> In the context of these changes, I took the opportunity to make some clean-ups

> of some related code.

>

> Ulf Hansson (6):

>   mmc: core: Remove redundant code in mmc_set_signal_voltage()

>   mmc: core: Clarify usage of mmc_set_signal_voltage()

>   mmc: core: Rename __mmc_set_signal_voltage() to

>     mmc_set_signal_voltage()

>   mmc: core: Invent MMC_CAP_3_3V_DDR

>   mmc: dt: Document binding for eMMC DDR 3.3V I/O voltage support

>   mmc: core: Extend mmc_of_parse() to check for mmc-ddr-3_3v

>

>  Documentation/devicetree/bindings/mmc/mmc.txt |  1 +

>  drivers/mmc/core/core.c                       | 19 ++++++-------------

>  drivers/mmc/core/core.h                       |  4 ++--

>  drivers/mmc/core/host.c                       |  2 ++

>  drivers/mmc/core/mmc.c                        | 27 +++++++++++++++------------

>  drivers/mmc/core/sd.c                         |  3 +--

>  drivers/mmc/core/sdio.c                       |  3 +--

>  include/linux/mmc/host.h                      | 21 ++++++++++-----------

>  8 files changed, 38 insertions(+), 42 deletions(-)

>

> --

> 1.9.1

>


Applied for next, amended patch 3/6 according to suggestions by Shawn.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stefan Wahren Jan. 30, 2017, 9:13 a.m. UTC | #5
Am 25.01.2017 um 16:12 schrieb Ulf Hansson:
> It's been reported that some mmc hosts don't support a VCCQ (signal voltage) of

> 1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC spec, an

> eMMC card must support both if any, which makes the mmc host being the

> potential limitation. Therefore, let's invent a new mmc cap, MMC_CAP_3_3V_DDR,

> and a new corresponding DT binding, which tells whether 3.3V is supported for

> the VCCQ.

>

> In the context of these changes, I took the opportunity to make some clean-ups

> of some related code.


I know this series has already been merged, but i want to mention that
it works fine with mxs-mmc on a i.MX28.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Jan. 30, 2017, 10:05 a.m. UTC | #6
On 30 January 2017 at 10:13, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Am 25.01.2017 um 16:12 schrieb Ulf Hansson:

>> It's been reported that some mmc hosts don't support a VCCQ (signal voltage) of

>> 1.8V for eMMC DDR mode, but instead only 3.3V. According to the JEDEC spec, an

>> eMMC card must support both if any, which makes the mmc host being the

>> potential limitation. Therefore, let's invent a new mmc cap, MMC_CAP_3_3V_DDR,

>> and a new corresponding DT binding, which tells whether 3.3V is supported for

>> the VCCQ.

>>

>> In the context of these changes, I took the opportunity to make some clean-ups

>> of some related code.

>

> I know this series has already been merged, but i want to mention that

> it works fine with mxs-mmc on a i.MX28.


Thanks! I have added your tested by tag.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html