diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2018-07-29 11:55:17 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-07-30 08:12:32 +0200 |
commit | b70d3557e050484081f59291a81e5180f8b4fea5 (patch) | |
tree | 7ec2e80a2aff5c419f9a777c50a73d433d34069a /target/linux/apm821xx/dts | |
parent | cff6548948f76b8d0c922ef5e5d456a88a78ab2e (diff) | |
download | upstream-b70d3557e050484081f59291a81e5180f8b4fea5.tar.gz upstream-b70d3557e050484081f59291a81e5180f8b4fea5.tar.bz2 upstream-b70d3557e050484081f59291a81e5180f8b4fea5.zip |
apm821xx: clean up gpio-hogs
convert the usb and both sata port power related gpio-hogs to
what they really are: fixed-regulators.
The ethernet phy-reset gpio-hog is replaced by a proper
upstream (4.15+) reset-gpios property in the mdio-node.
So this will work eventually.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/dts')
-rw-r--r-- | target/linux/apm821xx/dts/wd-mybooklive.dts | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/target/linux/apm821xx/dts/wd-mybooklive.dts b/target/linux/apm821xx/dts/wd-mybooklive.dts index aee0d3266d..4c61987119 100644 --- a/target/linux/apm821xx/dts/wd-mybooklive.dts +++ b/target/linux/apm821xx/dts/wd-mybooklive.dts @@ -59,14 +59,6 @@ #gpio-cells = <2>; gpio-controller; - enable-phy { - /* toggle to reset EMAC PHY */ - gpio-hog; - line-name = "enable EMAC PHY"; - gpios = <0 GPIO_ACTIVE_LOW>; - output-low; - }; - enable-button { /* Defined in u-boot as: NOT_NOR * "enables features other than NOR @@ -83,27 +75,6 @@ gpios = <1 GPIO_ACTIVE_HIGH>; output-low; }; - - enable-usb { - gpio-hog; - line-name = "Power USB Core"; - gpios = <2 GPIO_ACTIVE_LOW>; - output-low; - }; - - enable-port1 { - gpio-hog; - line-name = "Power Drive Port 1"; - gpios = <3 GPIO_ACTIVE_LOW>; - output-low; - }; - - enable-port0 { - gpio-hog; - line-name = "Power Drive Port 0"; - gpios = <7 GPIO_ACTIVE_LOW>; - output-low; - }; }; GPIO2: gpio2@e0100000 { @@ -135,7 +106,7 @@ }; }; - gpio_keys_polled { + gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; #size-cells = <0>; @@ -148,6 +119,32 @@ gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>; }; }; + + usbpwr: usb-regulator { + compatible = "regulator-fixed"; + regulator-name = "Power USB Core"; + gpios = <&GPIO1 2 GPIO_ACTIVE_LOW>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + sata1pwr: sata1-regulator { + compatible = "regulator-fixed"; + regulator-name = "Power Drive Port 1"; + gpios = <&GPIO1 3 GPIO_ACTIVE_LOW>; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-always-on; /* needed to read OS from HDD */ + }; + + sata0pwr: sata0-regulator { + compatible = "regulator-fixed"; + regulator-name = "Power Drive Port 0"; + gpios = <&GPIO1 7 GPIO_ACTIVE_LOW>; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-always-on; /* needed to read OS from HDD */ + }; }; &EMAC0 { @@ -160,6 +157,7 @@ mdio { #address-cells = <1>; #size-cells = <0>; + reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>; phy: phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; @@ -195,4 +193,5 @@ &USBOTG0 { status = "okay"; dr_mode = "host"; + vbus-supply = <&usbpwr>; }; |