* [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards
@ 2017-03-15 9:28 Jacob Chen
2017-03-15 9:28 ` [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support Jacob Chen
2017-03-26 2:39 ` [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards Simon Glass
0 siblings, 2 replies; 6+ messages in thread
From: Jacob Chen @ 2017-03-15 9:28 UTC (permalink / raw)
To: u-boot
we are using mmc alias , so mmc index have been changed.
now mmc dev 0 is emmc and mmc dev 1 is sdmmc.
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
---
include/configs/evb_rk3288.h | 2 +-
include/configs/fennec_rk3288.h | 2 +-
include/configs/popmetal_rk3288.h | 2 +-
include/configs/tinker_rk3288.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/configs/evb_rk3288.h b/include/configs/evb_rk3288.h
index 6a068bb..bbd54a1 100644
--- a/include/configs/evb_rk3288.h
+++ b/include/configs/evb_rk3288.h
@@ -11,7 +11,7 @@
#include <configs/rk3288_common.h>
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 1
+#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_WHITE_ON_BLACK
diff --git a/include/configs/fennec_rk3288.h b/include/configs/fennec_rk3288.h
index 6a068bb..bbd54a1 100644
--- a/include/configs/fennec_rk3288.h
+++ b/include/configs/fennec_rk3288.h
@@ -11,7 +11,7 @@
#include <configs/rk3288_common.h>
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 1
+#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_WHITE_ON_BLACK
diff --git a/include/configs/popmetal_rk3288.h b/include/configs/popmetal_rk3288.h
index 6a068bb..bbd54a1 100644
--- a/include/configs/popmetal_rk3288.h
+++ b/include/configs/popmetal_rk3288.h
@@ -11,7 +11,7 @@
#include <configs/rk3288_common.h>
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 1
+#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_WHITE_ON_BLACK
diff --git a/include/configs/tinker_rk3288.h b/include/configs/tinker_rk3288.h
index c398e07..5228528 100644
--- a/include/configs/tinker_rk3288.h
+++ b/include/configs/tinker_rk3288.h
@@ -16,7 +16,7 @@
func(MMC, mmc, 1)
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_DEV 1
#define CONFIG_SYS_WHITE_ON_BLACK
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support
2017-03-15 9:28 [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards Jacob Chen
@ 2017-03-15 9:28 ` Jacob Chen
2017-03-21 18:56 ` Joe Hershberger
2017-03-26 2:39 ` [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards Simon Glass
1 sibling, 1 reply; 6+ messages in thread
From: Jacob Chen @ 2017-03-15 9:28 UTC (permalink / raw)
To: u-boot
Some board need a regulator for gmac phy, so add this code to handle it.
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
---
drivers/net/gmac_rockchip.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index e9b202a..63cccc9 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -17,6 +17,7 @@
#include <asm/arch/grf_rk3288.h>
#include <dm/pinctrl.h>
#include <dt-bindings/clock/rk3288-cru.h>
+#include <power/regulator.h>
#include "designware.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -79,6 +80,22 @@ static int gmac_rockchip_probe(struct udevice *dev)
struct clk clk;
int ret;
+#if defined(CONFIG_DM_REGULATOR)
+ struct udevice *phy_supply;
+
+ ret = device_get_supply_regulator(dev, "phy-supply",
+ &phy_supply);
+ if (ret) {
+ debug("%s: No phy supply\n", dev->name);
+ } else {
+ ret = regulator_set_enable(phy_supply, true);
+ if (ret) {
+ puts("Error enabling phy supply\n");
+ return ret;
+ }
+ }
+#endif
+
ret = clk_get_by_index(dev, 0, &clk);
if (ret)
return ret;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support
2017-03-15 9:28 ` [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support Jacob Chen
@ 2017-03-21 18:56 ` Joe Hershberger
2017-03-22 3:17 ` Jacob Chen
0 siblings, 1 reply; 6+ messages in thread
From: Joe Hershberger @ 2017-03-21 18:56 UTC (permalink / raw)
To: u-boot
On Wed, Mar 15, 2017 at 4:28 AM, Jacob Chen <jacob2.chen@rock-chips.com> wrote:
> Some board need a regulator for gmac phy, so add this code to handle it.
>
> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
> ---
>
> drivers/net/gmac_rockchip.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
> index e9b202a..63cccc9 100644
> --- a/drivers/net/gmac_rockchip.c
> +++ b/drivers/net/gmac_rockchip.c
> @@ -17,6 +17,7 @@
> #include <asm/arch/grf_rk3288.h>
> #include <dm/pinctrl.h>
> #include <dt-bindings/clock/rk3288-cru.h>
> +#include <power/regulator.h>
> #include "designware.h"
>
> DECLARE_GLOBAL_DATA_PTR;
> @@ -79,6 +80,22 @@ static int gmac_rockchip_probe(struct udevice *dev)
> struct clk clk;
> int ret;
>
> +#if defined(CONFIG_DM_REGULATOR)
> + struct udevice *phy_supply;
> +
> + ret = device_get_supply_regulator(dev, "phy-supply",
> + &phy_supply);
> + if (ret) {
> + debug("%s: No phy supply\n", dev->name);
> + } else {
> + ret = regulator_set_enable(phy_supply, true);
> + if (ret) {
> + puts("Error enabling phy supply\n");
> + return ret;
> + }
> + }
> +#endif
> +
This seems pretty generic. Is there maybe a more common place this
could live? Or is the phy-supply binding in DT only defined for
rockchip?
> ret = clk_get_by_index(dev, 0, &clk);
> if (ret)
> return ret;
> --
> 1.9.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support
2017-03-21 18:56 ` Joe Hershberger
@ 2017-03-22 3:17 ` Jacob Chen
2017-03-22 9:05 ` Sjoerd Simons
0 siblings, 1 reply; 6+ messages in thread
From: Jacob Chen @ 2017-03-22 3:17 UTC (permalink / raw)
To: u-boot
2017-03-22 2:56 GMT+08:00 Joe Hershberger <joe.hershberger@gmail.com>:
> On Wed, Mar 15, 2017 at 4:28 AM, Jacob Chen <jacob2.chen@rock-chips.com> wrote:
>> Some board need a regulator for gmac phy, so add this code to handle it.
>>
>> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
>> ---
>>
>> drivers/net/gmac_rockchip.c | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
>> index e9b202a..63cccc9 100644
>> --- a/drivers/net/gmac_rockchip.c
>> +++ b/drivers/net/gmac_rockchip.c
>> @@ -17,6 +17,7 @@
>> #include <asm/arch/grf_rk3288.h>
>> #include <dm/pinctrl.h>
>> #include <dt-bindings/clock/rk3288-cru.h>
>> +#include <power/regulator.h>
>> #include "designware.h"
>>
>> DECLARE_GLOBAL_DATA_PTR;
>> @@ -79,6 +80,22 @@ static int gmac_rockchip_probe(struct udevice *dev)
>> struct clk clk;
>> int ret;
>>
>> +#if defined(CONFIG_DM_REGULATOR)
>> + struct udevice *phy_supply;
>> +
>> + ret = device_get_supply_regulator(dev, "phy-supply",
>> + &phy_supply);
>> + if (ret) {
>> + debug("%s: No phy supply\n", dev->name);
>> + } else {
>> + ret = regulator_set_enable(phy_supply, true);
>> + if (ret) {
>> + puts("Error enabling phy supply\n");
>> + return ret;
>> + }
>> + }
>> +#endif
>> +
>
> This seems pretty generic. Is there maybe a more common place this
> could live? Or is the phy-supply binding in DT only defined for
> rockchip?
>
I have look kernel driver and phy-supply is set in "
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c".
So i think it might not be generic.
>> ret = clk_get_by_index(dev, 0, &clk);
>> if (ret)
>> return ret;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> https://lists.denx.de/listinfo/u-boot
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support
2017-03-22 3:17 ` Jacob Chen
@ 2017-03-22 9:05 ` Sjoerd Simons
0 siblings, 0 replies; 6+ messages in thread
From: Sjoerd Simons @ 2017-03-22 9:05 UTC (permalink / raw)
To: u-boot
On Wed, 2017-03-22 at 11:17 +0800, Jacob Chen wrote:
> 2017-03-22 2:56 GMT+08:00 Joe Hershberger <joe.hershberger@gmail.com>
> :
> > On Wed, Mar 15, 2017 at 4:28 AM, Jacob Chen <jacob2.chen@rock-chips
> > .com> wrote:
> > > Some board need a regulator for gmac phy, so add this code to
> > > handle it.
> > >
> > > Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
> > > ---
> > >
> > > drivers/net/gmac_rockchip.c | 17 +++++++++++++++++
> > > 1 file changed, 17 insertions(+)
> > >
> > > diff --git a/drivers/net/gmac_rockchip.c
> > > b/drivers/net/gmac_rockchip.c
> > > index e9b202a..63cccc9 100644
> > > --- a/drivers/net/gmac_rockchip.c
> > > +++ b/drivers/net/gmac_rockchip.c
> > > @@ -17,6 +17,7 @@
> > > #include <asm/arch/grf_rk3288.h>
> > > #include <dm/pinctrl.h>
> > > #include <dt-bindings/clock/rk3288-cru.h>
> > > +#include <power/regulator.h>
> > > #include "designware.h"
> > >
> > > DECLARE_GLOBAL_DATA_PTR;
> > > @@ -79,6 +80,22 @@ static int gmac_rockchip_probe(struct udevice
> > > *dev)
> > > struct clk clk;
> > > int ret;
> > >
> > > +#if defined(CONFIG_DM_REGULATOR)
> > > + struct udevice *phy_supply;
> > > +
> > > + ret = device_get_supply_regulator(dev, "phy-supply",
> > > + &phy_supply);
> > > + if (ret) {
> > > + debug("%s: No phy supply\n", dev->name);
> > > + } else {
> > > + ret = regulator_set_enable(phy_supply, true);
> > > + if (ret) {
> > > + puts("Error enabling phy supply\n");
> > > + return ret;
> > > + }
> > > + }
> > > +#endif
> > > +
> >
> > This seems pretty generic. Is there maybe a more common place this
> > could live? Or is the phy-supply binding in DT only defined for
> > rockchip?
> >
>
> I have look kernel driver and phy-supply is set in "
> drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c".
> So i think it might not be generic.
From the device-tree bindings, it's specifically documented for
allwinner,sun7i-a20-gmac and rockchip,*-gmac. It's also the common
naming for in the generic phy bindings (though i haven't seen those
used for any networking device-tree bindings). So it's not documented
as a generic property but definitely is the convential naming for,
well, phy supplies.
Which is all pretty inconclusive :) But it might make sense to do it
generically for dwmac so e.g. the allwinner support also can use it.
>
> > > ret = clk_get_by_index(dev, 0, &clk);
> > > if (ret)
> > > return ret;
> > > --
> > > 1.9.1
> > >
> > > _______________________________________________
> > > U-Boot mailing list
> > > U-Boot at lists.denx.de
> > > https://lists.denx.de/listinfo/u-boot
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
--
Sjoerd Simons
Collabora Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards
2017-03-15 9:28 [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards Jacob Chen
2017-03-15 9:28 ` [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support Jacob Chen
@ 2017-03-26 2:39 ` Simon Glass
1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2017-03-26 2:39 UTC (permalink / raw)
To: u-boot
On 15 March 2017 at 03:28, Jacob Chen <jacob2.chen@rock-chips.com> wrote:
> we are using mmc alias , so mmc index have been changed.
> now mmc dev 0 is emmc and mmc dev 1 is sdmmc.
>
> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
> ---
>
> include/configs/evb_rk3288.h | 2 +-
> include/configs/fennec_rk3288.h | 2 +-
> include/configs/popmetal_rk3288.h | 2 +-
> include/configs/tinker_rk3288.h | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-26 2:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 9:28 [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards Jacob Chen
2017-03-15 9:28 ` [U-Boot] [PATCH 2/2] net: gmac_rockchip: Add phy supply support Jacob Chen
2017-03-21 18:56 ` Joe Hershberger
2017-03-22 3:17 ` Jacob Chen
2017-03-22 9:05 ` Sjoerd Simons
2017-03-26 2:39 ` [U-Boot] [PATCH 1/2] rockchip: configs: correct mmc env dev for rk3288 based boards Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox