Merge tag 'imx-dt-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
authorOlof Johansson <olof@lixom.net>
Fri, 23 Jan 2015 22:44:16 +0000 (14:44 -0800)
committerOlof Johansson <olof@lixom.net>
Fri, 23 Jan 2015 22:44:16 +0000 (14:44 -0800)
Merge "ARM: imx: device tree changes for 3.20" from Shawn Guo:

The i.MX device tree update for 3.20:
 - Update i.MX6 operating-points setting in device tree to match the
   latest i.MX6 data sheet
 - Add i.MX6SX sabreauto board support
 - Add imx6dl-udoo board support based off imx6q-udoo
 - Update sabrelite board to include I2C and HDMI support
 - Update the VPU compatible strings to also use cnm,coda<model>
 - Remove the ocram clock from the VPU node, as the clock is already
   provided inside the ocram node
 - Add system reset controller and syscon-reboot for VF610
 - Update VF610 device tree to use zero based naming for GPIO nodes,
   so that the number scheme matches hardware manual
 - A number of random device additions like watchdog for VF610, sahara
   for i.MX53, QSPI for imx6sx-sdb board, etc.

Note: the branch imx/soc was merged into imx/dt because the SNVS device
tree node needs to refer to the new clock ID added by the imx/soc patch.

* tag 'imx-dt-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (28 commits)
  ARM: dts: imx28-evk: remove duplicate property
  ARM: vf610: use zero based naming for GPIO nodes
  ARM: dts: imx6q: enable dma for ecspi5
  ARM: dts: vfxxx: Add SNVS node
  ARM: imx: clk-vf610: Add clock for SNVS
  ARM: imx: clk-vf610: Add clock for UART4 and UART5
  ARM: imx: drop CPUIDLE_FLAG_TIME_VALID from cpuidle-imx6sx
  ARM: dts: imx6dl-udoo: Add board support based off imx6q-udoo
  ARM: imx: support arm power off in cpuidle for i.mx6sx
  ARM: imx: remove unnecessary setting for DSM
  ARM: dts: imx6sx: add i.mx6sx sabreauto board support
  ARM: dts: imx6sx-sdb: Add QSPI support
  ARM: dts: imx6qdl: Remove OCRAM clock from VPU node
  ARM: imx: apf51dev: add gpio-backlight support
  ARM: imx: correct the hardware clock gate setting for shared nodes
  ARM: imx: pllv3: add shift for frequency multiplier
  ARM vf610: add compatibilty strings of supported Vybrid SoC's
  ARM: i.MX53: dts: add sahara module
  ARM: dts: imx6dl: correct cpufreq volt/freq table
  ARM: dts: imx6q: update cpufreq volt/freq table
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
34 files changed:
Documentation/devicetree/bindings/arm/fsl.txt
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/imx27-apf27dev.dts
arch/arm/boot/dts/imx27.dtsi
arch/arm/boot/dts/imx28-evk.dts
arch/arm/boot/dts/imx51-apf51dev.dts
arch/arm/boot/dts/imx53.dtsi
arch/arm/boot/dts/imx6dl-udoo.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl.dtsi
arch/arm/boot/dts/imx6q-udoo.dts
arch/arm/boot/dts/imx6q.dtsi
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
arch/arm/boot/dts/imx6qdl-udoo.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6sx-sabreauto.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6sx-sdb.dts
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
arch/arm/boot/dts/vf-colibri.dtsi
arch/arm/boot/dts/vf500.dtsi
arch/arm/boot/dts/vf610-twr.dts
arch/arm/boot/dts/vfxxx.dtsi
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/clk-gate2.c
arch/arm/mach-imx/clk-pllv3.c
arch/arm/mach-imx/clk-vf610.c
arch/arm/mach-imx/clk.h
arch/arm/mach-imx/common.h
arch/arm/mach-imx/cpuidle-imx6sx.c [new file with mode: 0644]
arch/arm/mach-imx/cpuidle.h
arch/arm/mach-imx/gpc.c
arch/arm/mach-imx/mach-imx6sx.c
arch/arm/mach-imx/mach-vf610.c
arch/arm/mach-imx/pm-imx6.c
include/dt-bindings/clock/vf610-clock.h

index 4e8b7df7fc62d84b505f165aaf3067a8417c8cee..c830b5b65882b0fe5e892bde5ef27e4546f561b8 100644 (file)
@@ -75,6 +75,18 @@ i.MX6q generic board
 Required root node properties:
     - compatible = "fsl,imx6q";
 
+Freescale Vybrid Platform Device Tree Bindings
+----------------------------------------------
+
+For the Vybrid SoC familiy all variants with DDR controller are supported,
+which is the VF5xx and VF6xx series. Out of historical reasons, in most
+places the kernel uses vf610 to refer to the whole familiy.
+
+Required root node compatible property (one of them):
+    - compatible = "fsl,vf500";
+    - compatible = "fsl,vf510";
+    - compatible = "fsl,vf600";
+    - compatible = "fsl,vf610";
 
 Freescale LS1021A Platform Device Tree Bindings
 ------------------------------------------------
index 89b732b6d6cf598566e53df61defb33d1ef4a87e..38e1ec7a81ff6fa50d1f7b39eee3f1d7dbd88422 100644 (file)
@@ -273,6 +273,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6dl-tx6dl-comtft.dtb \
        imx6dl-tx6u-801x.dtb \
        imx6dl-tx6u-811x.dtb \
+       imx6dl-udoo.dtb \
        imx6dl-wandboard.dtb \
        imx6dl-wandboard-revb1.dtb \
        imx6q-arm2.dtb \
@@ -307,6 +308,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
 dtb-$(CONFIG_SOC_IMX6SL) += \
        imx6sl-evk.dtb
 dtb-$(CONFIG_SOC_IMX6SX) += \
+       imx6sx-sabreauto.dtb \
        imx6sx-sdb.dtb
 dtb-$(CONFIG_SOC_LS1021A) += \
        ls1021a-qds.dtb \
index da306c5dd6782862e67d1470c0e5ddcbc4a7dfd0..bba3f41b89ef680b587c11cb6e1215a5c45b1885 100644 (file)
                        linux,default-trigger = "heartbeat";
                };
        };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_max5821: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "max5821-reg";
+                       regulator-min-microvolt = <2500000>;
+                       regulator-max-microvolt = <2500000>;
+                       regulator-always-on;
+               };
+       };
 };
 
 &cspi1 {
                compatible = "dallas,ds1374";
                reg = <0x68>;
        };
+
+       max5821@38 {
+               compatible = "maxim,max5821";
+               reg = <0x38>;
+               vref-supply = <&reg_max5821>;
+       };
 };
 
 &i2c2 {
index 107d713e1cbecdbf63a18f9f99eafe74cee67e0e..4b063b68db44cbd1f99c3b63bcdb5463a0236baa 100644 (file)
                        };
 
                        coda: coda@10023000 {
-                               compatible = "fsl,imx27-vpu";
+                               compatible = "fsl,imx27-vpu", "cnm,codadx6";
                                reg = <0x10023000 0x0200>;
                                interrupts = <53>;
                                clocks = <&clks IMX27_CLK_VPU_BAUD_GATE>,
index 0e13b4b10a929cb7d22beee36a5775948849c5a3..279249b8c3f3b1c50e682abd8103c47b2b017bbb 100644 (file)
                        };
 
                        lradc@80050000 {
-                               fsl,lradc-touchscreen-wires = <4>;
                                status = "okay";
                                fsl,lradc-touchscreen-wires = <4>;
                                fsl,ave-ctrl = <4>;
index c5a9a24c280a48941bf004ee7370e39ce3c23068..93d3ea12328c50c07cf9d7ab4d09fc952dc5a397 100644 (file)
        model = "Armadeus Systems APF51Dev docking/development board";
        compatible = "armadeus,imx51-apf51dev", "armadeus,imx51-apf51", "fsl,imx51";
 
+       backlight@bl1{
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight>;
+               compatible = "gpio-backlight";
+               gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
+               default-on;
+       };
+
        display@di1 {
                compatible = "fsl,imx-parallel-display";
                interface-pix-fmt = "bgr666";
        pinctrl-0 = <&pinctrl_hog>;
 
        imx51-apf51dev {
+               pinctrl_backlight: bl1grp {
+                       fsl,pins = <
+                               MX51_PAD_DI1_D1_CS__GPIO3_4 0x1F5
+                       >;
+               };
+
                pinctrl_hog: hoggrp {
                        fsl,pins = <
                                MX51_PAD_EIM_EB2__GPIO2_22   0x0C5
index a30bddfdbdb6e587d455dc3d07beb0d6f4eb1aba..ff4fa7ecacd86ef1ddc7f4a63f23e32af5d2808c 100644 (file)
                        };
 
                        vpu: vpu@63ff4000 {
-                               compatible = "fsl,imx53-vpu";
+                               compatible = "fsl,imx53-vpu", "cnm,coda7541";
                                reg = <0x63ff4000 0x1000>;
                                interrupts = <9>;
                                clocks = <&clks IMX5_CLK_VPU_REFERENCE_GATE>,
                                resets = <&src 1>;
                                iram = <&ocram>;
                        };
+
+                       sahara: crypto@63ff8000 {
+                               compatible = "fsl,imx53-sahara";
+                               reg = <0x63ff8000 0x4000>;
+                               interrupts = <19 20>;
+                               clocks = <&clks IMX5_CLK_SAHARA_IPG_GATE>,
+                                        <&clks IMX5_CLK_SAHARA_IPG_GATE>;
+                               clock-names = "ipg", "ahb";
+                       };
                };
 
                ocram: sram@f8000000 {
diff --git a/arch/arm/boot/dts/imx6dl-udoo.dts b/arch/arm/boot/dts/imx6dl-udoo.dts
new file mode 100644 (file)
index 0000000..e3713f0
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-udoo.dtsi"
+
+/ {
+       model = "Udoo i.MX6 Dual-lite Board";
+       compatible = "udoo,imx6dl-udoo", "fsl,imx6dl";
+};
index 1ac2fe7328679b128da6ef74669abad2d4bd08fd..f94bf72832af891ba34bb449fd5e3d83ae4ba3c3 100644 (file)
@@ -28,7 +28,7 @@
                        next-level-cache = <&L2>;
                        operating-points = <
                                /* kHz    uV */
-                               996000  1275000
+                               996000  1250000
                                792000  1175000
                                396000  1075000
                        >;
index e3bff2ac00db28f25f239bd9b2922ebfc9bd8e02..c3e64ff3d544655f22650cf8c4ab3b023a9dbe02 100644 (file)
  * published by the Free Software Foundation.
  *
  */
-
 /dts-v1/;
 #include "imx6q.dtsi"
+#include "imx6qdl-udoo.dtsi"
 
 / {
        model = "Udoo i.MX6 Quad Board";
        compatible = "udoo,imx6q-udoo", "fsl,imx6q";
-
-       chosen {
-               stdout-path = &uart2;
-       };
-
-       memory {
-               reg = <0x10000000 0x40000000>;
-       };
-
-       regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               reg_usb_h1_vbus: regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "usb_h1_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       enable-active-high;
-                       startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */
-                       gpio = <&gpio7 12 0>;
-               };
-       };
-};
-
-&fec {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_enet>;
-       phy-mode = "rgmii";
-       status = "okay";
-};
-
-&hdmi {
-       ddc-i2c-bus = <&i2c2>;
-       status = "okay";
-};
-
-&i2c2 {
-       clock-frequency = <100000>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_i2c2>;
-       status = "okay";
-};
-
-&iomuxc {
-       imx6q-udoo {
-               pinctrl_enet: enetgrp {
-                       fsl,pins = <
-                               MX6QDL_PAD_RGMII_RXC__RGMII_RXC         0x1b0b0
-                               MX6QDL_PAD_RGMII_RD0__RGMII_RD0         0x1b0b0
-                               MX6QDL_PAD_RGMII_RD1__RGMII_RD1         0x1b0b0
-                               MX6QDL_PAD_RGMII_RD2__RGMII_RD2         0x1b0b0
-                               MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b0b0
-                               MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x1b0b0
-                               MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x1b0b0
-                               MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x1b0b0
-                               MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x1b0b0
-                               MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x1b0b0
-                               MX6QDL_PAD_RGMII_TD3__RGMII_TD3         0x1b0b0
-                               MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b0b0
-                               MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK    0x1b0b0
-                               MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
-                               MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
-                               MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x4001b0a8
-                       >;
-               };
-
-               pinctrl_i2c2: i2c2grp {
-                       fsl,pins = <
-                               MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
-                               MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
-                       >;
-               };
-
-               pinctrl_uart2: uart2grp {
-                       fsl,pins = <
-                               MX6QDL_PAD_EIM_D26__UART2_TX_DATA       0x1b0b1
-                               MX6QDL_PAD_EIM_D27__UART2_RX_DATA       0x1b0b1
-                       >;
-               };
-
-               pinctrl_usbh: usbhgrp {
-                       fsl,pins = <
-                               MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000
-                               MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
-                       >;
-               };
-
-               pinctrl_usdhc3: usdhc3grp {
-                       fsl,pins = <
-                               MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
-                               MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10059
-                               MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17059
-                               MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
-                               MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
-                               MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
-                       >;
-               };
-       };
 };
 
 &sata {
        status = "okay";
 };
-
-&uart2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_uart2>;
-       status = "okay";
-};
-
-&usbh1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_usbh>;
-       vbus-supply = <&reg_usb_h1_vbus>;
-       clocks = <&clks 201>;
-       status = "okay";
-};
-
-&usdhc3 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_usdhc3>;
-       non-removable;
-       status = "okay";
-};
index 85f72e6b5badebe9afb92a4ebda4414efb19aa83..93ec79bb6b35c54b451ff8ccb9775387f8574aa4 100644 (file)
@@ -31,7 +31,7 @@
                                1200000 1275000
                                996000  1250000
                                852000  1250000
-                               792000  1150000
+                               792000  1175000
                                396000  975000
                        >;
                        fsl,soc-operating-points = <
@@ -95,6 +95,8 @@
                                        clocks = <&clks IMX6Q_CLK_ECSPI5>,
                                                 <&clks IMX6Q_CLK_ECSPI5>;
                                        clock-names = "ipg", "per";
+                                       dmas = <&sdma 11 7 1>, <&sdma 12 7 2>;
+                                       dma-names = "rx", "tx";
                                        status = "disabled";
                                };
                        };
index 0a36129152e0ced29635fe958e38aa2af6cc31b9..0b28a9d5241e5b137ec1f09df2e76f9070675289 100644 (file)
        status = "okay";
 };
 
+&hdmi {
+       ddc-i2c-bus = <&i2c2>;
+       status = "okay";
+};
+
 &i2c1 {
        clock-frequency = <100000>;
        pinctrl-names = "default";
        };
 };
 
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+};
+
 &iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog>;
                        >;
                };
 
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
+                               MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c3: i2c3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_5__I2C3_SCL             0x4001b8b1
+                               MX6QDL_PAD_GPIO_16__I2C3_SDA            0x4001b8b1
+                       >;
+               };
+
                pinctrl_pwm1: pwm1grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD1_DAT3__PWM1_OUT 0x1b0b1
diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
new file mode 100644 (file)
index 0000000..1211da8
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+/ {
+       chosen {
+               stdout-path = &uart2;
+       };
+
+       memory {
+               reg = <0x10000000 0x40000000>;
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_usb_h1_vbus: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "usb_h1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */
+                       gpio = <&gpio7 12 0>;
+               };
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rgmii";
+       status = "okay";
+};
+
+&hdmi {
+       ddc-i2c-bus = <&i2c2>;
+       status = "okay";
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&iomuxc {
+       imx6q-udoo {
+               pinctrl_enet: enetgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_RGMII_RXC__RGMII_RXC         0x1b0b0
+                               MX6QDL_PAD_RGMII_RD0__RGMII_RD0         0x1b0b0
+                               MX6QDL_PAD_RGMII_RD1__RGMII_RD1         0x1b0b0
+                               MX6QDL_PAD_RGMII_RD2__RGMII_RD2         0x1b0b0
+                               MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b0b0
+                               MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x1b0b0
+                               MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD3__RGMII_TD3         0x1b0b0
+                               MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b0b0
+                               MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK    0x1b0b0
+                               MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                               MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                               MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x4001b0a8
+                       >;
+               };
+
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
+                               MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
+                       >;
+               };
+
+               pinctrl_uart2: uart2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D26__UART2_TX_DATA       0x1b0b1
+                               MX6QDL_PAD_EIM_D27__UART2_RX_DATA       0x1b0b1
+                       >;
+               };
+
+               pinctrl_usbh: usbhgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000
+                               MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
+                       >;
+               };
+
+               pinctrl_usdhc3: usdhc3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
+                               MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10059
+                               MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17059
+                               MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
+                               MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
+                               MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
+                       >;
+               };
+       };
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&usbh1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbh>;
+       vbus-supply = <&reg_usb_h1_vbus>;
+       clocks = <&clks 201>;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       non-removable;
+       status = "okay";
+};
index 4fc03b7f1ceec52fe5d327974cd2929127de21f9..f6c6a6e1cf3d1368e38eed5401c4f1d47ebcfb1f 100644 (file)
                                             <0 12 IRQ_TYPE_LEVEL_HIGH>;
                                interrupt-names = "bit", "jpeg";
                                clocks = <&clks IMX6QDL_CLK_VPU_AXI>,
-                                        <&clks IMX6QDL_CLK_MMDC_CH0_AXI>,
-                                        <&clks IMX6QDL_CLK_OCRAM>;
-                               clock-names = "per", "ahb", "ocram";
+                                        <&clks IMX6QDL_CLK_MMDC_CH0_AXI>;
+                               clock-names = "per", "ahb";
                                resets = <&src 1>;
                                iram = <&ocram>;
                        };
diff --git a/arch/arm/boot/dts/imx6sx-sabreauto.dts b/arch/arm/boot/dts/imx6sx-sabreauto.dts
new file mode 100644 (file)
index 0000000..e3c0b63
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2014 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "imx6sx.dtsi"
+
+/ {
+       model = "Freescale i.MX6 SoloX Sabre Auto Board";
+       compatible = "fsl,imx6sx-sabreauto", "fsl,imx6sx";
+
+       memory {
+               reg = <0x80000000 0x80000000>;
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               vcc_sd3: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_vcc_sd3>;
+                       regulator-name = "VCC_SD3";
+                       regulator-min-microvolt = <3000000>;
+                       regulator-max-microvolt = <3000000>;
+                       gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+       };
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+       bus-width = <8>;
+       cd-gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>;
+       wp-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
+       keep-power-in-suspend;
+       enable-sdio-wakeup;
+       vmmc-supply = <&vcc_sd3>;
+       status = "okay";
+};
+
+&usdhc4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc4>;
+       bus-width = <8>;
+       cd-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>;
+       no-1-8-v;
+       keep-power-in-suspend;
+       enable-sdio-wakup;
+       status = "okay";
+};
+
+&iomuxc {
+       imx6x-sabreauto {
+               pinctrl_uart1: uart1grp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO04__UART1_TX          0x1b0b1
+                               MX6SX_PAD_GPIO1_IO05__UART1_RX          0x1b0b1
+                       >;
+               };
+
+               pinctrl_usdhc3: usdhc3grp {
+                       fsl,pins = <
+                               MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x17059
+                               MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x10059
+                               MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x17059
+                               MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x17059
+                               MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x17059
+                               MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x17059
+                               MX6SX_PAD_SD3_DATA4__USDHC3_DATA4       0x17059
+                               MX6SX_PAD_SD3_DATA5__USDHC3_DATA5       0x17059
+                               MX6SX_PAD_SD3_DATA6__USDHC3_DATA6       0x17059
+                               MX6SX_PAD_SD3_DATA7__USDHC3_DATA7       0x17059
+                               MX6SX_PAD_KEY_COL0__GPIO2_IO_10         0x17059 /* CD */
+                               MX6SX_PAD_KEY_ROW0__GPIO2_IO_15         0x17059 /* WP */
+                       >;
+               };
+
+               pinctrl_usdhc3_100mhz: usdhc3grp-100mhz {
+                       fsl,pins = <
+                               MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x170b9
+                               MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x100b9
+                               MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x170b9
+                               MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x170b9
+                               MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x170b9
+                               MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x170b9
+                               MX6SX_PAD_SD3_DATA4__USDHC3_DATA4       0x170b9
+                               MX6SX_PAD_SD3_DATA5__USDHC3_DATA5       0x170b9
+                               MX6SX_PAD_SD3_DATA6__USDHC3_DATA6       0x170b9
+                               MX6SX_PAD_SD3_DATA7__USDHC3_DATA7       0x170b9
+                       >;
+               };
+
+               pinctrl_usdhc3_200mhz: usdhc3grp-200mhz {
+                       fsl,pins = <
+                               MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x170f9
+                               MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x100f9
+                               MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x170f9
+                               MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x170f9
+                               MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x170f9
+                               MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x170f9
+                               MX6SX_PAD_SD3_DATA4__USDHC3_DATA4       0x170f9
+                               MX6SX_PAD_SD3_DATA5__USDHC3_DATA5       0x170f9
+                               MX6SX_PAD_SD3_DATA6__USDHC3_DATA6       0x170f9
+                               MX6SX_PAD_SD3_DATA7__USDHC3_DATA7       0x170f9
+                       >;
+               };
+
+               pinctrl_usdhc4: usdhc4grp {
+                       fsl,pins = <
+                               MX6SX_PAD_SD4_CMD__USDHC4_CMD           0x17059
+                               MX6SX_PAD_SD4_CLK__USDHC4_CLK           0x10059
+                               MX6SX_PAD_SD4_DATA0__USDHC4_DATA0       0x17059
+                               MX6SX_PAD_SD4_DATA1__USDHC4_DATA1       0x17059
+                               MX6SX_PAD_SD4_DATA2__USDHC4_DATA2       0x17059
+                               MX6SX_PAD_SD4_DATA3__USDHC4_DATA3       0x17059
+                               MX6SX_PAD_SD4_DATA7__GPIO6_IO_21        0x17059 /* CD */
+                               MX6SX_PAD_SD4_DATA6__GPIO6_IO_20        0x17059 /* WP */
+                       >;
+               };
+
+               pinctrl_vcc_sd3: vccsd3grp {
+                       fsl,pins = <
+                               MX6SX_PAD_KEY_COL1__GPIO2_IO_11         0x17059
+                       >;
+               };
+       };
+};
index 1e6e5cc1c14cf283fb8b3bd9321f44218fbe4fb3..cdffe8465c4652dc3282e7501dda94f18c836eb4 100644 (file)
        status = "okay";
 };
 
+&qspi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_qspi2>;
+       status = "okay";
+
+       flash0: s25fl128s@0 {
+               reg = <0>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "spansion,s25fl128s";
+               spi-max-frequency = <66000000>;
+       };
+
+       flash1: s25fl128s@1 {
+               reg = <1>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "spansion,s25fl128s";
+               spi-max-frequency = <66000000>;
+       };
+};
+
 &ssi2 {
        status = "okay";
 };
                        >;
                };
 
+               pinctrl_qspi2: qspi2grp {
+                       fsl,pins = <
+                               MX6SX_PAD_NAND_WP_B__QSPI2_A_DATA_0     0x70f1
+                               MX6SX_PAD_NAND_READY_B__QSPI2_A_DATA_1  0x70f1
+                               MX6SX_PAD_NAND_CE0_B__QSPI2_A_DATA_2    0x70f1
+                               MX6SX_PAD_NAND_CE1_B__QSPI2_A_DATA_3    0x70f1
+                               MX6SX_PAD_NAND_CLE__QSPI2_A_SCLK        0x70f1
+                               MX6SX_PAD_NAND_ALE__QSPI2_A_SS0_B       0x70f1
+                               MX6SX_PAD_NAND_DATA01__QSPI2_B_DATA_0   0x70f1
+                               MX6SX_PAD_NAND_DATA00__QSPI2_B_DATA_1   0x70f1
+                               MX6SX_PAD_NAND_WE_B__QSPI2_B_DATA_2     0x70f1
+                               MX6SX_PAD_NAND_RE_B__QSPI2_B_DATA_3     0x70f1
+                               MX6SX_PAD_NAND_DATA02__QSPI2_B_SCLK     0x70f1
+                               MX6SX_PAD_NAND_DATA03__QSPI2_B_SS0_B    0x70f1
+                       >;
+               };
+
                pinctrl_vcc_sd3: vccsd3grp {
                        fsl,pins = <
                                MX6SX_PAD_KEY_COL1__GPIO2_IO_11         0x17059
index 56a452bc326c2272368895883762a44a07cf8f4a..36cafbfa1bfacd58bd9e6ebbfeaf8a18c23ff018 100644 (file)
@@ -35,7 +35,7 @@
                        regulator-name = "usbh_vbus";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
-                       gpio = <&gpio3 19 GPIO_ACTIVE_LOW>;
+                       gpio = <&gpio2 19 GPIO_ACTIVE_LOW>;
                        vin-supply = <&sys_5v0_reg>;
                };
        };
index 82f5728be5c9d10f92fe8b6e5a9a58331fa5eb7b..5c2b7320856dc0efc49c12cf7ff5575bf94a05dc 100644 (file)
@@ -31,7 +31,7 @@
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_esdhc1>;
        bus-width = <4>;
-       cd-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
+       cd-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
 };
 
 &fec1 {
 
                pinctrl_fec1: fec1grp {
                        fsl,pins = <
+                               VF610_PAD_PTA6__RMII_CLKOUT             0x30d2
                                VF610_PAD_PTC9__ENET_RMII1_MDC          0x30d2
                                VF610_PAD_PTC10__ENET_RMII1_MDIO        0x30d3
                                VF610_PAD_PTC11__ENET_RMII1_CRS         0x30d1
index de67005427142fc1241dc51cf2149bd1d9b48509..1dbf8d2d1ddf50e034b337a64b6f74b4f868fd55 100644 (file)
        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
 };
 
-&gpio1 {
+&gpio0 {
        interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
 };
 
-&gpio2 {
+&gpio1 {
        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 };
 
-&gpio3 {
+&gpio2 {
        interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
 };
 
-&gpio4 {
+&gpio3 {
        interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
 };
 
-&gpio5 {
+&gpio4 {
        interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
 };
 
        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 };
 
+&snvsrtc {
+       interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&src {
+       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+};
+
 &uart0 {
        interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
 };
 &usbphy1 {
        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
 };
+
+&wdoga5 {
+       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+       status = "okay";
+};
index a0f762159cb26501b517a1af0d529da8abc42283..289fef20cd834f84eb89dd521526db4b3169cb19 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_esdhc1>;
        bus-width = <4>;
-       cd-gpios = <&gpio5 6 GPIO_ACTIVE_LOW>;
+       cd-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index 505969ae8093d123a80adc613744c9735939f56b..a29c7ce15eafb2b8bbeffb05f173c752d319d230 100644 (file)
                serial3 = &uart3;
                serial4 = &uart4;
                serial5 = &uart5;
-               gpio0 = &gpio1;
-               gpio1 = &gpio2;
-               gpio2 = &gpio3;
-               gpio3 = &gpio4;
-               gpio4 = &gpio5;
+               gpio0 = &gpio0;
+               gpio1 = &gpio1;
+               gpio2 = &gpio2;
+               gpio3 = &gpio3;
+               gpio4 = &gpio4;
                usbphy0 = &usbphy0;
                usbphy1 = &usbphy1;
        };
                clock-frequency = <32768>;
        };
 
+       reboot: syscon-reboot {
+               compatible = "syscon-reboot";
+               regmap = <&src>;
+               offset = <0x0>;
+               mask = <0x1000>;
+       };
+
        soc {
                #address-cells = <1>;
                #size-cells = <1>;
                                status = "disabled";
                        };
 
-                       wdog@4003e000 {
+                       wdoga5: wdog@4003e000 {
                                compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
                                reg = <0x4003e000 0x1000>;
                                clocks = <&clks VF610_CLK_WDT>;
                                #gpio-range-cells = <3>;
                        };
 
-                       gpio1: gpio@40049000 {
+                       gpio0: gpio@40049000 {
                                compatible = "fsl,vf610-gpio";
                                reg = <0x40049000 0x1000 0x400ff000 0x40>;
                                gpio-controller;
                                gpio-ranges = <&iomuxc 0 0 32>;
                        };
 
-                       gpio2: gpio@4004a000 {
+                       gpio1: gpio@4004a000 {
                                compatible = "fsl,vf610-gpio";
                                reg = <0x4004a000 0x1000 0x400ff040 0x40>;
                                gpio-controller;
                                gpio-ranges = <&iomuxc 0 32 32>;
                        };
 
-                       gpio3: gpio@4004b000 {
+                       gpio2: gpio@4004b000 {
                                compatible = "fsl,vf610-gpio";
                                reg = <0x4004b000 0x1000 0x400ff080 0x40>;
                                gpio-controller;
                                gpio-ranges = <&iomuxc 0 64 32>;
                        };
 
-                       gpio4: gpio@4004c000 {
+                       gpio3: gpio@4004c000 {
                                compatible = "fsl,vf610-gpio";
                                reg = <0x4004c000 0x1000 0x400ff0c0 0x40>;
                                gpio-controller;
                                gpio-ranges = <&iomuxc 0 96 32>;
                        };
 
-                       gpio5: gpio@4004d000 {
+                       gpio4: gpio@4004d000 {
                                compatible = "fsl,vf610-gpio";
                                reg = <0x4004d000 0x1000 0x400ff100 0x40>;
                                gpio-controller;
                                clocks = <&clks VF610_CLK_USBC0>;
                                status = "disabled";
                        };
+
+                       src: src@4006e000 {
+                               compatible = "fsl,vf610-src", "syscon";
+                               reg = <0x4006e000 0x1000>;
+                       };
                };
 
                aips1: aips-bus@40080000 {
                                status = "disabled";
                        };
 
+                       snvs0: snvs@400a7000 {
+                           compatible = "fsl,sec-v4.0-mon", "simple-bus";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x400a7000 0x2000>;
+
+                               snvsrtc: snvs-rtc-lp@34 {
+                                       compatible = "fsl,sec-v4.0-mon-rtc-lp";
+                                       reg = <0x34 0x58>;
+                                       clocks = <&clks VF610_CLK_SNVS>;
+                                       clock-names = "snvs-rtc";
+                               };
+                       };
+
                        uart4: serial@400a9000 {
                                compatible = "fsl,vf610-lpuart";
                                reg = <0x400a9000 0x1000>;
index f5ac685a29fc4d554f63133677c460a8f3d1640c..8d1b1018090898d9d1698b6bb39825a99d540001 100644 (file)
@@ -32,8 +32,7 @@ ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_SOC_IMX5) += cpuidle-imx5.o
 obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o
 obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o
-# i.MX6SX reuses i.MX6Q cpuidle driver
-obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6q.o
+obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o
 endif
 
 ifdef CONFIG_SND_IMX_SOC
index 5a75cdc81891c369d3cfd738d9fb3271e7ca208b..8935bff99fe7acc083fb631c5ff8b7e97e7544c6 100644 (file)
@@ -96,15 +96,30 @@ static int clk_gate2_is_enabled(struct clk_hw *hw)
 {
        struct clk_gate2 *gate = to_clk_gate2(hw);
 
-       if (gate->share_count)
-               return !!__clk_get_enable_count(hw->clk);
-       else
-               return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
+       return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
+}
+
+static void clk_gate2_disable_unused(struct clk_hw *hw)
+{
+       struct clk_gate2 *gate = to_clk_gate2(hw);
+       unsigned long flags = 0;
+       u32 reg;
+
+       spin_lock_irqsave(gate->lock, flags);
+
+       if (!gate->share_count || *gate->share_count == 0) {
+               reg = readl(gate->reg);
+               reg &= ~(3 << gate->bit_idx);
+               writel(reg, gate->reg);
+       }
+
+       spin_unlock_irqrestore(gate->lock, flags);
 }
 
 static struct clk_ops clk_gate2_ops = {
        .enable = clk_gate2_enable,
        .disable = clk_gate2_disable,
+       .disable_unused = clk_gate2_disable_unused,
        .is_enabled = clk_gate2_is_enabled,
 };
 
index 0ad6e5442fd8cc80db0027981511a656f8df6103..641ebc50892044a3da816b8b68cc058563f83543 100644 (file)
@@ -31,6 +31,7 @@
  * @base:       base address of PLL registers
  * @powerup_set: set POWER bit to power up the PLL
  * @div_mask:   mask of divider bits
+ * @div_shift:  shift of divider bits
  *
  * IMX PLL clock version 3, found on i.MX6 series.  Divider for pllv3
  * is actually a multiplier, and always sits at bit 0.
@@ -40,6 +41,7 @@ struct clk_pllv3 {
        void __iomem    *base;
        bool            powerup_set;
        u32             div_mask;
+       u32             div_shift;
 };
 
 #define to_clk_pllv3(_hw) container_of(_hw, struct clk_pllv3, hw)
@@ -97,7 +99,7 @@ static unsigned long clk_pllv3_recalc_rate(struct clk_hw *hw,
                                           unsigned long parent_rate)
 {
        struct clk_pllv3 *pll = to_clk_pllv3(hw);
-       u32 div = readl_relaxed(pll->base)  & pll->div_mask;
+       u32 div = (readl_relaxed(pll->base) >> pll->div_shift)  & pll->div_mask;
 
        return (div == 1) ? parent_rate * 22 : parent_rate * 20;
 }
@@ -125,8 +127,8 @@ static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate,
                return -EINVAL;
 
        val = readl_relaxed(pll->base);
-       val &= ~pll->div_mask;
-       val |= div;
+       val &= ~(pll->div_mask << pll->div_shift);
+       val |= (div << pll->div_shift);
        writel_relaxed(val, pll->base);
 
        return clk_pllv3_wait_lock(pll);
@@ -295,6 +297,8 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
        case IMX_PLLV3_SYS:
                ops = &clk_pllv3_sys_ops;
                break;
+       case IMX_PLLV3_USB_VF610:
+               pll->div_shift = 1;
        case IMX_PLLV3_USB:
                ops = &clk_pllv3_ops;
                pll->powerup_set = true;
index 5937ddee1a99ae8e93fbbcdfa2f8b2cf9beee197..61876ed6e11e975c4e1be56f1f56185bfc8d51db 100644 (file)
@@ -172,11 +172,11 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 
        clk[VF610_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll1", "pll1_bypass_src", PLL1_CTRL, 0x1);
        clk[VF610_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "pll2_bypass_src", PLL2_CTRL, 0x1);
-       clk[VF610_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB,     "pll3", "pll3_bypass_src", PLL3_CTRL, 0x1);
+       clk[VF610_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB_VF610,     "pll3", "pll3_bypass_src", PLL3_CTRL, 0x2);
        clk[VF610_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV,      "pll4", "pll4_bypass_src", PLL4_CTRL, 0x7f);
        clk[VF610_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_ENET,    "pll5", "pll5_bypass_src", PLL5_CTRL, 0x3);
        clk[VF610_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_AV,      "pll6", "pll6_bypass_src", PLL6_CTRL, 0x7f);
-       clk[VF610_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB,     "pll7", "pll7_bypass_src", PLL7_CTRL, 0x1);
+       clk[VF610_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB_VF610,     "pll7", "pll7_bypass_src", PLL7_CTRL, 0x2);
 
        clk[VF610_PLL1_BYPASS] = imx_clk_mux_flags("pll1_bypass", PLL1_CTRL, 16, 1, pll1_bypass_sels, ARRAY_SIZE(pll1_bypass_sels), CLK_SET_RATE_PARENT);
        clk[VF610_PLL2_BYPASS] = imx_clk_mux_flags("pll2_bypass", PLL2_CTRL, 16, 1, pll2_bypass_sels, ARRAY_SIZE(pll2_bypass_sels), CLK_SET_RATE_PARENT);
@@ -267,6 +267,8 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
        clk[VF610_CLK_UART1] = imx_clk_gate2("uart1", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(8));
        clk[VF610_CLK_UART2] = imx_clk_gate2("uart2", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(9));
        clk[VF610_CLK_UART3] = imx_clk_gate2("uart3", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(10));
+       clk[VF610_CLK_UART4] = imx_clk_gate2("uart4", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(9));
+       clk[VF610_CLK_UART5] = imx_clk_gate2("uart5", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(10));
 
        clk[VF610_CLK_I2C0] = imx_clk_gate2("i2c0", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(6));
        clk[VF610_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(7));
@@ -380,6 +382,8 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
        clk[VF610_CLK_DMAMUX2] = imx_clk_gate2("dmamux2", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(1));
        clk[VF610_CLK_DMAMUX3] = imx_clk_gate2("dmamux3", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(2));
 
+       clk[VF610_CLK_SNVS] = imx_clk_gate2("snvs-rtc", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(7));
+
        imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        clk_set_parent(clk[VF610_CLK_QSPI0_SEL], clk[VF610_CLK_PLL1_PFD4]);
index 5ef82e2f8fc510ce552b920487fc8c9046d37d50..6a07903a28bc81e8123985fc179d0ca17de9b6e9 100644 (file)
@@ -20,6 +20,7 @@ enum imx_pllv3_type {
        IMX_PLLV3_GENERIC,
        IMX_PLLV3_SYS,
        IMX_PLLV3_USB,
+       IMX_PLLV3_USB_VF610,
        IMX_PLLV3_AV,
        IMX_PLLV3_ENET,
 };
index cfcdb623d78fc5be98092a7f2a65fa735056c7cc..1028b6c505c496b315b90c65911e1cda403ac4fe 100644 (file)
@@ -70,6 +70,10 @@ void imx_set_soc_revision(unsigned int rev);
 unsigned int imx_get_soc_revision(void);
 void imx_init_revision_from_anatop(void);
 struct device *imx_soc_device_init(void);
+void imx6_enable_rbc(bool enable);
+void imx_gpc_set_arm_power_in_lpm(bool power_off);
+void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw);
+void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw);
 
 enum mxc_cpu_pwr_mode {
        WAIT_CLOCKED,           /* wfi only */
diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-imx/cpuidle-imx6sx.c
new file mode 100644 (file)
index 0000000..5a36722
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2014 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/cpuidle.h>
+#include <linux/cpu_pm.h>
+#include <linux/module.h>
+#include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
+#include <asm/suspend.h>
+
+#include "common.h"
+#include "cpuidle.h"
+
+static int imx6sx_idle_finish(unsigned long val)
+{
+       cpu_do_idle();
+
+       return 0;
+}
+
+static int imx6sx_enter_wait(struct cpuidle_device *dev,
+                           struct cpuidle_driver *drv, int index)
+{
+       imx6q_set_lpm(WAIT_UNCLOCKED);
+
+       switch (index) {
+       case 1:
+               cpu_do_idle();
+               break;
+       case 2:
+               imx6_enable_rbc(true);
+               imx_gpc_set_arm_power_in_lpm(true);
+               imx_set_cpu_jump(0, v7_cpu_resume);
+               /* Need to notify there is a cpu pm operation. */
+               cpu_pm_enter();
+               cpu_cluster_pm_enter();
+
+               cpu_suspend(0, imx6sx_idle_finish);
+
+               cpu_cluster_pm_exit();
+               cpu_pm_exit();
+               imx_gpc_set_arm_power_in_lpm(false);
+               imx6_enable_rbc(false);
+               break;
+       default:
+               break;
+       }
+
+       imx6q_set_lpm(WAIT_CLOCKED);
+
+       return index;
+}
+
+static struct cpuidle_driver imx6sx_cpuidle_driver = {
+       .name = "imx6sx_cpuidle",
+       .owner = THIS_MODULE,
+       .states = {
+               /* WFI */
+               ARM_CPUIDLE_WFI_STATE,
+               /* WAIT */
+               {
+                       .exit_latency = 50,
+                       .target_residency = 75,
+                       .flags = CPUIDLE_FLAG_TIMER_STOP,
+                       .enter = imx6sx_enter_wait,
+                       .name = "WAIT",
+                       .desc = "Clock off",
+               },
+               /* WAIT + ARM power off  */
+               {
+                       /*
+                        * ARM gating 31us * 5 + RBC clear 65us
+                        * and some margin for SW execution, here set it
+                        * to 300us.
+                        */
+                       .exit_latency = 300,
+                       .target_residency = 500,
+                       .enter = imx6sx_enter_wait,
+                       .name = "LOW-POWER-IDLE",
+                       .desc = "ARM power off",
+               },
+       },
+       .state_count = 3,
+       .safe_state_index = 0,
+};
+
+int __init imx6sx_cpuidle_init(void)
+{
+       imx6_enable_rbc(false);
+       /*
+        * set ARM power up/down timing to the fastest,
+        * sw2iso and sw can be set to one 32K cycle = 31us
+        * except for power up sw2iso which need to be
+        * larger than LDO ramp up time.
+        */
+       imx_gpc_set_arm_power_up_timing(2, 1);
+       imx_gpc_set_arm_power_down_timing(1, 1);
+
+       return cpuidle_register(&imx6sx_cpuidle_driver, NULL);
+}
index 24e33670417c1dd48f21aa2acf4f8bdfbc16c95a..f9140128ba05189c125b2ff788960b3c74e473e7 100644 (file)
@@ -14,6 +14,7 @@
 extern int imx5_cpuidle_init(void);
 extern int imx6q_cpuidle_init(void);
 extern int imx6sl_cpuidle_init(void);
+extern int imx6sx_cpuidle_init(void);
 #else
 static inline int imx5_cpuidle_init(void)
 {
@@ -27,4 +28,8 @@ static inline int imx6sl_cpuidle_init(void)
 {
        return 0;
 }
+static inline int imx6sx_cpuidle_init(void)
+{
+       return 0;
+}
 #endif
index 5f3602ec74fac50c8d0dd827e76782cbd8514f32..745caa18ab2c0bc0edcfa7388e1a44c1bdf6986a 100644 (file)
 
 #define GPC_IMR1               0x008
 #define GPC_PGC_CPU_PDN                0x2a0
+#define GPC_PGC_CPU_PUPSCR     0x2a4
+#define GPC_PGC_CPU_PDNSCR     0x2a8
+#define GPC_PGC_SW2ISO_SHIFT   0x8
+#define GPC_PGC_SW_SHIFT       0x0
 
 #define IMR_NUM                        4
 
@@ -27,6 +31,23 @@ static void __iomem *gpc_base;
 static u32 gpc_wake_irqs[IMR_NUM];
 static u32 gpc_saved_imrs[IMR_NUM];
 
+void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw)
+{
+       writel_relaxed((sw2iso << GPC_PGC_SW2ISO_SHIFT) |
+               (sw << GPC_PGC_SW_SHIFT), gpc_base + GPC_PGC_CPU_PUPSCR);
+}
+
+void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw)
+{
+       writel_relaxed((sw2iso << GPC_PGC_SW2ISO_SHIFT) |
+               (sw << GPC_PGC_SW_SHIFT), gpc_base + GPC_PGC_CPU_PDNSCR);
+}
+
+void imx_gpc_set_arm_power_in_lpm(bool power_off)
+{
+       writel_relaxed(power_off, gpc_base + GPC_PGC_CPU_PDN);
+}
+
 void imx_gpc_pre_suspend(bool arm_power_off)
 {
        void __iomem *reg_imr1 = gpc_base + GPC_IMR1;
@@ -34,7 +55,7 @@ void imx_gpc_pre_suspend(bool arm_power_off)
 
        /* Tell GPC to power off ARM core when suspend */
        if (arm_power_off)
-               writel_relaxed(0x1, gpc_base + GPC_PGC_CPU_PDN);
+               imx_gpc_set_arm_power_in_lpm(arm_power_off);
 
        for (i = 0; i < IMR_NUM; i++) {
                gpc_saved_imrs[i] = readl_relaxed(reg_imr1 + i * 4);
@@ -48,7 +69,7 @@ void imx_gpc_post_resume(void)
        int i;
 
        /* Keep ARM core powered on for other low-power modes */
-       writel_relaxed(0x0, gpc_base + GPC_PGC_CPU_PDN);
+       imx_gpc_set_arm_power_in_lpm(false);
 
        for (i = 0; i < IMR_NUM; i++)
                writel_relaxed(gpc_saved_imrs[i], reg_imr1 + i * 4);
index 7a96c65772344f20e385993b6dd17057bd2af658..66988eb6a3a4dc5ac520bd2a19421e76eaaf28fd 100644 (file)
@@ -90,7 +90,7 @@ static void __init imx6sx_init_irq(void)
 
 static void __init imx6sx_init_late(void)
 {
-       imx6q_cpuidle_init();
+       imx6sx_cpuidle_init();
 
        if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ))
                platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
index c11ab6a1dc87f7d18d12c8c3e391dc49acc6afd3..2e7c75b66fe03420ef5fad642fdaf968cc95c441 100644 (file)
 #include <asm/hardware/cache-l2x0.h>
 
 static const char * const vf610_dt_compat[] __initconst = {
+       "fsl,vf500",
+       "fsl,vf510",
+       "fsl,vf600",
        "fsl,vf610",
        NULL,
 };
 
-DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
+DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF5xx/VF6xx (Device Tree)")
        .l2c_aux_val    = 0,
        .l2c_aux_mask   = ~0,
        .dt_compat      = vf610_dt_compat,
index 5d2c1bd5f5ef911834a477d82de71909ec0e80d7..46fd695203c70a22fdc4389b39161d1e6ef5a5b8 100644 (file)
@@ -205,7 +205,7 @@ void imx6q_set_int_mem_clk_lpm(bool enable)
        writel_relaxed(val, ccm_base + CGPR);
 }
 
-static void imx6q_enable_rbc(bool enable)
+void imx6_enable_rbc(bool enable)
 {
        u32 val;
 
@@ -359,17 +359,16 @@ static int imx6q_pm_enter(suspend_state_t state)
                 * RBC setting, so we do NOT need to do that here.
                 */
                if (!imx6_suspend_in_ocram_fn)
-                       imx6q_enable_rbc(true);
+                       imx6_enable_rbc(true);
                imx_gpc_pre_suspend(true);
                imx_anatop_pre_suspend();
-               imx_set_cpu_jump(0, v7_cpu_resume);
                /* Zzz ... */
                cpu_suspend(0, imx6q_suspend_finish);
                if (cpu_is_imx6q() || cpu_is_imx6dl())
                        imx_smp_prepare();
                imx_anatop_post_resume();
                imx_gpc_post_resume();
-               imx6q_enable_rbc(false);
+               imx6_enable_rbc(false);
                imx6q_enable_wb(false);
                imx6q_set_int_mem_clk_lpm(true);
                imx6q_set_lpm(WAIT_CLOCKED);
index 801c0ac50c47f3ba80df69b9db99fda95d0db5e2..979d24a6799f052df426ea3400413c71aa0efbd0 100644 (file)
 #define VF610_PLL5_BYPASS              179
 #define VF610_PLL6_BYPASS              180
 #define VF610_PLL7_BYPASS              181
-#define VF610_CLK_END                  182
+#define VF610_CLK_SNVS                 182
+#define VF610_CLK_END                  183
 
 #endif /* __DT_BINDINGS_CLOCK_VF610_H */