File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 18
18
#include <linux/compiler.h>
19
19
#include <linux/err.h>
20
20
#include <asm/io.h>
21
+ #include <power/regulator.h>
21
22
#include "designware.h"
22
23
23
24
DECLARE_GLOBAL_DATA_PTR ;
@@ -661,6 +662,22 @@ int designware_eth_probe(struct udevice *dev)
661
662
ulong ioaddr ;
662
663
int ret ;
663
664
665
+ #if defined(CONFIG_DM_REGULATOR )
666
+ struct udevice * phy_supply ;
667
+
668
+ ret = device_get_supply_regulator (dev , "phy-supply" ,
669
+ & phy_supply );
670
+ if (ret ) {
671
+ debug ("%s: No phy supply\n" , dev -> name );
672
+ } else {
673
+ ret = regulator_set_enable (phy_supply , true);
674
+ if (ret ) {
675
+ puts ("Error enabling phy supply\n" );
676
+ return ret ;
677
+ }
678
+ }
679
+ #endif
680
+
664
681
#ifdef CONFIG_DM_PCI
665
682
/*
666
683
* If we are on PCI bus, either directly attached to a PCI root port,
You can’t perform that action at this time.
0 commit comments