ipq806x: clean up dts files
[openwrt/staging/blogic.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-r7500.dts
index ca1f612844b902adb6fb1fbb6df27f45e8809278..7fcbb0c8788911f2feae5abc40e562788e87f6af 100644 (file)
        aliases {
                serial0 = &uart4;
                mdio-gpio0 = &mdio0;
+
+               led-boot = &power;
+               led-failsafe = &power;
+               led-running = &power;
+               led-upgrade = &power;
        };
 
        chosen {
 
        soc {
                pinmux@800000 {
+                       button_pins: button_pins {
+                               mux {
+                                       pins = "gpio6", "gpio54", "gpio65";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+                       };
+
                        i2c4_pins: i2c4_pinmux {
-                               pins = "gpio12", "gpio13";
-                               function = "gsbi4";
-                               bias-disable;
+                               mux {
+                                       pins = "gpio12", "gpio13";
+                                       function = "gsbi4";
+                                       drive-strength = <12>;
+                                       bias-disable;
+                               };
+                       };
+
+                       led_pins: led_pins {
+                               mux {
+                                       pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
+                                               "gpio24","gpio26", "gpio53", "gpio64", "gpio67";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       mdio0_pins: mdio0_pins {
+                               mux {
+                                       pins = "gpio0", "gpio1";
+                                       function = "gpio";
+                                       drive-strength = <8>;
+                                       bias-disable;
+                               };
                        };
 
                        nand_pins: nand_pins {
                                };
                        };
 
-                       mdio0_pins: mdio0_pins {
-                               mux {
-                                       pins = "gpio0", "gpio1";
-                                       function = "gpio";
-                                       drive-strength = <8>;
-                                       bias-disable;
-                               };
-                       };
-
                        rgmii2_pins: rgmii2_pins {
                                mux {
                                        pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
                        compatible = "virtual,mdio-gpio";
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
+                       gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
                        pinctrl-0 = <&mdio0_pins>;
                        pinctrl-names = "default";
 
                                        0x00004 0x7600000   /* PAD0_MODE */
                                        0x00008 0x1000000   /* PAD5_MODE */
                                        0x0000c 0x80        /* PAD6_MODE */
-                                       0x000e4 0xaa545     /* MAC_POWER_SEL */
+                                       0x000e4 0x6a545     /* MAC_POWER_SEL */
                                        0x000e0 0xc74164de  /* SGMII_CTRL */
                                        0x0007c 0x4e        /* PORT0_STATUS */
                                        0x00094 0x4e        /* PORT6_STATUS */
                                full-duplex;
                        };
                };
+
+               rpm@108000 {
+                       pinctrl-0 = <&i2c4_pins>;
+                       pinctrl-names = "default";
+               };
        };
 
        gpio-keys {
                compatible = "gpio-keys";
+               pinctrl-0 = <&button_pins>;
+               pinctrl-names = "default";
 
                wifi {
                        label = "wifi";
-                       gpios = <&qcom_pinmux 6 1>;
-                       linux,code = <KEY_WLAN>;
+                       gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RFKILL>;
                };
 
                reset {
                        label = "reset";
-                       gpios = <&qcom_pinmux 54 1>;
+                       gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&qcom_pinmux 65 1>;
+                       gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
 
        gpio-leds {
                compatible = "gpio-leds";
+               pinctrl-0 = <&led_pins>;
+               pinctrl-names = "default";
 
                usb1 {
                        label = "r7500:amber:usb1";
-                       gpios = <&qcom_pinmux 7 0>;
+                       gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
                };
 
                usb3 {
                        label = "r7500:amber:usb3";
-                       gpios = <&qcom_pinmux 8 0>;
+                       gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
                };
 
                status {
                        label = "r7500:amber:status";
-                       gpios = <&qcom_pinmux 9 0>;
+                       gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
                };
 
                internet {
                        label = "r7500:white:internet";
-                       gpios = <&qcom_pinmux 22 0>;
+                       gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
                };
 
                wan {
                        label = "r7500:white:wan";
-                       gpios = <&qcom_pinmux 23 0>;
+                       gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
                };
 
                wps {
                        label = "r7500:white:wps";
-                       gpios = <&qcom_pinmux 24 0>;
+                       gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
                };
 
                esata {
                        label = "r7500:white:esata";
-                       gpios = <&qcom_pinmux 26 0>;
+                       gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
                };
 
-               power {
+               power: power {
                        label = "r7500:white:power";
-                       gpios = <&qcom_pinmux 53 0>;
-                       default-state = "on";
+                       gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
+                       default-state = "keep";
                };
 
                rfkill {
                        label = "r7500:white:rfkill";
-                       gpios = <&qcom_pinmux 64 0>;
+                       gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
                };
 
                wifi5g {
                        label = "r7500:white:wifi5g";
-                       gpios = <&qcom_pinmux 67 0>;
+                       gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
                };
        };
 };