* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
@ 2017-09-15 19:10 Marek Vasut
2017-09-25 16:47 ` Marek Vasut
0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2017-09-15 19:10 UTC (permalink / raw)
To: u-boot
Add initial support for setting the vqmmc regulator. Since we do not
support 1V8 modes, set the regulator to 3V3 and enable it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/uniphier-sd.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index 3c52161067..0d1203cb76 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -14,6 +14,7 @@
#include <linux/dma-direction.h>
#include <linux/io.h>
#include <linux/sizes.h>
+#include <power/regulator.h>
#include <asm/unaligned.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -756,6 +757,9 @@ static int uniphier_sd_probe(struct udevice *dev)
fdt_addr_t base;
struct clk clk;
int ret;
+#ifdef CONFIG_DM_REGULATOR
+ struct udevice *vqmmc_dev;
+#endif
base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
@@ -765,6 +769,15 @@ static int uniphier_sd_probe(struct udevice *dev)
if (!priv->regbase)
return -ENOMEM;
+#ifdef CONFIG_DM_REGULATOR
+ ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
+ if (!ret) {
+ /* Set the regulator to 3.3V until we support 1.8V modes */
+ regulator_set_value(vqmmc_dev, 3300000);
+ regulator_set_enable(vqmmc_dev, true);
+ }
+#endif
+
ret = clk_get_by_index(dev, 0, &clk);
if (ret < 0) {
dev_err(dev, "failed to get host clock\n");
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-15 19:10 [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support Marek Vasut
@ 2017-09-25 16:47 ` Marek Vasut
2017-09-26 7:41 ` Jaehoon Chung
2017-09-29 2:30 ` Jaehoon Chung
0 siblings, 2 replies; 8+ messages in thread
From: Marek Vasut @ 2017-09-25 16:47 UTC (permalink / raw)
To: u-boot
On 09/15/2017 09:10 PM, Marek Vasut wrote:
> Add initial support for setting the vqmmc regulator. Since we do not
> support 1V8 modes, set the regulator to 3V3 and enable it.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
Anything ?! I don't see this in the PR ...
> ---
> drivers/mmc/uniphier-sd.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
> index 3c52161067..0d1203cb76 100644
> --- a/drivers/mmc/uniphier-sd.c
> +++ b/drivers/mmc/uniphier-sd.c
> @@ -14,6 +14,7 @@
> #include <linux/dma-direction.h>
> #include <linux/io.h>
> #include <linux/sizes.h>
> +#include <power/regulator.h>
> #include <asm/unaligned.h>
>
> DECLARE_GLOBAL_DATA_PTR;
> @@ -756,6 +757,9 @@ static int uniphier_sd_probe(struct udevice *dev)
> fdt_addr_t base;
> struct clk clk;
> int ret;
> +#ifdef CONFIG_DM_REGULATOR
> + struct udevice *vqmmc_dev;
> +#endif
>
> base = devfdt_get_addr(dev);
> if (base == FDT_ADDR_T_NONE)
> @@ -765,6 +769,15 @@ static int uniphier_sd_probe(struct udevice *dev)
> if (!priv->regbase)
> return -ENOMEM;
>
> +#ifdef CONFIG_DM_REGULATOR
> + ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
> + if (!ret) {
> + /* Set the regulator to 3.3V until we support 1.8V modes */
> + regulator_set_value(vqmmc_dev, 3300000);
> + regulator_set_enable(vqmmc_dev, true);
> + }
> +#endif
> +
> ret = clk_get_by_index(dev, 0, &clk);
> if (ret < 0) {
> dev_err(dev, "failed to get host clock\n");
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-25 16:47 ` Marek Vasut
@ 2017-09-26 7:41 ` Jaehoon Chung
2017-09-27 15:19 ` Masahiro Yamada
2017-09-29 2:30 ` Jaehoon Chung
1 sibling, 1 reply; 8+ messages in thread
From: Jaehoon Chung @ 2017-09-26 7:41 UTC (permalink / raw)
To: u-boot
Hi Marek,
On 09/26/2017 01:47 AM, Marek Vasut wrote:
> On 09/15/2017 09:10 PM, Marek Vasut wrote:
>> Add initial support for setting the vqmmc regulator. Since we do not
>> support 1V8 modes, set the regulator to 3V3 and enable it.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>
> Anything ?! I don't see this in the PR ...
Sorry...I missed this patch..First, i have checked on patchwork.
Will pick this patch into u-boot-mmc.
Best Regards,
Jaehoon Chung
>
>> ---
>> drivers/mmc/uniphier-sd.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
>> index 3c52161067..0d1203cb76 100644
>> --- a/drivers/mmc/uniphier-sd.c
>> +++ b/drivers/mmc/uniphier-sd.c
>> @@ -14,6 +14,7 @@
>> #include <linux/dma-direction.h>
>> #include <linux/io.h>
>> #include <linux/sizes.h>
>> +#include <power/regulator.h>
>> #include <asm/unaligned.h>
>>
>> DECLARE_GLOBAL_DATA_PTR;
>> @@ -756,6 +757,9 @@ static int uniphier_sd_probe(struct udevice *dev)
>> fdt_addr_t base;
>> struct clk clk;
>> int ret;
>> +#ifdef CONFIG_DM_REGULATOR
>> + struct udevice *vqmmc_dev;
>> +#endif
>>
>> base = devfdt_get_addr(dev);
>> if (base == FDT_ADDR_T_NONE)
>> @@ -765,6 +769,15 @@ static int uniphier_sd_probe(struct udevice *dev)
>> if (!priv->regbase)
>> return -ENOMEM;
>>
>> +#ifdef CONFIG_DM_REGULATOR
>> + ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
>> + if (!ret) {
>> + /* Set the regulator to 3.3V until we support 1.8V modes */
>> + regulator_set_value(vqmmc_dev, 3300000);
>> + regulator_set_enable(vqmmc_dev, true);
>> + }
>> +#endif
>> +
>> ret = clk_get_by_index(dev, 0, &clk);
>> if (ret < 0) {
>> dev_err(dev, "failed to get host clock\n");
>>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-26 7:41 ` Jaehoon Chung
@ 2017-09-27 15:19 ` Masahiro Yamada
2017-09-27 15:50 ` Marek Vasut
0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2017-09-27 15:19 UTC (permalink / raw)
To: u-boot
2017-09-26 16:41 GMT+09:00 Jaehoon Chung <jh80.chung@samsung.com>:
> Hi Marek,
>
> On 09/26/2017 01:47 AM, Marek Vasut wrote:
>> On 09/15/2017 09:10 PM, Marek Vasut wrote:
>>> Add initial support for setting the vqmmc regulator. Since we do not
>>> support 1V8 modes, set the regulator to 3V3 and enable it.
>>>
>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>>
>> Anything ?! I don't see this in the PR ...
>
> Sorry...I missed this patch..First, i have checked on patchwork.
> Will pick this patch into u-boot-mmc.
>
> Best Regards,
> Jaehoon Chung
>
UniPhier SoCs have different mechanism for 3.3/1.8 switching,
but it is not a problem for me because I do not have a plan
for enabling CONFIG_DM_REGULATOR.
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-27 15:19 ` Masahiro Yamada
@ 2017-09-27 15:50 ` Marek Vasut
2017-09-27 16:13 ` Masahiro Yamada
0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2017-09-27 15:50 UTC (permalink / raw)
To: u-boot
On 09/27/2017 05:19 PM, Masahiro Yamada wrote:
> 2017-09-26 16:41 GMT+09:00 Jaehoon Chung <jh80.chung@samsung.com>:
>> Hi Marek,
>>
>> On 09/26/2017 01:47 AM, Marek Vasut wrote:
>>> On 09/15/2017 09:10 PM, Marek Vasut wrote:
>>>> Add initial support for setting the vqmmc regulator. Since we do not
>>>> support 1V8 modes, set the regulator to 3V3 and enable it.
>>>>
>>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>>>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>>>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>>>
>>> Anything ?! I don't see this in the PR ...
>>
>> Sorry...I missed this patch..First, i have checked on patchwork.
>> Will pick this patch into u-boot-mmc.
>>
>> Best Regards,
>> Jaehoon Chung
>>
>
>
> UniPhier SoCs have different mechanism for 3.3/1.8 switching,
> but it is not a problem for me because I do not have a plan
> for enabling CONFIG_DM_REGULATOR.
>
> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cool, thanks!
Is there a documentation for the uniphier mechanism somewhere ?
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-27 15:50 ` Marek Vasut
@ 2017-09-27 16:13 ` Masahiro Yamada
2017-09-27 19:29 ` Marek Vasut
0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2017-09-27 16:13 UTC (permalink / raw)
To: u-boot
2017-09-28 0:50 GMT+09:00 Marek Vasut <marek.vasut@gmail.com>:
> On 09/27/2017 05:19 PM, Masahiro Yamada wrote:
>> 2017-09-26 16:41 GMT+09:00 Jaehoon Chung <jh80.chung@samsung.com>:
>>> Hi Marek,
>>>
>>> On 09/26/2017 01:47 AM, Marek Vasut wrote:
>>>> On 09/15/2017 09:10 PM, Marek Vasut wrote:
>>>>> Add initial support for setting the vqmmc regulator. Since we do not
>>>>> support 1V8 modes, set the regulator to 3V3 and enable it.
>>>>>
>>>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>>>>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>>>>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>>>>
>>>> Anything ?! I don't see this in the PR ...
>>>
>>> Sorry...I missed this patch..First, i have checked on patchwork.
>>> Will pick this patch into u-boot-mmc.
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>
>>
>> UniPhier SoCs have different mechanism for 3.3/1.8 switching,
>> but it is not a problem for me because I do not have a plan
>> for enabling CONFIG_DM_REGULATOR.
>>
>> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Cool, thanks!
>
> Is there a documentation for the uniphier mechanism somewhere ?
>
No document available.
Only crappy private documents.
They say SoC spec books are CONFIDENTIAL!!
Sigh.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-27 16:13 ` Masahiro Yamada
@ 2017-09-27 19:29 ` Marek Vasut
0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2017-09-27 19:29 UTC (permalink / raw)
To: u-boot
On 09/27/2017 06:13 PM, Masahiro Yamada wrote:
> 2017-09-28 0:50 GMT+09:00 Marek Vasut <marek.vasut@gmail.com>:
>> On 09/27/2017 05:19 PM, Masahiro Yamada wrote:
>>> 2017-09-26 16:41 GMT+09:00 Jaehoon Chung <jh80.chung@samsung.com>:
>>>> Hi Marek,
>>>>
>>>> On 09/26/2017 01:47 AM, Marek Vasut wrote:
>>>>> On 09/15/2017 09:10 PM, Marek Vasut wrote:
>>>>>> Add initial support for setting the vqmmc regulator. Since we do not
>>>>>> support 1V8 modes, set the regulator to 3V3 and enable it.
>>>>>>
>>>>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>>>>>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>>>>>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>>>>>
>>>>> Anything ?! I don't see this in the PR ...
>>>>
>>>> Sorry...I missed this patch..First, i have checked on patchwork.
>>>> Will pick this patch into u-boot-mmc.
>>>>
>>>> Best Regards,
>>>> Jaehoon Chung
>>>>
>>>
>>>
>>> UniPhier SoCs have different mechanism for 3.3/1.8 switching,
>>> but it is not a problem for me because I do not have a plan
>>> for enabling CONFIG_DM_REGULATOR.
>>>
>>> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>
>> Cool, thanks!
>>
>> Is there a documentation for the uniphier mechanism somewhere ?
>>
>
> No document available.
I hope that new 96borad will have documentation available, *ahem* :-)
> Only crappy private documents.
>
> They say SoC spec books are CONFIDENTIAL!!
> Sigh.
OK, I'll keep in mind there's a uniphier-specific way to toggle the 1V8
when adding HS200 support, so you can fill that in when you have time.
Thanks!
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support
2017-09-25 16:47 ` Marek Vasut
2017-09-26 7:41 ` Jaehoon Chung
@ 2017-09-29 2:30 ` Jaehoon Chung
1 sibling, 0 replies; 8+ messages in thread
From: Jaehoon Chung @ 2017-09-29 2:30 UTC (permalink / raw)
To: u-boot
On 09/26/2017 01:47 AM, Marek Vasut wrote:
> On 09/15/2017 09:10 PM, Marek Vasut wrote:
>> Add initial support for setting the vqmmc regulator. Since we do not
>> support 1V8 modes, set the regulator to 3V3 and enable it.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>
> Anything ?! I don't see this in the PR ...
Applied to u-boot-mmc. Thanks!
Best Regards,
Jaehoon Chung
>
>> ---
>> drivers/mmc/uniphier-sd.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
>> index 3c52161067..0d1203cb76 100644
>> --- a/drivers/mmc/uniphier-sd.c
>> +++ b/drivers/mmc/uniphier-sd.c
>> @@ -14,6 +14,7 @@
>> #include <linux/dma-direction.h>
>> #include <linux/io.h>
>> #include <linux/sizes.h>
>> +#include <power/regulator.h>
>> #include <asm/unaligned.h>
>>
>> DECLARE_GLOBAL_DATA_PTR;
>> @@ -756,6 +757,9 @@ static int uniphier_sd_probe(struct udevice *dev)
>> fdt_addr_t base;
>> struct clk clk;
>> int ret;
>> +#ifdef CONFIG_DM_REGULATOR
>> + struct udevice *vqmmc_dev;
>> +#endif
>>
>> base = devfdt_get_addr(dev);
>> if (base == FDT_ADDR_T_NONE)
>> @@ -765,6 +769,15 @@ static int uniphier_sd_probe(struct udevice *dev)
>> if (!priv->regbase)
>> return -ENOMEM;
>>
>> +#ifdef CONFIG_DM_REGULATOR
>> + ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
>> + if (!ret) {
>> + /* Set the regulator to 3.3V until we support 1.8V modes */
>> + regulator_set_value(vqmmc_dev, 3300000);
>> + regulator_set_enable(vqmmc_dev, true);
>> + }
>> +#endif
>> +
>> ret = clk_get_by_index(dev, 0, &clk);
>> if (ret < 0) {
>> dev_err(dev, "failed to get host clock\n");
>>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-09-29 2:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 19:10 [U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support Marek Vasut
2017-09-25 16:47 ` Marek Vasut
2017-09-26 7:41 ` Jaehoon Chung
2017-09-27 15:19 ` Masahiro Yamada
2017-09-27 15:50 ` Marek Vasut
2017-09-27 16:13 ` Masahiro Yamada
2017-09-27 19:29 ` Marek Vasut
2017-09-29 2:30 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox