apm821xx: clean up gpio-hogs
[openwrt/staging/chunkeey.git] / target / linux / apm821xx / dts / wd-mybooklive.dts
index aee0d3266d1af148d34a325b335de15c3134e8bf..4c619871196f0a6d9de5f92b03c5aa5a0173982a 100644 (file)
                #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
                        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 {
                };
        };
 
-       gpio_keys_polled {
+       gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
                #size-cells = <0>;
                        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 {
        mdio {
                #address-cells = <1>;
                #size-cells = <0>;
+               reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
 
                phy: phy@1 {
                        compatible = "ethernet-phy-ieee802.3-c22";
 &USBOTG0 {
        status = "okay";
        dr_mode = "host";
+       vbus-supply = <&usbpwr>;
 };