ipq806x: fixes for R7800 and C2600
authorPavel Kubelun <be.dissent@gmail.com>
Tue, 8 Nov 2016 05:49:07 +0000 (08:49 +0300)
committerJohn Crispin <john@phrozen.org>
Wed, 16 Nov 2016 09:59:30 +0000 (10:59 +0100)
Updating spi pins configuration in R7800 and C2600 DTs
Adding more usb power pin export and gsbi6 in R7800 DT
Updating and fixing leds

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
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-ipq8065-r7800.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi

index fbe19cd77b7cc2682c7daa4d292bad3f29fa98bf..1f3d3133f537314c870aeb5886079713aaf26273 100755 (executable)
@@ -15,7 +15,7 @@ c2600)
        ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb_2" "usb1-port1" "usb2-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb_4" "usb3-port1" "usb4-port1"
        ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
-       ucidef_set_led_netdev "lan" "LAN" "${board}:white:lan" "br-lan"
+       ucidef_set_led_netdev "lan" "LAN" "${board}:white:lan" "eth1"
        ucidef_set_led_default "general" "general" "${board}:white:ledgnr" "1"
        ;;
 d7800 |\
@@ -29,8 +29,8 @@ r7500v2)
        ucidef_set_led_default "rfkill" "rfkill" "${board}:white:rfkill" "0"
        ;;
 r7800)
-       ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "2-1"
-       ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb2" "4-1"
+       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"
index 9427e993f3f60acf1f25f55ffaec2cc3a428aaa2..9162200fd902799487f25b26015da035e828e7bd 100644 (file)
                                mux {
                                        pins = "gpio18", "gpio19", "gpio21";
                                        function = "gsbi5";
+                                       bias-pull-down;
+                               };
+
+                               data {
+                                       pins = "gpio18", "gpio19";
+                                       drive-strength = <10>;
+                               };
+
+                               cs {
+                                       pins = "gpio20";
                                        drive-strength = <10>;
-                                       bias-none;
+                                       bias-pull-up;
+                               };
+
+                               clk {
+                                       pins = "gpio21";
+                                       drive-strength = <12>;
                                };
                        };
 
                        qcom,mode = <GSBI_PROT_SPI>;
                        status = "ok";
 
-                       spi4: spi@1a280000 {
+                       spi5: spi@1a280000 {
                                status = "ok";
                                spi-max-frequency = <50000000>;
 
                                cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
                                flash: m25p80@0 {
-                                       compatible = "s25fl256s1";
+                                       compatible = "jedec,spi-nor";
                                        #address-cells = <1>;
                                        #size-cells = <1>;
                                        spi-max-frequency = <50000000>;
                wifi {
                        label = "wifi";
                        gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_WLAN>;
+                       linux,code = <KEY_RFKILL>;
                };
 
                reset {
                        gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
                };
 
+               wan_red {
+                       label = "c2600:red:wan";
+                       gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
+               };
+
                wan_blue {
                        label = "c2600:white:wan";
                        gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
index 560a48756731905009af75a55dccc79dfc4f2252..8566995ef5e1663bfb65dbaecb4e41541a7899c1 100644 (file)
                                mux {
                                        pins = "gpio18", "gpio19", "gpio21";
                                        function = "gsbi5";
+                                       bias-pull-down;
+                               };
+
+                               data {
+                                       pins = "gpio18", "gpio19";
                                        drive-strength = <10>;
-                                       bias-none;
                                };
 
                                cs {
                                        pins = "gpio20";
+                                       drive-strength = <10>;
+                                       bias-pull-up;
+                               };
+
+                               clk {
+                                       pins = "gpio21";
+                                       drive-strength = <12>;
+                               };
+                       };
+
+                       spi6_pins: spi6_pins {
+                               mux {
+                                       pins = "gpio55", "gpio56", "gpio58";
+                                       function = "gsbi6";
+                                       bias-pull-down;
+                               };
+
+                               mosi {
+                                       pins = "gpio55";
+                                       drive-strength = <12>;
+                               };
+
+                               miso {
+                                       pins = "gpio56";
+                                       drive-strength = <14>;
+                               };
+
+                               cs {
+                                       pins = "gpio57";
+                                       drive-strength = <12>;
+                                       bias-pull-up;
+                               };
+
+                               clk {
+                                       pins = "gpio58";
                                        drive-strength = <12>;
                                };
+
+                               reset {
+                                       pins = "gpio33";
+                                       drive-strength = <10>;
+                                       bias-pull-down;
+                                       output-high;
+                               };
                        };
                };
 
                        qcom,mode = <GSBI_PROT_SPI>;
                        status = "ok";
 
-                       spi4: spi@1a280000 {
+                       spi5: spi@1a280000 {
                                status = "ok";
                                spi-max-frequency = <50000000>;
                                pinctrl-0 = <&spi_pins>;
                                cs-gpios = <&qcom_pinmux 20 0>;
 
                                flash: m25p80@0 {
-                                       compatible = "s25fl512s";
+                                       compatible = "jedec,spi-nor";
                                        #address-cells = <1>;
                                        #size-cells = <1>;
-                                       spi-max-frequency = <51200000>;
+                                       spi-max-frequency = <50000000>;
                                        reg = <0>;
 
                                        linux,part-probe = "qcom-smem";
                        };
                };
 
+               gsbi6: gsbi@16500000 {
+                       qcom,mode = <GSBI_PROT_SPI>;
+                       status = "ok";
+                       spi6: spi@16580000 {
+                               status = "ok";
+                               spi-max-frequency = <6000000>;
+                               pinctrl-0 = <&spi6_pins>;
+                               pinctrl-names = "default";
+
+                               cs-gpios = <&qcom_pinmux 57 0>;
+
+                               spi-nor@0 {
+                                       compatible = "spi-nor";
+                                       reg = <0>;
+                                       spi-max-frequency = <6000000>;
+                               };
+                       };
+               };
+
                sata-phy@1b400000 {
                        status = "ok";
                };
                        label = "wifi";
                        gpios = <&qcom_pinmux 6 1>;
                        linux,code = <KEY_RFKILL>;
+                       debounce-interval = <60>;
+                       wakeup-source;
                };
 
                reset {
                        label = "reset";
                        gpios = <&qcom_pinmux 54 1>;
                        linux,code = <KEY_RESTART>;
+                       debounce-interval = <60>;
+                       wakeup-source;
                };
 
                wps {
                        label = "wps";
                        gpios = <&qcom_pinmux 65 1>;
                        linux,code = <KEY_WPS_BUTTON>;
+                       debounce-interval = <60>;
+                       wakeup-source;
                };
        };
 
                compatible = "gpio-export";
                #size-cells = <0>;
 
-               display_data {
-                       gpio-export,name = "usb0";
+               usb1-power {
+                       gpio-export,name = "usb1";
                        gpio-export,output = <1>;
                        gpios = <&qcom_pinmux 15 0>;
                };
 
-               display_clock {
-                       gpio-export,name = "usb1";
+               usb2-power {
+                       gpio-export,name = "usb2";
                        gpio-export,output = <1>;
                        gpios = <&qcom_pinmux 16 0>;
                };
+
+               usb-power {
+                       gpio-export,name = "usb_p";
+                       gpio-export,output = <1>;
+                       gpios = <&qcom_pinmux 68 0>;
+               };
        };
 };
 
index bff9979adfcc3373c4d777a7d719607529ee65f6..435692b183f2514c14bcdffa86f32e9814d5265d 100644 (file)
@@ -29,7 +29,7 @@
                        qcom,saw = <&saw0>;
                        clocks = <&kraitcc 0>, <&kraitcc 4>;
                        clock-names = "cpu", "l2";
-                       qcom,imem = <&imem>;
+                       qcom,imem = <&qfprom>;
                        clock-latency = <100000>;
                        cpu-supply = <&smb208_s2a>;
                        voltage-tolerance = <5>;
@@ -49,7 +49,7 @@
                        qcom,saw = <&saw1>;
                        clocks = <&kraitcc 1>, <&kraitcc 4>;
                        clock-names = "cpu", "l2";
-                       qcom,imem = <&imem>;
+                       qcom,imem = <&qfprom>;
                        clock-latency = <100000>;
                        cpu-supply = <&smb208_s2b>;
                        cooling-min-state = <0>;
                        reg-names = "lpass-lpaif";
                };
 
-               imem: memory@700000 {
+               qfprom: qfprom@700000 {
                        compatible = "qcom,qfprom", "syscon";
                        reg = <0x00700000 0x1000>;
                        #address-cells = <1>;