ipq806x: more dts cleanup
authorMathias Kresin <dev@kresin.me>
Sat, 26 Nov 2016 09:20:03 +0000 (10:20 +0100)
committerMathias Kresin <dev@kresin.me>
Sun, 27 Nov 2016 14:33:54 +0000 (15:33 +0100)
Remove the wifi5g LED from the the d7800, r7500 and r7800. Albeit this
GPIO is mentioned in the GPL tarball, it doesn't do anything. The
2.4/5 GHz LEDs are connected to the wifi chips and not be controlled
from the the userspace.

Use the LEDs names/colours as they are used in the board manuals. Merge
redundant LED configurations. Use the phy[0|1]tpt trigger for the
wireless LEDs. Remove the workarounds for the not controllable wireless
LEDs.

Fix spi compatible strings and remove superfluous spi-max-frequency
parameters.

If there are two power leds, use one for indicating normal operation and
one for failsafe/upgrade. Keep the on/off state of the main power led
during boot.

Use the usb pinmux settings from the nbg6817 gpl sources.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ipq806x/base-files/etc/board.d/01_leds
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts

index 21ad8be562594c3c7cdf9c84ff4d871bd02ba2e8..977b3b104ebb3e7bf12d210b76265a790562bc03 100755 (executable)
@@ -16,40 +16,26 @@ c2600)
        ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb_4" "usb3-port1" "usb4-port1"
        ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
        ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
-       ucidef_set_led_default "general" "general" "${board}:white:general" "1"
        ;;
 d7800 |\
 r7500 |\
-r7500v2)
-       ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "1-1"
-       ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb3" "3-1"
-       ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
-       ucidef_set_led_ide "esata" "eSATA" "${board}:amber:esata"
-       ucidef_set_led_default "wps" "WPS" "${board}:white:wps" "0"
-       ucidef_set_led_default "rfkill" "rfkill" "${board}:white:rfkill" "0"
-       ;;
+r7500v2 |\
 r7800)
        ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb1" "usb1-port1" "usb2-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb2" "usb3-port1" "usb4-port1"
        ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
        ucidef_set_led_ide "esata" "eSATA" "${board}:white:esata"
-       ucidef_set_led_wlan "wps" "WPS" "${board}:white:wps" "phy0tpt"
-       ucidef_set_led_wlan "rfkill" "rfkill" "${board}:white:rfkill" "phy1tpt"
-       ;;
-ea8500)
-       ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio"
-       ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0"
        ;;
 nbg6817)
-       ucidef_set_led_wlan "wlan2g" "WLAN2g" "$board:amber:wifi" "phy1radio"
-       ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5" "phy0radio"
+       ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:amber:wifi2g" "phy1tpt"
+       ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5g" "phy0tpt"
        ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
        ;;
 vr2600v)
        ucidef_set_led_usbport "usb" "USB" "${board}:white:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
        ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
-       ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:white:wlan2g" "phy0radio"
-       ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:white:wlan5g" "phy1radio"
+       ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:white:wlan2g" "phy0tpt"
+       ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:white:wlan5g" "phy1tpt"
        ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
        ;;
 *)
index f22838f7b4612fd03db0a6fa8eb0d16386af292f..7eeaab1557bb1b0d82d7113a3d390ad7276e9fed 100644 (file)
 
                        spi5: spi@1a280000 {
                                status = "ok";
-                               spi-max-frequency = <50000000>;
 
                                pinctrl-0 = <&spi_pins>;
                                pinctrl-names = "default";
                        gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
                };
 
-               wan_red {
-                       label = "c2600:orange:wan";
+               wan_amber {
+                       label = "c2600:amber:wan";
                        gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
                };
 
-               wan_blue {
+               wan_white {
                        label = "c2600:white:wan";
                        gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
                };
 
-               power: status {
-                       label = "c2600:white:status";
+               power: power {
+                       label = "c2600:white:power";
                        gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
                        default-state = "keep";
                };
index 4af56bae494a8c6410d897dfbcc2ef559f72ea53..a8a613945f92f37f79172f7c81684f69d5d2756e 100644 (file)
                serial0 = &uart4;
                mdio-gpio0 = &mdio0;
 
-               led-boot = &power;
-               led-failsafe = &power;
-               led-running = &power;
-               led-upgrade = &power;
+               led-boot = &power_white;
+               led-failsafe = &power_amber;
+               led-running = &power_white;
+               led-upgrade = &power_amber;
        };
 
        chosen {
@@ -59,7 +59,7 @@
                        led_pins: led_pins {
                                mux {
                                        pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
-                                               "gpio24","gpio26", "gpio53", "gpio64", "gpio67";
+                                               "gpio24","gpio26", "gpio53", "gpio64";
                                        function = "gpio";
                                        drive-strength = <2>;
                                        bias-pull-up;
                pinctrl-names = "default";
 
                usb1 {
-                       label = "d7800:amber:usb1";
+                       label = "d7800:white:usb1";
                        gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
                };
 
-               usb3 {
-                       label = "d7800:amber:usb3";
+               usb2 {
+                       label = "d7800:white:usb2";
                        gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
                };
 
-               status {
-                       label = "d7800:amber:status";
+               power_amber: power_amber {
+                       label = "d7800:amber:power";
                        gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
                };
 
-               internet {
-                       label = "d7800:white:internet";
+               wan_white {
+                       label = "d7800:white:wan";
                        gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
                };
 
-               wan {
-                       label = "d7800:white:wan";
+               wan_amber {
+                       label = "d7800:amber:wan";
                        gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
                };
 
                        gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
                };
 
-               power: power {
+               power_white: power_white {
                        label = "d7800:white:power";
                        gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
                        default-state = "keep";
                };
 
-               rfkill {
-                       label = "d7800:white:rfkill";
+               wifi {
+                       label = "d7800:white:wifi";
                        gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
                };
-
-               wifi5g {
-                       label = "d7800:white:wifi5g";
-                       gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
-               };
        };
 };
 
index 7fcbb0c8788911f2feae5abc40e562788e87f6af..fc35df7e689ba87852ab28afb251731e1e93ece4 100644 (file)
                serial0 = &uart4;
                mdio-gpio0 = &mdio0;
 
-               led-boot = &power;
-               led-failsafe = &power;
-               led-running = &power;
-               led-upgrade = &power;
+               led-boot = &power_white;
+               led-failsafe = &power_amber;
+               led-running = &power_white;
+               led-upgrade = &power_amber;
        };
 
        chosen {
@@ -59,7 +59,7 @@
                        led_pins: led_pins {
                                mux {
                                        pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
-                                               "gpio24","gpio26", "gpio53", "gpio64", "gpio67";
+                                               "gpio24","gpio26", "gpio53", "gpio64";
                                        function = "gpio";
                                        drive-strength = <2>;
                                        bias-pull-up;
                pinctrl-names = "default";
 
                usb1 {
-                       label = "r7500:amber:usb1";
+                       label = "r7500:white:usb1";
                        gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
                };
 
-               usb3 {
-                       label = "r7500:amber:usb3";
+               usb2 {
+                       label = "r7500:white:usb2";
                        gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
                };
 
-               status {
-                       label = "r7500:amber:status";
+               power_amber: power_amber {
+                       label = "r7500:amber:power";
                        gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
                };
 
-               internet {
-                       label = "r7500:white:internet";
+               wan_white {
+                       label = "r7500:white:wan";
                        gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
                };
 
-               wan {
-                       label = "r7500:white:wan";
+               wan_amber {
+                       label = "r7500:amber:wan";
                        gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
                };
 
                        gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
                };
 
-               power: power {
+               power_white: power_white {
                        label = "r7500:white:power";
                        gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
                        default-state = "keep";
                };
 
-               rfkill {
-                       label = "r7500:white:rfkill";
+               wifi {
+                       label = "r7500:white:wifi";
                        gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
                };
-
-               wifi5g {
-                       label = "r7500:white:wifi5g";
-                       gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
-               };
        };
 };
 
index 67af68ee986e9ae88fedf092c1c6aab68d6a3ab7..4edfbeb72db42f7a91eee00ab8ad10a97be90721 100644 (file)
                        default-state = "keep";
                };
 
-               rfkill {
-                       label = "r7500v2:white:rfkill";
+               wifi {
+                       label = "r7500v2:white:wifi";
                        gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
                };
        };
index ec0aa0c0ee7716b95f204a032800c59481b9ce0a..407c180ec542d8b5fbbf7324cfc65b54ddd6b630 100644 (file)
 
                        spi4: spi@1a280000 {
                                status = "ok";
-                               spi-max-frequency = <50000000>;
 
                                pinctrl-0 = <&spi_pins>;
                                pinctrl-names = "default";
                power: power {
                        label = "vr2600v:white:power";
                        gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
+                       default-state = "keep";
                };
 
                phone {
index d23d57aa47233bf3f2a72f6abdf819c43d79be59..abc381a15ee5d078803fb78d7b1379a8e611d82b 100644 (file)
                        };
 
                        led_pins: led_pins {
-                               off {
-                                       pins = "gpio26", "gpio33", "gpio64";
+                               mux {
+                                       pins = "gpio9", "gpio26", "gpio33", "gpio64";
                                        function = "gpio";
                                        drive-strength = <2>;
                                        bias-pull-down;
                                };
-
-                               on {
-                                       pins = "gpio9";
-                                       function = "gpio";
-                                       drive-strength = <2>;
-                                       bias-pull-up;
-                               };
                        };
 
                        mdio0_pins: mdio0_pins {
                        };
 
                        usb0_pwr_en_pins: usb0_pwr_en_pins {
-                               pwr {
-                                       pins = "gpio14";
+                               mux {
+                                       pins = "gpio16", "gpio17";
                                        function = "gpio";
                                        drive-strength = <12>;
+                               };
+
+                               pwr {
+                                       pins = "gpio17";
                                        bias-pull-down;
                                        output-high;
                                };
 
                                ovc {
-                                       pins = "gpio15";
-                                       function = "gpio";
-                                       drive-strength = <12>;
+                                       pins = "gpio16";
                                        bias-pull-up;
-                                       output-high;
                                };
                        };
 
                        usb1_pwr_en_pins: usb1_pwr_en_pins {
-                               pwr {
-                                       pins = "gpio17";
+                               mux {
+                                       pins = "gpio14", "gpio15";
                                        function = "gpio";
                                        drive-strength = <12>;
+                               };
+
+                               pwr {
+                                       pins = "gpio14";
                                        bias-pull-down;
                                        output-high;
                                };
 
                                ovc {
-                                       pins = "gpio16";
-                                       function = "gpio";
-                                       drive-strength = <12>;
+                                       pins = "gpio15";
                                        bias-pull-up;
-                                       output-high;
                                };
                        };
                };
 
                        spi4: spi@1a280000 {
                                status = "ok";
-                               spi-max-frequency = <50000000>;
+
                                pinctrl-0 = <&spi_pins>;
                                pinctrl-names = "default";
 
                                cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
                                flash: m25p80@0 {
-                                       compatible = "s25fl512s";
+                                       compatible = "jedec,spi-nor";
                                        #address-cells = <1>;
                                        #size-cells = <1>;
                                        spi-max-frequency = <51200000>;
                power: power {
                        label = "nbg6817:white:power";
                        gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
+                       default-state = "keep";
                };
 
-               wifi {
-                       label = "nbg6817:amber:wifi";
+               wifi2g {
+                       label = "nbg6817:amber:wifi2g";
                        gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
                };
 
+               /* wifi2g amber from the manual is missing */
+
                wifi5g {
                        label = "nbg6817:amber:wifi5g";
                        gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
                };
+
+               /* wifi5g amber from the manual is missing */
        };
 };
 
index 42d6e2b7a072777c31833ae878b0aceca8b187e8..79c8334a42d826206b02e1c6dbddc954a13e798a 100644 (file)
@@ -31,7 +31,7 @@
                mdio-gpio0 = &mdio0;
 
                led-boot = &power_white;
-               led-failsafe = &power_white;
+               led-failsafe = &power_amber;
                led-running = &power_white;
                led-upgrade = &power_amber;
        };
@@ -62,7 +62,7 @@
 
                        led_pins: led_pins {
                                pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
-                                       "gpio24","gpio26", "gpio53", "gpio64", "gpio67";
+                                       "gpio24","gpio26", "gpio53", "gpio64";
                                function = "gpio";
                                drive-strength = <2>;
                                bias-pull-down;
 
                        spi5: spi@1a280000 {
                                status = "ok";
-                               spi-max-frequency = <50000000>;
+
                                pinctrl-0 = <&spi_pins>;
                                pinctrl-names = "default";
 
                        status = "ok";
                        spi6: spi@16580000 {
                                status = "ok";
-                               spi-max-frequency = <6000000>;
+
                                pinctrl-0 = <&spi6_pins>;
                                pinctrl-names = "default";
 
                                cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
 
                                spi-nor@0 {
-                                       compatible = "spi-nor";
+                                       compatible = "jedec,spi-nor";
                                        reg = <0>;
                                        spi-max-frequency = <6000000>;
                                };
                power_white: power_white {
                        label = "r7800:white:power";
                        gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
-                       default-state = "on";
+                       default-state = "keep";
                };
 
                power_amber: power_amber {
                        gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
                };
 
-               rfkill {
-                       label = "r7800:white:rfkill";
+               wifi {
+                       label = "r7800:white:wifi";
                        gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
                };
 
                        label = "r7800:white:wps";
                        gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
                };
-
-               wifi {
-                       label = "r7800:white:wifi";
-                       gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
-               };
        };
 };