rockchip: configs: correct mmc env dev for rk3288 based boards
Subsystems (2)
PATCH 1/2 rockchip: configs: correct mmc env dev for rk3288 based boards
we are using mmc alias , so mmc index have been changed. now mmc dev 0 is emmc and mmc dev 1 is sdmmc.
---
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(-)
include/configs/evb_rk3288.h +1 -1
@@ -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
include/configs/fennec_rk3288.h +1 -1
@@ -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
include/configs/popmetal_rk3288.h +1 -1
@@ -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
include/configs/tinker_rk3288.h +1 -1
@@ -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
Signature · 1 line
1.9.1
PATCH 2/2 net: gmac_rockchip: Add phy supply support
Some board need a regulator for gmac phy, so add this code to handle it.
---
drivers/net/gmac_rockchip.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/net/gmac_rockchip.c +17 -0
@@ -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;
Signature · 1 line
1.9.1
PATCH 2/2 net: gmac_rockchip: Add phy supply support
Quoted 30 lines · Jacob Chen
Some board need a regulator for gmac phy, so add this code to handle it.
Signed-off-by Jacob Chen <[email protected]>---
drivers/net/gmac_rockchip.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)drivers/net/gmac_rockchip.c +7
-0@@ -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) {
drivers/net/gmac_rockchip.c static int gmac_rockchip_probe(struct udevice *dev) · line 98
Quoted 10 lines
drivers/net/gmac_rockchip.c +10
-0+ 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?
Quoted 10 lines
drivers/net/gmac_rockchip.c +0
-1ret =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
PATCH 2/2 net: gmac_rockchip: Add phy supply support
2017-03-22 2:56 GMT+08:00 Joe Hershberger <[email protected]>:
Quoted 37 lines · Jacob Chen
Quoted 36 lines
Some board need a regulator for gmac phy, so add this code to handle it.
Signed-off-by Jacob Chen <[email protected]>---
drivers/net/gmac_rockchip.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)drivers/net/gmac_rockchip.c +13
-0@@ -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;
Quoted 9 lines
drivers/net/gmac_rockchip.c static int gmac_rockchip_probe(struct udevice *dev) · line 98
Quoted 4 lines
drivers/net/gmac_rockchip.c +4
-0+ } + } +#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.
Quoted 14 lines
Quoted 10 lines
drivers/net/gmac_rockchip.c +0
-1ret =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
PATCH 2/2 net: gmac_rockchip: Add phy supply support
Quoted 53 lines · Jacob Chen
2017-03-22 2:56 GMT+08:00 Joe Hershberger <[email protected]> :
Quoted 41 lines
Quoted 39 lines · Jacob Chen
Some board need a regulator for gmac phy, so add this code to handle it.
Signed-off-by Jacob Chen <[email protected]>---
drivers/net/gmac_rockchip.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)drivers/net/gmac_rockchip.c +13
-0@@ -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;Quoted 9 lines
drivers/net/gmac_rockchip.c static int gmac_rockchip_probe(struct udevice *dev) · line 98
Quoted 4 lines
drivers/net/gmac_rockchip.c +4
-0+ } + } +#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?
Quoted 3 lines
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.
Quoted 16 lines
Quoted 16 lines
Quoted 11 lines
drivers/net/gmac_rockchip.c +0
-0ret = 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
Signature · 2 lines
Sjoerd Simons Collabora Ltd.
PATCH 1/2 rockchip: configs: correct mmc env dev for rk3288 based boards
In reply to Jacob ChenQuoted 11 lines · Jacob Chen
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 <[email protected]>---
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!