[meta-freescale] [PATCH 2/3] linux-cm-fx6: add cm-fx6 kernel configuration files

Valentin Raevsky valentin at compulab.co.il
Sat Apr 11 02:39:24 PDT 2015


Add cm-fx6 kernel configuration files.
This is a fork of the linux-imx 3.10.17.ga with the CompuLab patches
for cm-fx6 boards.

Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
---
 ...-i.MX6-dts-Add-initial-support-for-cm-fx6.patch |  399 ++++++
 .../0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch      |  456 +++++++
 .../0003-igb-Enable-random-mac-address.patch       |   32 +
 .../0004-ARM-i.MX6-cm-fx6-update-defconfig.patch   |   27 +
 ...05-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch |  101 ++
 ...0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch |   40 +
 .../0007-ARM-i.MX6-dts-add-SPDIF-support.patch     |   69 +
 .../0008-ARM-i.MX6-dts-add-Power-Button.patch      |   36 +
 ....MX6-dts-Enable-uart2-as-a-serial-console.patch |   50 +
 ...-dts-add-pcie-power-reset-gpio-definition.patch |   44 +
 ...MX6-dts-add-onboard-SSD-pin-configuration.patch |   46 +
 ...MX6-dts-add-onboard-SSD-power-up-sequence.patch |   92 ++
 ...X6-dts-add-audio-mux-pinmux-configuration.patch |   47 +
 ...14-ARM-i.MX6-dts-add-analog-audio-support.patch |   67 +
 ...-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch |  573 ++++++++
 ...6-ASoC-add-imx-wm8731-master-mode-support.patch |  335 +++++
 .../0017-ARM-i.MX6-dts-enable-v4l2-output.patch    |   31 +
 ...X6-dts-some-small-changes-in-the-dts-file.patch |   52 +
 ...ine-the-device-mac-address-in-device-tree.patch |   79 ++
 .../0020-ARM-i.MX6-cm-fx6-update-defconfig.patch   |   87 ++
 ...ts-refactoring-the-cm-fx6-device-tree-fil.patch | 1111 +++++++++++++++
 ...m-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch |   42 +
 ...ts-refactoring-of-the-cm-fx6-device-tree-.patch | 1421 ++++++++++++++++++++
 ...m-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch |   26 +
 ...MX6-override-system_rev-for-cm-fx6-boards.patch |  159 +++
 ...ts-pcie-power-on-gpio-to-a-fixed-regulato.patch |   45 +
 .../0027-ARM-i.MX6-dts-add-i2c1-status-okay.patch  |   45 +
 ...6-dts-add-local-mac-address-field-for-fec.patch |   28 +
 ...-ARM-mxs-change-usb-phy-test-clock-gating.patch |   36 +
 ...i.MX6-dts-fix-the-cm-fx6-operation-points.patch |   51 +
 ...m-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch |   26 +
 ...6-ASoC-fsl-hdmi-Disable-NEON-optimization.patch |   39 +
 ...SoC-fix-build-warnings-and-update-include.patch |   70 +
 ...-u32-variables-for-SDIO-read-write-port-b.patch |  178 +++
 ...re-SDIO-chip-specific-information-in-sepa.patch |  557 ++++++++
 ...lace-unnecessary-u32-variables-with-u8-in.patch |  136 ++
 ...code-rearrangement-in-mwifiex_get_rd_port.patch |   60 +
 ...8-mwifiex-do-port-calculations-separately.patch |   97 ++
 ...ifiex-define-a-macro-for-MPA-base-address.patch |   53 +
 ...e-rearrangement-in-multiport-aggregation-.patch |  220 +++
 ...ex-add-support-for-Marvell-SD8897-chipset.patch |  715 ++++++++++
 .../0042-mtd-m25p80-add-support-for-m25px16.patch  |   29 +
 ...0043-ARM-i.MX6-dts-change-issd-gpio-order.patch |   67 +
 ...RM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch |   30 +
 ...se-devname-vhci-module-alias-for-virtual-.patch |   26 +
 ...dd-support-creating-virtual-AMP-controlle.patch |  319 +++++
 ...-btmrvl-add-btmrvl_send_sync_cmd-function.patch |  223 +++
 ...tooth-btmrvl-get-rid-of-struct-btmrvl_cmd.patch |   67 +
 .../0049-Bluetooth-btmrvl-add-setup-handler.patch  |   71 +
 ...tmrvl-add-calibration-data-download-suppo.patch |  287 ++++
 ...tmrvl-operate-on-16-bit-opcodes-instead-o.patch |  146 ++
 ...tmrvl-use-cal-data-from-device-tree-inste.patch |  282 ++++
 ...tmrvl-remove-cal-data-byte-swapping-and-r.patch |  102 ++
 ...tmrvl-wait-for-HOST_SLEEP_ENABLE-event-in.patch |  102 ++
 ...luetooth-btmrvl-disable-SD8787-AMP-device.patch |   36 +
 ...M-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch |   29 +
 .../0057-Input-add-hx8520-6-device-driver.patch    |  562 ++++++++
 ...X6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch |   53 +
 ...dts-add-i2cmux-support-for-SBC-FX6-boards.patch |  172 +++
 .../0060-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch    |   46 +
 ...0061-video-mxc-IPUv3-fb-restore-sync-bits.patch |  114 ++
 ...ts-add-backlight-support-for-SBC-FX6-boar.patch |   47 +
 ...ts-rearrangement-of-the-frame-buffers-def.patch |   69 +
 ...i.MX6-iomux-raise-DSE-for-display-signals.patch |   73 +
 ...MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch |   46 +
 ...RM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch |   54 +
 ...i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch |   37 +
 ...m-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch |   26 +
 ...46-make-sure-we-do-not-change-platform-da.patch |   62 +
 ...70-Input-ads7846-add-device-tree-bindings.patch |  293 ++++
 .../0071-Input-ads7846-use-IS_ENABLED-macro.patch  |   38 +
 .../0072-ARM-dts-cm-fx6-enable-can-bus.patch       |   29 +
 ...ts-cm-fx6-add-tsc2046-touchscreen-support.patch |   85 ++
 ...b-fx6x-refactoring-of-the-usdhc3-definiti.patch |   83 ++
 ...6-cm-fx6-fix-up-incorrect-compatibilities.patch |   47 +
 ...0076-ARM-i.MX6-dts-fix-include-file-order.patch |  129 ++
 ...M-i.MX6-dts-rename-the-sb-fx6-board-files.patch |  570 ++++++++
 ...MX6-dts-refactor-the-sbc-fx6-target-files.patch |  243 ++++
 ...M-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch | 1182 ++++++++++++++++
 ...6-dts-add-initial-support-for-cm-fx6-DL-S.patch |   53 +
 ....MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch |   78 ++
 ...fx6-add-build-targets-for-cm-fx6-flavour-.patch |   48 +
 ...m-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch |   26 +
 ...m-fx6-change-the-hdmi_core-ipu-connection.patch |   47 +
 ...X6-dts-add-ldb-support-for-SBC-FX6-boards.patch |   90 ++
 ...fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch |   46 +
 .../linux/linux-cm-fx6-3.10.17/defconfig           |  457 +++++++
 recipes-kernel/linux/linux-cm-fx6_3.10.17.bb       |  102 ++
 88 files changed, 14601 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0003-igb-Enable-random-mac-address.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0007-ARM-i.MX6-dts-add-SPDIF-support.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0008-ARM-i.MX6-dts-add-Power-Button.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0014-ARM-i.MX6-dts-add-analog-audio-support.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0017-ARM-i.MX6-dts-enable-v4l2-output.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0019-igb-Define-the-device-mac-address-in-device-tree.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0022-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0023-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0024-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0025-ARM-i.MX6-override-system_rev-for-cm-fx6-boards.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0026-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0027-ARM-i.MX6-dts-add-i2c1-status-okay.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0028-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0029-ARM-mxs-change-usb-phy-test-clock-gating.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0030-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0031-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0032-ENGR00317636-ASoC-fsl-hdmi-Disable-NEON-optimization.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0033-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0034-mwifiex-use-u32-variables-for-SDIO-read-write-port-b.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0035-mwifiex-store-SDIO-chip-specific-information-in-sepa.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0036-mwifiex-replace-unnecessary-u32-variables-with-u8-in.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0037-mwifiex-code-rearrangement-in-mwifiex_get_rd_port.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0038-mwifiex-do-port-calculations-separately.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0039-mwifiex-define-a-macro-for-MPA-base-address.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0040-mwifiex-code-rearrangement-in-multiport-aggregation-.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0041-mwifiex-add-support-for-Marvell-SD8897-chipset.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0042-mtd-m25p80-add-support-for-m25px16.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0043-ARM-i.MX6-dts-change-issd-gpio-order.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0044-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0045-Bluetooth-Use-devname-vhci-module-alias-for-virtual-.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0046-Bluetooth-Add-support-creating-virtual-AMP-controlle.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0047-Bluetooth-btmrvl-add-btmrvl_send_sync_cmd-function.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0048-Bluetooth-btmrvl-get-rid-of-struct-btmrvl_cmd.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0049-Bluetooth-btmrvl-add-setup-handler.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0050-Bluetooth-btmrvl-add-calibration-data-download-suppo.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0051-Bluetooth-btmrvl-operate-on-16-bit-opcodes-instead-o.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0052-Bluetooth-btmrvl-use-cal-data-from-device-tree-inste.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0053-Bluetooth-btmrvl-remove-cal-data-byte-swapping-and-r.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0054-Bluetooth-btmrvl-wait-for-HOST_SLEEP_ENABLE-event-in.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0055-Bluetooth-btmrvl-disable-SD8787-AMP-device.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0056-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0057-Input-add-hx8520-6-device-driver.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0058-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0059-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0060-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0061-video-mxc-IPUv3-fb-restore-sync-bits.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0062-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0063-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0064-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0065-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0066-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0067-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0068-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0069-Input-ads7846-make-sure-we-do-not-change-platform-da.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0070-Input-ads7846-add-device-tree-bindings.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0071-Input-ads7846-use-IS_ENABLED-macro.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0072-ARM-dts-cm-fx6-enable-can-bus.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0073-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0074-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0075-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0076-ARM-i.MX6-dts-fix-include-file-order.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0077-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0078-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0079-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0080-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0081-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0082-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0083-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0084-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0085-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/0086-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch
 create mode 100644 recipes-kernel/linux/linux-cm-fx6-3.10.17/defconfig
 create mode 100644 recipes-kernel/linux/linux-cm-fx6_3.10.17.bb

diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch
new file mode 100644
index 0000000..33640a3
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch
@@ -0,0 +1,399 @@
+From 295162356cd1eecfc0fdaa540bb1150fe51697dc Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 15 May 2014 17:18:11 +0300
+Subject: ARM: i.MX6: dts: Add initial support for cm-fx6
+
+Add initial support for cm-fx6 module.
+
+This patch configures:
+1) serial console
+2) hearbeat led
+3) FreeScale NIC
+4) pcie
+5) Intel I210 NIC
+6) wif/bt
+7) sata
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |  368 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 368 insertions(+)
+ create mode 100644 arch/arm/boot/dts/imx6q-cm-fx6.dts
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+new file mode 100644
+index 0000000..1f06d95
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -0,0 +1,368 @@
++/*
++* Copyright 2013 CompuLab Ltd.
++*
++* Author: Valentin Raevsky <valentin at compulab.co.il>
++*
++* The code contained herein is licensed under the GNU General Public
++* License. You may obtain a copy of the GNU General Public License
++* Version 2 or later at the following locations:
++*
++* http://www.opensource.org/licenses/gpl-license.html
++* http://www.gnu.org/copyleft/gpl.html
++*/
++
++/dts-v1/;
++#include "imx6q.dtsi"
++
++/ {
++   model = "CompuLab CM-FX6";
++   compatible = "compulab,cm-fx6", "fsl,imx6q";
++
++   memory {
++      reg = <0x10000000 0x80000000>;
++   };
++
++   leds {
++      compatible = "gpio-leds";
++
++      heartbeat-led {
++         label = "Heartbeat";
++         gpios = <&gpio2 31 0>;
++         linux,default-trigger = "heartbeat";
++      };
++   };
++
++   regulators {
++      compatible = "simple-bus";
++      #address-cells = <1>;
++      #size-cells = <0>;
++
++      /* regulator for mmc */
++      reg_3p3v: 3p3v {
++         compatible = "regulator-fixed";
++         regulator-name = "3P3V";
++         regulator-min-microvolt = <3300000>;
++         regulator-max-microvolt = <3300000>;
++         regulator-always-on;
++      };
++
++      /* regulator for usb otg */
++      reg_usb_otg_vbus: usb_otg_vbus {
++         compatible = "regulator-fixed";
++         regulator-name = "usb_otg_vbus";
++         regulator-min-microvolt = <5000000>;
++         regulator-max-microvolt = <5000000>;
++         gpio = <&gpio3 22 0>;
++         enable-active-high;
++      };
++
++      /* regulator for usb hub1 */
++      reg_usb_h1_vbus: usb_h1_vbus {
++         compatible = "regulator-fixed";
++         regulator-name = "usb_h1_vbus";
++         regulator-min-microvolt = <5000000>;
++         regulator-max-microvolt = <5000000>;
++         gpio = <&gpio7 8 0>;
++         enable-active-high;
++      };
++
++      /* regulator1 for wifi/bt */
++      awnh387_npoweron: regulator-awnh387-npoweron {
++         compatible = "regulator-fixed";
++         regulator-name = "regulator-awnh387-npoweron";
++         regulator-min-microvolt = <3300000>;
++         regulator-max-microvolt = <3300000>;
++         gpio = <&gpio7 12 0>;
++         enable-active-high;
++      };
++      
++      /* regulator2 for wifi/bt */
++      awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
++         compatible = "regulator-fixed";
++         regulator-name = "regulator-awnh387-wifi-nreset";
++         regulator-min-microvolt = <3300000>;
++         regulator-max-microvolt = <3300000>;
++         gpio = <&gpio6 16 0>;
++         startup-delay-us = <10000>;
++      };
++   };
++};
++
++&iomuxc {
++   imx6q-cm-fx6 {
++       /* pins for eth0 */
++      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
++         >;
++      };
++      
++      /* pins for spi */
++      pinctrl_ecspi1: ecspi1grp {
++         fsl,pins = <
++            MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
++            MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
++            MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
++            MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
++            MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
++         >;
++      };
++
++      /* pins for nand */
++      pinctrl_gpmi_nand: gpminandgrp {
++         fsl,pins = <
++            MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
++            MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
++            MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
++            MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
++            MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
++            MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
++            MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
++            MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
++            MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
++            MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
++            MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
++            MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
++            MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
++            MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
++            MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
++            MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
++            MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
++         >;
++      };
++
++      /* pins for i2c1 */
++      pinctrl_i2c1: i2c1grp {
++         fsl,pins = <
++            MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
++            MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
++         >;
++      };
++      
++      /* pins for i2c2 */
++      pinctrl_i2c2: i2c2grp {
++         fsl,pins = <
++            MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
++            MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
++         >;
++      };
++      
++      /* pins for i2c3 */
++      pinctrl_i2c3: i2c3grp {
++         fsl,pins = <
++            MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
++            MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
++         >;
++      };
++
++      /* pins for console */
++      pinctrl_uart4: uart4grp {
++         fsl,pins = <
++            MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
++            MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
++         >;
++      };
++      
++      /* pins for usb hub1 */
++      pinctrl_usbh1: usbh1grp {
++         fsl,pins = <
++            MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
++         >;
++      };
++      
++      /* pins for usb otg */
++      pinctrl_usbotg: usbotggrp {
++         fsl,pins = <
++            MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
++         >;
++      };
++
++      /* pins for wifi/bt */
++      pinctrl_usdhc1: usdhc1grp {
++         fsl,pins = <
++            MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
++            MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
++            MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
++            MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
++            MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
++            MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
++         >;
++      };
++
++      /* pins for mmc */
++      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
++         >;
++      };
++   };
++};
++
++/* spi */
++&ecspi1 {
++   fsl,spi-num-chipselects = <2>;
++   cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_ecspi1>;
++   status = "okay";
++
++   flash: m25p80 at 0 {
++      #address-cells = <1>;
++      #size-cells = <1>;
++      compatible = "st,m25px16", "st,m25p";
++      spi-max-frequency = <20000000>;
++      reg = <0>;
++
++      partition at 0 {
++         label = "uboot";
++         reg = <0x0 0xc0000>;
++      };
++
++      partition at c0000 {
++         label = "uboot environment";
++         reg = <0xc0000 0x40000>;
++      };
++
++      partition at 100000 {
++         label = "reserved";
++         reg = <0x100000 0x100000>;
++      };
++   };
++};
++
++/* eth0 */
++&fec {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_enet>;
++   phy-mode = "rgmii";
++   status = "okay";
++};
++
++/* nand */
++&gpmi {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_gpmi_nand>;
++   status = "okay";
++};
++
++/* i2c1 */
++&i2c1 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_i2c1>;
++   status = "okay";
++
++   eeprom at 50 {
++      compatible = "at24,24c02";
++      reg = <0x50>;
++      pagesize = <16>;
++   };
++
++   rtc at 56 {
++      compatible = "emmicro,em3027";
++      reg = <0x56>;
++   };
++};
++
++/* i2c2 */
++&i2c2 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_i2c2>;
++   status = "okay";
++};
++
++/* i2c3 */
++&i2c3 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_i2c3>;
++   status = "okay";
++
++   eeprom at 50 {
++      compatible = "at24,24c02";
++      reg = <0x50>;
++      pagesize = <16>;
++   };
++};
++
++/* eth1 */ 
++&pcie {
++   reset-gpio = <&gpio1 26 0>;
++   status = "okay";
++};
++
++/* sata */
++&sata {
++   status = "okay";
++};
++
++/* rear serial console */
++&uart2 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_uart2_2>;
++   fsl,dte-mode;
++   fsl,uart-has-rtscts;
++   dma-names = "rx", "tx";
++   dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
++   status = "okay";
++};
++
++/* console */
++&uart4 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_uart4>;
++   status = "okay";
++};
++
++/* usb otg */
++&usbotg {
++   vbus-supply = <&reg_usb_otg_vbus>;
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_usbotg>;
++   dr_mode = "otg";
++   status = "okay";
++};
++
++/* usb hub1 */
++&usbh1 {
++   vbus-supply = <&reg_usb_h1_vbus>;
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_usbh1>;
++   status = "okay";
++};
++
++/* wifi/bt */
++&usdhc1 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_usdhc1>;
++   non-removable;
++   vmmc-supply = <&awnh387_npoweron>;
++   vmmc_aux-supply = <&awnh387_wifi_nreset>;
++   status = "okay";
++};
++
++/* mmc */
++&usdhc3 {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_usdhc3>;
++   vmmc-supply = <&reg_3p3v>;
++   status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch
new file mode 100644
index 0000000..0087248
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch
@@ -0,0 +1,456 @@
+From 872a25d586e7cd36c787cf7717d01e0ecfe507df Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 15 May 2014 17:25:07 +0300
+Subject: ARM: i.MX6: cm-fx6: Add defconfig
+
+Add default configuration file for the cm-fx6 module.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |  434 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 434 insertions(+)
+ create mode 100644 arch/arm/configs/cm_fx6_defconfig
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+new file mode 100644
+index 0000000..92c3da1
+--- /dev/null
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -0,0 +1,434 @@
++CONFIG_KERNEL_LZO=y
++CONFIG_SYSVIPC=y
++CONFIG_NO_HZ=y
++CONFIG_HIGH_RES_TIMERS=y
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_LOG_BUF_SHIFT=18
++CONFIG_CGROUPS=y
++CONFIG_RELAY=y
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_EXPERT=y
++CONFIG_PERF_EVENTS=y
++# CONFIG_SLUB_DEBUG is not set
++# CONFIG_COMPAT_BRK is not set
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++# CONFIG_BLK_DEV_BSG is not set
++CONFIG_GPIO_PCA953X=y
++CONFIG_ARCH_MXC=y
++CONFIG_MXC_DEBUG_BOARD=y
++CONFIG_MACH_IMX51_DT=y
++CONFIG_MACH_EUKREA_CPUIMX51SD=y
++CONFIG_SOC_IMX53=y
++CONFIG_SOC_IMX6Q=y
++CONFIG_SOC_IMX6SL=y
++CONFIG_SOC_VF610=y
++# CONFIG_SWP_EMULATE is not set
++CONFIG_PCI=y
++CONFIG_PCI_IMX6=y
++CONFIG_SMP=y
++CONFIG_VMSPLIT_2G=y
++CONFIG_PREEMPT=y
++CONFIG_AEABI=y
++# CONFIG_OABI_COMPAT is not set
++CONFIG_HIGHMEM=y
++CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
++CONFIG_CPU_FREQ=y
++CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
++CONFIG_CPU_FREQ_GOV_POWERSAVE=y
++CONFIG_CPU_FREQ_GOV_USERSPACE=y
++CONFIG_CPU_FREQ_GOV_ONDEMAND=y
++CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
++CONFIG_ARM_IMX6_CPUFREQ=y
++CONFIG_CPU_IDLE=y
++CONFIG_VFP=y
++CONFIG_NEON=y
++CONFIG_BINFMT_MISC=m
++CONFIG_PM_RUNTIME=y
++CONFIG_PM_DEBUG=y
++CONFIG_PM_TEST_SUSPEND=y
++CONFIG_NET=y
++CONFIG_PACKET=y
++CONFIG_UNIX=y
++CONFIG_INET=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_BEET is not set
++# CONFIG_INET_LRO is not set
++CONFIG_IPV6=y
++CONFIG_NETFILTER=y
++CONFIG_NETFILTER_DEBUG=y
++CONFIG_NF_CONNTRACK=m
++CONFIG_NF_CONNTRACK_FTP=m
++CONFIG_NF_CONNTRACK_TFTP=m
++CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
++CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
++CONFIG_NETFILTER_XT_TARGET_DSCP=m
++CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
++CONFIG_NETFILTER_XT_TARGET_LED=m
++CONFIG_NETFILTER_XT_TARGET_MARK=m
++CONFIG_NETFILTER_XT_TARGET_NFLOG=m
++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
++CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
++CONFIG_NETFILTER_XT_TARGET_TEE=m
++CONFIG_NETFILTER_XT_TARGET_TRACE=m
++CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
++CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
++CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
++CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
++CONFIG_NETFILTER_XT_MATCH_COMMENT=m
++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
++CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
++CONFIG_NETFILTER_XT_MATCH_CPU=m
++CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m
++CONFIG_NETFILTER_XT_MATCH_DSCP=m
++CONFIG_NETFILTER_XT_MATCH_ESP=m
++CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
++CONFIG_NETFILTER_XT_MATCH_HELPER=m
++CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
++CONFIG_NETFILTER_XT_MATCH_LENGTH=m
++CONFIG_NETFILTER_XT_MATCH_LIMIT=m
++CONFIG_NETFILTER_XT_MATCH_MAC=m
++CONFIG_NETFILTER_XT_MATCH_MARK=m
++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
++CONFIG_NETFILTER_XT_MATCH_OSF=m
++CONFIG_NETFILTER_XT_MATCH_OWNER=m
++CONFIG_NETFILTER_XT_MATCH_POLICY=m
++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
++CONFIG_NETFILTER_XT_MATCH_QUOTA=m
++CONFIG_NETFILTER_XT_MATCH_RATEEST=m
++CONFIG_NETFILTER_XT_MATCH_REALM=m
++CONFIG_NETFILTER_XT_MATCH_RECENT=m
++CONFIG_NETFILTER_XT_MATCH_STATE=m
++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
++CONFIG_NETFILTER_XT_MATCH_STRING=m
++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
++CONFIG_NETFILTER_XT_MATCH_TIME=m
++CONFIG_NETFILTER_XT_MATCH_U32=m
++CONFIG_NF_CONNTRACK_IPV4=m
++CONFIG_IP_NF_IPTABLES=y
++CONFIG_IP_NF_MATCH_AH=m
++CONFIG_IP_NF_MATCH_ECN=m
++CONFIG_IP_NF_MATCH_RPFILTER=m
++CONFIG_IP_NF_MATCH_TTL=m
++CONFIG_IP_NF_FILTER=y
++CONFIG_IP_NF_TARGET_REJECT=y
++CONFIG_IP_NF_TARGET_ULOG=m
++CONFIG_NF_NAT_IPV4=m
++CONFIG_IP_NF_TARGET_MASQUERADE=m
++CONFIG_IP_NF_TARGET_NETMAP=m
++CONFIG_IP_NF_TARGET_REDIRECT=m
++CONFIG_IP_NF_MANGLE=m
++CONFIG_IP_NF_TARGET_ECN=m
++CONFIG_IP_NF_TARGET_TTL=m
++CONFIG_IP_NF_RAW=m
++CONFIG_IP_NF_ARPTABLES=m
++CONFIG_IP_NF_ARPFILTER=m
++CONFIG_IP_NF_ARP_MANGLE=m
++CONFIG_VLAN_8021Q=m
++CONFIG_VLAN_8021Q_GVRP=y
++CONFIG_CAN=y
++CONFIG_CAN_FLEXCAN=y
++CONFIG_CFG80211=y
++CONFIG_CFG80211_WEXT=y
++CONFIG_MAC80211=y
++CONFIG_DEVTMPFS=y
++CONFIG_DEVTMPFS_MOUNT=y
++# CONFIG_STANDALONE is not set
++CONFIG_CMA=y
++CONFIG_CMA_SIZE_MBYTES=320
++CONFIG_IMX_WEIM=y
++CONFIG_CONNECTOR=y
++CONFIG_MTD=y
++CONFIG_MTD_CMDLINE_PARTS=y
++CONFIG_MTD_BLOCK=y
++CONFIG_MTD_CFI=y
++CONFIG_MTD_JEDECPROBE=y
++CONFIG_MTD_CFI_INTELEXT=y
++CONFIG_MTD_CFI_AMDSTD=y
++CONFIG_MTD_CFI_STAA=y
++CONFIG_MTD_PHYSMAP_OF=y
++CONFIG_MTD_DATAFLASH=y
++CONFIG_MTD_M25P80=y
++CONFIG_MTD_SST25L=y
++CONFIG_MTD_NAND=y
++CONFIG_MTD_NAND_GPMI_NAND=y
++CONFIG_MTD_NAND_MXC=y
++CONFIG_MTD_UBI=y
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_SIZE=65536
++CONFIG_EEPROM_AT24=y
++CONFIG_EEPROM_AT25=y
++# CONFIG_SCSI_PROC_FS is not set
++CONFIG_BLK_DEV_SD=y
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++CONFIG_SCSI_SCAN_ASYNC=y
++# CONFIG_SCSI_LOWLEVEL is not set
++CONFIG_ATA=y
++CONFIG_SATA_AHCI_PLATFORM=y
++CONFIG_AHCI_IMX=y
++CONFIG_PATA_IMX=y
++CONFIG_NETDEVICES=y
++CONFIG_TUN=m
++# CONFIG_NET_VENDOR_BROADCOM is not set
++CONFIG_CS89x0=y
++CONFIG_CS89x0_PLATFORM=y
++# CONFIG_NET_VENDOR_FARADAY is not set
++CONFIG_IGB=m
++# CONFIG_NET_VENDOR_MARVELL is not set
++# CONFIG_NET_VENDOR_MICREL is not set
++# CONFIG_NET_VENDOR_MICROCHIP is not set
++# CONFIG_NET_VENDOR_NATSEMI is not set
++# CONFIG_NET_VENDOR_SEEQ is not set
++CONFIG_SMC91X=y
++CONFIG_SMC911X=y
++CONFIG_SMSC911X=y
++# CONFIG_NET_VENDOR_STMICRO is not set
++CONFIG_ATH_CARDS=y
++CONFIG_ATH6KL=m
++CONFIG_ATH6KL_SDIO=m
++CONFIG_MWIFIEX=m
++CONFIG_MWIFIEX_SDIO=m
++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
++CONFIG_INPUT_EVDEV=y
++CONFIG_INPUT_EVBUG=m
++CONFIG_KEYBOARD_GPIO=y
++CONFIG_KEYBOARD_IMX=y
++CONFIG_MOUSE_PS2=m
++CONFIG_MOUSE_PS2_ELANTECH=y
++CONFIG_INPUT_TOUCHSCREEN=y
++CONFIG_TOUCHSCREEN_EGALAX=y
++CONFIG_TOUCHSCREEN_ELAN=y
++CONFIG_TOUCHSCREEN_MAX11801=y
++CONFIG_TOUCHSCREEN_MC13783=y
++CONFIG_INPUT_MISC=y
++CONFIG_INPUT_MMA8450=y
++CONFIG_INPUT_ISL29023=y
++CONFIG_SERIO_SERPORT=m
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_LEGACY_PTYS is not set
++# CONFIG_DEVKMEM is not set
++CONFIG_SERIAL_IMX=y
++CONFIG_SERIAL_IMX_CONSOLE=y
++CONFIG_SERIAL_FSL_LPUART=y
++CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
++CONFIG_FSL_OTP=y
++CONFIG_MXS_VIIM=y
++# CONFIG_I2C_COMPAT is not set
++CONFIG_I2C_CHARDEV=y
++# CONFIG_I2C_HELPER_AUTO is not set
++CONFIG_I2C_ALGOPCF=m
++CONFIG_I2C_ALGOPCA=m
++CONFIG_I2C_IMX=y
++CONFIG_SPI=y
++CONFIG_SPI_IMX=y
++CONFIG_GPIO_SYSFS=y
++CONFIG_POWER_SUPPLY=y
++CONFIG_SABRESD_MAX8903=y
++CONFIG_IMX6_USB_CHARGER=y
++CONFIG_SENSORS_MAX17135=y
++CONFIG_SENSORS_MAG3110=y
++CONFIG_THERMAL=y
++CONFIG_CPU_THERMAL=y
++CONFIG_IMX_THERMAL=y
++CONFIG_DEVICE_THERMAL=y
++CONFIG_WATCHDOG=y
++CONFIG_IMX2_WDT=y
++CONFIG_MFD_DA9052_I2C=y
++CONFIG_MFD_MC13XXX_SPI=y
++CONFIG_MFD_MC13XXX_I2C=y
++CONFIG_MFD_MAX17135=y
++CONFIG_MFD_SI476X_CORE=y
++CONFIG_REGULATOR=y
++CONFIG_REGULATOR_FIXED_VOLTAGE=y
++CONFIG_REGULATOR_DA9052=y
++CONFIG_REGULATOR_ANATOP=y
++CONFIG_REGULATOR_MC13783=y
++CONFIG_REGULATOR_MC13892=y
++CONFIG_REGULATOR_MAX17135=y
++CONFIG_REGULATOR_PFUZE100=y
++CONFIG_MEDIA_SUPPORT=y
++CONFIG_MEDIA_CAMERA_SUPPORT=y
++CONFIG_MEDIA_RADIO_SUPPORT=y
++CONFIG_VIDEO_V4L2_INT_DEVICE=y
++CONFIG_MEDIA_USB_SUPPORT=y
++CONFIG_USB_VIDEO_CLASS=m
++CONFIG_V4L_PLATFORM_DRIVERS=y
++CONFIG_VIDEO_MXC_OUTPUT=y
++CONFIG_VIDEO_MXC_CAPTURE=m
++CONFIG_VIDEO_MXC_CSI_CAMERA=m
++CONFIG_MXC_CAMERA_OV5640=m
++CONFIG_MXC_CAMERA_OV5642=m
++CONFIG_MXC_CAMERA_OV5640_MIPI=m
++CONFIG_MXC_TVIN_ADV7180=m
++CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m
++CONFIG_VIDEO_MXC_IPU_OUTPUT=y
++CONFIG_VIDEO_MXC_PXP_V4L2=y
++CONFIG_SOC_CAMERA=y
++CONFIG_VIDEO_MX3=y
++CONFIG_RADIO_SI476X=y
++CONFIG_SOC_CAMERA_OV2640=y
++CONFIG_DRM=y
++CONFIG_DRM_VIVANTE=y
++CONFIG_FB=y
++CONFIG_FB_MXS=y
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++CONFIG_LCD_CLASS_DEVICE=y
++CONFIG_LCD_L4F00242T03=y
++CONFIG_LCD_PLATFORM=y
++CONFIG_BACKLIGHT_CLASS_DEVICE=y
++CONFIG_BACKLIGHT_PWM=y
++CONFIG_FB_MXC_SYNC_PANEL=y
++CONFIG_FB_MXC_LDB=y
++CONFIG_FB_MXC_MIPI_DSI=y
++CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y
++CONFIG_FB_MXC_HDMI=y
++CONFIG_FB_MXC_EINK_PANEL=y
++CONFIG_FB_MXS_SII902X=y
++CONFIG_HANNSTAR_CABC=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
++CONFIG_FONTS=y
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++CONFIG_LOGO=y
++CONFIG_SOUND=y
++CONFIG_SND=y
++CONFIG_SND_USB_AUDIO=m
++CONFIG_SND_SOC=y
++CONFIG_SND_IMX_SOC=y
++CONFIG_SND_SOC_EUKREA_TLV320=y
++CONFIG_SND_SOC_IMX_CS42888=y
++CONFIG_SND_SOC_IMX_WM8962=y
++CONFIG_SND_SOC_IMX_SGTL5000=y
++CONFIG_SND_SOC_IMX_SPDIF=y
++CONFIG_SND_SOC_IMX_MC13783=y
++CONFIG_SND_SOC_IMX_HDMI=y
++CONFIG_SND_SOC_IMX_SI476X=y
++CONFIG_USB=y
++CONFIG_USB_EHCI_HCD=y
++CONFIG_USB_STORAGE=y
++CONFIG_USB_CHIPIDEA=y
++CONFIG_USB_CHIPIDEA_UDC=y
++CONFIG_USB_CHIPIDEA_HOST=y
++CONFIG_USB_PHY=y
++CONFIG_NOP_USB_XCEIV=y
++CONFIG_USB_MXS_PHY=y
++CONFIG_USB_GADGET=y
++CONFIG_USB_ZERO=m
++CONFIG_USB_ETH=m
++CONFIG_USB_MASS_STORAGE=m
++CONFIG_USB_G_SERIAL=m
++CONFIG_MMC=y
++CONFIG_MMC_UNSAFE_RESUME=y
++CONFIG_MMC_SDHCI=y
++CONFIG_MMC_SDHCI_PLTFM=y
++CONFIG_MMC_SDHCI_ESDHC_IMX=y
++CONFIG_MXC_IPU=y
++CONFIG_MXC_GPU_VIV=y
++CONFIG_MXC_ASRC=y
++CONFIG_MXC_MIPI_CSI2=y
++CONFIG_MXC_MLB150=m
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
++CONFIG_LEDS_GPIO=y
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_GPIO=y
++CONFIG_RTC_CLASS=y
++CONFIG_RTC_INTF_DEV_UIE_EMUL=y
++CONFIG_RTC_DRV_MC13XXX=y
++CONFIG_RTC_DRV_MXC=y
++CONFIG_RTC_DRV_SNVS=y
++CONFIG_DMADEVICES=y
++CONFIG_MXC_PXP_V2=y
++CONFIG_IMX_SDMA=y
++CONFIG_MXS_DMA=y
++CONFIG_STAGING=y
++CONFIG_COMMON_CLK_DEBUG=y
++# CONFIG_IOMMU_SUPPORT is not set
++CONFIG_PWM=y
++CONFIG_PWM_IMX=y
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++CONFIG_EXT3_FS_SECURITY=y
++CONFIG_EXT4_FS=y
++CONFIG_EXT4_FS_POSIX_ACL=y
++CONFIG_EXT4_FS_SECURITY=y
++CONFIG_QUOTA=y
++CONFIG_QUOTA_NETLINK_INTERFACE=y
++# CONFIG_PRINT_QUOTA_WARNING is not set
++CONFIG_AUTOFS4_FS=y
++CONFIG_FUSE_FS=y
++CONFIG_ISO9660_FS=m
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_UDF_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=y
++CONFIG_TMPFS=y
++CONFIG_JFFS2_FS=y
++CONFIG_UBIFS_FS=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3_ACL=y
++CONFIG_NFS_V4=y
++CONFIG_ROOT_NFS=y
++CONFIG_NLS_DEFAULT="cp437"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_ASCII=y
++CONFIG_NLS_ISO8859_1=y
++CONFIG_NLS_ISO8859_15=m
++CONFIG_NLS_UTF8=y
++CONFIG_MAGIC_SYSRQ=y
++# CONFIG_SCHED_DEBUG is not set
++# CONFIG_DEBUG_BUGVERBOSE is not set
++# CONFIG_FTRACE is not set
++CONFIG_SECURITYFS=y
++CONFIG_CRYPTO_USER=y
++CONFIG_CRYPTO_TEST=m
++CONFIG_CRYPTO_CCM=y
++CONFIG_CRYPTO_GCM=y
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTS=y
++CONFIG_CRYPTO_ECB=y
++CONFIG_CRYPTO_LRW=y
++CONFIG_CRYPTO_XTS=y
++CONFIG_CRYPTO_MD4=y
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=y
++CONFIG_CRYPTO_RMD128=y
++CONFIG_CRYPTO_RMD160=y
++CONFIG_CRYPTO_RMD256=y
++CONFIG_CRYPTO_RMD320=y
++CONFIG_CRYPTO_SHA1=y
++CONFIG_CRYPTO_SHA256=y
++CONFIG_CRYPTO_SHA512=y
++CONFIG_CRYPTO_TGR192=y
++CONFIG_CRYPTO_WP512=y
++CONFIG_CRYPTO_BLOWFISH=y
++CONFIG_CRYPTO_CAMELLIA=y
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_TWOFISH=y
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_DEV_FSL_CAAM=y
++CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
++CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y
++CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
++CONFIG_CRC_CCITT=m
++CONFIG_CRC_T10DIF=y
++CONFIG_CRC7=m
++CONFIG_LIBCRC32C=m
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0003-igb-Enable-random-mac-address.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0003-igb-Enable-random-mac-address.patch
new file mode 100644
index 0000000..5cd2ec2
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0003-igb-Enable-random-mac-address.patch
@@ -0,0 +1,32 @@
+From 54da75bf3745ab90c3b1bab8e3ee6b39063d1ff8 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 15 May 2014 17:26:30 +0300
+Subject: igb: Enable random mac address
+
+Enable random mac address in order to let the driver up
+if eeprom values are incorrect.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
+index 64cbe0d..4ca17ab 100644
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -2178,6 +2178,11 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	if (hw->mac.ops.read_mac_addr(hw))
+ 		dev_err(&pdev->dev, "NVM Read Error\n");
+ 
++	if (!is_valid_ether_addr(hw->mac.addr)) {
++		dev_info(&pdev->dev, "Random MAC Address\n");
++		random_ether_addr(hw->mac.addr);
++	}
++
+ 	memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);
+ 
+ 	if (!is_valid_ether_addr(netdev->dev_addr)) {
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch
new file mode 100644
index 0000000..84652bd
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch
@@ -0,0 +1,27 @@
+From 6b03d561345178d3106d9e1a142f7ce5a2eee8ff Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 22 Jun 2014 18:03:27 +0300
+Subject: ARM: i.MX6: cm-fx6: update defconfig
+
+Enable EM3027 RTC
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index 92c3da1..eb6d9cb 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -347,6 +347,7 @@ CONFIG_LEDS_TRIGGERS=y
+ CONFIG_LEDS_TRIGGER_GPIO=y
+ CONFIG_RTC_CLASS=y
+ CONFIG_RTC_INTF_DEV_UIE_EMUL=y
++CONFIG_RTC_DRV_EM3027=y
+ CONFIG_RTC_DRV_MC13XXX=y
+ CONFIG_RTC_DRV_MXC=y
+ CONFIG_RTC_DRV_SNVS=y
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch
new file mode 100644
index 0000000..81f4eaa
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch
@@ -0,0 +1,101 @@
+From ce9c2ffff62a089a8060b1633cf727d7a9c12411 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 23 Jun 2014 13:53:35 +0300
+Subject: ARM: i.MX6: dts: add HDMI and DVI support
+
+Add HDMI and DVI support on IPU1 and IPU2, define two frame buffers.
+Enable starting X with fbdev.
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   65 +++++++++++++++++++++++++++++++++++-
+ 1 file changed, 64 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 1f06d95..018c3b1 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -86,6 +86,44 @@
+          startup-delay-us = <10000>;
+       };
+    };
++
++   aliases {
++	mxcfb0 = &mxcfb1;
++	mxcfb1 = &mxcfb2;
++   };
++
++   mxcfb1: fb at 0 {
++	compatible = "fsl,mxc_sdc_fb";
++	disp_dev = "hdmi";
++	interface_pix_fmt = "RGB24";
++	mode_str ="1920x1080M at 60";
++	default_bpp = <24>;
++	int_clk = <0>;
++	late_init = <0>;
++	status = "disabled";
++   };
++
++   mxcfb2: fb at 1 {
++	compatible = "fsl,mxc_sdc_fb";
++	disp_dev = "lcd";
++	interface_pix_fmt = "RGB24";
++	mode_str ="1920x1080M at 60";
++	default_bpp = <24>;
++	int_clk = <0>;
++	late_init = <0>;
++	status = "disabled";
++   };
++
++    lcd at 0 {
++	compatible = "fsl,lcd";
++	ipu_id = <0>;
++	disp_id = <0>;
++	default_ifmt = "RGB24";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_ipu1_1>;
++	status = "okay";
++   };
++
+ };
+ 
+ &iomuxc {
+@@ -287,7 +325,7 @@
+ &i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_i2c2>;
+-   status = "okay";
++   /* status = "okay"; */
+ };
+ 
+ /* i2c3 */
+@@ -366,3 +404,28 @@
+    vmmc-supply = <&reg_3p3v>;
+    status = "okay";
+ };
++
++&mxcfb1 {
++	status = "okay";
++};
++
++&mxcfb2 {
++	status = "okay";
++};
++
++&hdmi_core {
++	ipu_id = <1>;
++	disp_id = <0>;
++	status = "okay";
++};
++
++&hdmi_video {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hdmi_hdcp_1>;
++	fsl,hdcp;
++	status = "okay";
++};
++
++&hdmi_audio {
++/*	status = "okay"; */
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch
new file mode 100644
index 0000000..f5205bd
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch
@@ -0,0 +1,40 @@
+From 9894a8ebce33c6541d6f0d3b0ad33691c7445b6f Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 23 Jun 2014 15:29:21 +0300
+Subject: ARM: i.MX6: dts: add HDMI-Audio support
+
+Add HDMI-Audio support.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 018c3b1..76b4b0c 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -92,6 +92,13 @@
+ 	mxcfb1 = &mxcfb2;
+    };
+ 
++   sound-hdmi {
++	compatible = "fsl,imx6q-audio-hdmi",
++		"fsl,imx-audio-hdmi";
++	model = "imx-audio-hdmi";
++	hdmi-controller = <&hdmi_audio>;
++   };
++
+    mxcfb1: fb at 0 {
+ 	compatible = "fsl,mxc_sdc_fb";
+ 	disp_dev = "hdmi";
+@@ -427,5 +434,5 @@
+ };
+ 
+ &hdmi_audio {
+-/*	status = "okay"; */
++	status = "okay";
+ };
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0007-ARM-i.MX6-dts-add-SPDIF-support.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0007-ARM-i.MX6-dts-add-SPDIF-support.patch
new file mode 100644
index 0000000..256863e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0007-ARM-i.MX6-dts-add-SPDIF-support.patch
@@ -0,0 +1,69 @@
+From 21d2f8922a300ee6ec042d60c081e149c6ff7f7f Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 23 Jun 2014 16:30:18 +0300
+Subject: ARM: i.MX6: dts: add SPDIF support
+
+Add SPDIF support.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   25 ++++++++++++++++++++++++-
+ 1 file changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 76b4b0c..3f73b83 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -99,6 +99,15 @@
+ 	hdmi-controller = <&hdmi_audio>;
+    };
+ 
++   sound-spdif {
++	compatible = "fsl,imx-audio-spdif",
++		"fsl,imx-sabreauto-spdif";
++	model = "imx-spdif";
++	spdif-controller = <&spdif>;
++	spdif-out;
++	spdif-in;
++   };
++
+    mxcfb1: fb at 0 {
+ 	compatible = "fsl,mxc_sdc_fb";
+ 	disp_dev = "hdmi";
+@@ -153,7 +162,6 @@
+             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
+          >;
+       };
+       
+@@ -260,6 +268,15 @@
+             MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
+          >;
+       };
++
++      /* pins for spdif */
++      pinctrl_spdif: spdifgrp {
++	fsl,pins = <
++		MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
++		MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
++	>;
++     };
++
+    };
+ };
+ 
+@@ -436,3 +453,9 @@
+ &hdmi_audio {
+ 	status = "okay";
+ };
++
++&spdif {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_spdif>;
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0008-ARM-i.MX6-dts-add-Power-Button.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0008-ARM-i.MX6-dts-add-Power-Button.patch
new file mode 100644
index 0000000..06b3a1c
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0008-ARM-i.MX6-dts-add-Power-Button.patch
@@ -0,0 +1,36 @@
+From 0c4753c91fc9afe31d62464dabbce574dffb872c Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 24 Jun 2014 15:35:52 +0300
+Subject: ARM: i.MX6: dts: add "Power Button"
+
+Add "Power Button" by means of GPIO
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 3f73b83..0abb116 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -87,6 +87,16 @@
+       };
+    };
+ 
++   gpio-keys {
++	compatible = "gpio-keys";
++	power {
++		label = "Power Button";
++		gpios = <&gpio1 29 1>;
++		linux,code = <116>; /* KEY_POWER */
++		gpio-key,wakeup;
++	};
++   };
++
+    aliases {
+ 	mxcfb0 = &mxcfb1;
+ 	mxcfb1 = &mxcfb2;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch
new file mode 100644
index 0000000..f035f7e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch
@@ -0,0 +1,50 @@
+From 999c2beb64851cab559699ba267f5c4038210dda Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 10:42:20 +0300
+Subject: ARM: i.MX6: dts: Enable uart2 as a serial console
+
+Enable ttymxc1 for use as a serial console:
+1) Add the correct uart2 pinmux configuration.
+2) Disable uart2 dte mode.
+	It allows running 'getty' and 'login' on the ttymxc1.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 0abb116..16cefe0 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -287,6 +287,16 @@
+ 	>;
+      };
+ 
++	/* pins for uart2 */
++	pinctrl_uart2: uart2grp {
++		fsl,pins = <
++			MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
++			MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
++			MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
++			MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
++	>;
++	};
++
+    };
+ };
+ 
+@@ -389,8 +399,8 @@
+ /* rear serial console */
+ &uart2 {
+    pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_uart2_2>;
+-   fsl,dte-mode;
++   pinctrl-0 = <&pinctrl_uart2>;
++   /* fsl,dte-mode; */
+    fsl,uart-has-rtscts;
+    dma-names = "rx", "tx";
+    dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch
new file mode 100644
index 0000000..0bf3d3c
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch
@@ -0,0 +1,44 @@
+From a5b573ad1d12e64d57f62564fa1b958d7f241e32 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 10:51:44 +0300
+Subject: ARM: i.MX6: dts: add pcie power/reset gpio definition
+
+Add pcie power/reset gpio definition.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 16cefe0..592db30 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -297,6 +297,13 @@
+ 	>;
+ 	};
+ 
++	/* pins for pcie */
++	pinctrl_pcie: pciegrp {
++		fsl,pins = <
++			MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
++			MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
++	>;
++     };
+    };
+ };
+ 
+@@ -387,7 +394,10 @@
+ 
+ /* eth1 */ 
+ &pcie {
++   pinctrl-names = "default";
++   pinctrl-0 = <&pinctrl_pcie>;
+    reset-gpio = <&gpio1 26 0>;
++   power-on-gpio = <&gpio2 24 0>;
+    status = "okay";
+ };
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch
new file mode 100644
index 0000000..372d3cf
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch
@@ -0,0 +1,46 @@
+From b129bc1f07d8f78091aa59f4f3a716f6b2669444 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 10:53:32 +0300
+Subject: ARM: i.MX6: dts: add onboard SSD pin configuration
+
+Add onboard SSD pin configuration.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 592db30..0dfffa9 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -153,6 +153,26 @@
+ };
+ 
+ &iomuxc {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hog>;
++
++	hog {
++		pinctrl_hog: hoggrp {
++			fsl,pins = <
++				/* SATA PWR */
++				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000
++				MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000
++				MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
++				MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000
++				/* SATA CTRL */
++				MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000
++				MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000
++				MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000
++				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
++			>;
++		};
++	};
++
+    imx6q-cm-fx6 {
+        /* pins for eth0 */
+       pinctrl_enet: enetgrp {
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch
new file mode 100644
index 0000000..611ceef
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch
@@ -0,0 +1,92 @@
+From 1678bfb68eb5619fb99fd6ae27500bbbf940dc11 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 10:54:43 +0300
+Subject: ARM: i.MX6: dts: add onboard SSD power up sequence
+
+Add onboard SSD power up sequence.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   66 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 66 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 0dfffa9..286b03e 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -85,6 +85,72 @@
+          gpio = <&gpio6 16 0>;
+          startup-delay-us = <10000>;
+       };
++
++      reg_sata_phy_slp: sata_phy_slp {
++	      compatible = "regulator-fixed";
++	      regulator-name = "cm_fx6_sata_phy_slp";
++	      regulator-min-microvolt = <3300000>;
++	      regulator-max-microvolt = <3300000>;
++	      gpio = <&gpio3 23 0>;
++	      startup-delay-us = <100>;
++	      enable-active-high;
++      };
++
++      reg_sata_nrstdly: sata_nrstdly {
++	      compatible = "regulator-fixed";
++	      regulator-name = "cm_fx6_sata_nrstdly";
++	      regulator-min-microvolt = <3300000>;
++	      regulator-max-microvolt = <3300000>;
++	      gpio = <&gpio6 6 0>;
++	      startup-delay-us = <100>;
++	      enable-active-high;
++	      vin-supply = <&reg_sata_phy_slp>;
++      };
++
++      reg_sata_pwren: sata_pwren {
++	      compatible = "regulator-fixed";
++	      regulator-name = "cm_fx6_sata_pwren";
++	      regulator-min-microvolt = <3300000>;
++	      regulator-max-microvolt = <3300000>;
++	      gpio = <&gpio1 28 0>;
++	      startup-delay-us = <100>;
++	      enable-active-high;
++	      vin-supply = <&reg_sata_nrstdly>;
++      };
++
++      reg_sata_nstandby1: sata_nstandby1 {
++	      compatible = "regulator-fixed";
++	      regulator-name = "cm_fx6_sata_nstandby1";
++	      regulator-min-microvolt = <3300000>;
++	      regulator-max-microvolt = <3300000>;
++	      gpio = <&gpio3 20 0>;
++	      startup-delay-us = <100>;
++	      enable-active-high;
++	      vin-supply = <&reg_sata_pwren>;
++      };
++
++      reg_sata_nstandby2: sata_nstandby2 {
++	      compatible = "regulator-fixed";
++	      regulator-name = "cm_fx6_sata_nstandby2";
++	      regulator-min-microvolt = <3300000>;
++	      regulator-max-microvolt = <3300000>;
++	      gpio = <&gpio5 2 0>;
++	      startup-delay-us = <100>;
++	      enable-active-high;
++	      vin-supply = <&reg_sata_nstandby1>;
++      };
++
++      reg_sata_ldo_en: sata_ldo_en {
++	      compatible = "regulator-fixed";
++	      regulator-name = "cm_fx6_sata_ldo_en";
++	      regulator-min-microvolt = <3300000>;
++	      regulator-max-microvolt = <3300000>;
++	      gpio = <&gpio2 16 0>;
++	      startup-delay-us = <100>;
++	      enable-active-high;
++	      regulator-boot-on;
++	      vin-supply = <&reg_sata_nstandby2>;
++      };
+    };
+ 
+    gpio-keys {
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch
new file mode 100644
index 0000000..a9bd286
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch
@@ -0,0 +1,47 @@
+From 9a6bb802c13cd62ae654206e109976bc34850539 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 10:57:39 +0300
+Subject: ARM: i.MX6: dts: add audio mux pinmux configuration
+
+Add audio mux pinmux configuration and enable audio mux.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 286b03e..776e0d8 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -373,6 +373,17 @@
+ 	>;
+      };
+ 
++	/* pins for audmux */
++	pinctrl_audmux: audmuxgrp {
++		fsl,pins = <
++			MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
++			MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
++			MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
++			MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
++			MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
++	>;
++	};
++
+ 	/* pins for uart2 */
+ 	pinctrl_uart2: uart2grp {
+ 		fsl,pins = <
+@@ -575,3 +586,9 @@
+ 	pinctrl-0 = <&pinctrl_spdif>;
+ 	status = "okay";
+ };
++
++&audmux {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_audmux>;
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0014-ARM-i.MX6-dts-add-analog-audio-support.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0014-ARM-i.MX6-dts-add-analog-audio-support.patch
new file mode 100644
index 0000000..ad9e178
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0014-ARM-i.MX6-dts-add-analog-audio-support.patch
@@ -0,0 +1,67 @@
+From 65926dc02e5daabac41ea1b4bb9bda2d277a5cdb Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 11:02:28 +0300
+Subject: ARM: i.MX6: dts: add analog audio support
+
+1) Add i2c analog audion device node definition.
+2) Add wm8731 codec node definition.
+3) Enable ssi2 in master mode.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |   25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 776e0d8..9f5da43 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -168,6 +168,15 @@
+ 	mxcfb1 = &mxcfb2;
+    };
+ 
++	sound {
++		compatible = "fsl,imx6q-cm-fx6-wm8731",
++			  "fsl,imx-audio-wm8731";
++		model = "wm8731-audio";
++		ssi-controller = <&ssi2>;
++		audio-codec = <&codec>;
++		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
++	};
++
+    sound-hdmi {
+ 	compatible = "fsl,imx6q-audio-hdmi",
+ 		"fsl,imx-audio-hdmi";
+@@ -487,6 +496,17 @@
+       reg = <0x50>;
+       pagesize = <16>;
+    };
++
++	codec: wm8731 at 1a {
++		compatible = "wlf,wm8731";
++		reg = <0x1a>;
++		clocks = <&clks 173>, <&clks 158>;
++		clock-names = "pll4", "imx-ssi.1";
++		AVDD-supply = <&pu_dummy>;
++		HPVDD-supply = <&pu_dummy>;
++		DCVDD-supply = <&pu_dummy>;
++		DBVDD-supply = <&pu_dummy>;
++	};
+ };
+ 
+ /* eth1 */ 
+@@ -556,6 +576,11 @@
+    status = "okay";
+ };
+ 
++&ssi2 {
++	fsl,mode = "i2s-master";
++	status = "okay";
++};
++
+ &mxcfb1 {
+ 	status = "okay";
+ };
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch
new file mode 100644
index 0000000..66fad87
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch
@@ -0,0 +1,573 @@
+From ea1217b332b4624ef7b4b9799cce636168901546 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 20 Jul 2014 11:10:12 +0300
+Subject: ARM: i.MX6: ASoC: add imx-wm8731 machine driver
+
+This is the initial imx-wm8731 device-tree-only machine driver working with
+fsl_ssi driver. Works in the slave mode.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ sound/soc/fsl/Kconfig      |   12 ++
+ sound/soc/fsl/Makefile     |    2 +
+ sound/soc/fsl/imx-wm8731.c |  505 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 519 insertions(+)
+ create mode 100644 sound/soc/fsl/imx-wm8731.c
+
+diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
+index 8e8f144..5395581 100644
+--- a/sound/soc/fsl/Kconfig
++++ b/sound/soc/fsl/Kconfig
+@@ -197,6 +197,18 @@ config SND_SOC_IMX_CS42888
+ 	 Say Y if you want to add support for SoC audio on an i.MX board with
+ 	 a cs42888 codec.
+ 
++config SND_SOC_IMX_WM8731
++	tristate "SoC Audio support for i.MX boards with wm8731"
++	depends on OF && I2C
++	select SND_SOC_WM8731
++	select SND_SOC_IMX_PCM_DMA
++	select SND_SOC_IMX_AUDMUX
++	select SND_SOC_FSL_SSI
++	select SND_SOC_FSL_UTILS
++	help
++	  Say Y if you want to add support for SoC audio on an i.MX board with
++	  a wm8731 codec.
++
+ config SND_SOC_IMX_WM8962
+ 	tristate "SoC Audio support for i.MX boards with wm8962"
+ 	depends on OF && I2C
+diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
+index a04afcf..0d7dfee 100644
+--- a/sound/soc/fsl/Makefile
++++ b/sound/soc/fsl/Makefile
+@@ -54,6 +54,7 @@ snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o
+ snd-soc-wm1133-ev1-objs := wm1133-ev1.o
+ snd-soc-imx-cs42888-objs := imx-cs42888.o
+ snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o
++snd-soc-imx-wm8731-objs := imx-wm8731.o
+ snd-soc-imx-wm8962-objs := imx-wm8962.o
+ snd-soc-imx-spdif-objs := imx-spdif.o
+ snd-soc-imx-mc13783-objs := imx-mc13783.o
+@@ -67,6 +68,7 @@ obj-$(CONFIG_SND_MXC_SOC_WM1133_EV1) += snd-soc-wm1133-ev1.o
+ obj-$(CONFIG_SND_SOC_IMX_CS42888) += snd-soc-imx-cs42888.o
+ obj-$(CONFIG_SND_SOC_IMX_SGTL5000) += snd-soc-imx-sgtl5000.o
+ obj-$(CONFIG_SND_SOC_IMX_WM8962) += snd-soc-imx-wm8962.o
++obj-$(CONFIG_SND_SOC_IMX_WM8731) += snd-soc-imx-wm8731.o
+ obj-$(CONFIG_SND_SOC_IMX_SPDIF) += snd-soc-imx-spdif.o
+ obj-$(CONFIG_SND_SOC_IMX_MC13783) += snd-soc-imx-mc13783.o
+ obj-$(CONFIG_SND_SOC_IMX_HDMI) += snd-soc-imx-hdmi.o
+diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c
+new file mode 100644
+index 0000000..ba1363f
+--- /dev/null
++++ b/sound/soc/fsl/imx-wm8731.c
+@@ -0,0 +1,505 @@
++/*
++ * Copyright (C) 2014 Freescale Semiconductor, Inc.
++ *
++ * Based on imx-sgtl5000.c
++ * Copyright (C) 2012 Freescale Semiconductor, Inc.
++ * Copyright (C) 2012 Linaro Ltd.
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include <linux/of_platform.h>
++#include <linux/of_i2c.h>
++#include <linux/of_gpio.h>
++#include <linux/slab.h>
++#include <linux/gpio.h>
++#include <linux/clk.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++#include <sound/pcm_params.h>
++#include <sound/soc-dapm.h>
++#include <linux/pinctrl/consumer.h>
++
++#include "../codecs/wm8731.h"
++#include "imx-audmux.h"
++#include "imx-ssi.h"
++
++#define DAI_NAME_SIZE	32
++
++struct imx_wm8731_data {
++	struct snd_soc_dai_link dai;
++	struct snd_soc_card card;
++	char codec_dai_name[DAI_NAME_SIZE];
++	char platform_name[DAI_NAME_SIZE];
++	struct i2c_client *codec_dev;
++	/* audio_clocking_data */
++	struct clk *pll;
++	struct clk *clock_root;
++	long sysclk;
++	long current_rate;
++	/* platfor data */
++	unsigned int ssi_num;
++	unsigned int src_port;
++	unsigned int ext_port;
++};
++
++static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd);
++static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream,
++                                       struct snd_pcm_hw_params *params);
++static void imx_hifi_shutdown(struct snd_pcm_substream *substream);
++
++struct imx_priv {
++	struct platform_device *pdev;
++	struct imx_wm8731_data *data;
++};
++
++static struct imx_priv card_priv;
++
++static struct snd_soc_ops imx_hifi_ops = {
++	.shutdown	= imx_hifi_shutdown,
++	.hw_params	= imx_hifi_hw_params_slv_mode,
++};
++
++/* imx card dapm widgets */
++static const struct snd_soc_dapm_widget imx_dapm_widgets[] = {
++	SND_SOC_DAPM_HP("Headphone Jack",       NULL),
++	SND_SOC_DAPM_SPK("Ext Spk",             NULL),
++	SND_SOC_DAPM_LINE("Line Jack",          NULL),
++	SND_SOC_DAPM_MIC("Mic Jack",            NULL),
++};
++
++/* imx machine connections to the codec pins */
++static const struct snd_soc_dapm_route audio_map[] = {
++	{ "Headphone Jack",     NULL,   "LHPOUT" },
++	{ "Headphone Jack",     NULL,   "RHPOUT" },
++
++	{ "Ext Spk",            NULL,   "LOUT" },
++	{ "Ext Spk",            NULL,   "ROUT" },
++
++	{ "LLINEIN",            NULL,   "Line Jack" },
++	{ "RLINEIN",            NULL,   "Line Jack" },
++
++	{ "MICIN",              NULL,   "Mic Bias" },
++	{ "Mic Bias",           NULL,   "Mic Jack"},
++};
++
++static int wm8731_slv_mode_init(struct imx_wm8731_data *data)
++{
++	struct clk *new_parent;
++	struct clk *ssi_clk;
++	struct i2c_client *codec_dev = data->codec_dev;
++
++	new_parent = devm_clk_get(&codec_dev->dev, "pll4");
++	if (IS_ERR(new_parent)) {
++		pr_err("Could not get \"pll4\" clock \n");
++		return PTR_ERR(new_parent);
++	}
++
++	ssi_clk = devm_clk_get(&codec_dev->dev, "imx-ssi.1");
++	if (IS_ERR(ssi_clk)) {
++		pr_err("Could not get \"imx-ssi.1\" clock \n");
++		return PTR_ERR(ssi_clk);
++	}
++
++	clk_set_parent(ssi_clk, new_parent);
++
++	data->pll = new_parent;
++	data->clock_root = ssi_clk;
++	data->current_rate = 0;
++
++	data->sysclk = 0;
++
++	return 0;
++}
++
++static int wm8731_slv_mode_clock_enable(int enable, struct imx_wm8731_data *data)
++{
++	long pll_rate;
++	long rate_req;
++	long rate_avail;
++
++	if (!enable)
++		return 0;
++
++	if (data->sysclk == data->current_rate)
++		return 0;
++
++	switch (data->sysclk) {
++		case 11289600:
++			pll_rate = 632217600;
++			break;
++
++		case 12288000:
++			pll_rate = 688128000;
++			break;
++
++		default:
++			return -EINVAL;
++	}
++
++	rate_req = pll_rate;
++	rate_avail = clk_round_rate(data->pll, rate_req);
++	clk_set_rate(data->pll, rate_avail);
++
++	rate_req = data->sysclk;
++	rate_avail = clk_round_rate(data->clock_root,
++								rate_req);
++	clk_set_rate(data->clock_root, rate_avail);
++
++	pr_info("%s: \"imx-ssi.1\" rate = %ld (= %ld)\n",
++			__func__, rate_avail, rate_req);
++
++	data->current_rate = data->sysclk;
++
++	return 0;
++}
++
++static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream,
++				       struct snd_pcm_hw_params *params)
++{
++	struct snd_soc_pcm_runtime *rtd = substream->private_data;
++	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++	struct snd_soc_dai *codec_dai = rtd->codec_dai;
++	struct snd_soc_card *card = codec_dai->codec->card;
++	struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card);
++	
++	u32 dai_format, pll_out;
++	snd_pcm_format_t sample_format;
++	unsigned int channels;
++	unsigned int tx_mask, rx_mask;
++	unsigned int sampling_rate;
++	unsigned int div_2, div_psr, div_pm;
++	int ret;
++
++	sampling_rate = params_rate(params);
++	sample_format = params_format(params);
++	
++	channels = params_channels(params);
++	printk("%s:%s  sampling rate = %u  channels = %u \n", __FUNCTION__,
++		   (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture"),
++		   sampling_rate, channels);
++
++	/* set CPU DAI configuration */
++	switch (sampling_rate) {
++		case 8000:
++		case 32000:
++		case 48000:
++		case 96000:
++			data->sysclk = 12288000;
++			break;
++
++		case 44100:
++		case 88200:
++			data->sysclk = 11289600;
++			break;
++
++		default:
++			return -EINVAL;
++	}
++
++	wm8731_slv_mode_clock_enable(1,data);
++
++	dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
++		SND_SOC_DAIFMT_CBS_CFS;
++
++	ret = snd_soc_dai_set_fmt(cpu_dai, dai_format);
++	if (ret < 0)
++		return ret;
++
++	/* set i.MX active slot mask */
++	/* S[TR]CCR:DC */
++	tx_mask = ~((1 << channels) - 1);
++	rx_mask = tx_mask;
++	snd_soc_dai_set_tdm_slot(cpu_dai, tx_mask, rx_mask, 2, 32);
++
++	/*
++	 * SSI sysclk divider:
++	 * div_2:	/1 or /2
++	 * div_psr:	/1 or /8
++	 * div_pm:	/1 .. /256
++	 */
++	div_2	= 0;
++	div_psr	= 0;
++	switch (sampling_rate) {
++		case 8000:
++			// 1x1x12
++			div_pm	= 11;
++			break;
++		case 32000:
++			// 1x1x3
++			div_pm	= 2;
++			break;
++		case 48000:
++			// 1x1x2
++			div_pm	= 1;
++			break;
++		case 96000:
++			// 1x1x1
++			div_pm	= 0;
++			break;
++		case 44100:
++			// 1x1x2
++			div_pm	= 1;
++			break;
++		case 88200:
++			// 1x1x1
++			div_pm	= 0;
++			break;
++		default:
++			return -EINVAL;
++	}
++
++	/* sync mode: a single clock controls both playback and capture */
++	snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_2, (div_2 ? SSI_STCCR_DIV2 : 0));
++	snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PSR, (div_psr ? SSI_STCCR_PSR : 0));
++	snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PM, div_pm);
++
++	/* set codec DAI configuration */
++	dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
++		SND_SOC_DAIFMT_CBS_CFS;
++
++	ret = snd_soc_dai_set_fmt(codec_dai, dai_format);
++	if (ret < 0)
++		return ret;
++
++	ret = snd_soc_dai_set_sysclk(codec_dai,
++				     WM8731_SYSCLK_MCLK,
++				     data->sysclk,
++				     SND_SOC_CLOCK_IN);
++
++	if (ret < 0) {
++		pr_err("Failed to set codec master clock to %u: %d \n",
++		       data->sysclk, ret);
++		return ret;
++	}
++
++	return 0;
++}
++
++static void imx_hifi_shutdown(struct snd_pcm_substream *substream)
++{
++	struct snd_soc_pcm_runtime *rtd = substream->private_data;
++	struct snd_soc_dai *codec_dai = rtd->codec_dai;
++	struct snd_soc_card *card = codec_dai->codec->card;
++	struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card);
++	
++	if (!codec_dai->active)
++		wm8731_slv_mode_clock_enable(0,data);
++	
++	return;
++}
++
++static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd)
++{
++	int ret = 0;
++	struct snd_soc_codec *codec = rtd->codec;
++
++	/* Add imx specific widgets */
++	ret = snd_soc_dapm_new_controls(&codec->dapm, imx_dapm_widgets,
++									ARRAY_SIZE(imx_dapm_widgets));
++	if (ret)
++			goto out_retcode;
++
++	/* Set up imx specific audio path audio_map */
++	ret = snd_soc_dapm_add_routes(&codec->dapm, audio_map, ARRAY_SIZE(audio_map));
++	if (ret)
++			goto out_retcode;
++
++	ret = snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack");
++	if (ret)
++			goto out_retcode;
++
++	ret = snd_soc_dapm_nc_pin(&codec->dapm, "Ext Spk");
++	if (ret)
++			goto out_retcode;
++
++out_retcode:
++
++	if (ret)
++			pr_err("%s: failed with error code: %d \n", __FUNCTION__, ret);
++	else
++			pr_info("%s: success \n", __FUNCTION__);
++
++	return ret;
++}
++
++/**
++ * Configure AUDMUX interconnection between
++ * _slave (CPU side) and _master (codec size)
++ *
++ * When SSI operates in master mode, 5-wire interconnect with
++ * audio codec is required:
++ * TXC  - BCLK
++ * TXD  - DAC data
++ * RXD  - ADC data
++ * TXFS - {DAC|ADC}LRC, i.e. word clock
++ * RXC  - MCLK, i.e. oversampling clock
++ * Audmux is operated in asynchronous mode to enable 6-wire
++ * interface (as opposed to 4-wire interface in sync mode).
++ */
++static int imx_audmux_config_slv_mode(int _slave, int _master)
++{
++	unsigned int ptcr, pdcr;
++	int slave = _slave - 1;
++	int master = _master - 1;
++
++	ptcr = IMX_AUDMUX_V2_PTCR_SYN |
++		IMX_AUDMUX_V2_PTCR_TFSDIR |
++		IMX_AUDMUX_V2_PTCR_TFSEL(slave) |
++		IMX_AUDMUX_V2_PTCR_RCLKDIR |
++		IMX_AUDMUX_V2_PTCR_RCSEL(slave | 0x8) |
++		IMX_AUDMUX_V2_PTCR_TCLKDIR |
++		IMX_AUDMUX_V2_PTCR_TCSEL(slave);
++
++	pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(slave);
++	imx_audmux_v2_configure_port(master, ptcr, pdcr);
++	ptcr = ptcr & ~IMX_AUDMUX_V2_PTCR_SYN;
++	imx_audmux_v2_configure_port(master, ptcr, pdcr);
++
++	ptcr = IMX_AUDMUX_V2_PTCR_SYN |
++		IMX_AUDMUX_V2_PTCR_RCLKDIR |
++		IMX_AUDMUX_V2_PTCR_RCSEL(master | 0x8) |
++		IMX_AUDMUX_V2_PTCR_TCLKDIR |
++		IMX_AUDMUX_V2_PTCR_TCSEL(master);
++
++	pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(master);
++	imx_audmux_v2_configure_port(slave, ptcr, pdcr);
++	ptcr = ptcr & ~IMX_AUDMUX_V2_PTCR_SYN;
++	imx_audmux_v2_configure_port(slave, ptcr, pdcr);
++
++	return 0;
++}
++
++static int imx_wm8731_probe(struct platform_device *pdev)
++{
++	struct device_node *ssi_np, *codec_np;
++	struct platform_device *ssi_pdev;
++	struct imx_priv *priv = &card_priv;
++	struct i2c_client *codec_dev;
++	struct imx_wm8731_data *data;
++	int ret;
++
++	priv->pdev = pdev;
++	
++	ssi_np = of_parse_phandle(pdev->dev.of_node, "ssi-controller", 0);
++	codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0);
++	if (!ssi_np || !codec_np) {
++		dev_err(&pdev->dev, "phandle missing or invalid\n");
++		ret = -EINVAL;
++		goto fail;
++	}
++
++	ssi_pdev = of_find_device_by_node(ssi_np);
++	if (!ssi_pdev) {
++		dev_err(&pdev->dev, "failed to find SSI platform device\n");
++		ret = -EINVAL;
++		goto fail;
++	}
++        
++	codec_dev = of_find_i2c_device_by_node(codec_np);
++	if (!codec_dev || !codec_dev->driver) {
++		dev_err(&pdev->dev, "failed to find codec platform device\n");
++		ret = -EINVAL;
++		goto fail;
++	}
++
++	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
++	if (!data) {
++		ret = -ENOMEM;
++		goto fail;
++	}
++
++	card_priv.data = data;
++
++	data->codec_dev = codec_dev;
++	
++	data->dai.name = "HiFi";
++	data->dai.stream_name = "HiFi";
++	data->dai.codec_dai_name = "wm8731-hifi";
++	data->dai.codec_of_node = codec_np;
++	data->dai.cpu_dai_name = dev_name(&ssi_pdev->dev);
++	data->dai.platform_of_node = ssi_np;
++	data->dai.ops = &imx_hifi_ops;
++	data->dai.init = &imx_wm8731_init;
++	
++	data->ssi_num = 2; /* 1-based */
++	data->src_port = 2;
++	data->ext_port = 4;
++	
++	imx_audmux_config_slv_mode(data->src_port, data->ext_port);
++	
++	/* Slave Mode Init */
++	wm8731_slv_mode_init(data);
++	
++	data->card.dev = &pdev->dev;
++	ret = snd_soc_of_parse_card_name(&data->card, "model");
++	if (ret)
++		goto fail;
++	
++	ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing");
++	if (ret)
++		goto fail;
++
++	data->card.num_links = 1;
++	data->card.dai_link = &data->dai;
++
++	data->card.dapm_widgets = imx_dapm_widgets;
++	data->card.num_dapm_widgets = ARRAY_SIZE(imx_dapm_widgets);
++
++	platform_set_drvdata(pdev, &data->card);
++	snd_soc_card_set_drvdata(&data->card, data);
++
++	ret = snd_soc_register_card(&data->card);
++	if (ret) {
++		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
++		goto fail;
++	}
++	
++	return 0;
++
++fail:
++
++	if (ssi_np)
++		of_node_put(ssi_np);
++
++	if (codec_np)
++		of_node_put(codec_np);
++
++	return ret;
++}
++
++static int imx_wm8731_remove(struct platform_device *pdev)
++{
++	struct snd_soc_card *card = platform_get_drvdata(pdev);
++	snd_soc_unregister_card(card);
++
++	return 0;
++}
++
++static const struct of_device_id imx_wm8731_dt_ids[] = {
++	{ .compatible = "fsl,imx-audio-wm8731", },
++	{ /* sentinel */ }
++};
++MODULE_DEVICE_TABLE(of, imx_wm8731_dt_ids);
++
++static struct platform_driver imx_wm8731_driver = {
++	.driver = {
++		.name = "imx-wm8731",
++		.owner = THIS_MODULE,
++		.of_match_table = imx_wm8731_dt_ids,
++	},
++	.probe = imx_wm8731_probe,
++	.remove = imx_wm8731_remove,
++};
++module_platform_driver(imx_wm8731_driver);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("Freescale i.MX WM8731 ASoC machine driver");
++MODULE_LICENSE("GPL v2");
++MODULE_ALIAS("platform:imx-wm8731");
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch
new file mode 100644
index 0000000..ce03a0b
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch
@@ -0,0 +1,335 @@
+From 89e58f5df1dbec7ec1d3be70319d435e76a21ff6 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 21 Jul 2014 17:17:32 +0300
+Subject: ARM: i.MX6: ASoC: add imx-wm8731 master mode support
+
+Add imx-wm8731 master mode support.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |    8 +-
+ sound/soc/fsl/imx-wm8731.c         |  212 +++++++++++++++++++++++++++++++++---
+ 2 files changed, 203 insertions(+), 17 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 9f5da43..050795b 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -173,6 +173,8 @@
+ 			  "fsl,imx-audio-wm8731";
+ 		model = "wm8731-audio";
+ 		ssi-controller = <&ssi2>;
++		src-port = <2>;
++		ext-port = <4>;
+ 		audio-codec = <&codec>;
+ 		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
+ 	};
+@@ -390,6 +392,8 @@
+ 			MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
+ 			MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
+ 			MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
++			/* master mode pin */
++			MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
+ 	>;
+ 	};
+ 
+@@ -500,8 +504,8 @@
+ 	codec: wm8731 at 1a {
+ 		compatible = "wlf,wm8731";
+ 		reg = <0x1a>;
+-		clocks = <&clks 173>, <&clks 158>;
+-		clock-names = "pll4", "imx-ssi.1";
++		clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>;
++		clock-names = "pll4", "imx-ssi.1", "cko", "cko2";
+ 		AVDD-supply = <&pu_dummy>;
+ 		HPVDD-supply = <&pu_dummy>;
+ 		DCVDD-supply = <&pu_dummy>;
+diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c
+index ba1363f..72b75ad 100644
+--- a/sound/soc/fsl/imx-wm8731.c
++++ b/sound/soc/fsl/imx-wm8731.c
+@@ -31,6 +31,7 @@
+ #include "imx-ssi.h"
+ 
+ #define DAI_NAME_SIZE	32
++#define	WM8731_MCLK_FREQ	(24000000 / 2)
+ 
+ struct imx_wm8731_data {
+ 	struct snd_soc_dai_link dai;
+@@ -43,10 +44,8 @@ struct imx_wm8731_data {
+ 	struct clk *clock_root;
+ 	long sysclk;
+ 	long current_rate;
+-	/* platfor data */
+-	unsigned int ssi_num;
+-	unsigned int src_port;
+-	unsigned int ext_port;
++	/* apis */
++	int (*clock_enable)(int enable,struct imx_wm8731_data *data);
+ };
+ 
+ static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd);
+@@ -63,7 +62,6 @@ static struct imx_priv card_priv;
+ 
+ static struct snd_soc_ops imx_hifi_ops = {
+ 	.shutdown	= imx_hifi_shutdown,
+-	.hw_params	= imx_hifi_hw_params_slv_mode,
+ };
+ 
+ /* imx card dapm widgets */
+@@ -160,6 +158,78 @@ static int wm8731_slv_mode_clock_enable(int enable, struct imx_wm8731_data *data
+ 	return 0;
+ }
+ 
++static int imx_hifi_startup_slv_mode(struct snd_pcm_substream *substream)
++{
++	/*
++	 * As SSI's sys clock rate depends on sampling rate,
++	 * the clock enabling code is moved to imx_hifi_hw_params().
++	 */
++	return 0;
++}
++
++static int wm8731_mst_mode_init(struct imx_wm8731_data *data)
++{
++	long rate;
++	struct clk *new_parent;
++	struct clk *ssi_clk;
++	struct i2c_client *codec_dev = data->codec_dev;
++
++	new_parent = devm_clk_get(&codec_dev->dev, "cko2");
++	if (IS_ERR(new_parent)) {
++		pr_err("Could not get \"cko2\" clock \n");
++		return PTR_ERR(new_parent);
++	}
++
++	ssi_clk = devm_clk_get(&codec_dev->dev, "cko");
++	if (IS_ERR(ssi_clk)) {
++		pr_err("Could not get \"cko\" clock \n");
++		return PTR_ERR(ssi_clk);
++	}
++
++	rate = clk_round_rate(new_parent, WM8731_MCLK_FREQ);
++	clk_set_rate(new_parent, rate);
++
++	clk_set_parent(ssi_clk, new_parent);
++
++	rate = clk_round_rate(ssi_clk, WM8731_MCLK_FREQ);
++	clk_set_rate(ssi_clk, rate);
++
++	pr_info("%s: \"CLKO\" rate = %ld (= %d)\n",
++		__func__, rate, WM8731_MCLK_FREQ);
++
++	data->pll = new_parent;
++	data->clock_root = ssi_clk;
++	data->sysclk = rate;
++
++	return 0;
++}
++
++static int wm8731_mst_mode_clock_enable(int enable, struct imx_wm8731_data *data)
++{
++	struct clk *clko = data->clock_root;
++
++	if (enable)
++		clk_enable(clko);
++	else
++		clk_disable(clko);
++
++	return 0;
++}
++
++static int imx_hifi_startup_mst_mode(struct snd_pcm_substream *substream)
++{
++	struct snd_soc_pcm_runtime *rtd = substream->private_data;
++	struct snd_soc_dai *codec_dai = rtd->codec_dai;
++	struct snd_soc_card *card = codec_dai->codec->card;
++	struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card);
++
++	if (!codec_dai->active)
++		data->clock_enable(1,data);
++
++	return 0;
++}
++
++
+ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream,
+ 				       struct snd_pcm_hw_params *params)
+ {
+@@ -169,7 +239,7 @@ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream,
+ 	struct snd_soc_card *card = codec_dai->codec->card;
+ 	struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card);
+ 	
+-	u32 dai_format, pll_out;
++	u32 dai_format;
+ 	snd_pcm_format_t sample_format;
+ 	unsigned int channels;
+ 	unsigned int tx_mask, rx_mask;
+@@ -282,6 +352,63 @@ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream,
+ 	return 0;
+ }
+ 
++static int imx_hifi_hw_params_mst_mode(struct snd_pcm_substream *substream,
++				       struct snd_pcm_hw_params *params)
++{
++	struct snd_soc_pcm_runtime *rtd = substream->private_data;
++	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++	struct snd_soc_dai *codec_dai = rtd->codec_dai;
++	struct snd_soc_card *card = codec_dai->codec->card;
++	struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card);
++	u32 dai_format;
++	unsigned int channels;
++	unsigned int tx_mask, rx_mask;
++	unsigned int sampling_rate;
++	int ret;
++
++
++	sampling_rate = params_rate(params);
++	channels = params_channels(params);
++	pr_debug("%s:%s  sampling rate = %u  channels = %u \n", __FUNCTION__,
++		 (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture"),
++		 sampling_rate, channels);
++
++	/* set cpu DAI configuration */
++	dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
++		SND_SOC_DAIFMT_CBM_CFM;
++
++	ret = snd_soc_dai_set_fmt(cpu_dai, dai_format);
++	if (ret < 0)
++		return ret;
++
++	/* set i.MX active slot mask */
++	/* S[TR]CCR:DC */
++	tx_mask = ~((1 << channels) - 1);
++	rx_mask = tx_mask;
++	snd_soc_dai_set_tdm_slot(cpu_dai, tx_mask, rx_mask, 2, 32);
++
++	/* set codec DAI configuration */
++	dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
++		SND_SOC_DAIFMT_CBM_CFM;
++
++	ret = snd_soc_dai_set_fmt(codec_dai, dai_format);
++	if (ret < 0)
++		return ret;
++
++	ret = snd_soc_dai_set_sysclk(codec_dai,
++				     WM8731_SYSCLK_MCLK,
++				     data->sysclk,
++				     SND_SOC_CLOCK_IN);
++
++	if (ret < 0) {
++		pr_err("Failed to set codec master clock to %u: %d \n",
++		       data->sysclk, ret);
++		return ret;
++	}
++
++	return 0;
++}
++
+ static void imx_hifi_shutdown(struct snd_pcm_substream *substream)
+ {
+ 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+@@ -290,7 +417,7 @@ static void imx_hifi_shutdown(struct snd_pcm_substream *substream)
+ 	struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card);
+ 	
+ 	if (!codec_dai->active)
+-		wm8731_slv_mode_clock_enable(0,data);
++		data->clock_enable(0,data);
+ 	
+ 	return;
+ }
+@@ -376,6 +503,27 @@ static int imx_audmux_config_slv_mode(int _slave, int _master)
+ 	return 0;
+ }
+ 
++static int imx_audmux_config_mst_mode(int _slave, int _master)
++{
++	unsigned int ptcr, pdcr;
++	int slave = _slave - 1;
++	int master = _master - 1;
++
++	ptcr = IMX_AUDMUX_V2_PTCR_SYN;
++	ptcr |= IMX_AUDMUX_V2_PTCR_TFSDIR |
++		IMX_AUDMUX_V2_PTCR_TFSEL(master) |
++		IMX_AUDMUX_V2_PTCR_TCLKDIR |
++		IMX_AUDMUX_V2_PTCR_TCSEL(master);
++	pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(master);
++	imx_audmux_v2_configure_port(slave, ptcr, pdcr);
++
++	ptcr = IMX_AUDMUX_V2_PTCR_SYN;
++	pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(slave);
++	imx_audmux_v2_configure_port(master, ptcr, pdcr);
++
++	return 0;
++}
++
+ static int imx_wm8731_probe(struct platform_device *pdev)
+ {
+ 	struct device_node *ssi_np, *codec_np;
+@@ -383,6 +531,10 @@ static int imx_wm8731_probe(struct platform_device *pdev)
+ 	struct imx_priv *priv = &card_priv;
+ 	struct i2c_client *codec_dev;
+ 	struct imx_wm8731_data *data;
++	unsigned int src_port, ext_port;
++	unsigned int ssi_mode;
++	const char *ssi_mode_str;
++
+ 	int ret;
+ 
+ 	priv->pdev = pdev;
+@@ -428,14 +580,44 @@ static int imx_wm8731_probe(struct platform_device *pdev)
+ 	data->dai.ops = &imx_hifi_ops;
+ 	data->dai.init = &imx_wm8731_init;
+ 	
+-	data->ssi_num = 2; /* 1-based */
+-	data->src_port = 2;
+-	data->ext_port = 4;
+-	
+-	imx_audmux_config_slv_mode(data->src_port, data->ext_port);
+-	
+-	/* Slave Mode Init */
+-	wm8731_slv_mode_init(data);
++	ret = of_property_read_u32(pdev->dev.of_node, "src-port", &src_port);
++	if (ret) {
++		dev_err(&pdev->dev, "failed to get \"src-port\" value\n");
++		ret = -EINVAL;
++		goto fail;
++	}
++
++	ret = of_property_read_u32(pdev->dev.of_node, "ext-port", &ext_port);
++	if (ret) {
++		dev_err(&pdev->dev, "failed to get \"ext-port\" value\n");
++		ret = -EINVAL;
++		goto fail;
++	}
++
++	ret = of_property_read_string(ssi_np, "fsl,mode", &ssi_mode_str);
++	if (ret) {
++		dev_err(&pdev->dev, "failed to get \"fsl,mode\" value\n");
++		ret = -EINVAL;
++		goto fail;
++	}
++
++	ssi_mode = strcmp(ssi_mode_str, "i2s-master");
++
++	if (ssi_mode) {
++		/* Master Mode */
++		imx_audmux_config_mst_mode(src_port, ext_port);
++		wm8731_mst_mode_init(data);
++		data->clock_enable = wm8731_mst_mode_clock_enable;
++		imx_hifi_ops.hw_params = imx_hifi_hw_params_mst_mode;
++		imx_hifi_ops.startup = imx_hifi_startup_mst_mode;
++	} else {
++		/* Slave Mode */
++		imx_audmux_config_slv_mode(src_port, ext_port);
++		wm8731_slv_mode_init(data);
++		data->clock_enable = wm8731_slv_mode_clock_enable;
++		imx_hifi_ops.hw_params = imx_hifi_hw_params_slv_mode;
++		imx_hifi_ops.startup = imx_hifi_startup_slv_mode;
++	}
+ 	
+ 	data->card.dev = &pdev->dev;
+ 	ret = snd_soc_of_parse_card_name(&data->card, "model");
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0017-ARM-i.MX6-dts-enable-v4l2-output.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0017-ARM-i.MX6-dts-enable-v4l2-output.patch
new file mode 100644
index 0000000..001e978
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0017-ARM-i.MX6-dts-enable-v4l2-output.patch
@@ -0,0 +1,31 @@
+From 5122b07198ef2a6d55096bab88acd1f6ce6884f4 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 24 Jul 2014 16:11:29 +0300
+Subject: ARM: i.MX6: dts: enable v4l2 output
+
+Enable v4l2 output.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 050795b..2e04224 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -227,6 +227,11 @@
+ 	status = "okay";
+    };
+ 
++   v4l2_out {
++	compatible = "fsl,mxc_v4l2_output";
++	status = "okay";
++   };
++
+ };
+ 
+ &iomuxc {
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch
new file mode 100644
index 0000000..1e70d2a
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch
@@ -0,0 +1,52 @@
+From 77f1c3182b1d0491db4926ead4aeaebba0d2a4c1 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 31 Jul 2014 16:27:38 +0300
+Subject: ARM: i.MX6: dts: some small changes in the dts file
+
+1) Fixed the color depth value for both frame buffers.
+2) Added a missing OTG pinmux definition.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 2e04224..1613c32 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -200,7 +200,7 @@
+ 	disp_dev = "hdmi";
+ 	interface_pix_fmt = "RGB24";
+ 	mode_str ="1920x1080M at 60";
+-	default_bpp = <24>;
++	default_bpp = <32>;
+ 	int_clk = <0>;
+ 	late_init = <0>;
+ 	status = "disabled";
+@@ -211,12 +211,13 @@
+ 	disp_dev = "lcd";
+ 	interface_pix_fmt = "RGB24";
+ 	mode_str ="1920x1080M at 60";
+-	default_bpp = <24>;
++	default_bpp = <32>;
+ 	int_clk = <0>;
+ 	late_init = <0>;
+ 	status = "disabled";
+    };
+ 
++
+     lcd at 0 {
+ 	compatible = "fsl,lcd";
+ 	ipu_id = <0>;
+@@ -354,6 +355,7 @@
+       pinctrl_usbotg: usbotggrp {
+          fsl,pins = <
+             MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
++            MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
+          >;
+       };
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0019-igb-Define-the-device-mac-address-in-device-tree.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0019-igb-Define-the-device-mac-address-in-device-tree.patch
new file mode 100644
index 0000000..04abb0c
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0019-igb-Define-the-device-mac-address-in-device-tree.patch
@@ -0,0 +1,79 @@
+From 945e4082fdc904bd37ba7cdad42a04afca0777c4 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 5 Aug 2014 15:04:44 +0300
+Subject: igb: Define the device mac address in device tree
+
+1) Define the device mac address node in the device tree.
+2) Make the driver read the mac address from the device tree node.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts        |    6 ++++++
+ drivers/net/ethernet/intel/igb/igb_main.c |   27 +++++++++++++++++++++++++++
+ 2 files changed, 33 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 1613c32..0e2558f 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -233,6 +233,12 @@
+ 	status = "okay";
+    };
+ 
++   eth at pcie {
++	compatible = "intel,i211";
++	local-mac-address = [00 1C 1D 1E 1F 20];
++	status = "okay";
++   };
++
+ };
+ 
+ &iomuxc {
+diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
+index 4ca17ab..51404d3 100644
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -1979,6 +1979,30 @@ static s32 igb_init_i2c(struct igb_adapter *adapter)
+ 	return status;
+ }
+ 
++
++/**
++ *  igb_read_mac_addr_dts - Read mac addres from the device tree
++ *  blob
++ *  @adapter: pointer to adapter structure
++ **/
++static void igb_read_mac_addr_dts(struct e1000_hw *hw)
++{
++	struct device_node *dn;
++	const uint8_t *mac;
++
++	dn = of_find_compatible_node(NULL, NULL, "intel,i211");
++
++	if (!dn)
++		return;
++
++	mac = of_get_property(dn, "local-mac-address", NULL);
++
++	if (mac)
++		memcpy(hw->mac.addr, mac, ETH_ALEN);
++
++	return;
++}
++
+ /**
+  *  igb_probe - Device Initialization Routine
+  *  @pdev: PCI device information struct
+@@ -2178,6 +2202,9 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	if (hw->mac.ops.read_mac_addr(hw))
+ 		dev_err(&pdev->dev, "NVM Read Error\n");
+ 
++	if (!is_valid_ether_addr(hw->mac.addr))
++		igb_read_mac_addr_dts(hw);
++
+ 	if (!is_valid_ether_addr(hw->mac.addr)) {
+ 		dev_info(&pdev->dev, "Random MAC Address\n");
+ 		random_ether_addr(hw->mac.addr);
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch
new file mode 100644
index 0000000..ae6f828
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch
@@ -0,0 +1,87 @@
+From 9f8e2ca4a131db1505ddcd0e25c74aa0e358f28c Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 5 Aug 2014 15:39:32 +0300
+Subject: ARM: i.MX6: cm-fx6: update defconfig
+
+Enable:
+1) Analog audio
+2) MRVL bluetooth
+3) SATA AHCI
+4) USB OTG
+5) Board revision
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index eb6d9cb..210062b 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -26,6 +26,7 @@ CONFIG_SOC_IMX53=y
+ CONFIG_SOC_IMX6Q=y
+ CONFIG_SOC_IMX6SL=y
+ CONFIG_SOC_VF610=y
++CONFIG_MACH_CM_FX6=y
+ # CONFIG_SWP_EMULATE is not set
+ CONFIG_PCI=y
+ CONFIG_PCI_IMX6=y
+@@ -137,6 +138,9 @@ CONFIG_VLAN_8021Q=m
+ CONFIG_VLAN_8021Q_GVRP=y
+ CONFIG_CAN=y
+ CONFIG_CAN_FLEXCAN=y
++CONFIG_BT=m
++CONFIG_BT_MRVL=m
++CONFIG_BT_MRVL_SDIO=m
+ CONFIG_CFG80211=y
+ CONFIG_CFG80211_WEXT=y
+ CONFIG_MAC80211=y
+@@ -176,6 +180,7 @@ CONFIG_SCSI_LOGGING=y
+ CONFIG_SCSI_SCAN_ASYNC=y
+ # CONFIG_SCSI_LOWLEVEL is not set
+ CONFIG_ATA=y
++CONFIG_SATA_AHCI=y
+ CONFIG_SATA_AHCI_PLATFORM=y
+ CONFIG_AHCI_IMX=y
+ CONFIG_PATA_IMX=y
+@@ -251,6 +256,7 @@ CONFIG_MFD_MC13XXX_I2C=y
+ CONFIG_MFD_MAX17135=y
+ CONFIG_MFD_SI476X_CORE=y
+ CONFIG_REGULATOR=y
++CONFIG_REGULATOR_DUMMY=y
+ CONFIG_REGULATOR_FIXED_VOLTAGE=y
+ CONFIG_REGULATOR_DA9052=y
+ CONFIG_REGULATOR_ANATOP=y
+@@ -310,6 +316,7 @@ CONFIG_SND_SOC=y
+ CONFIG_SND_IMX_SOC=y
+ CONFIG_SND_SOC_EUKREA_TLV320=y
+ CONFIG_SND_SOC_IMX_CS42888=y
++CONFIG_SND_SOC_IMX_WM8731=y
+ CONFIG_SND_SOC_IMX_WM8962=y
+ CONFIG_SND_SOC_IMX_SGTL5000=y
+ CONFIG_SND_SOC_IMX_SPDIF=y
+@@ -317,7 +324,10 @@ CONFIG_SND_SOC_IMX_MC13783=y
+ CONFIG_SND_SOC_IMX_HDMI=y
+ CONFIG_SND_SOC_IMX_SI476X=y
+ CONFIG_USB=y
++CONFIG_USB_OTG=y
+ CONFIG_USB_EHCI_HCD=y
++CONFIG_USB_EHCI_MXC=y
++CONFIG_USB_EHCI_HCD_PLATFORM=y
+ CONFIG_USB_STORAGE=y
+ CONFIG_USB_CHIPIDEA=y
+ CONFIG_USB_CHIPIDEA_UDC=y
+@@ -326,7 +336,9 @@ CONFIG_USB_PHY=y
+ CONFIG_NOP_USB_XCEIV=y
+ CONFIG_USB_MXS_PHY=y
+ CONFIG_USB_GADGET=y
++CONFIG_USB_FSL_USB2=y
+ CONFIG_USB_ZERO=m
++CONFIG_USB_AUDIO=m
+ CONFIG_USB_ETH=m
+ CONFIG_USB_MASS_STORAGE=m
+ CONFIG_USB_G_SERIAL=m
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch
new file mode 100644
index 0000000..a45cabb
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch
@@ -0,0 +1,1111 @@
+From e620e8b90393737dfdeb57d81d99b1c11bfdc9e9 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 7 Aug 2014 15:30:03 +0300
+Subject: ARM: i.MX6: dts: refactoring the cm-fx6 device tree file.
+
+Separate the staff that belongs to SB-FX6 and SB-FX6m boards.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts   |  880 ++++++++++++++++------------------
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |   23 +
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |   83 ++++
+ 3 files changed, 516 insertions(+), 470 deletions(-)
+ create mode 100644 arch/arm/boot/dts/imx6q-sbc-fx6.dts
+ create mode 100644 arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index 0e2558f..fa32c57 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -15,158 +15,147 @@
+ #include "imx6q.dtsi"
+ 
+ / {
+-   model = "CompuLab CM-FX6";
+-   compatible = "compulab,cm-fx6", "fsl,imx6q";
+-
+-   memory {
+-      reg = <0x10000000 0x80000000>;
+-   };
+-
+-   leds {
+-      compatible = "gpio-leds";
+-
+-      heartbeat-led {
+-         label = "Heartbeat";
+-         gpios = <&gpio2 31 0>;
+-         linux,default-trigger = "heartbeat";
+-      };
+-   };
+-
+-   regulators {
+-      compatible = "simple-bus";
+-      #address-cells = <1>;
+-      #size-cells = <0>;
+-
+-      /* regulator for mmc */
+-      reg_3p3v: 3p3v {
+-         compatible = "regulator-fixed";
+-         regulator-name = "3P3V";
+-         regulator-min-microvolt = <3300000>;
+-         regulator-max-microvolt = <3300000>;
+-         regulator-always-on;
+-      };
+-
+-      /* regulator for usb otg */
+-      reg_usb_otg_vbus: usb_otg_vbus {
+-         compatible = "regulator-fixed";
+-         regulator-name = "usb_otg_vbus";
+-         regulator-min-microvolt = <5000000>;
+-         regulator-max-microvolt = <5000000>;
+-         gpio = <&gpio3 22 0>;
+-         enable-active-high;
+-      };
+-
+-      /* regulator for usb hub1 */
+-      reg_usb_h1_vbus: usb_h1_vbus {
+-         compatible = "regulator-fixed";
+-         regulator-name = "usb_h1_vbus";
+-         regulator-min-microvolt = <5000000>;
+-         regulator-max-microvolt = <5000000>;
+-         gpio = <&gpio7 8 0>;
+-         enable-active-high;
+-      };
+-
+-      /* regulator1 for wifi/bt */
+-      awnh387_npoweron: regulator-awnh387-npoweron {
+-         compatible = "regulator-fixed";
+-         regulator-name = "regulator-awnh387-npoweron";
+-         regulator-min-microvolt = <3300000>;
+-         regulator-max-microvolt = <3300000>;
+-         gpio = <&gpio7 12 0>;
+-         enable-active-high;
+-      };
+-      
+-      /* regulator2 for wifi/bt */
+-      awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
+-         compatible = "regulator-fixed";
+-         regulator-name = "regulator-awnh387-wifi-nreset";
+-         regulator-min-microvolt = <3300000>;
+-         regulator-max-microvolt = <3300000>;
+-         gpio = <&gpio6 16 0>;
+-         startup-delay-us = <10000>;
+-      };
+-
+-      reg_sata_phy_slp: sata_phy_slp {
+-	      compatible = "regulator-fixed";
+-	      regulator-name = "cm_fx6_sata_phy_slp";
+-	      regulator-min-microvolt = <3300000>;
+-	      regulator-max-microvolt = <3300000>;
+-	      gpio = <&gpio3 23 0>;
+-	      startup-delay-us = <100>;
+-	      enable-active-high;
+-      };
+-
+-      reg_sata_nrstdly: sata_nrstdly {
+-	      compatible = "regulator-fixed";
+-	      regulator-name = "cm_fx6_sata_nrstdly";
+-	      regulator-min-microvolt = <3300000>;
+-	      regulator-max-microvolt = <3300000>;
+-	      gpio = <&gpio6 6 0>;
+-	      startup-delay-us = <100>;
+-	      enable-active-high;
+-	      vin-supply = <&reg_sata_phy_slp>;
+-      };
+-
+-      reg_sata_pwren: sata_pwren {
+-	      compatible = "regulator-fixed";
+-	      regulator-name = "cm_fx6_sata_pwren";
+-	      regulator-min-microvolt = <3300000>;
+-	      regulator-max-microvolt = <3300000>;
+-	      gpio = <&gpio1 28 0>;
+-	      startup-delay-us = <100>;
+-	      enable-active-high;
+-	      vin-supply = <&reg_sata_nrstdly>;
+-      };
+-
+-      reg_sata_nstandby1: sata_nstandby1 {
+-	      compatible = "regulator-fixed";
+-	      regulator-name = "cm_fx6_sata_nstandby1";
+-	      regulator-min-microvolt = <3300000>;
+-	      regulator-max-microvolt = <3300000>;
+-	      gpio = <&gpio3 20 0>;
+-	      startup-delay-us = <100>;
+-	      enable-active-high;
+-	      vin-supply = <&reg_sata_pwren>;
+-      };
+-
+-      reg_sata_nstandby2: sata_nstandby2 {
+-	      compatible = "regulator-fixed";
+-	      regulator-name = "cm_fx6_sata_nstandby2";
+-	      regulator-min-microvolt = <3300000>;
+-	      regulator-max-microvolt = <3300000>;
+-	      gpio = <&gpio5 2 0>;
+-	      startup-delay-us = <100>;
+-	      enable-active-high;
+-	      vin-supply = <&reg_sata_nstandby1>;
+-      };
+-
+-      reg_sata_ldo_en: sata_ldo_en {
+-	      compatible = "regulator-fixed";
+-	      regulator-name = "cm_fx6_sata_ldo_en";
+-	      regulator-min-microvolt = <3300000>;
+-	      regulator-max-microvolt = <3300000>;
+-	      gpio = <&gpio2 16 0>;
+-	      startup-delay-us = <100>;
+-	      enable-active-high;
+-	      regulator-boot-on;
+-	      vin-supply = <&reg_sata_nstandby2>;
+-      };
+-   };
+-
+-   gpio-keys {
+-	compatible = "gpio-keys";
+-	power {
+-		label = "Power Button";
+-		gpios = <&gpio1 29 1>;
+-		linux,code = <116>; /* KEY_POWER */
+-		gpio-key,wakeup;
++	model = "CompuLab CM-FX6";
++	compatible = "compulab,cm-fx6", "fsl,imx6q";
++
++	memory {
++		reg = <0x10000000 0x80000000>;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		heartbeat-led {
++			label = "Heartbeat";
++			gpios = <&gpio2 31 0>;
++			linux,default-trigger = "heartbeat";
++		};
++	};
++
++	regulators {
++		compatible = "simple-bus";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		/* regulator for mmc */
++		reg_3p3v: 3p3v {
++			compatible = "regulator-fixed";
++			regulator-name = "3P3V";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			regulator-always-on;
++		};
++
++		/* regulator for usb otg */
++		reg_usb_otg_vbus: usb_otg_vbus {
++			compatible = "regulator-fixed";
++			regulator-name = "usb_otg_vbus";
++			regulator-min-microvolt = <5000000>;
++			regulator-max-microvolt = <5000000>;
++			gpio = <&gpio3 22 0>;
++			enable-active-high;
++		};
++
++		/* regulator for usb hub1 */
++		reg_usb_h1_vbus: usb_h1_vbus {
++			compatible = "regulator-fixed";
++			regulator-name = "usb_h1_vbus";
++			regulator-min-microvolt = <5000000>;
++			regulator-max-microvolt = <5000000>;
++			gpio = <&gpio7 8 0>;
++			enable-active-high;
++		};
++
++		/* regulator1 for wifi/bt */
++		awnh387_npoweron: regulator-awnh387-npoweron {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-awnh387-npoweron";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio7 12 0>;
++			enable-active-high;
++		};
++
++		/* regulator2 for wifi/bt */
++		awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-awnh387-wifi-nreset";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio6 16 0>;
++			startup-delay-us = <10000>;
++		};
++
++		reg_sata_phy_slp: sata_phy_slp {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_phy_slp";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio3 23 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++		};
++
++		reg_sata_nrstdly: sata_nrstdly {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_nrstdly";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio6 6 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_phy_slp>;
++		};
++
++		reg_sata_pwren: sata_pwren {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_pwren";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio1 28 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_nrstdly>;
++		};
++
++		reg_sata_nstandby1: sata_nstandby1 {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_nstandby1";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio3 20 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_pwren>;
++		};
++
++		reg_sata_nstandby2: sata_nstandby2 {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_nstandby2";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio5 2 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_nstandby1>;
++		};
++
++		reg_sata_ldo_en: sata_ldo_en {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_ldo_en";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio2 16 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			regulator-boot-on;
++			vin-supply = <&reg_sata_nstandby2>;
++		};
+ 	};
+-   };
+ 
+-   aliases {
+-	mxcfb0 = &mxcfb1;
+-	mxcfb1 = &mxcfb2;
+-   };
++	aliases {
++		mxcfb0 = &mxcfb1;
++		mxcfb1 = &mxcfb2;
++	};
+ 
+ 	sound {
+ 		compatible = "fsl,imx6q-cm-fx6-wm8731",
+@@ -179,66 +168,58 @@
+ 		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
+ 	};
+ 
+-   sound-hdmi {
+-	compatible = "fsl,imx6q-audio-hdmi",
+-		"fsl,imx-audio-hdmi";
+-	model = "imx-audio-hdmi";
+-	hdmi-controller = <&hdmi_audio>;
+-   };
+-
+-   sound-spdif {
+-	compatible = "fsl,imx-audio-spdif",
+-		"fsl,imx-sabreauto-spdif";
+-	model = "imx-spdif";
+-	spdif-controller = <&spdif>;
+-	spdif-out;
+-	spdif-in;
+-   };
+-
+-   mxcfb1: fb at 0 {
+-	compatible = "fsl,mxc_sdc_fb";
+-	disp_dev = "hdmi";
+-	interface_pix_fmt = "RGB24";
+-	mode_str ="1920x1080M at 60";
+-	default_bpp = <32>;
+-	int_clk = <0>;
+-	late_init = <0>;
+-	status = "disabled";
+-   };
+-
+-   mxcfb2: fb at 1 {
+-	compatible = "fsl,mxc_sdc_fb";
+-	disp_dev = "lcd";
+-	interface_pix_fmt = "RGB24";
+-	mode_str ="1920x1080M at 60";
+-	default_bpp = <32>;
+-	int_clk = <0>;
+-	late_init = <0>;
+-	status = "disabled";
+-   };
+-
+-
+-    lcd at 0 {
+-	compatible = "fsl,lcd";
+-	ipu_id = <0>;
+-	disp_id = <0>;
+-	default_ifmt = "RGB24";
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_ipu1_1>;
+-	status = "okay";
+-   };
++	sound-hdmi {
++		compatible = "fsl,imx6q-audio-hdmi",
++			  "fsl,imx-audio-hdmi";
++		model = "imx-audio-hdmi";
++		hdmi-controller = <&hdmi_audio>;
++	};
+ 
+-   v4l2_out {
+-	compatible = "fsl,mxc_v4l2_output";
+-	status = "okay";
+-   };
++	sound-spdif {
++		compatible = "fsl,imx-audio-spdif",
++			  "fsl,imx-sabreauto-spdif";
++		model = "imx-spdif";
++		spdif-controller = <&spdif>;
++		spdif-out;
++		spdif-in;
++	};
+ 
+-   eth at pcie {
+-	compatible = "intel,i211";
+-	local-mac-address = [00 1C 1D 1E 1F 20];
+-	status = "okay";
+-   };
++	mxcfb1: fb at 0 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "hdmi";
++		interface_pix_fmt = "RGB24";
++		mode_str ="1920x1080M at 60";
++		default_bpp = <32>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	mxcfb2: fb at 1 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "lcd";
++		interface_pix_fmt = "RGB24";
++		mode_str ="1920x1080M at 60";
++		default_bpp = <32>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	lcd at 0 {
++		compatible = "fsl,lcd";
++		ipu_id = <0>;
++		disp_id = <0>;
++		default_ifmt = "RGB24";
++		pinctrl-names = "default";
++		pinctrl-0 = <&pinctrl_ipu1_1>;
++		status = "okay";
++	};
+ 
++	v4l2_out {
++		compatible = "fsl,mxc_v4l2_output";
++		status = "okay";
++	};
+ };
+ 
+ &iomuxc {
+@@ -258,261 +239,240 @@
+ 				MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000
+ 				MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000
+ 				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
++				/* POWER_BUTTON */
++				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
+ 			>;
+ 		};
+ 	};
+ 
+-   imx6q-cm-fx6 {
+-       /* pins for eth0 */
+-      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
+-         >;
+-      };
++	imx6q-cm-fx6 {
++		/* pins for eth0 */
++		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
++			>;
++		};
+       
+-      /* pins for spi */
+-      pinctrl_ecspi1: ecspi1grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
+-            MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
+-            MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
+-            MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
+-            MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
+-         >;
+-      };
+-
+-      /* pins for nand */
+-      pinctrl_gpmi_nand: gpminandgrp {
+-         fsl,pins = <
+-            MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
+-            MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
+-            MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
+-            MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
+-            MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
+-            MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
+-            MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
+-            MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
+-            MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
+-            MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
+-            MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
+-            MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
+-            MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
+-            MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
+-            MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
+-            MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
+-            MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
+-         >;
+-      };
+-
+-      /* pins for i2c1 */
+-      pinctrl_i2c1: i2c1grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
+-            MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
+-         >;
+-      };
++		/* pins for spi */
++		pinctrl_ecspi1: ecspi1grp {
++			fsl,pins = <
++				MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
++				MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
++				MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
++				MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
++				MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
++			>;
++		};
++
++		/* pins for nand */
++		pinctrl_gpmi_nand: gpminandgrp {
++			fsl,pins = <
++				MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
++				MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
++				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
++				MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
++				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
++				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
++				MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
++				MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
++				MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
++				MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
++				MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
++				MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
++				MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
++				MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
++				MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
++				MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
++				MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
++			>;
++		};
++
++		/* pins for i2c1 */
++		pinctrl_i2c1: i2c1grp {
++			fsl,pins = <
++				MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
++				MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
++			>;
++		};
+       
+-      /* pins for i2c2 */
+-      pinctrl_i2c2: i2c2grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
+-            MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
+-         >;
+-      };
++		/* pins for i2c2 */
++		pinctrl_i2c2: i2c2grp {
++			fsl,pins = <
++				MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
++				MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
++			>;
++		};
+       
+-      /* pins for i2c3 */
+-      pinctrl_i2c3: i2c3grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
+-            MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
+-         >;
+-      };
+-
+-      /* pins for console */
+-      pinctrl_uart4: uart4grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
+-            MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
+-         >;
+-      };
++		/* pins for i2c3 */
++		pinctrl_i2c3: i2c3grp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
++				MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for console */
++		pinctrl_uart4: uart4grp {
++			fsl,pins = <
++				MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
++				MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
++			>;
++		};
+       
+-      /* pins for usb hub1 */
+-      pinctrl_usbh1: usbh1grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
+-         >;
+-      };
++		/* pins for usb hub1 */
++		pinctrl_usbh1: usbh1grp {
++			fsl,pins = <
++				MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
++			>;
++		};
+       
+-      /* pins for usb otg */
+-      pinctrl_usbotg: usbotggrp {
+-         fsl,pins = <
+-            MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
+-            MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
+-         >;
+-      };
+-
+-      /* pins for wifi/bt */
+-      pinctrl_usdhc1: usdhc1grp {
+-         fsl,pins = <
+-            MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
+-            MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
+-            MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
+-            MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
+-            MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
+-            MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
+-         >;
+-      };
+-
+-      /* pins for mmc */
+-      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
+-         >;
+-      };
+-
+-      /* pins for spdif */
+-      pinctrl_spdif: spdifgrp {
+-	fsl,pins = <
+-		MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
+-		MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
+-	>;
+-     };
+-
+-	/* pins for audmux */
+-	pinctrl_audmux: audmuxgrp {
+-		fsl,pins = <
+-			MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
+-			MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
+-			MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
+-			MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
+-			MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
+-			/* master mode pin */
+-			MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
+-	>;
+-	};
++		/* pins for usb otg */
++		pinctrl_usbotg: usbotggrp {
++			fsl,pins = <
++				MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
++				MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
++			>;
++		};
+ 
+-	/* pins for uart2 */
+-	pinctrl_uart2: uart2grp {
+-		fsl,pins = <
+-			MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
+-			MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
+-			MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
+-			MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
+-	>;
+-	};
++		/* pins for wifi/bt */
++		pinctrl_usdhc1: usdhc1grp {
++			fsl,pins = <
++				MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
++				MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
++				MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
++				MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
++				MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
++				MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
++			>;
++		};
++
++		/* pins for mmc */
++		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
++			>;
++		};
++
++		/* pins for spdif */
++		pinctrl_spdif: spdifgrp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
++				MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
++			>;
++		};
+ 
+-	/* pins for pcie */
+-	pinctrl_pcie: pciegrp {
+-		fsl,pins = <
+-			MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
+-			MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
+-	>;
+-     };
+-   };
++		/* pins for audmux */
++		pinctrl_audmux: audmuxgrp {
++			fsl,pins = <
++				MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
++				MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
++				MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
++				MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
++				MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
++				/* master mode pin */
++				MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
++			>;
++		};
++	};
+ };
+ 
+ /* spi */
+ &ecspi1 {
+-   fsl,spi-num-chipselects = <2>;
+-   cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_ecspi1>;
+-   status = "okay";
+-
+-   flash: m25p80 at 0 {
+-      #address-cells = <1>;
+-      #size-cells = <1>;
+-      compatible = "st,m25px16", "st,m25p";
+-      spi-max-frequency = <20000000>;
+-      reg = <0>;
+-
+-      partition at 0 {
+-         label = "uboot";
+-         reg = <0x0 0xc0000>;
+-      };
+-
+-      partition at c0000 {
+-         label = "uboot environment";
+-         reg = <0xc0000 0x40000>;
+-      };
+-
+-      partition at 100000 {
+-         label = "reserved";
+-         reg = <0x100000 0x100000>;
+-      };
+-   };
++	fsl,spi-num-chipselects = <2>;
++	cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_ecspi1>;
++	status = "okay";
++
++	flash: m25p80 at 0 {
++		#address-cells = <1>;
++		#size-cells = <1>;
++		compatible = "st,m25px16", "st,m25p";
++		spi-max-frequency = <20000000>;
++		reg = <0>;
++
++		partition at 0 {
++			label = "uboot";
++			reg = <0x0 0xc0000>;
++		};
++
++		partition at c0000 {
++			label = "uboot environment";
++			reg = <0xc0000 0x40000>;
++		};
++
++		partition at 100000 {
++			label = "reserved";
++			reg = <0x100000 0x100000>;
++		};
++	};
+ };
+ 
+ /* eth0 */
+ &fec {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_enet>;
+-   phy-mode = "rgmii";
+-   status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_enet>;
++	phy-mode = "rgmii";
++	status = "okay";
+ };
+ 
+ /* nand */
+ &gpmi {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_gpmi_nand>;
+-   status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_gpmi_nand>;
++	status = "okay";
+ };
+ 
+ /* i2c1 */
+ &i2c1 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_i2c1>;
+-   status = "okay";
+-
+-   eeprom at 50 {
+-      compatible = "at24,24c02";
+-      reg = <0x50>;
+-      pagesize = <16>;
+-   };
+-
+-   rtc at 56 {
+-      compatible = "emmicro,em3027";
+-      reg = <0x56>;
+-   };
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c1>;
++	status = "okay";
++
++	eeprom at 50 {
++		compatible = "at24,24c02";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
+ };
+ 
+ /* i2c2 */
+-&i2c2 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_i2c2>;
+-   /* status = "okay"; */
++&i2c2 { /* to be removed */
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c2>;
++	/* status = "okay"; */
+ };
+ 
+ /* i2c3 */
+ &i2c3 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_i2c3>;
+-   status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c3>;
++	status = "okay";
+ 
+-   eeprom at 50 {
+-      compatible = "at24,24c02";
+-      reg = <0x50>;
+-      pagesize = <16>;
+-   };
++	eeprom at 50 {
++		compatible = "at24,24c02";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
+ 
+ 	codec: wm8731 at 1a {
+ 		compatible = "wlf,wm8731";
+@@ -526,71 +486,51 @@
+ 	};
+ };
+ 
+-/* eth1 */ 
+-&pcie {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_pcie>;
+-   reset-gpio = <&gpio1 26 0>;
+-   power-on-gpio = <&gpio2 24 0>;
+-   status = "okay";
+-};
+-
+ /* sata */
+ &sata {
+-   status = "okay";
+-};
+-
+-/* rear serial console */
+-&uart2 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_uart2>;
+-   /* fsl,dte-mode; */
+-   fsl,uart-has-rtscts;
+-   dma-names = "rx", "tx";
+-   dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
+-   status = "okay";
++	status = "okay";
+ };
+ 
+ /* console */
+ &uart4 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_uart4>;
+-   status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_uart4>;
++	status = "okay";
+ };
+ 
+ /* usb otg */
+ &usbotg {
+-   vbus-supply = <&reg_usb_otg_vbus>;
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_usbotg>;
+-   dr_mode = "otg";
+-   status = "okay";
++	vbus-supply = <&reg_usb_otg_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usbotg>;
++	dr_mode = "otg";
++	status = "okay";
+ };
+ 
+ /* usb hub1 */
+ &usbh1 {
+-   vbus-supply = <&reg_usb_h1_vbus>;
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_usbh1>;
+-   status = "okay";
++	vbus-supply = <&reg_usb_h1_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usbh1>;
++	status = "okay";
+ };
+ 
+ /* wifi/bt */
+ &usdhc1 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_usdhc1>;
+-   non-removable;
+-   vmmc-supply = <&awnh387_npoweron>;
+-   vmmc_aux-supply = <&awnh387_wifi_nreset>;
+-   status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usdhc1>;
++	non-removable;
++	vmmc-supply = <&awnh387_npoweron>;
++	vmmc_aux-supply = <&awnh387_wifi_nreset>;
++	status = "okay";
+ };
+ 
+ /* mmc */
+ &usdhc3 {
+-   pinctrl-names = "default";
+-   pinctrl-0 = <&pinctrl_usdhc3>;
+-   vmmc-supply = <&reg_3p3v>;
+-   status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usdhc3>;
++	vmmc-supply = <&reg_3p3v>;
++	status = "okay";
+ };
+ 
+ &ssi2 {
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+new file mode 100644
+index 0000000..5d3c7da
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -0,0 +1,23 @@
++/*
++* Copyright 2014 CompuLab Ltd.
++*
++* Author: Valentin Raevsky <valentin at compulab.co.il>
++*
++* The code contained herein is licensed under the GNU General Public
++* License. You may obtain a copy of the GNU General Public License
++* Version 2 or later at the following locations:
++*
++* http://www.opensource.org/licenses/gpl-license.html
++* http://www.gnu.org/copyleft/gpl.html
++*/
++
++#include "imx6q-cm-fx6.dts"
++
++/ {
++   model = "CompuLab CM-FX6 on SBC-FX6";
++   compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
++};
++
++&pcie {
++	status = "okay";
++};
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+new file mode 100644
+index 0000000..0e76f02
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -0,0 +1,83 @@
++/*
++* Copyright 2014 CompuLab Ltd.
++*
++* Author: Valentin Raevsky <valentin at compulab.co.il>
++*
++* The code contained herein is licensed under the GNU General Public
++* License. You may obtain a copy of the GNU General Public License
++* Version 2 or later at the following locations:
++*
++* http://www.opensource.org/licenses/gpl-license.html
++* http://www.gnu.org/copyleft/gpl.html
++*/
++
++#include "imx6q-cm-fx6.dts"
++
++/ {
++	model = "CompuLab CM-FX6 on SBC-FX6m";	
++	compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q";
++
++	eth at pcie {
++		compatible = "intel,i211";
++		local-mac-address = [FF FF FF FF FF FF];
++		status = "okay";
++	};
++
++	gpio-keys {
++		compatible = "gpio-keys";
++		power {
++			label = "Power Button";
++			gpios = <&gpio1 29 1>;
++			linux,code = <116>; /* KEY_POWER */
++			gpio-key,wakeup;
++		};
++	};
++};
++
++&iomuxc {
++	imx6q-sb-fx6m {
++		/* pins for uart2 */
++		pinctrl_uart2: uart2grp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
++				MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
++				MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
++				MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
++		>;
++		};
++
++		/* pins for pcie */
++		pinctrl_pcie: pciegrp {
++			fsl,pins = <
++				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
++				MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
++		>;
++	    };
++	};
++};
++
++&i2c1 {
++	rtc at 56 {
++		compatible = "emmicro,em3027";
++		reg = <0x56>;
++	};
++};
++
++&pcie {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_pcie>;
++	reset-gpio = <&gpio1 26 0>;
++	power-on-gpio = <&gpio2 24 0>;
++	status = "okay";
++};
++
++/* rear serial console */
++&uart2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_uart2>;
++	/* fsl,dte-mode; */
++	fsl,uart-has-rtscts;
++	dma-names = "rx", "tx";
++	dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0022-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0022-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
new file mode 100644
index 0000000..f89d63b
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0022-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
@@ -0,0 +1,42 @@
+From 6cba0256e822035d96bbd4bce1dee88275ec8543 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 7 Aug 2014 15:43:47 +0300
+Subject: ARM: i.MX6: cm-fx6: tag kernel version 3.10.17-cm-fx6-1-alpha
+
+Tag kernel version 3.10.17-cm-fx6-1-alpha.
+This is a new kernel version alpha release.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index 210062b..f8e79ec 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -1,3 +1,4 @@
++CONFIG_LOCALVERSION="-cm-fx6-1-alpha"
+ CONFIG_KERNEL_LZO=y
+ CONFIG_SYSVIPC=y
+ CONFIG_NO_HZ=y
+@@ -26,7 +27,6 @@ CONFIG_SOC_IMX53=y
+ CONFIG_SOC_IMX6Q=y
+ CONFIG_SOC_IMX6SL=y
+ CONFIG_SOC_VF610=y
+-CONFIG_MACH_CM_FX6=y
+ # CONFIG_SWP_EMULATE is not set
+ CONFIG_PCI=y
+ CONFIG_PCI_IMX6=y
+@@ -36,7 +36,7 @@ CONFIG_PREEMPT=y
+ CONFIG_AEABI=y
+ # CONFIG_OABI_COMPAT is not set
+ CONFIG_HIGHMEM=y
+-CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
++CONFIG_CMDLINE="console=ttymxc3,115200 root=/dev/mmcblk0p1 rootwait"
+ CONFIG_CPU_FREQ=y
+ CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
+ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0023-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0023-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch
new file mode 100644
index 0000000..bcc62ed
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0023-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch
@@ -0,0 +1,1421 @@
+From f6cfd0bc5eab55471e9f62314813a67f43e1b4d5 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 12 Aug 2014 17:46:23 +0300
+Subject: ARM: i.MX6: dts: refactoring of the cm-fx6 device tree files.
+
+Refactoring device tree files:
+1) Utilite:
++ imx6q.dtsi
++ imx6q-sb-fx6x.dtsi
++ imx6q-sb-fx6m.dtsi
++ imx6q-cm-fx6.dtsi
+= imx6q-sbc-fx6m.dts
+
+2) CM-FX6-EVAL:
++ imx6q.dtsi
++ imx6q-sb-fx6x.dtsi
++ imx6q-sb-fx6.dtsi
++ imx6q-cm-fx6.dtsi
+= imx6q-sbc-fx6.dts
+
+3) CM-FX6 Module:
++ imx6q.dtsi
++ imx6q-cm-fx6.dtsi
+= imx6q-cm-fx6.dts
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts   |  582 +---------------------------------
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi  |  531 +++++++++++++++++++++++++++++++
+ arch/arm/boot/dts/imx6q-sb-fx6.dtsi  |   14 +
+ arch/arm/boot/dts/imx6q-sb-fx6m.dtsi |   32 ++
+ arch/arm/boot/dts/imx6q-sb-fx6x.dtsi |   75 +++++
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |    8 +-
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |   38 +--
+ 7 files changed, 677 insertions(+), 603 deletions(-)
+ create mode 100644 arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+ create mode 100644 arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+ create mode 100644 arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+ create mode 100644 arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index fa32c57..a0e423b 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -1,576 +1,20 @@
+ /*
+-* Copyright 2013 CompuLab Ltd.
+-*
+-* Author: Valentin Raevsky <valentin at compulab.co.il>
+-*
+-* The code contained herein is licensed under the GNU General Public
+-* License. You may obtain a copy of the GNU General Public License
+-* Version 2 or later at the following locations:
+-*
+-* http://www.opensource.org/licenses/gpl-license.html
+-* http://www.gnu.org/copyleft/gpl.html
+-*/
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
+ 
+ /dts-v1/;
+-#include "imx6q.dtsi"
++#include "imx6q-cm-fx6.dtsi"
+ 
+ / {
+ 	model = "CompuLab CM-FX6";
+ 	compatible = "compulab,cm-fx6", "fsl,imx6q";
+-
+-	memory {
+-		reg = <0x10000000 0x80000000>;
+-	};
+-
+-	leds {
+-		compatible = "gpio-leds";
+-		heartbeat-led {
+-			label = "Heartbeat";
+-			gpios = <&gpio2 31 0>;
+-			linux,default-trigger = "heartbeat";
+-		};
+-	};
+-
+-	regulators {
+-		compatible = "simple-bus";
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+-		/* regulator for mmc */
+-		reg_3p3v: 3p3v {
+-			compatible = "regulator-fixed";
+-			regulator-name = "3P3V";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			regulator-always-on;
+-		};
+-
+-		/* regulator for usb otg */
+-		reg_usb_otg_vbus: usb_otg_vbus {
+-			compatible = "regulator-fixed";
+-			regulator-name = "usb_otg_vbus";
+-			regulator-min-microvolt = <5000000>;
+-			regulator-max-microvolt = <5000000>;
+-			gpio = <&gpio3 22 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator for usb hub1 */
+-		reg_usb_h1_vbus: usb_h1_vbus {
+-			compatible = "regulator-fixed";
+-			regulator-name = "usb_h1_vbus";
+-			regulator-min-microvolt = <5000000>;
+-			regulator-max-microvolt = <5000000>;
+-			gpio = <&gpio7 8 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator1 for wifi/bt */
+-		awnh387_npoweron: regulator-awnh387-npoweron {
+-			compatible = "regulator-fixed";
+-			regulator-name = "regulator-awnh387-npoweron";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio7 12 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator2 for wifi/bt */
+-		awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
+-			compatible = "regulator-fixed";
+-			regulator-name = "regulator-awnh387-wifi-nreset";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio6 16 0>;
+-			startup-delay-us = <10000>;
+-		};
+-
+-		reg_sata_phy_slp: sata_phy_slp {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_phy_slp";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio3 23 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-		};
+-
+-		reg_sata_nrstdly: sata_nrstdly {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_nrstdly";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio6 6 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-			vin-supply = <&reg_sata_phy_slp>;
+-		};
+-
+-		reg_sata_pwren: sata_pwren {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_pwren";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio1 28 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-			vin-supply = <&reg_sata_nrstdly>;
+-		};
+-
+-		reg_sata_nstandby1: sata_nstandby1 {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_nstandby1";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio3 20 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-			vin-supply = <&reg_sata_pwren>;
+-		};
+-
+-		reg_sata_nstandby2: sata_nstandby2 {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_nstandby2";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio5 2 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-			vin-supply = <&reg_sata_nstandby1>;
+-		};
+-
+-		reg_sata_ldo_en: sata_ldo_en {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_ldo_en";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio2 16 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-			regulator-boot-on;
+-			vin-supply = <&reg_sata_nstandby2>;
+-		};
+-	};
+-
+-	aliases {
+-		mxcfb0 = &mxcfb1;
+-		mxcfb1 = &mxcfb2;
+-	};
+-
+-	sound {
+-		compatible = "fsl,imx6q-cm-fx6-wm8731",
+-			  "fsl,imx-audio-wm8731";
+-		model = "wm8731-audio";
+-		ssi-controller = <&ssi2>;
+-		src-port = <2>;
+-		ext-port = <4>;
+-		audio-codec = <&codec>;
+-		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
+-	};
+-
+-	sound-hdmi {
+-		compatible = "fsl,imx6q-audio-hdmi",
+-			  "fsl,imx-audio-hdmi";
+-		model = "imx-audio-hdmi";
+-		hdmi-controller = <&hdmi_audio>;
+-	};
+-
+-	sound-spdif {
+-		compatible = "fsl,imx-audio-spdif",
+-			  "fsl,imx-sabreauto-spdif";
+-		model = "imx-spdif";
+-		spdif-controller = <&spdif>;
+-		spdif-out;
+-		spdif-in;
+-	};
+-
+-	mxcfb1: fb at 0 {
+-		compatible = "fsl,mxc_sdc_fb";
+-		disp_dev = "hdmi";
+-		interface_pix_fmt = "RGB24";
+-		mode_str ="1920x1080M at 60";
+-		default_bpp = <32>;
+-		int_clk = <0>;
+-		late_init = <0>;
+-		status = "disabled";
+-	};
+-
+-	mxcfb2: fb at 1 {
+-		compatible = "fsl,mxc_sdc_fb";
+-		disp_dev = "lcd";
+-		interface_pix_fmt = "RGB24";
+-		mode_str ="1920x1080M at 60";
+-		default_bpp = <32>;
+-		int_clk = <0>;
+-		late_init = <0>;
+-		status = "disabled";
+-	};
+-
+-	lcd at 0 {
+-		compatible = "fsl,lcd";
+-		ipu_id = <0>;
+-		disp_id = <0>;
+-		default_ifmt = "RGB24";
+-		pinctrl-names = "default";
+-		pinctrl-0 = <&pinctrl_ipu1_1>;
+-		status = "okay";
+-	};
+-
+-	v4l2_out {
+-		compatible = "fsl,mxc_v4l2_output";
+-		status = "okay";
+-	};
+-};
+-
+-&iomuxc {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_hog>;
+-
+-	hog {
+-		pinctrl_hog: hoggrp {
+-			fsl,pins = <
+-				/* SATA PWR */
+-				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000
+-				MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000
+-				MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
+-				MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000
+-				/* SATA CTRL */
+-				MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000
+-				MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000
+-				MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000
+-				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
+-				/* POWER_BUTTON */
+-				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
+-			>;
+-		};
+-	};
+-
+-	imx6q-cm-fx6 {
+-		/* pins for eth0 */
+-		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
+-			>;
+-		};
+-      
+-		/* pins for spi */
+-		pinctrl_ecspi1: ecspi1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
+-				MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
+-				MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
+-				MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
+-				MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
+-			>;
+-		};
+-
+-		/* pins for nand */
+-		pinctrl_gpmi_nand: gpminandgrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
+-				MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
+-				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
+-				MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
+-				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
+-				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
+-				MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
+-				MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
+-				MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
+-				MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
+-				MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
+-				MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
+-				MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
+-				MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
+-				MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
+-				MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
+-				MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
+-			>;
+-		};
+-
+-		/* pins for i2c1 */
+-		pinctrl_i2c1: i2c1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
+-				MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
+-			>;
+-		};
+-      
+-		/* pins for i2c2 */
+-		pinctrl_i2c2: i2c2grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
+-				MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
+-			>;
+-		};
+-      
+-		/* pins for i2c3 */
+-		pinctrl_i2c3: i2c3grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
+-				MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
+-			>;
+-		};
+-
+-		/* pins for console */
+-		pinctrl_uart4: uart4grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
+-				MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
+-			>;
+-		};
+-      
+-		/* pins for usb hub1 */
+-		pinctrl_usbh1: usbh1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
+-			>;
+-		};
+-      
+-		/* pins for usb otg */
+-		pinctrl_usbotg: usbotggrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
+-				MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
+-			>;
+-		};
+-
+-		/* pins for wifi/bt */
+-		pinctrl_usdhc1: usdhc1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
+-				MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
+-				MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
+-				MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
+-				MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
+-				MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
+-			>;
+-		};
+-
+-		/* pins for mmc */
+-		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
+-			>;
+-		};
+-
+-		/* pins for spdif */
+-		pinctrl_spdif: spdifgrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
+-				MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
+-			>;
+-		};
+-
+-		/* pins for audmux */
+-		pinctrl_audmux: audmuxgrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
+-				MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
+-				MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
+-				MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
+-				MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
+-				/* master mode pin */
+-				MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
+-			>;
+-		};
+-	};
+-};
+-
+-/* spi */
+-&ecspi1 {
+-	fsl,spi-num-chipselects = <2>;
+-	cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_ecspi1>;
+-	status = "okay";
+-
+-	flash: m25p80 at 0 {
+-		#address-cells = <1>;
+-		#size-cells = <1>;
+-		compatible = "st,m25px16", "st,m25p";
+-		spi-max-frequency = <20000000>;
+-		reg = <0>;
+-
+-		partition at 0 {
+-			label = "uboot";
+-			reg = <0x0 0xc0000>;
+-		};
+-
+-		partition at c0000 {
+-			label = "uboot environment";
+-			reg = <0xc0000 0x40000>;
+-		};
+-
+-		partition at 100000 {
+-			label = "reserved";
+-			reg = <0x100000 0x100000>;
+-		};
+-	};
+-};
+-
+-/* eth0 */
+-&fec {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_enet>;
+-	phy-mode = "rgmii";
+-	status = "okay";
+-};
+-
+-/* nand */
+-&gpmi {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_gpmi_nand>;
+-	status = "okay";
+-};
+-
+-/* i2c1 */
+-&i2c1 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_i2c1>;
+-	status = "okay";
+-
+-	eeprom at 50 {
+-		compatible = "at24,24c02";
+-		reg = <0x50>;
+-		pagesize = <16>;
+-	};
+-};
+-
+-/* i2c2 */
+-&i2c2 { /* to be removed */
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_i2c2>;
+-	/* status = "okay"; */
+-};
+-
+-/* i2c3 */
+-&i2c3 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_i2c3>;
+-	status = "okay";
+-
+-	eeprom at 50 {
+-		compatible = "at24,24c02";
+-		reg = <0x50>;
+-		pagesize = <16>;
+-	};
+-
+-	codec: wm8731 at 1a {
+-		compatible = "wlf,wm8731";
+-		reg = <0x1a>;
+-		clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>;
+-		clock-names = "pll4", "imx-ssi.1", "cko", "cko2";
+-		AVDD-supply = <&pu_dummy>;
+-		HPVDD-supply = <&pu_dummy>;
+-		DCVDD-supply = <&pu_dummy>;
+-		DBVDD-supply = <&pu_dummy>;
+-	};
+-};
+-
+-/* sata */
+-&sata {
+-	status = "okay";
+-};
+-
+-/* console */
+-&uart4 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_uart4>;
+-	status = "okay";
+-};
+-
+-/* usb otg */
+-&usbotg {
+-	vbus-supply = <&reg_usb_otg_vbus>;
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usbotg>;
+-	dr_mode = "otg";
+-	status = "okay";
+-};
+-
+-/* usb hub1 */
+-&usbh1 {
+-	vbus-supply = <&reg_usb_h1_vbus>;
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usbh1>;
+-	status = "okay";
+-};
+-
+-/* wifi/bt */
+-&usdhc1 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usdhc1>;
+-	non-removable;
+-	vmmc-supply = <&awnh387_npoweron>;
+-	vmmc_aux-supply = <&awnh387_wifi_nreset>;
+-	status = "okay";
+-};
+-
+-/* mmc */
+-&usdhc3 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usdhc3>;
+-	vmmc-supply = <&reg_3p3v>;
+-	status = "okay";
+-};
+-
+-&ssi2 {
+-	fsl,mode = "i2s-master";
+-	status = "okay";
+-};
+-
+-&mxcfb1 {
+-	status = "okay";
+-};
+-
+-&mxcfb2 {
+-	status = "okay";
+-};
+-
+-&hdmi_core {
+-	ipu_id = <1>;
+-	disp_id = <0>;
+-	status = "okay";
+-};
+-
+-&hdmi_video {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_hdmi_hdcp_1>;
+-	fsl,hdcp;
+-	status = "okay";
+-};
+-
+-&hdmi_audio {
+-	status = "okay";
+-};
+-
+-&spdif {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_spdif>;
+-	status = "okay";
+-};
+-
+-&audmux {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_audmux>;
+-	status = "okay";
+-};
++};
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+new file mode 100644
+index 0000000..0aa4461
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -0,0 +1,531 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include "imx6q.dtsi"
++
++/ {
++	memory {
++		reg = <0x10000000 0x80000000>;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		heartbeat-led {
++			label = "Heartbeat";
++			gpios = <&gpio2 31 0>;
++			linux,default-trigger = "heartbeat";
++		};
++	};
++
++	regulators {
++		compatible = "simple-bus";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		/* regulator for usb otg */
++		reg_usb_otg_vbus: usb_otg_vbus {
++			compatible = "regulator-fixed";
++			regulator-name = "usb_otg_vbus";
++			regulator-min-microvolt = <5000000>;
++			regulator-max-microvolt = <5000000>;
++			gpio = <&gpio3 22 0>;
++			enable-active-high;
++		};
++
++		/* regulator for usb hub1 */
++		reg_usb_h1_vbus: usb_h1_vbus {
++			compatible = "regulator-fixed";
++			regulator-name = "usb_h1_vbus";
++			regulator-min-microvolt = <5000000>;
++			regulator-max-microvolt = <5000000>;
++			gpio = <&gpio7 8 0>;
++			enable-active-high;
++		};
++
++		/* regulator1 for wifi/bt */
++		awnh387_npoweron: regulator-awnh387-npoweron {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-awnh387-npoweron";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio7 12 0>;
++			enable-active-high;
++		};
++
++		/* regulator2 for wifi/bt */
++		awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-awnh387-wifi-nreset";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio6 16 0>;
++			startup-delay-us = <10000>;
++		};
++
++		reg_sata_phy_slp: sata_phy_slp {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_phy_slp";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio3 23 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++		};
++
++		reg_sata_nrstdly: sata_nrstdly {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_nrstdly";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio6 6 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_phy_slp>;
++		};
++
++		reg_sata_pwren: sata_pwren {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_pwren";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio1 28 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_nrstdly>;
++		};
++
++		reg_sata_nstandby1: sata_nstandby1 {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_nstandby1";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio3 20 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_pwren>;
++		};
++
++		reg_sata_nstandby2: sata_nstandby2 {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_nstandby2";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio5 2 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			vin-supply = <&reg_sata_nstandby1>;
++		};
++
++		reg_sata_ldo_en: sata_ldo_en {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_ldo_en";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio2 16 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++			regulator-boot-on;
++			vin-supply = <&reg_sata_nstandby2>;
++		};
++	};
++
++	aliases {
++		mxcfb0 = &mxcfb1;
++		mxcfb1 = &mxcfb2;
++	};
++
++	sound {
++		compatible = "fsl,imx6q-cm-fx6-wm8731",
++			  "fsl,imx-audio-wm8731";
++		model = "wm8731-audio";
++		ssi-controller = <&ssi2>;
++		src-port = <2>;
++		ext-port = <4>;
++		audio-codec = <&codec>;
++		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
++	};
++
++	sound-hdmi {
++		compatible = "fsl,imx6q-audio-hdmi",
++			  "fsl,imx-audio-hdmi";
++		model = "imx-audio-hdmi";
++		hdmi-controller = <&hdmi_audio>;
++	};
++
++	sound-spdif {
++		compatible = "fsl,imx-audio-spdif",
++			  "fsl,imx-sabreauto-spdif";
++		model = "imx-spdif";
++		spdif-controller = <&spdif>;
++		spdif-out;
++		spdif-in;
++	};
++
++	mxcfb1: fb at 0 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "hdmi";
++		interface_pix_fmt = "RGB24";
++		mode_str ="1920x1080M at 60";
++		default_bpp = <32>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	mxcfb2: fb at 1 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "lcd";
++		interface_pix_fmt = "RGB24";
++		mode_str ="1920x1080M at 60";
++		default_bpp = <32>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	lcd at 0 {
++		compatible = "fsl,lcd";
++		ipu_id = <0>;
++		disp_id = <0>;
++		default_ifmt = "RGB24";
++		pinctrl-names = "default";
++		pinctrl-0 = <&pinctrl_ipu1_1>;
++		status = "okay";
++	};
++
++	v4l2_out {
++		compatible = "fsl,mxc_v4l2_output";
++		status = "okay";
++	};
++};
++
++&iomuxc {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hog>;
++
++	hog {
++		pinctrl_hog: hoggrp {
++			fsl,pins = <
++				/* SATA PWR */
++				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000
++				MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000
++				MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
++				MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000
++				/* SATA CTRL */
++				MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000
++				MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000
++				MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000
++				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
++				/* POWER_BUTTON */
++				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
++			>;
++		};
++	};
++
++	imx6q-cm-fx6 {
++		/* pins for eth0 */
++		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
++			>;
++		};
++
++		/* pins for spi */
++		pinctrl_ecspi1: ecspi1grp {
++			fsl,pins = <
++				MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
++				MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
++				MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
++				MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
++				MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
++			>;
++		};
++
++		/* pins for nand */
++		pinctrl_gpmi_nand: gpminandgrp {
++			fsl,pins = <
++				MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
++				MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
++				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
++				MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
++				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
++				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
++				MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
++				MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
++				MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
++				MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
++				MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
++				MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
++				MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
++				MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
++				MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
++				MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
++				MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
++			>;
++		};
++
++		/* pins for i2c2 */
++		pinctrl_i2c2: i2c2grp {
++			fsl,pins = <
++				MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
++				MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for i2c3 */
++		pinctrl_i2c3: i2c3grp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
++				MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for console */
++		pinctrl_uart4: uart4grp {
++			fsl,pins = <
++				MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
++				MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
++			>;
++		};
++
++		/* pins for usb hub1 */
++		pinctrl_usbh1: usbh1grp {
++			fsl,pins = <
++				MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
++			>;
++		};
++
++		/* pins for usb otg */
++		pinctrl_usbotg: usbotggrp {
++			fsl,pins = <
++				MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
++				MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
++			>;
++		};
++
++		/* pins for wifi/bt */
++		pinctrl_usdhc1: usdhc1grp {
++			fsl,pins = <
++				MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
++				MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
++				MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
++				MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
++				MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
++				MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
++			>;
++		};
++
++		/* pins for pcie */
++		pinctrl_pcie: pciegrp {
++			fsl,pins = <
++				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
++				MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
++			>;
++		};
++
++		/* pins for spdif */
++		pinctrl_spdif: spdifgrp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
++				MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
++			>;
++		};
++
++		/* pins for audmux */
++		pinctrl_audmux: audmuxgrp {
++			fsl,pins = <
++				MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
++				MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
++				MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
++				MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
++				MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
++				/* master mode pin */
++				MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
++			>;
++		};
++	};
++};
++
++/* spi */
++&ecspi1 {
++	fsl,spi-num-chipselects = <2>;
++	cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_ecspi1>;
++	status = "okay";
++
++	flash: m25p80 at 0 {
++		#address-cells = <1>;
++		#size-cells = <1>;
++		compatible = "st,m25px16", "st,m25p";
++		spi-max-frequency = <20000000>;
++		reg = <0>;
++
++		partition at 0 {
++			label = "uboot";
++			reg = <0x0 0xc0000>;
++		};
++
++		partition at c0000 {
++			label = "uboot environment";
++			reg = <0xc0000 0x40000>;
++		};
++
++		partition at 100000 {
++			label = "reserved";
++			reg = <0x100000 0x100000>;
++		};
++	};
++};
++
++/* eth0 */
++&fec {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_enet>;
++	phy-mode = "rgmii";
++	status = "okay";
++};
++
++/* nand */
++&gpmi {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_gpmi_nand>;
++	status = "okay";
++};
++
++/* i2c3 */
++&i2c3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c3>;
++	status = "okay";
++
++	eeprom at 50 {
++		compatible = "at24,24c02";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
++
++	codec: wm8731 at 1a {
++		compatible = "wlf,wm8731";
++		reg = <0x1a>;
++		clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>;
++		clock-names = "pll4", "imx-ssi.1", "cko", "cko2";
++		AVDD-supply = <&pu_dummy>;
++		HPVDD-supply = <&pu_dummy>;
++		DCVDD-supply = <&pu_dummy>;
++		DBVDD-supply = <&pu_dummy>;
++	};
++};
++
++&pcie {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_pcie>;
++	reset-gpio = <&gpio1 26 0>;
++	power-on-gpio = <&gpio2 24 0>;
++	status = "okay";
++};
++
++/* sata */
++&sata {
++	status = "okay";
++};
++
++/* console */
++&uart4 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_uart4>;
++	status = "okay";
++};
++
++/* usb otg */
++&usbotg {
++	vbus-supply = <&reg_usb_otg_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usbotg>;
++	dr_mode = "otg";
++	status = "okay";
++};
++
++/* usb hub1 */
++&usbh1 {
++	vbus-supply = <&reg_usb_h1_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usbh1>;
++	status = "okay";
++};
++
++/* wifi/bt */
++&usdhc1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usdhc1>;
++	non-removable;
++	vmmc-supply = <&awnh387_npoweron>;
++	vmmc_aux-supply = <&awnh387_wifi_nreset>;
++	status = "okay";
++};
++
++&ssi2 {
++	fsl,mode = "i2s-master";
++	status = "okay";
++};
++
++&mxcfb1 {
++	status = "okay";
++};
++
++&mxcfb2 {
++	status = "okay";
++};
++
++&hdmi_core {
++	ipu_id = <1>;
++	disp_id = <0>;
++	status = "okay";
++};
++
++&hdmi_video {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hdmi_hdcp_1>;
++	fsl,hdcp;
++	status = "okay";
++};
++
++&hdmi_audio {
++	status = "okay";
++};
++
++&spdif {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_spdif>;
++	status = "okay";
++};
++
++&audmux {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_audmux>;
++	status = "okay";
++};
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+new file mode 100644
+index 0000000..acfc572
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+@@ -0,0 +1,14 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include "imx6q-sb-fx6x.dtsi"
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+new file mode 100644
+index 0000000..5a488f8
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+@@ -0,0 +1,32 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include "imx6q-sb-fx6x.dtsi"
++
++/ {
++	eth at pcie {
++		compatible = "intel,i211";
++		local-mac-address = [FF FF FF FF FF FF];
++		status = "okay";
++	};
++
++	gpio-keys {
++		compatible = "gpio-keys";
++		power {
++			label = "Power Button";
++			gpios = <&gpio1 29 1>;
++			linux,code = <116>; /* KEY_POWER */
++			gpio-key,wakeup;
++		};
++	};
++};
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+new file mode 100644
+index 0000000..9f67b3e
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+@@ -0,0 +1,75 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include "imx6q.dtsi"
++
++/ {
++	regulators {
++		compatible = "simple-bus";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		/* regulator for mmc */
++		reg_3p3v: 3p3v {
++			compatible = "regulator-fixed";
++			regulator-name = "3P3V";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			regulator-always-on;
++		};
++	};
++
++};
++
++&iomuxc {
++	imx6q-sb-fx6x {
++		/* pins for i2c1 */
++		pinctrl_i2c1: i2c1grp {
++			fsl,pins = <
++				MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
++				MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for mmc */
++		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
++			>;
++		};
++	};
++};
++
++/* i2c1 */
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c1>;
++	eeprom at 50 {
++		compatible = "at24,24c02";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
++};
++
++/* mmc */
++&usdhc3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usdhc3>;
++	vmmc-supply = <&reg_3p3v>;
++	status = "disabled";
++};
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 5d3c7da..33e4f33 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -11,13 +11,15 @@
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+ 
+-#include "imx6q-cm-fx6.dts"
++/dts-v1/;
++#include "imx6q-sb-fx6x.dtsi"
++#include "imx6q-cm-fx6.dtsi"
+ 
+ / {
+    model = "CompuLab CM-FX6 on SBC-FX6";
+    compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
+ };
+ 
+-&pcie {
++&usdhc3 {
+ 	status = "okay";
+-};
++};
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 0e76f02..2282250 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -11,31 +11,18 @@
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+ 
+-#include "imx6q-cm-fx6.dts"
++/dts-v1/;
++#include "imx6q-sb-fx6m.dtsi"
++#include "imx6q-cm-fx6.dtsi"
+ 
+ / {
+ 	model = "CompuLab CM-FX6 on SBC-FX6m";	
+ 	compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q";
+ 
+-	eth at pcie {
+-		compatible = "intel,i211";
+-		local-mac-address = [FF FF FF FF FF FF];
+-		status = "okay";
+-	};
+-
+-	gpio-keys {
+-		compatible = "gpio-keys";
+-		power {
+-			label = "Power Button";
+-			gpios = <&gpio1 29 1>;
+-			linux,code = <116>; /* KEY_POWER */
+-			gpio-key,wakeup;
+-		};
+-	};
+ };
+ 
+ &iomuxc {
+-	imx6q-sb-fx6m {
++	imx6q-sbc-fx6m {
+ 		/* pins for uart2 */
+ 		pinctrl_uart2: uart2grp {
+ 			fsl,pins = <
+@@ -45,17 +32,10 @@
+ 				MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
+ 		>;
+ 		};
+-
+-		/* pins for pcie */
+-		pinctrl_pcie: pciegrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
+-				MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
+-		>;
+-	    };
+ 	};
+ };
+ 
++
+ &i2c1 {
+ 	rtc at 56 {
+ 		compatible = "emmicro,em3027";
+@@ -63,11 +43,7 @@
+ 	};
+ };
+ 
+-&pcie {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_pcie>;
+-	reset-gpio = <&gpio1 26 0>;
+-	power-on-gpio = <&gpio2 24 0>;
++&usdhc3 {
+ 	status = "okay";
+ };
+ 
+@@ -80,4 +56,4 @@
+ 	dma-names = "rx", "tx";
+ 	dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
+ 	status = "okay";
+-};
++};
+\ No newline at end of file
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0024-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0024-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
new file mode 100644
index 0000000..d5eba82
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0024-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
@@ -0,0 +1,26 @@
+From 61e15060d4edd19082f2d3963d40d4f558350113 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 17 Aug 2014 14:53:21 +0300
+Subject: ARM: i.MX6: cm-fx6: tag kernel version 3.10.17-cm-fx6-1-beta1
+
+Tag kernel version 3.10.17-cm-fx6-1-beta1.
+This is a new kernel version beta1 release.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index f8e79ec..e841782 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -1,4 +1,4 @@
+-CONFIG_LOCALVERSION="-cm-fx6-1-alpha"
++CONFIG_LOCALVERSION="-cm-fx6-1-beta1"
+ CONFIG_KERNEL_LZO=y
+ CONFIG_SYSVIPC=y
+ CONFIG_NO_HZ=y
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0025-ARM-i.MX6-override-system_rev-for-cm-fx6-boards.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0025-ARM-i.MX6-override-system_rev-for-cm-fx6-boards.patch
new file mode 100644
index 0000000..b264838
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0025-ARM-i.MX6-override-system_rev-for-cm-fx6-boards.patch
@@ -0,0 +1,159 @@
+From 1338961b5862fd364c0e81a569134c00cf052250 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 13 Aug 2014 16:19:24 +0300
+Subject: ARM: i.MX6: override system_rev for cm-fx6 boards
+
+Report on a non-zero system_rev at /proc/cpuinfo for cm-fx6
+boards. Calculation is from the 3.0.35 kernel.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    1 +
+ arch/arm/mach-imx/Kconfig         |    6 +++
+ arch/arm/mach-imx/Makefile        |    1 +
+ arch/arm/mach-imx/mach-cm_fx6.c   |   92 +++++++++++++++++++++++++++++++++++++
+ 4 files changed, 100 insertions(+)
+ create mode 100644 arch/arm/mach-imx/mach-cm_fx6.c
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index e841782..2c071d1 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -27,6 +27,7 @@ CONFIG_SOC_IMX53=y
+ CONFIG_SOC_IMX6Q=y
+ CONFIG_SOC_IMX6SL=y
+ CONFIG_SOC_VF610=y
++CONFIG_MACH_CM_FX6=y
+ # CONFIG_SWP_EMULATE is not set
+ CONFIG_PCI=y
+ CONFIG_PCI_IMX6=y
+diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
+index 6c14172..f11a03f 100644
+--- a/arch/arm/mach-imx/Kconfig
++++ b/arch/arm/mach-imx/Kconfig
+@@ -857,6 +857,12 @@ config SOC_VF610
+ 	help
+ 	  This enable support for Freescale Vybrid VF610 processor.
+ 
++config MACH_CM_FX6
++	bool "CompuLab CM-FX6 Support"
++
++	help
++	  This enable support for CompuLab CM-FX6 board.
++
+ endif
+ 
+ source "arch/arm/mach-imx/devices/Kconfig"
+diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
+index 87a323b..943d334 100644
+--- a/arch/arm/mach-imx/Makefile
++++ b/arch/arm/mach-imx/Makefile
+@@ -119,6 +119,7 @@ obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
+ 
+ obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
+ obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
++obj-$(CONFIG_MACH_CM_FX6) += mach-cm_fx6.o
+ 
+ obj-$(CONFIG_SOC_VF610) += clk-vf610.o mach-vf610.o
+ 
+diff --git a/arch/arm/mach-imx/mach-cm_fx6.c b/arch/arm/mach-imx/mach-cm_fx6.c
+new file mode 100644
+index 0000000..a2a40f0
+--- /dev/null
++++ b/arch/arm/mach-imx/mach-cm_fx6.c
+@@ -0,0 +1,92 @@
++/*
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include <linux/of_platform.h>
++
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/io.h>
++#include <linux/of.h>
++#include <linux/of_address.h>
++#include <linux/mfd/syscon.h>
++#include <linux/regmap.h>
++#include "common.h"
++#include "hardware.h"
++#include <linux/string.h>
++
++
++extern unsigned int system_rev;
++static unsigned int _system_rev;
++
++#define ANADIG_DIGPROG		0x260
++#define ANADIG_DIGPROG_IMX6SL	0x280
++
++extern unsigned int __mxc_cpu_type;
++
++static void revision_from_anatop(void)
++{
++	struct device_node *np;
++	void __iomem *anatop_base;
++	u32 cpu_type;
++	u16 offset = ANADIG_DIGPROG;
++	u32 fsl_system_rev = 0;
++
++	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
++	anatop_base = of_iomap(np, 0);
++	WARN_ON(!anatop_base);
++	if (of_device_is_compatible(np, "fsl,imx6sl-anatop"))
++		offset = ANADIG_DIGPROG_IMX6SL;
++	cpu_type = readl_relaxed(anatop_base + offset);
++	iounmap(anatop_base);
++
++	/* Chip Silicon ID */
++	fsl_system_rev = ((cpu_type >> 16) & 0xFF) << 12;
++	/* Chip silicon major revision */
++	fsl_system_rev |= ((cpu_type >> 8) & 0xFF) << 4;
++	fsl_system_rev += 0x10;
++	/* Chip silicon minor revision */
++	fsl_system_rev |= cpu_type & 0xFF;
++
++	/*
++	 * Move the CompuLab board revision to a different variable,
++	 * so we can use it anytime it is needed.
++	 * Put the Freescale silicon revision information to the place where
++	 * the userspace video libraries expect it to be.
++	 */
++	system_rev = fsl_system_rev;
++}
++
++static int cm_fx6_init(void)
++{
++	struct device_node *np;
++
++	np = of_find_compatible_node(NULL, NULL, "compulab,cm-fx6");
++
++	if (!np)
++		return -EINVAL;
++
++	_system_rev = system_rev;
++	revision_from_anatop();
++
++	return 0;
++}
++
++static void __exit cm_fx6_exit(void)
++{
++	system_rev = _system_rev;
++}
++module_init(cm_fx6_init);
++module_exit(cm_fx6_exit);
++
++MODULE_AUTHOR("CompuLab, Ltd.");
++MODULE_DESCRIPTION("CompuLab CM-FX6 machine driver");
++MODULE_LICENSE("GPL v2");
++MODULE_ALIAS("platform:cm-fx6");
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0026-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0026-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch
new file mode 100644
index 0000000..d0f5cd5
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0026-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch
@@ -0,0 +1,45 @@
+From 34dd155ad325773d97d0d1801f5e7bf162bef8cc Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 20 Aug 2014 14:48:09 +0300
+Subject: ARM: i.MX6: dts: pcie power-on-gpio to a fixed regulator
+
+Define pcie power-on-gpio as a fixed regulator.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 0aa4461..27f9567 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -42,6 +42,16 @@
+ 			enable-active-high;
+ 		};
+ 
++		/* regulator1 for pcie power-on-gpio */
++		pcie_power_on_gpio: regulator-pcie-power-on-gpio {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-pcie-power-on-gpio";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio2 24 0>;
++			enable-active-high;
++		};
++
+ 		/* regulator for usb hub1 */
+ 		reg_usb_h1_vbus: usb_h1_vbus {
+ 			compatible = "regulator-fixed";
+@@ -445,7 +455,7 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pinctrl_pcie>;
+ 	reset-gpio = <&gpio1 26 0>;
+-	power-on-gpio = <&gpio2 24 0>;
++	vdd-supply = <&pcie_power_on_gpio>;
+ 	status = "okay";
+ };
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0027-ARM-i.MX6-dts-add-i2c1-status-okay.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0027-ARM-i.MX6-dts-add-i2c1-status-okay.patch
new file mode 100644
index 0000000..d949ada
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0027-ARM-i.MX6-dts-add-i2c1-status-okay.patch
@@ -0,0 +1,45 @@
+From af233ba2bb4c49d5351e555ff4c3cb234176cbf1 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 20 Aug 2014 15:15:38 +0300
+Subject: ARM: i.MX6: dts: add i2c1 status okay
+
+Restore the i2c1 bus staus that has been deleted while refactoring.
+It was the reason why em3027 stoped working.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |    4 ++++
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |    1 +
+ 2 files changed, 5 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 33e4f33..6f6ad33 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -20,6 +20,10 @@
+    compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
+ };
+ 
++&i2c1 {
++	status = "okay";
++};
++
+ &usdhc3 {
+ 	status = "okay";
+ };
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 2282250..cf2a0eb 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -37,6 +37,7 @@
+ 
+ 
+ &i2c1 {
++	status = "okay";
+ 	rtc at 56 {
+ 		compatible = "emmicro,em3027";
+ 		reg = <0x56>;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0028-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0028-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch
new file mode 100644
index 0000000..914d3a1
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0028-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch
@@ -0,0 +1,28 @@
+From fff6329479660a7bcb0c254ff3c3ec6943618694 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 3 Sep 2014 10:48:29 +0300
+Subject: ARM: i.MX6: dts: add local-mac-address field for fec.
+
+Add local-mac-address field for fec.
+The board U-Boot is in charge to fill this field with a correct value.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6qdl.dtsi |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
+index 2cb5ae0..b6df3fd 100644
+--- a/arch/arm/boot/dts/imx6qdl.dtsi
++++ b/arch/arm/boot/dts/imx6qdl.dtsi
+@@ -823,6 +823,7 @@
+ 				interrupts = <0 118 0x04 0 119 0x04>;
+ 				clocks = <&clks 117>, <&clks 117>, <&clks 190>;
+ 				clock-names = "ipg", "ahb", "ptp";
++				local-mac-address = [FF FF FF FF FF FF];
+ 				status = "disabled";
+ 			};
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0029-ARM-mxs-change-usb-phy-test-clock-gating.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0029-ARM-mxs-change-usb-phy-test-clock-gating.patch
new file mode 100644
index 0000000..d7db9e2
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0029-ARM-mxs-change-usb-phy-test-clock-gating.patch
@@ -0,0 +1,36 @@
+From 30a77344c3dbd3aeae6bad0ec6663f4d7171ff93 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 28 Dec 2014 15:05:21 +0200
+Subject: ARM: mxs: change usb phy test clock gating.
+
+This change proposes to invert test clock gating.
+This solution has fixed usb hub suspend resume loop issue.
+---
+ drivers/usb/phy/phy-mxs-usb.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
+index 0423d56..1b287dd 100644
+--- a/drivers/usb/phy/phy-mxs-usb.c
++++ b/drivers/usb/phy/phy-mxs-usb.c
+@@ -223,7 +223,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
+ 
+ 	if (disconnect)
+ 		writel_relaxed(BM_USBPHY_DEBUG_CLKGATE,
+-			base + HW_USBPHY_DEBUG_CLR);
++			base + HW_USBPHY_DEBUG_SET);
+ 
+ 	if (mxs_phy->port_id == 0) {
+ 		reg = disconnect ? ANADIG_USB1_LOOPBACK_SET
+@@ -241,7 +241,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
+ 
+ 	if (!disconnect)
+ 		writel_relaxed(BM_USBPHY_DEBUG_CLKGATE,
+-			base + HW_USBPHY_DEBUG_SET);
++			base + HW_USBPHY_DEBUG_CLR);
+ 
+ 	/* Delay some time, and let Linestate be SE0 for controller */
+ 	if (disconnect)
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0030-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0030-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch
new file mode 100644
index 0000000..b37941a
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0030-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch
@@ -0,0 +1,51 @@
+From 8e0419353beba33718aae76da156f6ab7ec4effe Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 30 Dec 2014 13:55:58 +0200
+Subject: ARM: i.MX6: dts: fix the cm-fx6 operation points.
+
+Fix the cm-fx6 operation points. Remove settings for 1.2GHz.
+The current ldo settings do not allow 1.2GHz cpu frequency.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 27f9567..12eed61 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -380,6 +380,23 @@
+ 	};
+ };
+ 
++&cpu0 {
++	operating-points = <
++		/* kHz    uV */
++		996000  1250000
++		852000  1250000
++		792000  1150000
++		396000  975000
++	>;
++	fsl,soc-operating-points = <
++		/* ARM kHz  SOC-PU uV */
++		996000        1250000
++		852000        1250000
++		792000        1175000
++		396000        1175000
++	>;
++};
++
+ /* spi */
+ &ecspi1 {
+ 	fsl,spi-num-chipselects = <2>;
+@@ -538,4 +555,4 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pinctrl_audmux>;
+ 	status = "okay";
+-};
+\ No newline at end of file
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0031-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0031-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
new file mode 100644
index 0000000..6e2aefa
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0031-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
@@ -0,0 +1,26 @@
+From c9678a8b0ffc34b47eed2d646e83c1ce90e20ffd Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 17 Aug 2014 14:53:21 +0300
+Subject: ARM: i.MX6: cm-fx6: tag kernel version 3.10.17-cm-fx6-1-beta2
+
+Tag kernel version 3.10.17-cm-fx6-1-beta2.
+This is a new kernel version beta2 release.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index 2c071d1..1955172 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -1,4 +1,4 @@
+-CONFIG_LOCALVERSION="-cm-fx6-1-beta1"
++CONFIG_LOCALVERSION="-cm-fx6-1-beta2"
+ CONFIG_KERNEL_LZO=y
+ CONFIG_SYSVIPC=y
+ CONFIG_NO_HZ=y
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0032-ENGR00317636-ASoC-fsl-hdmi-Disable-NEON-optimization.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0032-ENGR00317636-ASoC-fsl-hdmi-Disable-NEON-optimization.patch
new file mode 100644
index 0000000..a38ce2f
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0032-ENGR00317636-ASoC-fsl-hdmi-Disable-NEON-optimization.patch
@@ -0,0 +1,39 @@
+From 7e3884fc239913e5241747dd5b6f5f4fb1a24ac2 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <b02247 at freescale.com>
+Date: Tue, 10 Jun 2014 16:13:09 +0800
+Subject: ENGR00317636 ASoC: fsl: hdmi: Disable NEON optimization
+
+Enable NEON optimization will cause pulseaudio crash in the user space.
+Which is caused by using the NEON instruction, if only use "VPUSH, VPOP" in the
+function, crash will be happened also.
+
+Signed-off-by: Shengjiu Wang <b02247 at freescale.com>
+---
+ sound/soc/fsl/imx-hdmi-dma.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c
+index 8f3e798..d8d0715 100644
+--- a/sound/soc/fsl/imx-hdmi-dma.c
++++ b/sound/soc/fsl/imx-hdmi-dma.c
+@@ -286,6 +286,17 @@ static void init_table(int channels)
+ 	}
+ }
+ 
++/*
++ * FIXME: Disable NEON Optimization in hdmi, or it will cause crash of
++ * pulseaudio in the userspace. There is no issue for the Optimization
++ * implemenation, if only use "VPUSH, VPOP" in the function, the pulseaudio
++ * will crash also. So for my assumption, we can't use the NEON in the
++ * interrupt.(tasklet is implemented by softirq.)
++ * Disable SMP, preempt, change the dma buffer to nocached, add protection of
++ * Dn register and fpscr, all these operation have no effect to the result.
++ */
++#define HDMI_DMA_NO_NEON
++
+ #ifdef HDMI_DMA_NO_NEON
+ /* Optimization for IEC head */
+ static void hdmi_dma_copy_16_c_lut(u16 *src, u32 *dst, int samples,
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0033-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0033-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch
new file mode 100644
index 0000000..5ac35e5
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0033-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch
@@ -0,0 +1,70 @@
+From f91eed0410654b557db755e47b88c0fa3a8e08d4 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 5 Jan 2015 10:34:13 +0200
+Subject: ARM: i.MX6: ASoC: fix build warnings and update includes
+
+Fix build warnings and update includes.
+
+sound/soc/fsl/imx-wm8731.c: In function 'imx_hifi_hw_params_slv_mode':
+sound/soc/fsl/imx-wm8731.c:357:3: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long int'
+sound/soc/fsl/imx-wm8731.c: In function 'imx_hifi_hw_params_mst_mode':
+sound/soc/fsl/imx-wm8731.c:414:3: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long int'
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ sound/soc/fsl/imx-wm8731.c |   13 ++++---------
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c
+index 72b75ad..c0833cf 100644
+--- a/sound/soc/fsl/imx-wm8731.c
++++ b/sound/soc/fsl/imx-wm8731.c
+@@ -14,17 +14,12 @@
+  */
+ 
+ #include <linux/module.h>
++#include <linux/of.h>
+ #include <linux/of_platform.h>
+ #include <linux/of_i2c.h>
+-#include <linux/of_gpio.h>
+-#include <linux/slab.h>
+-#include <linux/gpio.h>
+ #include <linux/clk.h>
+ #include <sound/soc.h>
+-#include <sound/jack.h>
+ #include <sound/pcm_params.h>
+-#include <sound/soc-dapm.h>
+-#include <linux/pinctrl/consumer.h>
+ 
+ #include "../codecs/wm8731.h"
+ #include "imx-audmux.h"
+@@ -344,7 +339,7 @@ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream,
+ 				     SND_SOC_CLOCK_IN);
+ 
+ 	if (ret < 0) {
+-		pr_err("Failed to set codec master clock to %u: %d \n",
++		pr_err("Failed to set codec master clock to %lu: %d \n",
+ 		       data->sysclk, ret);
+ 		return ret;
+ 	}
+@@ -401,7 +396,7 @@ static int imx_hifi_hw_params_mst_mode(struct snd_pcm_substream *substream,
+ 				     SND_SOC_CLOCK_IN);
+ 
+ 	if (ret < 0) {
+-		pr_err("Failed to set codec master clock to %u: %d \n",
++		pr_err("Failed to set codec master clock to %lu: %d \n",
+ 		       data->sysclk, ret);
+ 		return ret;
+ 	}
+@@ -555,7 +550,7 @@ static int imx_wm8731_probe(struct platform_device *pdev)
+ 	}
+         
+ 	codec_dev = of_find_i2c_device_by_node(codec_np);
+-	if (!codec_dev || !codec_dev->driver) {
++	if (!codec_dev) {
+ 		dev_err(&pdev->dev, "failed to find codec platform device\n");
+ 		ret = -EINVAL;
+ 		goto fail;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0034-mwifiex-use-u32-variables-for-SDIO-read-write-port-b.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0034-mwifiex-use-u32-variables-for-SDIO-read-write-port-b.patch
new file mode 100644
index 0000000..b988db6
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0034-mwifiex-use-u32-variables-for-SDIO-read-write-port-b.patch
@@ -0,0 +1,178 @@
+From 4c1fda329842d98db3fb769010a7997fc669d313 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:50:26 -0700
+Subject: mwifiex: use u32 variables for SDIO read/write port bitmap
+
+Currently supported SDIO chipsets (SD87XX) have 16 ports.
+This change is a prerequisite for new chipset.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Yogesh Ashok Powar <yogeshp at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |   40 +++++++++++++++++------------------
+ drivers/net/wireless/mwifiex/sdio.h |   10 ++++-----
+ 2 files changed, 25 insertions(+), 25 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index 139c958..1747f49 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -486,21 +486,21 @@ static int mwifiex_write_data_to_card(struct mwifiex_adapter *adapter,
+ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+-	u16 rd_bitmap = card->mp_rd_bitmap;
++	u32 rd_bitmap = card->mp_rd_bitmap;
+ 
+-	dev_dbg(adapter->dev, "data: mp_rd_bitmap=0x%04x\n", rd_bitmap);
++	dev_dbg(adapter->dev, "data: mp_rd_bitmap=0x%08x\n", rd_bitmap);
+ 
+ 	if (!(rd_bitmap & (CTRL_PORT_MASK | DATA_PORT_MASK)))
+ 		return -1;
+ 
+ 	if (card->mp_rd_bitmap & CTRL_PORT_MASK) {
+-		card->mp_rd_bitmap &= (u16) (~CTRL_PORT_MASK);
++		card->mp_rd_bitmap &= (u32) (~CTRL_PORT_MASK);
+ 		*port = CTRL_PORT;
+-		dev_dbg(adapter->dev, "data: port=%d mp_rd_bitmap=0x%04x\n",
++		dev_dbg(adapter->dev, "data: port=%d mp_rd_bitmap=0x%08x\n",
+ 			*port, card->mp_rd_bitmap);
+ 	} else {
+ 		if (card->mp_rd_bitmap & (1 << card->curr_rd_port)) {
+-			card->mp_rd_bitmap &= (u16)
++			card->mp_rd_bitmap &= (u32)
+ 						(~(1 << card->curr_rd_port));
+ 			*port = card->curr_rd_port;
+ 
+@@ -511,7 +511,7 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ 		}
+ 
+ 		dev_dbg(adapter->dev,
+-			"data: port=%d mp_rd_bitmap=0x%04x -> 0x%04x\n",
++			"data: port=%d mp_rd_bitmap=0x%08x -> 0x%08x\n",
+ 			*port, rd_bitmap, card->mp_rd_bitmap);
+ 	}
+ 	return 0;
+@@ -527,15 +527,15 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u8 *port)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+-	u16 wr_bitmap = card->mp_wr_bitmap;
++	u32 wr_bitmap = card->mp_wr_bitmap;
+ 
+-	dev_dbg(adapter->dev, "data: mp_wr_bitmap=0x%04x\n", wr_bitmap);
++	dev_dbg(adapter->dev, "data: mp_wr_bitmap=0x%08x\n", wr_bitmap);
+ 
+ 	if (!(wr_bitmap & card->mp_data_port_mask))
+ 		return -1;
+ 
+ 	if (card->mp_wr_bitmap & (1 << card->curr_wr_port)) {
+-		card->mp_wr_bitmap &= (u16) (~(1 << card->curr_wr_port));
++		card->mp_wr_bitmap &= (u32) (~(1 << card->curr_wr_port));
+ 		*port = card->curr_wr_port;
+ 		if (++card->curr_wr_port == card->mp_end_port)
+ 			card->curr_wr_port = 1;
+@@ -545,14 +545,14 @@ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u8 *port)
+ 	}
+ 
+ 	if (*port == CTRL_PORT) {
+-		dev_err(adapter->dev, "invalid data port=%d cur port=%d"
+-			" mp_wr_bitmap=0x%04x -> 0x%04x\n",
++		dev_err(adapter->dev,
++			"invalid data port=%d cur port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n",
+ 			*port, card->curr_wr_port, wr_bitmap,
+ 			card->mp_wr_bitmap);
+ 		return -1;
+ 	}
+ 
+-	dev_dbg(adapter->dev, "data: port=%d mp_wr_bitmap=0x%04x -> 0x%04x\n",
++	dev_dbg(adapter->dev, "data: port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n",
+ 		*port, wr_bitmap, card->mp_wr_bitmap);
+ 
+ 	return 0;
+@@ -1024,7 +1024,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 		goto rx_curr_single;
+ 	}
+ 
+-	if (card->mp_rd_bitmap & (~((u16) CTRL_PORT_MASK))) {
++	if (card->mp_rd_bitmap & (~((u32) CTRL_PORT_MASK))) {
+ 		/* Some more data RX pending */
+ 		dev_dbg(adapter->dev, "info: %s: not last packet\n", __func__);
+ 
+@@ -1185,9 +1185,9 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 		return ret;
+ 
+ 	if (sdio_ireg & DN_LD_HOST_INT_STATUS) {
+-		card->mp_wr_bitmap = ((u16) card->mp_regs[WR_BITMAP_U]) << 8;
+-		card->mp_wr_bitmap |= (u16) card->mp_regs[WR_BITMAP_L];
+-		dev_dbg(adapter->dev, "int: DNLD: wr_bitmap=0x%04x\n",
++		card->mp_wr_bitmap = ((u32) card->mp_regs[WR_BITMAP_U]) << 8;
++		card->mp_wr_bitmap |= (u32) card->mp_regs[WR_BITMAP_L];
++		dev_dbg(adapter->dev, "int: DNLD: wr_bitmap=0x%08x\n",
+ 			card->mp_wr_bitmap);
+ 		if (adapter->data_sent &&
+ 		    (card->mp_wr_bitmap & card->mp_data_port_mask)) {
+@@ -1204,7 +1204,7 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 		/* Check if firmware has attach buffer at command port and
+ 		   update just that in wr_bit_map. */
+ 		card->mp_wr_bitmap |=
+-			(u16) card->mp_regs[WR_BITMAP_L] & CTRL_PORT_MASK;
++			(u32) card->mp_regs[WR_BITMAP_L] & CTRL_PORT_MASK;
+ 		if (card->mp_wr_bitmap & CTRL_PORT_MASK)
+ 			adapter->cmd_sent = false;
+ 	}
+@@ -1212,9 +1212,9 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 	dev_dbg(adapter->dev, "info: cmd_sent=%d data_sent=%d\n",
+ 		adapter->cmd_sent, adapter->data_sent);
+ 	if (sdio_ireg & UP_LD_HOST_INT_STATUS) {
+-		card->mp_rd_bitmap = ((u16) card->mp_regs[RD_BITMAP_U]) << 8;
+-		card->mp_rd_bitmap |= (u16) card->mp_regs[RD_BITMAP_L];
+-		dev_dbg(adapter->dev, "int: UPLD: rd_bitmap=0x%04x\n",
++		card->mp_rd_bitmap = ((u32) card->mp_regs[RD_BITMAP_U]) << 8;
++		card->mp_rd_bitmap |= (u32) card->mp_regs[RD_BITMAP_L];
++		dev_dbg(adapter->dev, "int: UPLD: rd_bitmap=0x%08x\n",
+ 			card->mp_rd_bitmap);
+ 
+ 		while (true) {
+diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
+index 8cc5468..6588069 100644
+--- a/drivers/net/wireless/mwifiex/sdio.h
++++ b/drivers/net/wireless/mwifiex/sdio.h
+@@ -261,7 +261,7 @@ struct mwifiex_sdio_mpa_tx {
+ 	u8 *buf;
+ 	u32 buf_len;
+ 	u32 pkt_cnt;
+-	u16 ports;
++	u32 ports;
+ 	u16 start_port;
+ 	u8 enabled;
+ 	u32 buf_size;
+@@ -272,7 +272,7 @@ struct mwifiex_sdio_mpa_rx {
+ 	u8 *buf;
+ 	u32 buf_len;
+ 	u32 pkt_cnt;
+-	u16 ports;
++	u32 ports;
+ 	u16 start_port;
+ 
+ 	struct sk_buff *skb_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT];
+@@ -290,11 +290,11 @@ struct sdio_mmc_card {
+ 	struct sdio_func *func;
+ 	struct mwifiex_adapter *adapter;
+ 
+-	u16 mp_rd_bitmap;
+-	u16 mp_wr_bitmap;
++	u32 mp_rd_bitmap;
++	u32 mp_wr_bitmap;
+ 
+ 	u16 mp_end_port;
+-	u16 mp_data_port_mask;
++	u32 mp_data_port_mask;
+ 
+ 	u8 curr_rd_port;
+ 	u8 curr_wr_port;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0035-mwifiex-store-SDIO-chip-specific-information-in-sepa.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0035-mwifiex-store-SDIO-chip-specific-information-in-sepa.patch
new file mode 100644
index 0000000..e77bdec
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0035-mwifiex-store-SDIO-chip-specific-information-in-sepa.patch
@@ -0,0 +1,557 @@
+From 0c8c0bfecc2aa73bf518c0a4cd0c00e136d1b2b4 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:50:27 -0700
+Subject: mwifiex: store SDIO chip specific information in separate structure
+
+Register addresses, firmware name and some macros are specific to
+a chip. They are stored in a new structure.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |  116 ++++++++++++++++++++---------------
+ drivers/net/wireless/mwifiex/sdio.h |  114 ++++++++++++++++++++++++----------
+ 2 files changed, 149 insertions(+), 81 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index 1747f49..cc2e3f0 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -77,6 +77,15 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
+ 
+ 	func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
+ 
++	if (id->driver_data) {
++		struct mwifiex_sdio_device *data = (void *)id->driver_data;
++
++		card->firmware = data->firmware;
++		card->reg = data->reg;
++		card->max_ports = data->max_ports;
++		card->mp_agg_pkt_limit = data->mp_agg_pkt_limit;
++	}
++
+ 	sdio_claim_host(func);
+ 	ret = sdio_enable_func(func);
+ 	sdio_release_host(func);
+@@ -254,9 +263,12 @@ static int mwifiex_sdio_resume(struct device *dev)
+ 
+ /* WLAN IDs */
+ static const struct sdio_device_id mwifiex_ids[] = {
+-	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8786)},
+-	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787)},
+-	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797)},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8786),
++		.driver_data = (unsigned long) &mwifiex_sdio_sd8786},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787),
++		.driver_data = (unsigned long) &mwifiex_sdio_sd8787},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797),
++		.driver_data = (unsigned long) &mwifiex_sdio_sd8797},
+ 	{},
+ };
+ 
+@@ -410,6 +422,7 @@ static int mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
+ static int mwifiex_init_sdio_ioport(struct mwifiex_adapter *adapter)
+ {
+ 	u32 reg;
++	struct sdio_mmc_card *card = adapter->card;
+ 
+ 	adapter->ioport = 0;
+ 
+@@ -434,13 +447,13 @@ static int mwifiex_init_sdio_ioport(struct mwifiex_adapter *adapter)
+ 	/* Set Host interrupt reset to read to clear */
+ 	if (!mwifiex_read_reg(adapter, HOST_INT_RSR_REG, &reg))
+ 		mwifiex_write_reg(adapter, HOST_INT_RSR_REG,
+-				  reg | SDIO_INT_MASK);
++				  reg | card->reg->sdio_int_mask);
+ 	else
+ 		return -1;
+ 
+ 	/* Dnld/Upld ready set to auto reset */
+-	if (!mwifiex_read_reg(adapter, CARD_MISC_CFG_REG, &reg))
+-		mwifiex_write_reg(adapter, CARD_MISC_CFG_REG,
++	if (!mwifiex_read_reg(adapter, card->reg->card_misc_cfg_reg, &reg))
++		mwifiex_write_reg(adapter, card->reg->card_misc_cfg_reg,
+ 				  reg | AUTO_RE_ENABLE_INT);
+ 	else
+ 		return -1;
+@@ -486,11 +499,12 @@ static int mwifiex_write_data_to_card(struct mwifiex_adapter *adapter,
+ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	u32 rd_bitmap = card->mp_rd_bitmap;
+ 
+ 	dev_dbg(adapter->dev, "data: mp_rd_bitmap=0x%08x\n", rd_bitmap);
+ 
+-	if (!(rd_bitmap & (CTRL_PORT_MASK | DATA_PORT_MASK)))
++	if (!(rd_bitmap & (CTRL_PORT_MASK | reg->data_port_mask)))
+ 		return -1;
+ 
+ 	if (card->mp_rd_bitmap & CTRL_PORT_MASK) {
+@@ -504,8 +518,8 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ 						(~(1 << card->curr_rd_port));
+ 			*port = card->curr_rd_port;
+ 
+-			if (++card->curr_rd_port == MAX_PORT)
+-				card->curr_rd_port = 1;
++			if (++card->curr_rd_port == card->max_ports)
++				card->curr_rd_port = reg->start_rd_port;
+ 		} else {
+ 			return -1;
+ 		}
+@@ -538,7 +552,7 @@ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u8 *port)
+ 		card->mp_wr_bitmap &= (u32) (~(1 << card->curr_wr_port));
+ 		*port = card->curr_wr_port;
+ 		if (++card->curr_wr_port == card->mp_end_port)
+-			card->curr_wr_port = 1;
++			card->curr_wr_port = card->reg->start_wr_port;
+ 	} else {
+ 		adapter->data_sent = true;
+ 		return -EBUSY;
+@@ -564,11 +578,12 @@ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u8 *port)
+ static int
+ mwifiex_sdio_poll_card_status(struct mwifiex_adapter *adapter, u8 bits)
+ {
++	struct sdio_mmc_card *card = adapter->card;
+ 	u32 tries;
+ 	u32 cs;
+ 
+ 	for (tries = 0; tries < MAX_POLL_TRIES; tries++) {
+-		if (mwifiex_read_reg(adapter, CARD_STATUS_REG, &cs))
++		if (mwifiex_read_reg(adapter, card->reg->poll_reg, &cs))
+ 			break;
+ 		else if ((cs & bits) == bits)
+ 			return 0;
+@@ -587,12 +602,14 @@ mwifiex_sdio_poll_card_status(struct mwifiex_adapter *adapter, u8 bits)
+ static int
+ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat)
+ {
++	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	u32 fws0, fws1;
+ 
+-	if (mwifiex_read_reg(adapter, CARD_FW_STATUS0_REG, &fws0))
++	if (mwifiex_read_reg(adapter, reg->status_reg_0, &fws0))
+ 		return -1;
+ 
+-	if (mwifiex_read_reg(adapter, CARD_FW_STATUS1_REG, &fws1))
++	if (mwifiex_read_reg(adapter, reg->status_reg_1, &fws1))
+ 		return -1;
+ 
+ 	*dat = (u16) ((fws1 << 8) | fws0);
+@@ -633,8 +650,11 @@ static int mwifiex_sdio_disable_host_int(struct mwifiex_adapter *adapter)
+  */
+ static int mwifiex_sdio_enable_host_int(struct mwifiex_adapter *adapter)
+ {
++	struct sdio_mmc_card *card = adapter->card;
++
+ 	/* Simply write the mask to the register */
+-	if (mwifiex_write_reg(adapter, HOST_INT_MASK_REG, HOST_INT_ENABLE)) {
++	if (mwifiex_write_reg(adapter, HOST_INT_MASK_REG,
++			      card->reg->host_int_enable)) {
+ 		dev_err(adapter->dev, "enable host interrupt failed\n");
+ 		return -1;
+ 	}
+@@ -686,6 +706,8 @@ static int mwifiex_sdio_card_to_host(struct mwifiex_adapter *adapter,
+ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
+ 				    struct mwifiex_fw_image *fw)
+ {
++	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	int ret;
+ 	u8 *firmware = fw->fw_buf;
+ 	u32 firmware_len = fw->fw_len;
+@@ -727,7 +749,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
+ 			break;
+ 
+ 		for (tries = 0; tries < MAX_POLL_TRIES; tries++) {
+-			ret = mwifiex_read_reg(adapter, HOST_F1_RD_BASE_0,
++			ret = mwifiex_read_reg(adapter, reg->base_0_reg,
+ 					       &base0);
+ 			if (ret) {
+ 				dev_err(adapter->dev,
+@@ -736,7 +758,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
+ 					base0, base0);
+ 				goto done;
+ 			}
+-			ret = mwifiex_read_reg(adapter, HOST_F1_RD_BASE_1,
++			ret = mwifiex_read_reg(adapter, reg->base_1_reg,
+ 					       &base1);
+ 			if (ret) {
+ 				dev_err(adapter->dev,
+@@ -828,6 +850,7 @@ done:
+ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
+ 				   u32 poll_num)
+ {
++	struct sdio_mmc_card *card = adapter->card;
+ 	int ret = 0;
+ 	u16 firmware_stat;
+ 	u32 tries;
+@@ -849,7 +872,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
+ 
+ 	if (ret) {
+ 		if (mwifiex_read_reg
+-		    (adapter, CARD_FW_STATUS0_REG, &winner_status))
++		    (adapter, card->reg->status_reg_0, &winner_status))
+ 			winner_status = 0;
+ 
+ 		if (winner_status)
+@@ -869,9 +892,9 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
+ 	u32 sdio_ireg;
+ 	unsigned long flags;
+ 
+-	if (mwifiex_read_data_sync(adapter, card->mp_regs, MAX_MP_REGS,
+-				   REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK,
+-				   0)) {
++	if (mwifiex_read_data_sync(adapter, card->mp_regs,
++				   card->reg->max_mp_regs,
++				   REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK, 0)) {
+ 		dev_err(adapter->dev, "read mp_regs failed\n");
+ 		return;
+ 	}
+@@ -1167,6 +1190,7 @@ error:
+ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	int ret = 0;
+ 	u8 sdio_ireg;
+ 	struct sk_buff *skb;
+@@ -1185,8 +1209,10 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 		return ret;
+ 
+ 	if (sdio_ireg & DN_LD_HOST_INT_STATUS) {
+-		card->mp_wr_bitmap = ((u32) card->mp_regs[WR_BITMAP_U]) << 8;
+-		card->mp_wr_bitmap |= (u32) card->mp_regs[WR_BITMAP_L];
++		card->mp_wr_bitmap =
++			((u32) card->mp_regs[reg->wr_bitmap_u]) << 8;
++		card->mp_wr_bitmap |=
++			(u32) card->mp_regs[reg->wr_bitmap_l];
+ 		dev_dbg(adapter->dev, "int: DNLD: wr_bitmap=0x%08x\n",
+ 			card->mp_wr_bitmap);
+ 		if (adapter->data_sent &&
+@@ -1204,7 +1230,7 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 		/* Check if firmware has attach buffer at command port and
+ 		   update just that in wr_bit_map. */
+ 		card->mp_wr_bitmap |=
+-			(u32) card->mp_regs[WR_BITMAP_L] & CTRL_PORT_MASK;
++			(u32) card->mp_regs[reg->wr_bitmap_l] & CTRL_PORT_MASK;
+ 		if (card->mp_wr_bitmap & CTRL_PORT_MASK)
+ 			adapter->cmd_sent = false;
+ 	}
+@@ -1212,8 +1238,9 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 	dev_dbg(adapter->dev, "info: cmd_sent=%d data_sent=%d\n",
+ 		adapter->cmd_sent, adapter->data_sent);
+ 	if (sdio_ireg & UP_LD_HOST_INT_STATUS) {
+-		card->mp_rd_bitmap = ((u32) card->mp_regs[RD_BITMAP_U]) << 8;
+-		card->mp_rd_bitmap |= (u32) card->mp_regs[RD_BITMAP_L];
++		card->mp_rd_bitmap =
++			((u32) card->mp_regs[reg->rd_bitmap_u]) << 8;
++		card->mp_rd_bitmap |= (u32) card->mp_regs[reg->rd_bitmap_l];
+ 		dev_dbg(adapter->dev, "int: UPLD: rd_bitmap=0x%08x\n",
+ 			card->mp_rd_bitmap);
+ 
+@@ -1224,8 +1251,8 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 					"info: no more rd_port available\n");
+ 				break;
+ 			}
+-			len_reg_l = RD_LEN_P0_L + (port << 1);
+-			len_reg_u = RD_LEN_P0_U + (port << 1);
++			len_reg_l = reg->rd_len_p0_l + (port << 1);
++			len_reg_u = reg->rd_len_p0_u + (port << 1);
+ 			rx_len = ((u16) card->mp_regs[len_reg_u]) << 8;
+ 			rx_len |= (u16) card->mp_regs[len_reg_l];
+ 			dev_dbg(adapter->dev, "info: RX: port=%d rx_len=%u\n",
+@@ -1586,18 +1613,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
+ 
+ 	adapter->dev = &func->dev;
+ 
+-	switch (func->device) {
+-	case SDIO_DEVICE_ID_MARVELL_8786:
+-		strcpy(adapter->fw_name, SD8786_DEFAULT_FW_NAME);
+-		break;
+-	case SDIO_DEVICE_ID_MARVELL_8797:
+-		strcpy(adapter->fw_name, SD8797_DEFAULT_FW_NAME);
+-		break;
+-	case SDIO_DEVICE_ID_MARVELL_8787:
+-	default:
+-		strcpy(adapter->fw_name, SD8787_DEFAULT_FW_NAME);
+-		break;
+-	}
++	strcpy(adapter->fw_name, card->firmware);
+ 
+ 	return 0;
+ 
+@@ -1626,6 +1642,7 @@ disable_func:
+ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	int ret;
+ 	u32 sdio_ireg;
+ 
+@@ -1645,27 +1662,27 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
+ 	/* Initialize SDIO variables in card */
+ 	card->mp_rd_bitmap = 0;
+ 	card->mp_wr_bitmap = 0;
+-	card->curr_rd_port = 1;
+-	card->curr_wr_port = 1;
++	card->curr_rd_port = reg->start_rd_port;
++	card->curr_wr_port = reg->start_wr_port;
+ 
+-	card->mp_data_port_mask = DATA_PORT_MASK;
++	card->mp_data_port_mask = reg->data_port_mask;
+ 
+ 	card->mpa_tx.buf_len = 0;
+ 	card->mpa_tx.pkt_cnt = 0;
+ 	card->mpa_tx.start_port = 0;
+ 
+ 	card->mpa_tx.enabled = 1;
+-	card->mpa_tx.pkt_aggr_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
++	card->mpa_tx.pkt_aggr_limit = card->mp_agg_pkt_limit;
+ 
+ 	card->mpa_rx.buf_len = 0;
+ 	card->mpa_rx.pkt_cnt = 0;
+ 	card->mpa_rx.start_port = 0;
+ 
+ 	card->mpa_rx.enabled = 1;
+-	card->mpa_rx.pkt_aggr_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
++	card->mpa_rx.pkt_aggr_limit = card->mp_agg_pkt_limit;
+ 
+ 	/* Allocate buffers for SDIO MP-A */
+-	card->mp_regs = kzalloc(MAX_MP_REGS, GFP_KERNEL);
++	card->mp_regs = kzalloc(reg->max_mp_regs, GFP_KERNEL);
+ 	if (!card->mp_regs)
+ 		return -ENOMEM;
+ 
+@@ -1716,16 +1733,17 @@ static void
+ mwifiex_update_mp_end_port(struct mwifiex_adapter *adapter, u16 port)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	int i;
+ 
+ 	card->mp_end_port = port;
+ 
+-	card->mp_data_port_mask = DATA_PORT_MASK;
++	card->mp_data_port_mask = reg->data_port_mask;
+ 
+-	for (i = 1; i <= MAX_PORT - card->mp_end_port; i++)
+-		card->mp_data_port_mask &= ~(1 << (MAX_PORT - i));
++	for (i = 1; i <= card->max_ports - card->mp_end_port; i++)
++		card->mp_data_port_mask &= ~(1 << (card->max_ports - i));
+ 
+-	card->curr_wr_port = 1;
++	card->curr_wr_port = reg->start_wr_port;
+ 
+ 	dev_dbg(adapter->dev, "cmd: mp_end_port %d, data port mask 0x%x\n",
+ 		port, card->mp_data_port_mask);
+diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
+index 6588069..0d931f7 100644
+--- a/drivers/net/wireless/mwifiex/sdio.h
++++ b/drivers/net/wireless/mwifiex/sdio.h
+@@ -37,12 +37,6 @@
+ #define BYTE_MODE	0
+ 
+ #define REG_PORT			0
+-#define RD_BITMAP_L			0x04
+-#define RD_BITMAP_U			0x05
+-#define WR_BITMAP_L			0x06
+-#define WR_BITMAP_U			0x07
+-#define RD_LEN_P0_L			0x08
+-#define RD_LEN_P0_U			0x09
+ 
+ #define MWIFIEX_SDIO_IO_PORT_MASK		0xfffff
+ 
+@@ -50,12 +44,8 @@
+ 
+ #define CTRL_PORT			0
+ #define CTRL_PORT_MASK			0x0001
+-#define DATA_PORT_MASK			0xfffe
+ 
+-#define MAX_MP_REGS			64
+-#define MAX_PORT			16
+-
+-#define SDIO_MP_AGGR_DEF_PKT_LIMIT	8
++#define SDIO_MP_AGGR_DEF_PKT_LIMIT		8
+ 
+ #define SDIO_MP_TX_AGGR_DEF_BUF_SIZE        (8192)	/* 8K */
+ 
+@@ -90,8 +80,6 @@
+ #define UP_LD_HOST_INT_MASK		(0x1U)
+ /* Host Control Registers : Download host interrupt mask */
+ #define DN_LD_HOST_INT_MASK		(0x2U)
+-/* Enable Host interrupt mask */
+-#define HOST_INT_ENABLE	(UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK)
+ /* Disable Host interrupt mask */
+ #define	HOST_INT_DISABLE		0xff
+ 
+@@ -106,7 +94,6 @@
+ #define HOST_INT_RSR_REG		0x01
+ /* Host Control Registers : Upload host interrupt RSR */
+ #define UP_LD_HOST_INT_RSR		(0x1U)
+-#define SDIO_INT_MASK			0x3F
+ 
+ /* Host Control Registers : Host interrupt status */
+ #define HOST_INT_STATUS_REG		0x28
+@@ -117,8 +104,6 @@
+ /* Host Control Registers : Download restart */
+ #define DN_LD_RESTART                   (0x1U << 0)
+ 
+-/* Card Control Registers : Card status register */
+-#define CARD_STATUS_REG                 0x30
+ /* Card Control Registers : Card I/O ready */
+ #define CARD_IO_READY                   (0x1U << 3)
+ /* Card Control Registers : CIS card ready */
+@@ -153,20 +138,9 @@
+ /* Card Control Registers : Power down RSR */
+ #define POWER_DOWN_RSR                  (0x1U << 3)
+ 
+-/* Card Control Registers : Miscellaneous Configuration Register */
+-#define CARD_MISC_CFG_REG               0x6C
+-
+-/* Host F1 read base 0 */
+-#define HOST_F1_RD_BASE_0		0x0040
+-/* Host F1 read base 1 */
+-#define HOST_F1_RD_BASE_1		0x0041
+ /* Host F1 card ready */
+ #define HOST_F1_CARD_RDY		0x0020
+ 
+-/* Firmware status 0 register */
+-#define CARD_FW_STATUS0_REG		0x60
+-/* Firmware status 1 register */
+-#define CARD_FW_STATUS1_REG		0x61
+ /* Rx length register */
+ #define CARD_RX_LEN_REG			0x62
+ /* Rx unit register */
+@@ -192,7 +166,8 @@
+ 	if (a->mpa_tx.start_port <= port)				\
+ 		a->mpa_tx.ports |= (1<<(a->mpa_tx.pkt_cnt));		\
+ 	else								\
+-		a->mpa_tx.ports |= (1<<(a->mpa_tx.pkt_cnt+1+(MAX_PORT -	\
++		a->mpa_tx.ports |= (1<<(a->mpa_tx.pkt_cnt+1+		\
++						(a->max_ports -	\
+ 						a->mp_end_port)));	\
+ 	a->mpa_tx.pkt_cnt++;						\
+ } while (0)
+@@ -203,9 +178,9 @@
+ 
+ /* SDIO Tx aggregation port limit ? */
+ #define MP_TX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_wr_port <		\
+-			a->mpa_tx.start_port) && (((MAX_PORT -		\
++			a->mpa_tx.start_port) && (((a->max_ports -\
+ 			a->mpa_tx.start_port) + a->curr_wr_port) >=	\
+-				SDIO_MP_AGGR_DEF_PKT_LIMIT))
++				a->mp_agg_pkt_limit))
+ 
+ /* Reset SDIO Tx aggregation buffer parameters */
+ #define MP_TX_AGGR_BUF_RESET(a) do {					\
+@@ -221,9 +196,9 @@
+ 
+ /* SDIO Tx aggregation port limit ? */
+ #define MP_RX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_rd_port <		\
+-			a->mpa_rx.start_port) && (((MAX_PORT -		\
++			a->mpa_rx.start_port) && (((a->max_ports -\
+ 			a->mpa_rx.start_port) + a->curr_rd_port) >=	\
+-			SDIO_MP_AGGR_DEF_PKT_LIMIT))
++			a->mp_agg_pkt_limit))
+ 
+ /* SDIO Rx aggregation in progress ? */
+ #define MP_RX_AGGR_IN_PROGRESS(a) (a->mpa_rx.pkt_cnt > 0)
+@@ -286,10 +261,36 @@ struct mwifiex_sdio_mpa_rx {
+ int mwifiex_bus_register(void);
+ void mwifiex_bus_unregister(void);
+ 
++struct mwifiex_sdio_card_reg {
++	u8 start_rd_port;
++	u8 start_wr_port;
++	u8 base_0_reg;
++	u8 base_1_reg;
++	u8 poll_reg;
++	u8 host_int_enable;
++	u8 status_reg_0;
++	u8 status_reg_1;
++	u8 sdio_int_mask;
++	u32 data_port_mask;
++	u8 max_mp_regs;
++	u8 rd_bitmap_l;
++	u8 rd_bitmap_u;
++	u8 wr_bitmap_l;
++	u8 wr_bitmap_u;
++	u8 rd_len_p0_l;
++	u8 rd_len_p0_u;
++	u8 card_misc_cfg_reg;
++};
++
+ struct sdio_mmc_card {
+ 	struct sdio_func *func;
+ 	struct mwifiex_adapter *adapter;
+ 
++	const char *firmware;
++	const struct mwifiex_sdio_card_reg *reg;
++	u8 max_ports;
++	u8 mp_agg_pkt_limit;
++
+ 	u32 mp_rd_bitmap;
+ 	u32 mp_wr_bitmap;
+ 
+@@ -305,6 +306,55 @@ struct sdio_mmc_card {
+ 	struct mwifiex_sdio_mpa_rx mpa_rx;
+ };
+ 
++struct mwifiex_sdio_device {
++	const char *firmware;
++	const struct mwifiex_sdio_card_reg *reg;
++	u8 max_ports;
++	u8 mp_agg_pkt_limit;
++};
++
++static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = {
++	.start_rd_port = 1,
++	.start_wr_port = 1,
++	.base_0_reg = 0x0040,
++	.base_1_reg = 0x0041,
++	.poll_reg = 0x30,
++	.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK,
++	.status_reg_0 = 0x60,
++	.status_reg_1 = 0x61,
++	.sdio_int_mask = 0x3f,
++	.data_port_mask = 0x0000fffe,
++	.max_mp_regs = 64,
++	.rd_bitmap_l = 0x04,
++	.rd_bitmap_u = 0x05,
++	.wr_bitmap_l = 0x06,
++	.wr_bitmap_u = 0x07,
++	.rd_len_p0_l = 0x08,
++	.rd_len_p0_u = 0x09,
++	.card_misc_cfg_reg = 0x6c,
++};
++
++static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = {
++	.firmware = SD8786_DEFAULT_FW_NAME,
++	.reg = &mwifiex_reg_sd87xx,
++	.max_ports = 16,
++	.mp_agg_pkt_limit = 8,
++};
++
++static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
++	.firmware = SD8787_DEFAULT_FW_NAME,
++	.reg = &mwifiex_reg_sd87xx,
++	.max_ports = 16,
++	.mp_agg_pkt_limit = 8,
++};
++
++static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
++	.firmware = SD8797_DEFAULT_FW_NAME,
++	.reg = &mwifiex_reg_sd87xx,
++	.max_ports = 16,
++	.mp_agg_pkt_limit = 8,
++};
++
+ /*
+  * .cmdrsp_complete handler
+  */
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0036-mwifiex-replace-unnecessary-u32-variables-with-u8-in.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0036-mwifiex-replace-unnecessary-u32-variables-with-u8-in.patch
new file mode 100644
index 0000000..a5cdb70
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0036-mwifiex-replace-unnecessary-u32-variables-with-u8-in.patch
@@ -0,0 +1,136 @@
+From 2abb5aa54861255138aaeaf040cf55291967deec Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:53:42 -0700
+Subject: mwifiex: replace unnecessary u32 variables with u8 in sdio.c
+
+Some u32 variables in sdio.c are used to store/pass u8 values.
+Replace them with u8 variables.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |   26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index cc2e3f0..11e88fe 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -294,13 +294,13 @@ static struct sdio_driver mwifiex_sdio = {
+  * This function writes data into SDIO card register.
+  */
+ static int
+-mwifiex_write_reg(struct mwifiex_adapter *adapter, u32 reg, u32 data)
++mwifiex_write_reg(struct mwifiex_adapter *adapter, u32 reg, u8 data)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+ 	int ret = -1;
+ 
+ 	sdio_claim_host(card->func);
+-	sdio_writeb(card->func, (u8) data, reg, &ret);
++	sdio_writeb(card->func, data, reg, &ret);
+ 	sdio_release_host(card->func);
+ 
+ 	return ret;
+@@ -310,7 +310,7 @@ mwifiex_write_reg(struct mwifiex_adapter *adapter, u32 reg, u32 data)
+  * This function reads data from SDIO card register.
+  */
+ static int
+-mwifiex_read_reg(struct mwifiex_adapter *adapter, u32 reg, u32 *data)
++mwifiex_read_reg(struct mwifiex_adapter *adapter, u32 reg, u8 *data)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+ 	int ret = -1;
+@@ -421,7 +421,7 @@ static int mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
+  */
+ static int mwifiex_init_sdio_ioport(struct mwifiex_adapter *adapter)
+ {
+-	u32 reg;
++	u8 reg;
+ 	struct sdio_mmc_card *card = adapter->card;
+ 
+ 	adapter->ioport = 0;
+@@ -580,7 +580,7 @@ mwifiex_sdio_poll_card_status(struct mwifiex_adapter *adapter, u8 bits)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+ 	u32 tries;
+-	u32 cs;
++	u8 cs;
+ 
+ 	for (tries = 0; tries < MAX_POLL_TRIES; tries++) {
+ 		if (mwifiex_read_reg(adapter, card->reg->poll_reg, &cs))
+@@ -604,7 +604,7 @@ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+ 	const struct mwifiex_sdio_card_reg *reg = card->reg;
+-	u32 fws0, fws1;
++	u8 fws0, fws1;
+ 
+ 	if (mwifiex_read_reg(adapter, reg->status_reg_0, &fws0))
+ 		return -1;
+@@ -625,14 +625,14 @@ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat)
+  */
+ static int mwifiex_sdio_disable_host_int(struct mwifiex_adapter *adapter)
+ {
+-	u32 host_int_mask;
++	u8 host_int_mask, host_int_disable = HOST_INT_DISABLE;
+ 
+ 	/* Read back the host_int_mask register */
+ 	if (mwifiex_read_reg(adapter, HOST_INT_MASK_REG, &host_int_mask))
+ 		return -1;
+ 
+ 	/* Update with the mask and write back to the register */
+-	host_int_mask &= ~HOST_INT_DISABLE;
++	host_int_mask &= ~host_int_disable;
+ 
+ 	if (mwifiex_write_reg(adapter, HOST_INT_MASK_REG, host_int_mask)) {
+ 		dev_err(adapter->dev, "disable host interrupt failed\n");
+@@ -712,7 +712,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
+ 	u8 *firmware = fw->fw_buf;
+ 	u32 firmware_len = fw->fw_len;
+ 	u32 offset = 0;
+-	u32 base0, base1;
++	u8 base0, base1;
+ 	u8 *fwbuf;
+ 	u16 len = 0;
+ 	u32 txlen, tx_blocks = 0, tries;
+@@ -854,7 +854,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
+ 	int ret = 0;
+ 	u16 firmware_stat;
+ 	u32 tries;
+-	u32 winner_status;
++	u8 winner_status;
+ 
+ 	/* Wait for firmware initialization event */
+ 	for (tries = 0; tries < poll_num; tries++) {
+@@ -889,7 +889,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
+ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+-	u32 sdio_ireg;
++	u8 sdio_ireg;
+ 	unsigned long flags;
+ 
+ 	if (mwifiex_read_data_sync(adapter, card->mp_regs,
+@@ -1284,7 +1284,7 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 
+ 			if (mwifiex_sdio_card_to_host_mp_aggr(adapter, skb,
+ 							      port)) {
+-				u32 cr = 0;
++				u8 cr = 0;
+ 
+ 				dev_err(adapter->dev, "card_to_host_mpa failed:"
+ 					" int status=%#x\n", sdio_ireg);
+@@ -1644,7 +1644,7 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
+ 	struct sdio_mmc_card *card = adapter->card;
+ 	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	int ret;
+-	u32 sdio_ireg;
++	u8 sdio_ireg;
+ 
+ 	/*
+ 	 * Read the HOST_INT_STATUS_REG for ACK the first interrupt got
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0037-mwifiex-code-rearrangement-in-mwifiex_get_rd_port.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0037-mwifiex-code-rearrangement-in-mwifiex_get_rd_port.patch
new file mode 100644
index 0000000..c0f35a9
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0037-mwifiex-code-rearrangement-in-mwifiex_get_rd_port.patch
@@ -0,0 +1,60 @@
+From b9e9c6ddd2080f2ddaddf11c6021607a5f06c9e3 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:53:56 -0700
+Subject: mwifiex: code rearrangement in mwifiex_get_rd_port()
+
+Get rid of 'if else' usage by returning in 'if' block.
+This improves readability by removing indentations.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |   29 +++++++++++++++--------------
+ 1 file changed, 15 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index 11e88fe..c7479f0 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -512,22 +512,23 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ 		*port = CTRL_PORT;
+ 		dev_dbg(adapter->dev, "data: port=%d mp_rd_bitmap=0x%08x\n",
+ 			*port, card->mp_rd_bitmap);
+-	} else {
+-		if (card->mp_rd_bitmap & (1 << card->curr_rd_port)) {
+-			card->mp_rd_bitmap &= (u32)
+-						(~(1 << card->curr_rd_port));
+-			*port = card->curr_rd_port;
++		return 0;
++	}
+ 
+-			if (++card->curr_rd_port == card->max_ports)
+-				card->curr_rd_port = reg->start_rd_port;
+-		} else {
+-			return -1;
+-		}
++	if (!(card->mp_rd_bitmap & (1 << card->curr_rd_port)))
++		return -1;
++
++	/* We are now handling the SDIO data ports */
++	card->mp_rd_bitmap &= (u32)(~(1 << card->curr_rd_port));
++	*port = card->curr_rd_port;
++
++	if (++card->curr_rd_port == card->max_ports)
++		card->curr_rd_port = reg->start_rd_port;
++
++	dev_dbg(adapter->dev,
++		"data: port=%d mp_rd_bitmap=0x%08x -> 0x%08x\n",
++		*port, rd_bitmap, card->mp_rd_bitmap);
+ 
+-		dev_dbg(adapter->dev,
+-			"data: port=%d mp_rd_bitmap=0x%08x -> 0x%08x\n",
+-			*port, rd_bitmap, card->mp_rd_bitmap);
+-	}
+ 	return 0;
+ }
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0038-mwifiex-do-port-calculations-separately.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0038-mwifiex-do-port-calculations-separately.patch
new file mode 100644
index 0000000..f2c2b93
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0038-mwifiex-do-port-calculations-separately.patch
@@ -0,0 +1,97 @@
+From b9eedf3c0214b114d27f497ff2099dd26595a8a3 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:54:23 -0700
+Subject: mwifiex: do port calculations separately
+
+This patch rearranges the code for better readability
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Yogesh Ashok Powar <yogeshp at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |   24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index c7479f0..a796d7c 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -539,7 +539,7 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+  * increased (provided it does not reach the maximum limit, in which
+  * case it is reset to 1)
+  */
+-static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u8 *port)
++static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u32 *port)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+ 	u32 wr_bitmap = card->mp_wr_bitmap;
+@@ -1027,7 +1027,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 	s32 f_aggr_cur = 0;
+ 	struct sk_buff *skb_deaggr;
+ 	u32 pind;
+-	u32 pkt_len, pkt_type = 0;
++	u32 pkt_len, pkt_type, mport;
+ 	u8 *curr_ptr;
+ 	u32 rx_len = skb->len;
+ 
+@@ -1100,11 +1100,11 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 		dev_dbg(adapter->dev, "info: do_rx_aggr: num of packets: %d\n",
+ 			card->mpa_rx.pkt_cnt);
+ 
++		mport = (adapter->ioport | 0x1000 |
++			 (card->mpa_rx.ports << 4)) + card->mpa_rx.start_port;
++
+ 		if (mwifiex_read_data_sync(adapter, card->mpa_rx.buf,
+-					   card->mpa_rx.buf_len,
+-					   (adapter->ioport | 0x1000 |
+-					    (card->mpa_rx.ports << 4)) +
+-					   card->mpa_rx.start_port, 1))
++					   card->mpa_rx.buf_len, mport, 1))
+ 			goto error;
+ 
+ 		curr_ptr = card->mpa_rx.buf;
+@@ -1333,7 +1333,7 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+  * and return.
+  */
+ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+-					u8 *payload, u32 pkt_len, u8 port,
++					u8 *payload, u32 pkt_len, u32 port,
+ 					u32 next_pkt_len)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
+@@ -1342,6 +1342,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 	s32 f_send_cur_buf = 0;
+ 	s32 f_precopy_cur_buf = 0;
+ 	s32 f_postcopy_cur_buf = 0;
++	u32 mport;
+ 
+ 	if ((!card->mpa_tx.enabled) || (port == CTRL_PORT)) {
+ 		dev_dbg(adapter->dev, "info: %s: tx aggregation disabled\n",
+@@ -1418,11 +1419,10 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 		dev_dbg(adapter->dev, "data: %s: send aggr buffer: %d %d\n",
+ 			__func__,
+ 				card->mpa_tx.start_port, card->mpa_tx.ports);
++		mport = (adapter->ioport | 0x1000 |
++			 (card->mpa_tx.ports << 4)) + card->mpa_tx.start_port;
+ 		ret = mwifiex_write_data_to_card(adapter, card->mpa_tx.buf,
+-						 card->mpa_tx.buf_len,
+-						 (adapter->ioport | 0x1000 |
+-						 (card->mpa_tx.ports << 4)) +
+-						  card->mpa_tx.start_port);
++						 card->mpa_tx.buf_len, mport);
+ 
+ 		MP_TX_AGGR_BUF_RESET(card);
+ 	}
+@@ -1462,7 +1462,7 @@ static int mwifiex_sdio_host_to_card(struct mwifiex_adapter *adapter,
+ 	int ret;
+ 	u32 buf_block_len;
+ 	u32 blk_size;
+-	u8 port = CTRL_PORT;
++	u32 port = CTRL_PORT;
+ 	u8 *payload = (u8 *)skb->data;
+ 	u32 pkt_len = skb->len;
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0039-mwifiex-define-a-macro-for-MPA-base-address.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0039-mwifiex-define-a-macro-for-MPA-base-address.patch
new file mode 100644
index 0000000..5c4a3be
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0039-mwifiex-define-a-macro-for-MPA-base-address.patch
@@ -0,0 +1,53 @@
+From 74a32651094a57bf169c75e44cecd01cdfcf0b0b Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:54:34 -0700
+Subject: mwifiex: define a macro for MPA base address
+
+As Multiple-Port Aggregation base address value is fixed, we can
+have a macro for it.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |    4 ++--
+ drivers/net/wireless/mwifiex/sdio.h |    1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index a796d7c..f0edecb 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -1100,7 +1100,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 		dev_dbg(adapter->dev, "info: do_rx_aggr: num of packets: %d\n",
+ 			card->mpa_rx.pkt_cnt);
+ 
+-		mport = (adapter->ioport | 0x1000 |
++		mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
+ 			 (card->mpa_rx.ports << 4)) + card->mpa_rx.start_port;
+ 
+ 		if (mwifiex_read_data_sync(adapter, card->mpa_rx.buf,
+@@ -1419,7 +1419,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 		dev_dbg(adapter->dev, "data: %s: send aggr buffer: %d %d\n",
+ 			__func__,
+ 				card->mpa_tx.start_port, card->mpa_tx.ports);
+-		mport = (adapter->ioport | 0x1000 |
++		mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
+ 			 (card->mpa_tx.ports << 4)) + card->mpa_tx.start_port;
+ 		ret = mwifiex_write_data_to_card(adapter, card->mpa_tx.buf,
+ 						 card->mpa_tx.buf_len, mport);
+diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
+index 0d931f7..e4016d2 100644
+--- a/drivers/net/wireless/mwifiex/sdio.h
++++ b/drivers/net/wireless/mwifiex/sdio.h
+@@ -42,6 +42,7 @@
+ 
+ #define MWIFIEX_SDIO_BYTE_MODE_MASK	0x80000000
+ 
++#define SDIO_MPA_ADDR_BASE		0x1000
+ #define CTRL_PORT			0
+ #define CTRL_PORT_MASK			0x0001
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0040-mwifiex-code-rearrangement-in-multiport-aggregation-.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0040-mwifiex-code-rearrangement-in-multiport-aggregation-.patch
new file mode 100644
index 0000000..0c283b1
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0040-mwifiex-code-rearrangement-in-multiport-aggregation-.patch
@@ -0,0 +1,220 @@
+From a737de34a73872f58540ffa964c813d861b927e2 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Fri, 17 May 2013 17:54:51 -0700
+Subject: mwifiex: code rearrangement in multiport aggregation path
+
+There are some macros defined for multiport aggregation
+calculations. As we may need to add some more code to
+accomodate new chipsets, we will change them to inline
+functions. Also, use dynamic allocation for Rx buffer array.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/sdio.c |   17 ++++---
+ drivers/net/wireless/mwifiex/sdio.h |   83 ++++++++++++++++++++++-------------
+ 2 files changed, 64 insertions(+), 36 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index f0edecb..acdcad7 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -1084,10 +1084,10 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 	if (f_aggr_cur) {
+ 		dev_dbg(adapter->dev, "info: current packet aggregation\n");
+ 		/* Curr pkt can be aggregated */
+-		MP_RX_AGGR_SETUP(card, skb, port);
++		mp_rx_aggr_setup(card, skb, port);
+ 
+ 		if (MP_RX_AGGR_PKT_LIMIT_REACHED(card) ||
+-		    MP_RX_AGGR_PORT_LIMIT_REACHED(card)) {
++		    mp_rx_aggr_port_limit_reached(card)) {
+ 			dev_dbg(adapter->dev, "info: %s: aggregated packet "
+ 				"limit reached\n", __func__);
+ 			/* No more pkts allowed in Aggr buf, rx it */
+@@ -1358,7 +1358,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 			__func__);
+ 
+ 		if (MP_TX_AGGR_IN_PROGRESS(card)) {
+-			if (!MP_TX_AGGR_PORT_LIMIT_REACHED(card) &&
++			if (!mp_tx_aggr_port_limit_reached(card) &&
+ 			    MP_TX_AGGR_BUF_HAS_ROOM(card, pkt_len)) {
+ 				f_precopy_cur_buf = 1;
+ 
+@@ -1371,7 +1371,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 				/* No room in Aggr buf, send it */
+ 				f_send_aggr_buf = 1;
+ 
+-				if (MP_TX_AGGR_PORT_LIMIT_REACHED(card) ||
++				if (mp_tx_aggr_port_limit_reached(card) ||
+ 				    !(card->mp_wr_bitmap &
+ 				      (1 << card->curr_wr_port)))
+ 					f_send_cur_buf = 1;
+@@ -1410,7 +1410,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 		MP_TX_AGGR_BUF_PUT(card, payload, pkt_len, port);
+ 
+ 		if (MP_TX_AGGR_PKT_LIMIT_REACHED(card) ||
+-		    MP_TX_AGGR_PORT_LIMIT_REACHED(card))
++		    mp_tx_aggr_port_limit_reached(card))
+ 			/* No more pkts allowed in Aggr buf, send it */
+ 			f_send_aggr_buf = 1;
+ 	}
+@@ -1687,6 +1687,11 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
+ 	if (!card->mp_regs)
+ 		return -ENOMEM;
+ 
++	/* Allocate skb pointer buffers */
++	card->mpa_rx.skb_arr = kzalloc((sizeof(void *)) *
++				       card->mp_agg_pkt_limit, GFP_KERNEL);
++	card->mpa_rx.len_arr = kzalloc(sizeof(*card->mpa_rx.len_arr) *
++				       card->mp_agg_pkt_limit, GFP_KERNEL);
+ 	ret = mwifiex_alloc_sdio_mpa_buffers(adapter,
+ 					     SDIO_MP_TX_AGGR_DEF_BUF_SIZE,
+ 					     SDIO_MP_RX_AGGR_DEF_BUF_SIZE);
+@@ -1723,6 +1728,8 @@ static void mwifiex_cleanup_sdio(struct mwifiex_adapter *adapter)
+ 	struct sdio_mmc_card *card = adapter->card;
+ 
+ 	kfree(card->mp_regs);
++	kfree(card->mpa_rx.skb_arr);
++	kfree(card->mpa_rx.len_arr);
+ 	kfree(card->mpa_tx.buf);
+ 	kfree(card->mpa_rx.buf);
+ }
+diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
+index e4016d2..c2ee415c 100644
+--- a/drivers/net/wireless/mwifiex/sdio.h
++++ b/drivers/net/wireless/mwifiex/sdio.h
+@@ -46,8 +46,6 @@
+ #define CTRL_PORT			0
+ #define CTRL_PORT_MASK			0x0001
+ 
+-#define SDIO_MP_AGGR_DEF_PKT_LIMIT		8
+-
+ #define SDIO_MP_TX_AGGR_DEF_BUF_SIZE        (8192)	/* 8K */
+ 
+ /* Multi port RX aggregation buffer size */
+@@ -177,12 +175,6 @@
+ #define MP_TX_AGGR_PKT_LIMIT_REACHED(a)					\
+ 			(a->mpa_tx.pkt_cnt == a->mpa_tx.pkt_aggr_limit)
+ 
+-/* SDIO Tx aggregation port limit ? */
+-#define MP_TX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_wr_port <		\
+-			a->mpa_tx.start_port) && (((a->max_ports -\
+-			a->mpa_tx.start_port) + a->curr_wr_port) >=	\
+-				a->mp_agg_pkt_limit))
+-
+ /* Reset SDIO Tx aggregation buffer parameters */
+ #define MP_TX_AGGR_BUF_RESET(a) do {					\
+ 	a->mpa_tx.pkt_cnt = 0;						\
+@@ -195,12 +187,6 @@
+ #define MP_RX_AGGR_PKT_LIMIT_REACHED(a)					\
+ 			(a->mpa_rx.pkt_cnt == a->mpa_rx.pkt_aggr_limit)
+ 
+-/* SDIO Tx aggregation port limit ? */
+-#define MP_RX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_rd_port <		\
+-			a->mpa_rx.start_port) && (((a->max_ports -\
+-			a->mpa_rx.start_port) + a->curr_rd_port) >=	\
+-			a->mp_agg_pkt_limit))
+-
+ /* SDIO Rx aggregation in progress ? */
+ #define MP_RX_AGGR_IN_PROGRESS(a) (a->mpa_rx.pkt_cnt > 0)
+ 
+@@ -208,20 +194,6 @@
+ #define MP_RX_AGGR_BUF_HAS_ROOM(a, rx_len)				\
+ 			((a->mpa_rx.buf_len+rx_len) <= a->mpa_rx.buf_size)
+ 
+-/* Prepare to copy current packet from card to SDIO Rx aggregation buffer */
+-#define MP_RX_AGGR_SETUP(a, skb, port) do {				\
+-	a->mpa_rx.buf_len += skb->len;					\
+-	if (!a->mpa_rx.pkt_cnt)						\
+-		a->mpa_rx.start_port = port;				\
+-	if (a->mpa_rx.start_port <= port)				\
+-		a->mpa_rx.ports |= (1<<(a->mpa_rx.pkt_cnt));		\
+-	else								\
+-		a->mpa_rx.ports |= (1<<(a->mpa_rx.pkt_cnt+1));		\
+-	a->mpa_rx.skb_arr[a->mpa_rx.pkt_cnt] = skb;			\
+-	a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = skb->len;		\
+-	a->mpa_rx.pkt_cnt++;						\
+-} while (0)
+-
+ /* Reset SDIO Rx aggregation buffer parameters */
+ #define MP_RX_AGGR_BUF_RESET(a) do {					\
+ 	a->mpa_rx.pkt_cnt = 0;						\
+@@ -230,7 +202,6 @@
+ 	a->mpa_rx.start_port = 0;					\
+ } while (0)
+ 
+-
+ /* data structure for SDIO MPA TX */
+ struct mwifiex_sdio_mpa_tx {
+ 	/* multiport tx aggregation buffer pointer */
+@@ -251,8 +222,8 @@ struct mwifiex_sdio_mpa_rx {
+ 	u32 ports;
+ 	u16 start_port;
+ 
+-	struct sk_buff *skb_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT];
+-	u32 len_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT];
++	struct sk_buff **skb_arr;
++	u32 *len_arr;
+ 
+ 	u8 enabled;
+ 	u32 buf_size;
+@@ -376,4 +347,54 @@ static inline int mwifiex_sdio_event_complete(struct mwifiex_adapter *adapter,
+ 	return 0;
+ }
+ 
++static inline bool
++mp_rx_aggr_port_limit_reached(struct sdio_mmc_card *card)
++{
++	u8 tmp;
++
++	if (card->curr_rd_port < card->mpa_rx.start_port) {
++		tmp = card->mp_agg_pkt_limit;
++
++		if (((card->max_ports - card->mpa_rx.start_port) +
++		    card->curr_rd_port) >= tmp)
++			return true;
++	}
++
++	return false;
++}
++
++static inline bool
++mp_tx_aggr_port_limit_reached(struct sdio_mmc_card *card)
++{
++	u16 tmp;
++
++	if (card->curr_wr_port < card->mpa_tx.start_port) {
++		tmp = card->mp_agg_pkt_limit;
++
++		if (((card->max_ports - card->mpa_tx.start_port) +
++		    card->curr_wr_port) >= tmp)
++			return true;
++	}
++
++	return false;
++}
++
++/* Prepare to copy current packet from card to SDIO Rx aggregation buffer */
++static inline void mp_rx_aggr_setup(struct sdio_mmc_card *card,
++				    struct sk_buff *skb, u8 port)
++{
++	card->mpa_rx.buf_len += skb->len;
++
++	if (!card->mpa_rx.pkt_cnt)
++		card->mpa_rx.start_port = port;
++
++	if (card->mpa_rx.start_port <= port)
++		card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt);
++	else
++		card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt + 1);
++
++	card->mpa_rx.skb_arr[card->mpa_rx.pkt_cnt] = skb;
++	card->mpa_rx.len_arr[card->mpa_rx.pkt_cnt] = skb->len;
++	card->mpa_rx.pkt_cnt++;
++}
+ #endif /* _MWIFIEX_SDIO_H */
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0041-mwifiex-add-support-for-Marvell-SD8897-chipset.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0041-mwifiex-add-support-for-Marvell-SD8897-chipset.patch
new file mode 100644
index 0000000..5c7df84
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0041-mwifiex-add-support-for-Marvell-SD8897-chipset.patch
@@ -0,0 +1,715 @@
+From 3c2568274ea06d539fe735ba9e96239b8004253f Mon Sep 17 00:00:00 2001
+From: Yogesh Ashok Powar <yogeshp at marvell.com>
+Date: Fri, 17 May 2013 17:54:58 -0700
+Subject: mwifiex: add support for Marvell SD8897 chipset
+
+Some of the key differences between SD8897 and older chipsets
+are as follows:
+
+a) sdio mpa_rx and mpa_tx ports have been increased from 16 to 32
+b) Same is the case with read/write bitmap that one receives from
+   mpa_reg read
+c) aggregation packet count doubled from 8 to 16
+d) Most of key reg addresses are changed
+e) There is a separate command or control port
+f) Now command rx/tx_done have new interrupts
+
+1. 'supports_sdio_new_mode' flag is added to handle (a) and (b).
+2. (c) and (d) are taken care of by filling chip specific
+   information in global structurei (mwifiex_sdio_sd8897).
+3. For older chipsets, port 0 was cmd port and port 1->15 were
+   data port. Therefore we had CTRL_PORT_MASK to differentiate
+   port type. Now these changes are under 'has_control_mask' flag.
+
+Signed-off-by: Yogesh Ashok Powar <yogeshp at marvell.com>
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Nishant Sarmukadam <nishants at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Frank Huang <frankh at marvell.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/mwifiex/Kconfig |    4 +-
+ drivers/net/wireless/mwifiex/sdio.c  |  267 +++++++++++++++++++++++++++-------
+ drivers/net/wireless/mwifiex/sdio.h  |  105 ++++++++++++-
+ 3 files changed, 315 insertions(+), 61 deletions(-)
+
+diff --git a/drivers/net/wireless/mwifiex/Kconfig b/drivers/net/wireless/mwifiex/Kconfig
+index 4f614aa..f7ff472 100644
+--- a/drivers/net/wireless/mwifiex/Kconfig
++++ b/drivers/net/wireless/mwifiex/Kconfig
+@@ -3,13 +3,13 @@ config MWIFIEX
+ 	depends on CFG80211
+ 	---help---
+ 	  This adds support for wireless adapters based on Marvell
+-	  802.11n chipsets.
++	  802.11n/ac chipsets.
+ 
+ 	  If you choose to build it as a module, it will be called
+ 	  mwifiex.
+ 
+ config MWIFIEX_SDIO
+-	tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797"
++	tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8897"
+ 	depends on MWIFIEX && MMC
+ 	select FW_LOADER
+ 	---help---
+diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
+index acdcad7..c9f3ecf 100644
+--- a/drivers/net/wireless/mwifiex/sdio.c
++++ b/drivers/net/wireless/mwifiex/sdio.c
+@@ -84,6 +84,8 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
+ 		card->reg = data->reg;
+ 		card->max_ports = data->max_ports;
+ 		card->mp_agg_pkt_limit = data->mp_agg_pkt_limit;
++		card->supports_sdio_new_mode = data->supports_sdio_new_mode;
++		card->has_control_mask = data->has_control_mask;
+ 	}
+ 
+ 	sdio_claim_host(func);
+@@ -260,6 +262,8 @@ static int mwifiex_sdio_resume(struct device *dev)
+ #define SDIO_DEVICE_ID_MARVELL_8787   (0x9119)
+ /* Device ID for SD8797 */
+ #define SDIO_DEVICE_ID_MARVELL_8797   (0x9129)
++/* Device ID for SD8897 */
++#define SDIO_DEVICE_ID_MARVELL_8897   (0x912d)
+ 
+ /* WLAN IDs */
+ static const struct sdio_device_id mwifiex_ids[] = {
+@@ -269,6 +273,8 @@ static const struct sdio_device_id mwifiex_ids[] = {
+ 		.driver_data = (unsigned long) &mwifiex_sdio_sd8787},
+ 	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8797),
+ 		.driver_data = (unsigned long) &mwifiex_sdio_sd8797},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8897),
++		.driver_data = (unsigned long) &mwifiex_sdio_sd8897},
+ 	{},
+ };
+ 
+@@ -412,7 +418,40 @@ static int mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
+ }
+ 
+ /*
+- * This function initializes the IO ports.
++ * This function is used to initialize IO ports for the
++ * chipsets supporting SDIO new mode eg SD8897.
++ */
++static int mwifiex_init_sdio_new_mode(struct mwifiex_adapter *adapter)
++{
++	u8 reg;
++
++	adapter->ioport = MEM_PORT;
++
++	/* enable sdio new mode */
++	if (mwifiex_read_reg(adapter, CARD_CONFIG_2_1_REG, &reg))
++		return -1;
++	if (mwifiex_write_reg(adapter, CARD_CONFIG_2_1_REG,
++			      reg | CMD53_NEW_MODE))
++		return -1;
++
++	/* Configure cmd port and enable reading rx length from the register */
++	if (mwifiex_read_reg(adapter, CMD_CONFIG_0, &reg))
++		return -1;
++	if (mwifiex_write_reg(adapter, CMD_CONFIG_0, reg | CMD_PORT_RD_LEN_EN))
++		return -1;
++
++	/* Enable Dnld/Upld ready auto reset for cmd port after cmd53 is
++	 * completed
++	 */
++	if (mwifiex_read_reg(adapter, CMD_CONFIG_1, &reg))
++		return -1;
++	if (mwifiex_write_reg(adapter, CMD_CONFIG_1, reg | CMD_PORT_AUTO_EN))
++		return -1;
++
++	return 0;
++}
++
++/* This function initializes the IO ports.
+  *
+  * The following operations are performed -
+  *      - Read the IO ports (0, 1 and 2)
+@@ -426,6 +465,12 @@ static int mwifiex_init_sdio_ioport(struct mwifiex_adapter *adapter)
+ 
+ 	adapter->ioport = 0;
+ 
++	if (card->supports_sdio_new_mode) {
++		if (mwifiex_init_sdio_new_mode(adapter))
++			return -1;
++		goto cont;
++	}
++
+ 	/* Read the IO port */
+ 	if (!mwifiex_read_reg(adapter, IO_PORT_0_REG, &reg))
+ 		adapter->ioport |= (reg & 0xff);
+@@ -441,7 +486,7 @@ static int mwifiex_init_sdio_ioport(struct mwifiex_adapter *adapter)
+ 		adapter->ioport |= ((reg & 0xff) << 16);
+ 	else
+ 		return -1;
+-
++cont:
+ 	pr_debug("info: SDIO FUNC1 IO port: %#x\n", adapter->ioport);
+ 
+ 	/* Set Host interrupt reset to read to clear */
+@@ -504,10 +549,16 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ 
+ 	dev_dbg(adapter->dev, "data: mp_rd_bitmap=0x%08x\n", rd_bitmap);
+ 
+-	if (!(rd_bitmap & (CTRL_PORT_MASK | reg->data_port_mask)))
+-		return -1;
++	if (card->supports_sdio_new_mode) {
++		if (!(rd_bitmap & reg->data_port_mask))
++			return -1;
++	} else {
++		if (!(rd_bitmap & (CTRL_PORT_MASK | reg->data_port_mask)))
++			return -1;
++	}
+ 
+-	if (card->mp_rd_bitmap & CTRL_PORT_MASK) {
++	if ((card->has_control_mask) &&
++	    (card->mp_rd_bitmap & CTRL_PORT_MASK)) {
+ 		card->mp_rd_bitmap &= (u32) (~CTRL_PORT_MASK);
+ 		*port = CTRL_PORT;
+ 		dev_dbg(adapter->dev, "data: port=%d mp_rd_bitmap=0x%08x\n",
+@@ -542,24 +593,34 @@ static int mwifiex_get_rd_port(struct mwifiex_adapter *adapter, u8 *port)
+ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u32 *port)
+ {
+ 	struct sdio_mmc_card *card = adapter->card;
++	const struct mwifiex_sdio_card_reg *reg = card->reg;
+ 	u32 wr_bitmap = card->mp_wr_bitmap;
+ 
+ 	dev_dbg(adapter->dev, "data: mp_wr_bitmap=0x%08x\n", wr_bitmap);
+ 
+-	if (!(wr_bitmap & card->mp_data_port_mask))
++	if (card->supports_sdio_new_mode &&
++	    !(wr_bitmap & reg->data_port_mask)) {
++		adapter->data_sent = true;
++		return -EBUSY;
++	} else if (!card->supports_sdio_new_mode &&
++		   !(wr_bitmap & card->mp_data_port_mask)) {
+ 		return -1;
++	}
+ 
+ 	if (card->mp_wr_bitmap & (1 << card->curr_wr_port)) {
+ 		card->mp_wr_bitmap &= (u32) (~(1 << card->curr_wr_port));
+ 		*port = card->curr_wr_port;
+-		if (++card->curr_wr_port == card->mp_end_port)
+-			card->curr_wr_port = card->reg->start_wr_port;
++		if (((card->supports_sdio_new_mode) &&
++		     (++card->curr_wr_port == card->max_ports)) ||
++		    ((!card->supports_sdio_new_mode) &&
++		     (++card->curr_wr_port == card->mp_end_port)))
++			card->curr_wr_port = reg->start_wr_port;
+ 	} else {
+ 		adapter->data_sent = true;
+ 		return -EBUSY;
+ 	}
+ 
+-	if (*port == CTRL_PORT) {
++	if ((card->has_control_mask) && (*port == CTRL_PORT)) {
+ 		dev_err(adapter->dev,
+ 			"invalid data port=%d cur port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n",
+ 			*port, card->curr_wr_port, wr_bitmap,
+@@ -904,6 +965,9 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
+ 	if (sdio_ireg) {
+ 		/*
+ 		 * DN_LD_HOST_INT_STATUS and/or UP_LD_HOST_INT_STATUS
++		 * For SDIO new mode CMD port interrupts
++		 *	DN_LD_CMD_PORT_HOST_INT_STATUS and/or
++		 *	UP_LD_CMD_PORT_HOST_INT_STATUS
+ 		 * Clear the interrupt status register
+ 		 */
+ 		dev_dbg(adapter->dev, "int: sdio_ireg = %#x\n", sdio_ireg);
+@@ -1031,7 +1095,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 	u8 *curr_ptr;
+ 	u32 rx_len = skb->len;
+ 
+-	if (port == CTRL_PORT) {
++	if ((card->has_control_mask) && (port == CTRL_PORT)) {
+ 		/* Read the command Resp without aggr */
+ 		dev_dbg(adapter->dev, "info: %s: no aggregation for cmd "
+ 			"response\n", __func__);
+@@ -1048,7 +1112,10 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 		goto rx_curr_single;
+ 	}
+ 
+-	if (card->mp_rd_bitmap & (~((u32) CTRL_PORT_MASK))) {
++	if ((!card->has_control_mask && (card->mp_rd_bitmap &
++					 card->reg->data_port_mask)) ||
++	    (card->has_control_mask && (card->mp_rd_bitmap &
++					(~((u32) CTRL_PORT_MASK))))) {
+ 		/* Some more data RX pending */
+ 		dev_dbg(adapter->dev, "info: %s: not last packet\n", __func__);
+ 
+@@ -1100,8 +1167,25 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
+ 		dev_dbg(adapter->dev, "info: do_rx_aggr: num of packets: %d\n",
+ 			card->mpa_rx.pkt_cnt);
+ 
+-		mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
+-			 (card->mpa_rx.ports << 4)) + card->mpa_rx.start_port;
++		if (card->supports_sdio_new_mode) {
++			int i;
++			u32 port_count;
++
++			for (i = 0, port_count = 0; i < card->max_ports; i++)
++				if (card->mpa_rx.ports & BIT(i))
++					port_count++;
++
++			/* Reading data from "start_port + 0" to "start_port +
++			 * port_count -1", so decrease the count by 1
++			 */
++			port_count--;
++			mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
++				 (port_count << 8)) + card->mpa_rx.start_port;
++		} else {
++			mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
++				 (card->mpa_rx.ports << 4)) +
++				 card->mpa_rx.start_port;
++		}
+ 
+ 		if (mwifiex_read_data_sync(adapter, card->mpa_rx.buf,
+ 					   card->mpa_rx.buf_len, mport, 1))
+@@ -1200,6 +1284,8 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 	u32 rx_blocks;
+ 	u16 rx_len;
+ 	unsigned long flags;
++	u32 bitmap;
++	u8 cr;
+ 
+ 	spin_lock_irqsave(&adapter->int_lock, flags);
+ 	sdio_ireg = adapter->int_status;
+@@ -1209,12 +1295,60 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 	if (!sdio_ireg)
+ 		return ret;
+ 
++	/* Following interrupt is only for SDIO new mode */
++	if (sdio_ireg & DN_LD_CMD_PORT_HOST_INT_STATUS && adapter->cmd_sent)
++		adapter->cmd_sent = false;
++
++	/* Following interrupt is only for SDIO new mode */
++	if (sdio_ireg & UP_LD_CMD_PORT_HOST_INT_STATUS) {
++		u32 pkt_type;
++
++		/* read the len of control packet */
++		rx_len = card->mp_regs[CMD_RD_LEN_1] << 8;
++		rx_len |= (u16) card->mp_regs[CMD_RD_LEN_0];
++		rx_blocks = DIV_ROUND_UP(rx_len, MWIFIEX_SDIO_BLOCK_SIZE);
++		if (rx_len <= INTF_HEADER_LEN ||
++		    (rx_blocks * MWIFIEX_SDIO_BLOCK_SIZE) >
++		     MWIFIEX_RX_DATA_BUF_SIZE)
++			return -1;
++		rx_len = (u16) (rx_blocks * MWIFIEX_SDIO_BLOCK_SIZE);
++
++		skb = dev_alloc_skb(rx_len);
++		if (!skb)
++			return -1;
++
++		skb_put(skb, rx_len);
++
++		if (mwifiex_sdio_card_to_host(adapter, &pkt_type, skb->data,
++					      skb->len, adapter->ioport |
++							CMD_PORT_SLCT)) {
++			dev_err(adapter->dev,
++				"%s: failed to card_to_host", __func__);
++			dev_kfree_skb_any(skb);
++			goto term_cmd;
++		}
++
++		if ((pkt_type != MWIFIEX_TYPE_CMD) &&
++		    (pkt_type != MWIFIEX_TYPE_EVENT))
++			dev_err(adapter->dev,
++				"%s:Received wrong packet on cmd port",
++				__func__);
++
++		mwifiex_decode_rx_packet(adapter, skb, pkt_type);
++	}
++
+ 	if (sdio_ireg & DN_LD_HOST_INT_STATUS) {
+-		card->mp_wr_bitmap =
+-			((u32) card->mp_regs[reg->wr_bitmap_u]) << 8;
+-		card->mp_wr_bitmap |=
+-			(u32) card->mp_regs[reg->wr_bitmap_l];
+-		dev_dbg(adapter->dev, "int: DNLD: wr_bitmap=0x%08x\n",
++		bitmap = (u32) card->mp_regs[reg->wr_bitmap_l];
++		bitmap |= ((u32) card->mp_regs[reg->wr_bitmap_u]) << 8;
++		if (card->supports_sdio_new_mode) {
++			bitmap |=
++				((u32) card->mp_regs[reg->wr_bitmap_1l]) << 16;
++			bitmap |=
++				((u32) card->mp_regs[reg->wr_bitmap_1u]) << 24;
++		}
++		card->mp_wr_bitmap = bitmap;
++
++		dev_dbg(adapter->dev, "int: DNLD: wr_bitmap=0x%x\n",
+ 			card->mp_wr_bitmap);
+ 		if (adapter->data_sent &&
+ 		    (card->mp_wr_bitmap & card->mp_data_port_mask)) {
+@@ -1227,7 +1361,7 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 	/* As firmware will not generate download ready interrupt if the port
+ 	   updated is command port only, cmd_sent should be done for any SDIO
+ 	   interrupt. */
+-	if (adapter->cmd_sent) {
++	if (card->has_control_mask && adapter->cmd_sent) {
+ 		/* Check if firmware has attach buffer at command port and
+ 		   update just that in wr_bit_map. */
+ 		card->mp_wr_bitmap |=
+@@ -1239,10 +1373,16 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 	dev_dbg(adapter->dev, "info: cmd_sent=%d data_sent=%d\n",
+ 		adapter->cmd_sent, adapter->data_sent);
+ 	if (sdio_ireg & UP_LD_HOST_INT_STATUS) {
+-		card->mp_rd_bitmap =
+-			((u32) card->mp_regs[reg->rd_bitmap_u]) << 8;
+-		card->mp_rd_bitmap |= (u32) card->mp_regs[reg->rd_bitmap_l];
+-		dev_dbg(adapter->dev, "int: UPLD: rd_bitmap=0x%08x\n",
++		bitmap = (u32) card->mp_regs[reg->rd_bitmap_l];
++		bitmap |= ((u32) card->mp_regs[reg->rd_bitmap_u]) << 8;
++		if (card->supports_sdio_new_mode) {
++			bitmap |=
++				((u32) card->mp_regs[reg->rd_bitmap_1l]) << 16;
++			bitmap |=
++				((u32) card->mp_regs[reg->rd_bitmap_1u]) << 24;
++		}
++		card->mp_rd_bitmap = bitmap;
++		dev_dbg(adapter->dev, "int: UPLD: rd_bitmap=0x%x\n",
+ 			card->mp_rd_bitmap);
+ 
+ 		while (true) {
+@@ -1285,37 +1425,33 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+ 
+ 			if (mwifiex_sdio_card_to_host_mp_aggr(adapter, skb,
+ 							      port)) {
+-				u8 cr = 0;
+-
+ 				dev_err(adapter->dev, "card_to_host_mpa failed:"
+ 					" int status=%#x\n", sdio_ireg);
+-				if (mwifiex_read_reg(adapter,
+-						     CONFIGURATION_REG, &cr))
+-					dev_err(adapter->dev,
+-						"read CFG reg failed\n");
+-
+-				dev_dbg(adapter->dev,
+-					"info: CFG reg val = %d\n", cr);
+-				if (mwifiex_write_reg(adapter,
+-						      CONFIGURATION_REG,
+-						      (cr | 0x04)))
+-					dev_err(adapter->dev,
+-						"write CFG reg failed\n");
+-
+-				dev_dbg(adapter->dev, "info: write success\n");
+-				if (mwifiex_read_reg(adapter,
+-						     CONFIGURATION_REG, &cr))
+-					dev_err(adapter->dev,
+-						"read CFG reg failed\n");
+-
+-				dev_dbg(adapter->dev,
+-					"info: CFG reg val =%x\n", cr);
+-				return -1;
++				goto term_cmd;
+ 			}
+ 		}
+ 	}
+ 
+ 	return 0;
++
++term_cmd:
++	/* terminate cmd */
++	if (mwifiex_read_reg(adapter, CONFIGURATION_REG, &cr))
++		dev_err(adapter->dev, "read CFG reg failed\n");
++	else
++		dev_dbg(adapter->dev, "info: CFG reg val = %d\n", cr);
++
++	if (mwifiex_write_reg(adapter, CONFIGURATION_REG, (cr | 0x04)))
++		dev_err(adapter->dev, "write CFG reg failed\n");
++	else
++		dev_dbg(adapter->dev, "info: write success\n");
++
++	if (mwifiex_read_reg(adapter, CONFIGURATION_REG, &cr))
++		dev_err(adapter->dev, "read CFG reg failed\n");
++	else
++		dev_dbg(adapter->dev, "info: CFG reg val =%x\n", cr);
++
++	return -1;
+ }
+ 
+ /*
+@@ -1344,7 +1480,9 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 	s32 f_postcopy_cur_buf = 0;
+ 	u32 mport;
+ 
+-	if ((!card->mpa_tx.enabled) || (port == CTRL_PORT)) {
++	if (!card->mpa_tx.enabled ||
++	    (card->has_control_mask && (port == CTRL_PORT)) ||
++	    (card->supports_sdio_new_mode && (port == CMD_PORT_SLCT))) {
+ 		dev_dbg(adapter->dev, "info: %s: tx aggregation disabled\n",
+ 			__func__);
+ 
+@@ -1419,8 +1557,26 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
+ 		dev_dbg(adapter->dev, "data: %s: send aggr buffer: %d %d\n",
+ 			__func__,
+ 				card->mpa_tx.start_port, card->mpa_tx.ports);
+-		mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
+-			 (card->mpa_tx.ports << 4)) + card->mpa_tx.start_port;
++		if (card->supports_sdio_new_mode) {
++			u32 port_count;
++			int i;
++
++			for (i = 0, port_count = 0; i < card->max_ports; i++)
++				if (card->mpa_tx.ports & BIT(i))
++					port_count++;
++
++			/* Writing data from "start_port + 0" to "start_port +
++			 * port_count -1", so decrease the count by 1
++			 */
++			port_count--;
++			mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
++				 (port_count << 8)) + card->mpa_tx.start_port;
++		} else {
++			mport = (adapter->ioport | SDIO_MPA_ADDR_BASE |
++				 (card->mpa_tx.ports << 4)) +
++				 card->mpa_tx.start_port;
++		}
++
+ 		ret = mwifiex_write_data_to_card(adapter, card->mpa_tx.buf,
+ 						 card->mpa_tx.buf_len, mport);
+ 
+@@ -1493,6 +1649,9 @@ static int mwifiex_sdio_host_to_card(struct mwifiex_adapter *adapter,
+ 		    pkt_len > MWIFIEX_UPLD_SIZE)
+ 			dev_err(adapter->dev, "%s: payload=%p, nb=%d\n",
+ 				__func__, payload, pkt_len);
++
++		if (card->supports_sdio_new_mode)
++			port = CMD_PORT_SLCT;
+ 	}
+ 
+ 	/* Transfer data to card */
+@@ -1748,8 +1907,11 @@ mwifiex_update_mp_end_port(struct mwifiex_adapter *adapter, u16 port)
+ 
+ 	card->mp_data_port_mask = reg->data_port_mask;
+ 
+-	for (i = 1; i <= card->max_ports - card->mp_end_port; i++)
+-		card->mp_data_port_mask &= ~(1 << (card->max_ports - i));
++	if (reg->start_wr_port) {
++		for (i = 1; i <= card->max_ports - card->mp_end_port; i++)
++			card->mp_data_port_mask &=
++					~(1 << (card->max_ports - i));
++	}
+ 
+ 	card->curr_wr_port = reg->start_wr_port;
+ 
+@@ -1857,3 +2019,4 @@ MODULE_LICENSE("GPL v2");
+ MODULE_FIRMWARE(SD8786_DEFAULT_FW_NAME);
+ MODULE_FIRMWARE(SD8787_DEFAULT_FW_NAME);
+ MODULE_FIRMWARE(SD8797_DEFAULT_FW_NAME);
++MODULE_FIRMWARE(SD8897_DEFAULT_FW_NAME);
+diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
+index c2ee415c..8e6bf7f 100644
+--- a/drivers/net/wireless/mwifiex/sdio.h
++++ b/drivers/net/wireless/mwifiex/sdio.h
+@@ -32,6 +32,7 @@
+ #define SD8786_DEFAULT_FW_NAME "mrvl/sd8786_uapsta.bin"
+ #define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin"
+ #define SD8797_DEFAULT_FW_NAME "mrvl/sd8797_uapsta.bin"
++#define SD8897_DEFAULT_FW_NAME "mrvl/sd8897_uapsta.bin"
+ 
+ #define BLOCK_MODE	1
+ #define BYTE_MODE	0
+@@ -46,6 +47,23 @@
+ #define CTRL_PORT			0
+ #define CTRL_PORT_MASK			0x0001
+ 
++#define CMD_PORT_UPLD_INT_MASK		(0x1U<<6)
++#define CMD_PORT_DNLD_INT_MASK		(0x1U<<7)
++#define HOST_TERM_CMD53			(0x1U << 2)
++#define REG_PORT			0
++#define MEM_PORT			0x10000
++#define CMD_RD_LEN_0			0xB4
++#define CMD_RD_LEN_1			0xB5
++#define CARD_CONFIG_2_1_REG             0xCD
++#define CMD53_NEW_MODE			(0x1U << 0)
++#define CMD_CONFIG_0			0xB8
++#define CMD_PORT_RD_LEN_EN		(0x1U << 2)
++#define CMD_CONFIG_1			0xB9
++#define CMD_PORT_AUTO_EN		(0x1U << 0)
++#define CMD_PORT_SLCT			0x8000
++#define UP_LD_CMD_PORT_HOST_INT_STATUS	(0x40U)
++#define DN_LD_CMD_PORT_HOST_INT_STATUS	(0x80U)
++
+ #define SDIO_MP_TX_AGGR_DEF_BUF_SIZE        (8192)	/* 8K */
+ 
+ /* Multi port RX aggregation buffer size */
+@@ -79,6 +97,7 @@
+ #define UP_LD_HOST_INT_MASK		(0x1U)
+ /* Host Control Registers : Download host interrupt mask */
+ #define DN_LD_HOST_INT_MASK		(0x2U)
++
+ /* Disable Host interrupt mask */
+ #define	HOST_INT_DISABLE		0xff
+ 
+@@ -247,8 +266,12 @@ struct mwifiex_sdio_card_reg {
+ 	u8 max_mp_regs;
+ 	u8 rd_bitmap_l;
+ 	u8 rd_bitmap_u;
++	u8 rd_bitmap_1l;
++	u8 rd_bitmap_1u;
+ 	u8 wr_bitmap_l;
+ 	u8 wr_bitmap_u;
++	u8 wr_bitmap_1l;
++	u8 wr_bitmap_1u;
+ 	u8 rd_len_p0_l;
+ 	u8 rd_len_p0_u;
+ 	u8 card_misc_cfg_reg;
+@@ -262,6 +285,8 @@ struct sdio_mmc_card {
+ 	const struct mwifiex_sdio_card_reg *reg;
+ 	u8 max_ports;
+ 	u8 mp_agg_pkt_limit;
++	bool supports_sdio_new_mode;
++	bool has_control_mask;
+ 
+ 	u32 mp_rd_bitmap;
+ 	u32 mp_wr_bitmap;
+@@ -283,6 +308,8 @@ struct mwifiex_sdio_device {
+ 	const struct mwifiex_sdio_card_reg *reg;
+ 	u8 max_ports;
+ 	u8 mp_agg_pkt_limit;
++	bool supports_sdio_new_mode;
++	bool has_control_mask;
+ };
+ 
+ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = {
+@@ -306,11 +333,39 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = {
+ 	.card_misc_cfg_reg = 0x6c,
+ };
+ 
++static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8897 = {
++	.start_rd_port = 0,
++	.start_wr_port = 0,
++	.base_0_reg = 0x60,
++	.base_1_reg = 0x61,
++	.poll_reg = 0x50,
++	.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK |
++			CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK,
++	.status_reg_0 = 0xc0,
++	.status_reg_1 = 0xc1,
++	.sdio_int_mask = 0xff,
++	.data_port_mask = 0xffffffff,
++	.max_mp_regs = 184,
++	.rd_bitmap_l = 0x04,
++	.rd_bitmap_u = 0x05,
++	.rd_bitmap_1l = 0x06,
++	.rd_bitmap_1u = 0x07,
++	.wr_bitmap_l = 0x08,
++	.wr_bitmap_u = 0x09,
++	.wr_bitmap_1l = 0x0a,
++	.wr_bitmap_1u = 0x0b,
++	.rd_len_p0_l = 0x0c,
++	.rd_len_p0_u = 0x0d,
++	.card_misc_cfg_reg = 0xcc,
++};
++
+ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = {
+ 	.firmware = SD8786_DEFAULT_FW_NAME,
+ 	.reg = &mwifiex_reg_sd87xx,
+ 	.max_ports = 16,
+ 	.mp_agg_pkt_limit = 8,
++	.supports_sdio_new_mode = false,
++	.has_control_mask = true,
+ };
+ 
+ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
+@@ -318,6 +373,8 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
+ 	.reg = &mwifiex_reg_sd87xx,
+ 	.max_ports = 16,
+ 	.mp_agg_pkt_limit = 8,
++	.supports_sdio_new_mode = false,
++	.has_control_mask = true,
+ };
+ 
+ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
+@@ -325,6 +382,17 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
+ 	.reg = &mwifiex_reg_sd87xx,
+ 	.max_ports = 16,
+ 	.mp_agg_pkt_limit = 8,
++	.supports_sdio_new_mode = false,
++	.has_control_mask = true,
++};
++
++static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
++	.firmware = SD8897_DEFAULT_FW_NAME,
++	.reg = &mwifiex_reg_sd8897,
++	.max_ports = 32,
++	.mp_agg_pkt_limit = 16,
++	.supports_sdio_new_mode = true,
++	.has_control_mask = false,
+ };
+ 
+ /*
+@@ -353,13 +421,23 @@ mp_rx_aggr_port_limit_reached(struct sdio_mmc_card *card)
+ 	u8 tmp;
+ 
+ 	if (card->curr_rd_port < card->mpa_rx.start_port) {
+-		tmp = card->mp_agg_pkt_limit;
++		if (card->supports_sdio_new_mode)
++			tmp = card->mp_end_port >> 1;
++		else
++			tmp = card->mp_agg_pkt_limit;
+ 
+ 		if (((card->max_ports - card->mpa_rx.start_port) +
+ 		    card->curr_rd_port) >= tmp)
+ 			return true;
+ 	}
+ 
++	if (!card->supports_sdio_new_mode)
++		return false;
++
++	if ((card->curr_rd_port - card->mpa_rx.start_port) >=
++	    (card->mp_end_port >> 1))
++		return true;
++
+ 	return false;
+ }
+ 
+@@ -369,13 +447,23 @@ mp_tx_aggr_port_limit_reached(struct sdio_mmc_card *card)
+ 	u16 tmp;
+ 
+ 	if (card->curr_wr_port < card->mpa_tx.start_port) {
+-		tmp = card->mp_agg_pkt_limit;
++		if (card->supports_sdio_new_mode)
++			tmp = card->mp_end_port >> 1;
++		else
++			tmp = card->mp_agg_pkt_limit;
+ 
+ 		if (((card->max_ports - card->mpa_tx.start_port) +
+ 		    card->curr_wr_port) >= tmp)
+ 			return true;
+ 	}
+ 
++	if (!card->supports_sdio_new_mode)
++		return false;
++
++	if ((card->curr_wr_port - card->mpa_tx.start_port) >=
++	    (card->mp_end_port >> 1))
++		return true;
++
+ 	return false;
+ }
+ 
+@@ -388,11 +476,14 @@ static inline void mp_rx_aggr_setup(struct sdio_mmc_card *card,
+ 	if (!card->mpa_rx.pkt_cnt)
+ 		card->mpa_rx.start_port = port;
+ 
+-	if (card->mpa_rx.start_port <= port)
+-		card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt);
+-	else
+-		card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt + 1);
+-
++	if (card->supports_sdio_new_mode) {
++		card->mpa_rx.ports |= (1 << port);
++	} else {
++		if (card->mpa_rx.start_port <= port)
++			card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt);
++		else
++			card->mpa_rx.ports |= 1 << (card->mpa_rx.pkt_cnt + 1);
++	}
+ 	card->mpa_rx.skb_arr[card->mpa_rx.pkt_cnt] = skb;
+ 	card->mpa_rx.len_arr[card->mpa_rx.pkt_cnt] = skb->len;
+ 	card->mpa_rx.pkt_cnt++;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0042-mtd-m25p80-add-support-for-m25px16.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0042-mtd-m25p80-add-support-for-m25px16.patch
new file mode 100644
index 0000000..8082427
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0042-mtd-m25p80-add-support-for-m25px16.patch
@@ -0,0 +1,29 @@
+From 1a963e443f127b2234c31b5597e922d087494d15 Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Tue, 29 Oct 2013 11:30:39 +0200
+Subject: mtd: m25p80: add support for m25px16
+
+Although the m25px16 spi flash chip is JEDEC complient and can be used
+with the m25p80 driver, the support for it was missing.
+Add support for the m25px16 spi flash chip.
+
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ drivers/mtd/devices/m25p80.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
+index 2f3d2a5..364d034 100644
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -824,6 +824,7 @@ static const struct spi_device_id m25p_ids[] = {
+ 	{ "m25pe80", INFO(0x208014,  0, 64 * 1024, 16,       0) },
+ 	{ "m25pe16", INFO(0x208015,  0, 64 * 1024, 32, SECT_4K) },
+ 
++	{ "m25px16",    INFO(0x207115,  0, 64 * 1024, 32, SECT_4K) },
+ 	{ "m25px32",    INFO(0x207116,  0, 64 * 1024, 64, SECT_4K) },
+ 	{ "m25px32-s0", INFO(0x207316,  0, 64 * 1024, 64, SECT_4K) },
+ 	{ "m25px32-s1", INFO(0x206316,  0, 64 * 1024, 64, SECT_4K) },
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0043-ARM-i.MX6-dts-change-issd-gpio-order.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0043-ARM-i.MX6-dts-change-issd-gpio-order.patch
new file mode 100644
index 0000000..12d532d
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0043-ARM-i.MX6-dts-change-issd-gpio-order.patch
@@ -0,0 +1,67 @@
+From a06f0d25ab5ad9bf4f2d436b2bb03c48ef28938a Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 15 Jan 2015 13:52:37 +0200
+Subject: ARM: i.MX6: dts: change issd gpio order
+
+Change the order in which GPIOs are toggled in SATA init sequence to
+accomodate both SanDisk and Phison SSDs.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   23 ++++++++++++-----------
+ 1 file changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 12eed61..dd91190 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -82,6 +82,16 @@
+ 			startup-delay-us = <10000>;
+ 		};
+ 
++		reg_sata_ldo_en: sata_ldo_en {
++			compatible = "regulator-fixed";
++			regulator-name = "cm_fx6_sata_ldo_en";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio2 16 0>;
++			startup-delay-us = <100>;
++			enable-active-high;
++		};
++
+ 		reg_sata_phy_slp: sata_phy_slp {
+ 			compatible = "regulator-fixed";
+ 			regulator-name = "cm_fx6_sata_phy_slp";
+@@ -90,6 +100,7 @@
+ 			gpio = <&gpio3 23 0>;
+ 			startup-delay-us = <100>;
+ 			enable-active-high;
++			vin-supply = <&reg_sata_ldo_en>;
+ 		};
+ 
+ 		reg_sata_nrstdly: sata_nrstdly {
+@@ -133,20 +144,10 @@
+ 			gpio = <&gpio5 2 0>;
+ 			startup-delay-us = <100>;
+ 			enable-active-high;
++			regulator-boot-on;
+ 			vin-supply = <&reg_sata_nstandby1>;
+ 		};
+ 
+-		reg_sata_ldo_en: sata_ldo_en {
+-			compatible = "regulator-fixed";
+-			regulator-name = "cm_fx6_sata_ldo_en";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio2 16 0>;
+-			startup-delay-us = <100>;
+-			enable-active-high;
+-			regulator-boot-on;
+-			vin-supply = <&reg_sata_nstandby2>;
+-		};
+ 	};
+ 
+ 	aliases {
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0044-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0044-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch
new file mode 100644
index 0000000..9019a25
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0044-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch
@@ -0,0 +1,30 @@
+From ca17b6f5a91364160a0bd0a38cf2f5908ca133dc Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 27 Jan 2015 15:54:24 +0200
+Subject: ARM: i.MX6: dts: add missing WiFi/BT pinmuxes
+
+Set a correct mux mode for both:
+WLAN_BT_nPD and WLAN_BT_nRESET.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index dd91190..3b1a046 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -239,6 +239,9 @@
+ 				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
+ 				/* POWER_BUTTON */
+ 				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
++				/* WIFI_PWR_RST */
++				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x80000000
++				MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000
+ 			>;
+ 		};
+ 	};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0045-Bluetooth-Use-devname-vhci-module-alias-for-virtual-.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0045-Bluetooth-Use-devname-vhci-module-alias-for-virtual-.patch
new file mode 100644
index 0000000..ac52380
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0045-Bluetooth-Use-devname-vhci-module-alias-for-virtual-.patch
@@ -0,0 +1,26 @@
+From 12aaa3c0903d8b2d15c696b112290ddb064602dd Mon Sep 17 00:00:00 2001
+From: Marcel Holtmann <marcel at holtmann.org>
+Date: Mon, 26 Aug 2013 22:02:38 -0700
+Subject: Bluetooth: Use devname:vhci module alias for virtual HCI driver
+
+To allow creating /dev/vhci device node, add the proper module alias for
+this driver.
+
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
+---
+ drivers/bluetooth/hci_vhci.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
+index d8b7aed..a1ea5b1 100644
+--- a/drivers/bluetooth/hci_vhci.c
++++ b/drivers/bluetooth/hci_vhci.c
+@@ -309,3 +309,4 @@ MODULE_AUTHOR("Marcel Holtmann <marcel at holtmann.org>");
+ MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION);
+ MODULE_VERSION(VERSION);
+ MODULE_LICENSE("GPL");
++MODULE_ALIAS("devname:vhci");
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0046-Bluetooth-Add-support-creating-virtual-AMP-controlle.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0046-Bluetooth-Add-support-creating-virtual-AMP-controlle.patch
new file mode 100644
index 0000000..e2a48fc
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0046-Bluetooth-Add-support-creating-virtual-AMP-controlle.patch
@@ -0,0 +1,319 @@
+From dd46e78b6aef8ff622e6954141692139e1e0c304 Mon Sep 17 00:00:00 2001
+From: Marcel Holtmann <marcel at holtmann.org>
+Date: Mon, 2 Sep 2013 10:41:39 -0700
+Subject: Bluetooth: Add support creating virtual AMP controllers
+
+So far the only option to create a virtual AMP controller was by
+setting a module parameter for the hci_vhci driver. This patch adds
+the functionality to define inline to create either a BR/EDR or an
+AMP controller.
+
+In addition the client will be informed which HCI controller index
+it got assigned. That is especially useful for automated end-to-end
+testing.
+
+To keep backwards compatibility with existing userspace, the command
+for creating a controller type needs to be send right after opening
+the device node. If the command is not send, it defaults back to
+automatically creating a BR/EDR controller.
+
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
+---
+ drivers/bluetooth/hci_vhci.c |  169 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 123 insertions(+), 46 deletions(-)
+
+diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
+index a1ea5b1..c04a3e6 100644
+--- a/drivers/bluetooth/hci_vhci.c
++++ b/drivers/bluetooth/hci_vhci.c
+@@ -24,6 +24,7 @@
+  */
+ 
+ #include <linux/module.h>
++#include <asm/unaligned.h>
+ 
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+@@ -39,17 +40,17 @@
+ #include <net/bluetooth/bluetooth.h>
+ #include <net/bluetooth/hci_core.h>
+ 
+-#define VERSION "1.3"
++#define VERSION "1.4"
+ 
+ static bool amp;
+ 
+ struct vhci_data {
+ 	struct hci_dev *hdev;
+ 
+-	unsigned long flags;
+-
+ 	wait_queue_head_t read_wait;
+ 	struct sk_buff_head readq;
++
++	struct delayed_work open_timeout;
+ };
+ 
+ static int vhci_open_dev(struct hci_dev *hdev)
+@@ -99,16 +100,62 @@ static int vhci_send_frame(struct sk_buff *skb)
+ 	skb_queue_tail(&data->readq, skb);
+ 
+ 	wake_up_interruptible(&data->read_wait);
++	return 0;
++}
++
++static int vhci_create_device(struct vhci_data *data, __u8 dev_type)
++{
++	struct hci_dev *hdev;
++	struct sk_buff *skb;
++
++	skb = bt_skb_alloc(4, GFP_KERNEL);
++	if (!skb)
++		return -ENOMEM;
++
++	hdev = hci_alloc_dev();
++	if (!hdev) {
++		kfree_skb(skb);
++		return -ENOMEM;
++	}
++
++	data->hdev = hdev;
++
++	hdev->bus = HCI_VIRTUAL;
++	hdev->dev_type = dev_type;
++	hci_set_drvdata(hdev, data);
++
++	hdev->open  = vhci_open_dev;
++	hdev->close = vhci_close_dev;
++	hdev->flush = vhci_flush;
++	hdev->send  = vhci_send_frame;
+ 
++	if (hci_register_dev(hdev) < 0) {
++		BT_ERR("Can't register HCI device");
++		hci_free_dev(hdev);
++		data->hdev = NULL;
++		kfree_skb(skb);
++		return -EBUSY;
++	}
++
++	bt_cb(skb)->pkt_type = HCI_VENDOR_PKT;
++
++	*skb_put(skb, 1) = 0xff;
++	*skb_put(skb, 1) = dev_type;
++	put_unaligned_le16(hdev->id, skb_put(skb, 2));
++	skb_queue_tail(&data->readq, skb);
++
++	wake_up_interruptible(&data->read_wait);
+ 	return 0;
+ }
+ 
+ static inline ssize_t vhci_get_user(struct vhci_data *data,
+-					const char __user *buf, size_t count)
++				    const char __user *buf, size_t count)
+ {
+ 	struct sk_buff *skb;
++	__u8 pkt_type, dev_type;
++	int ret;
+ 
+-	if (count > HCI_MAX_FRAME_SIZE)
++	if (count < 2 || count > HCI_MAX_FRAME_SIZE)
+ 		return -EINVAL;
+ 
+ 	skb = bt_skb_alloc(count, GFP_KERNEL);
+@@ -120,27 +167,70 @@ static inline ssize_t vhci_get_user(struct vhci_data *data,
+ 		return -EFAULT;
+ 	}
+ 
+-	skb->dev = (void *) data->hdev;
+-	bt_cb(skb)->pkt_type = *((__u8 *) skb->data);
++	pkt_type = *((__u8 *) skb->data);
+ 	skb_pull(skb, 1);
+ 
+-	hci_recv_frame(skb);
++	switch (pkt_type) {
++	case HCI_EVENT_PKT:
++	case HCI_ACLDATA_PKT:
++	case HCI_SCODATA_PKT:
++		if (!data->hdev) {
++			kfree_skb(skb);
++			return -ENODEV;
++		}
++
++		skb->dev = (void *) data->hdev;
++		bt_cb(skb)->pkt_type = pkt_type;
++
++		ret = hci_recv_frame(skb);
++		break;
++
++	case HCI_VENDOR_PKT:
++		if (data->hdev) {
++			kfree_skb(skb);
++			return -EBADFD;
++		}
+ 
+-	return count;
++		cancel_delayed_work_sync(&data->open_timeout);
++
++		dev_type = *((__u8 *) skb->data);
++		skb_pull(skb, 1);
++
++		if (skb->len > 0) {
++			kfree_skb(skb);
++			return -EINVAL;
++		}
++
++		kfree_skb(skb);
++
++		if (dev_type != HCI_BREDR && dev_type != HCI_AMP)
++			return -EINVAL;
++
++		ret = vhci_create_device(data, dev_type);
++		break;
++
++	default:
++		kfree_skb(skb);
++		return -EINVAL;
++	}
++
++	return (ret < 0) ? ret : count;
+ }
+ 
+ static inline ssize_t vhci_put_user(struct vhci_data *data,
+-			struct sk_buff *skb, char __user *buf, int count)
++				    struct sk_buff *skb,
++				    char __user *buf, int count)
+ {
+ 	char __user *ptr = buf;
+-	int len, total = 0;
++	int len;
+ 
+ 	len = min_t(unsigned int, skb->len, count);
+ 
+ 	if (copy_to_user(ptr, skb->data, len))
+ 		return -EFAULT;
+ 
+-	total += len;
++	if (!data->hdev)
++		return len;
+ 
+ 	data->hdev->stat.byte_tx += len;
+ 
+@@ -148,21 +238,19 @@ static inline ssize_t vhci_put_user(struct vhci_data *data,
+ 	case HCI_COMMAND_PKT:
+ 		data->hdev->stat.cmd_tx++;
+ 		break;
+-
+ 	case HCI_ACLDATA_PKT:
+ 		data->hdev->stat.acl_tx++;
+ 		break;
+-
+ 	case HCI_SCODATA_PKT:
+ 		data->hdev->stat.sco_tx++;
+ 		break;
+ 	}
+ 
+-	return total;
++	return len;
+ }
+ 
+ static ssize_t vhci_read(struct file *file,
+-				char __user *buf, size_t count, loff_t *pos)
++			 char __user *buf, size_t count, loff_t *pos)
+ {
+ 	struct vhci_data *data = file->private_data;
+ 	struct sk_buff *skb;
+@@ -185,7 +273,7 @@ static ssize_t vhci_read(struct file *file,
+ 		}
+ 
+ 		ret = wait_event_interruptible(data->read_wait,
+-					!skb_queue_empty(&data->readq));
++					       !skb_queue_empty(&data->readq));
+ 		if (ret < 0)
+ 			break;
+ 	}
+@@ -194,7 +282,7 @@ static ssize_t vhci_read(struct file *file,
+ }
+ 
+ static ssize_t vhci_write(struct file *file,
+-			const char __user *buf, size_t count, loff_t *pos)
++			  const char __user *buf, size_t count, loff_t *pos)
+ {
+ 	struct vhci_data *data = file->private_data;
+ 
+@@ -213,10 +301,17 @@ static unsigned int vhci_poll(struct file *file, poll_table *wait)
+ 	return POLLOUT | POLLWRNORM;
+ }
+ 
++static void vhci_open_timeout(struct work_struct *work)
++{
++	struct vhci_data *data = container_of(work, struct vhci_data,
++					      open_timeout.work);
++
++	vhci_create_device(data, amp ? HCI_AMP : HCI_BREDR);
++}
++
+ static int vhci_open(struct inode *inode, struct file *file)
+ {
+ 	struct vhci_data *data;
+-	struct hci_dev *hdev;
+ 
+ 	data = kzalloc(sizeof(struct vhci_data), GFP_KERNEL);
+ 	if (!data)
+@@ -225,35 +320,13 @@ static int vhci_open(struct inode *inode, struct file *file)
+ 	skb_queue_head_init(&data->readq);
+ 	init_waitqueue_head(&data->read_wait);
+ 
+-	hdev = hci_alloc_dev();
+-	if (!hdev) {
+-		kfree(data);
+-		return -ENOMEM;
+-	}
+-
+-	data->hdev = hdev;
+-
+-	hdev->bus = HCI_VIRTUAL;
+-	hci_set_drvdata(hdev, data);
+-
+-	if (amp)
+-		hdev->dev_type = HCI_AMP;
+-
+-	hdev->open     = vhci_open_dev;
+-	hdev->close    = vhci_close_dev;
+-	hdev->flush    = vhci_flush;
+-	hdev->send     = vhci_send_frame;
+-
+-	if (hci_register_dev(hdev) < 0) {
+-		BT_ERR("Can't register HCI device");
+-		kfree(data);
+-		hci_free_dev(hdev);
+-		return -EBUSY;
+-	}
++	INIT_DELAYED_WORK(&data->open_timeout, vhci_open_timeout);
+ 
+ 	file->private_data = data;
+ 	nonseekable_open(inode, file);
+ 
++	schedule_delayed_work(&data->open_timeout, msecs_to_jiffies(1000));
++
+ 	return 0;
+ }
+ 
+@@ -262,8 +335,12 @@ static int vhci_release(struct inode *inode, struct file *file)
+ 	struct vhci_data *data = file->private_data;
+ 	struct hci_dev *hdev = data->hdev;
+ 
+-	hci_unregister_dev(hdev);
+-	hci_free_dev(hdev);
++	cancel_delayed_work_sync(&data->open_timeout);
++
++	if (hdev) {
++		hci_unregister_dev(hdev);
++		hci_free_dev(hdev);
++	}
+ 
+ 	file->private_data = NULL;
+ 	kfree(data);
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0047-Bluetooth-btmrvl-add-btmrvl_send_sync_cmd-function.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0047-Bluetooth-btmrvl-add-btmrvl_send_sync_cmd-function.patch
new file mode 100644
index 0000000..27ed697
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0047-Bluetooth-btmrvl-add-btmrvl_send_sync_cmd-function.patch
@@ -0,0 +1,223 @@
+From 07aac286db00fd30cffb0efb8d629c37b1e1ae83 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Tue, 1 Oct 2013 12:19:12 -0700
+Subject: Bluetooth: btmrvl: add btmrvl_send_sync_cmd() function
+
+Command preparation code is used multiple times. This patch
+separate out this common code and create btmrvl_send_sync_cmd()
+function.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_main.c |  129 +++++++++++++--------------------------
+ 1 file changed, 41 insertions(+), 88 deletions(-)
+
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index 9a9f518..d9d4229 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -57,8 +57,7 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
+ 		ocf = hci_opcode_ocf(opcode);
+ 		ogf = hci_opcode_ogf(opcode);
+ 
+-		if (ocf == BT_CMD_MODULE_CFG_REQ &&
+-					priv->btmrvl_dev.sendcmdflag) {
++		if (priv->btmrvl_dev.sendcmdflag) {
+ 			priv->btmrvl_dev.sendcmdflag = false;
+ 			priv->adapter->cmd_complete = true;
+ 			wake_up_interruptible(&priv->adapter->cmd_wait_q);
+@@ -116,7 +115,6 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
+ 			adapter->hs_state = HS_ACTIVATED;
+ 			if (adapter->psmode)
+ 				adapter->ps_state = PS_SLEEP;
+-			wake_up_interruptible(&adapter->cmd_wait_q);
+ 			BT_DBG("HS ACTIVATED!");
+ 		} else {
+ 			BT_DBG("HS Enable failed");
+@@ -168,11 +166,11 @@ exit:
+ }
+ EXPORT_SYMBOL_GPL(btmrvl_process_event);
+ 
+-int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
++static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no,
++				const void *param, u8 len)
+ {
+ 	struct sk_buff *skb;
+ 	struct btmrvl_cmd *cmd;
+-	int ret = 0;
+ 
+ 	skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
+ 	if (skb == NULL) {
+@@ -181,9 +179,11 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
+ 	}
+ 
+ 	cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
+-	cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_MODULE_CFG_REQ));
+-	cmd->length = 1;
+-	cmd->data[0] = subcmd;
++	cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, cmd_no));
++	cmd->length = len;
++
++	if (len)
++		memcpy(cmd->data, param, len);
+ 
+ 	bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
+ 
+@@ -194,19 +194,23 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
+ 
+ 	priv->adapter->cmd_complete = false;
+ 
+-	BT_DBG("Queue module cfg Command");
+-
+ 	wake_up_interruptible(&priv->main_thread.wait_q);
+ 
+ 	if (!wait_event_interruptible_timeout(priv->adapter->cmd_wait_q,
+ 				priv->adapter->cmd_complete,
+-				msecs_to_jiffies(WAIT_UNTIL_CMD_RESP))) {
+-		ret = -ETIMEDOUT;
+-		BT_ERR("module_cfg_cmd(%x): timeout: %d",
+-					subcmd, priv->btmrvl_dev.sendcmdflag);
+-	}
++				msecs_to_jiffies(WAIT_UNTIL_CMD_RESP)))
++		return -ETIMEDOUT;
+ 
+-	BT_DBG("module cfg Command done");
++	return 0;
++}
++
++int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
++{
++	int ret;
++
++	ret = btmrvl_send_sync_cmd(priv, BT_CMD_MODULE_CFG_REQ, &subcmd, 1);
++	if (ret)
++		BT_ERR("module_cfg_cmd(%x) failed\n", subcmd);
+ 
+ 	return ret;
+ }
+@@ -214,61 +218,36 @@ EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd);
+ 
+ int btmrvl_send_hscfg_cmd(struct btmrvl_private *priv)
+ {
+-	struct sk_buff *skb;
+-	struct btmrvl_cmd *cmd;
+-
+-	skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
+-	if (!skb) {
+-		BT_ERR("No free skb");
+-		return -ENOMEM;
+-	}
+-
+-	cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
+-	cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF,
+-						   BT_CMD_HOST_SLEEP_CONFIG));
+-	cmd->length = 2;
+-	cmd->data[0] = (priv->btmrvl_dev.gpio_gap & 0xff00) >> 8;
+-	cmd->data[1] = (u8) (priv->btmrvl_dev.gpio_gap & 0x00ff);
++	int ret;
++	u8 param[2];
+ 
+-	bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
++	param[0] = (priv->btmrvl_dev.gpio_gap & 0xff00) >> 8;
++	param[1] = (u8) (priv->btmrvl_dev.gpio_gap & 0x00ff);
+ 
+-	skb->dev = (void *) priv->btmrvl_dev.hcidev;
+-	skb_queue_head(&priv->adapter->tx_queue, skb);
++	BT_DBG("Sending HSCFG Command, gpio=0x%x, gap=0x%x",
++	       param[0], param[1]);
+ 
+-	BT_DBG("Queue HSCFG Command, gpio=0x%x, gap=0x%x", cmd->data[0],
+-	       cmd->data[1]);
++	ret = btmrvl_send_sync_cmd(priv, BT_CMD_HOST_SLEEP_CONFIG, param, 2);
++	if (ret)
++		BT_ERR("HSCFG command failed\n");
+ 
+-	return 0;
++	return ret;
+ }
+ EXPORT_SYMBOL_GPL(btmrvl_send_hscfg_cmd);
+ 
+ int btmrvl_enable_ps(struct btmrvl_private *priv)
+ {
+-	struct sk_buff *skb;
+-	struct btmrvl_cmd *cmd;
+-
+-	skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
+-	if (skb == NULL) {
+-		BT_ERR("No free skb");
+-		return -ENOMEM;
+-	}
+-
+-	cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
+-	cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF,
+-					BT_CMD_AUTO_SLEEP_MODE));
+-	cmd->length = 1;
++	int ret;
++	u8 param;
+ 
+ 	if (priv->btmrvl_dev.psmode)
+-		cmd->data[0] = BT_PS_ENABLE;
++		param = BT_PS_ENABLE;
+ 	else
+-		cmd->data[0] = BT_PS_DISABLE;
+-
+-	bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
+-
+-	skb->dev = (void *) priv->btmrvl_dev.hcidev;
+-	skb_queue_head(&priv->adapter->tx_queue, skb);
++		param = BT_PS_DISABLE;
+ 
+-	BT_DBG("Queue PSMODE Command:%d", cmd->data[0]);
++	ret = btmrvl_send_sync_cmd(priv, BT_CMD_AUTO_SLEEP_MODE, &param, 1);
++	if (ret)
++		BT_ERR("PSMODE command failed\n");
+ 
+ 	return 0;
+ }
+@@ -276,37 +255,11 @@ EXPORT_SYMBOL_GPL(btmrvl_enable_ps);
+ 
+ int btmrvl_enable_hs(struct btmrvl_private *priv)
+ {
+-	struct sk_buff *skb;
+-	struct btmrvl_cmd *cmd;
+-	int ret = 0;
+-
+-	skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
+-	if (skb == NULL) {
+-		BT_ERR("No free skb");
+-		return -ENOMEM;
+-	}
+-
+-	cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
+-	cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_HOST_SLEEP_ENABLE));
+-	cmd->length = 0;
+-
+-	bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
+-
+-	skb->dev = (void *) priv->btmrvl_dev.hcidev;
+-	skb_queue_head(&priv->adapter->tx_queue, skb);
+-
+-	BT_DBG("Queue hs enable Command");
+-
+-	wake_up_interruptible(&priv->main_thread.wait_q);
++	int ret;
+ 
+-	if (!wait_event_interruptible_timeout(priv->adapter->cmd_wait_q,
+-			priv->adapter->hs_state,
+-			msecs_to_jiffies(WAIT_UNTIL_HS_STATE_CHANGED))) {
+-		ret = -ETIMEDOUT;
+-		BT_ERR("timeout: %d, %d,%d", priv->adapter->hs_state,
+-						priv->adapter->ps_state,
+-						priv->adapter->wakeup_tries);
+-	}
++	ret = btmrvl_send_sync_cmd(priv, BT_CMD_HOST_SLEEP_ENABLE, NULL, 0);
++	if (ret)
++		BT_ERR("Host sleep enable command failed\n");
+ 
+ 	return ret;
+ }
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0048-Bluetooth-btmrvl-get-rid-of-struct-btmrvl_cmd.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0048-Bluetooth-btmrvl-get-rid-of-struct-btmrvl_cmd.patch
new file mode 100644
index 0000000..4d1f737
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0048-Bluetooth-btmrvl-get-rid-of-struct-btmrvl_cmd.patch
@@ -0,0 +1,67 @@
+From 04550801c5b9d48fc7c218f36d3c53d373f47435 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Tue, 1 Oct 2013 12:19:13 -0700
+Subject: Bluetooth: btmrvl: get rid of struct btmrvl_cmd
+
+Replace this proprietary structure with the standard one
+(struct hci_command_hdr).
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_drv.h  |    6 ------
+ drivers/bluetooth/btmrvl_main.c |   12 ++++++------
+ 2 files changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
+index 27068d1..42f7028 100644
+--- a/drivers/bluetooth/btmrvl_drv.h
++++ b/drivers/bluetooth/btmrvl_drv.h
+@@ -116,12 +116,6 @@ struct btmrvl_private {
+ #define PS_SLEEP			0x01
+ #define PS_AWAKE			0x00
+ 
+-struct btmrvl_cmd {
+-	__le16 ocf_ogf;
+-	u8 length;
+-	u8 data[4];
+-} __packed;
+-
+ struct btmrvl_event {
+ 	u8 ec;		/* event counter */
+ 	u8 length;
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index d9d4229..a4da7c8 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -170,20 +170,20 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no,
+ 				const void *param, u8 len)
+ {
+ 	struct sk_buff *skb;
+-	struct btmrvl_cmd *cmd;
++	struct hci_command_hdr *hdr;
+ 
+-	skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
++	skb = bt_skb_alloc(HCI_COMMAND_HDR_SIZE + len, GFP_ATOMIC);
+ 	if (skb == NULL) {
+ 		BT_ERR("No free skb");
+ 		return -ENOMEM;
+ 	}
+ 
+-	cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
+-	cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, cmd_no));
+-	cmd->length = len;
++	hdr = (struct hci_command_hdr *)skb_put(skb, HCI_COMMAND_HDR_SIZE);
++	hdr->opcode = cpu_to_le16(hci_opcode_pack(OGF, cmd_no));
++	hdr->plen = len;
+ 
+ 	if (len)
+-		memcpy(cmd->data, param, len);
++		memcpy(skb_put(skb, len), param, len);
+ 
+ 	bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0049-Bluetooth-btmrvl-add-setup-handler.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0049-Bluetooth-btmrvl-add-setup-handler.patch
new file mode 100644
index 0000000..bae7f09
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0049-Bluetooth-btmrvl-add-setup-handler.patch
@@ -0,0 +1,71 @@
+From e6b3456177695fc27f88f41b4b7bb9337625108f Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Tue, 1 Oct 2013 12:19:14 -0700
+Subject: Bluetooth: btmrvl: add setup handler
+
+Move initialization code to hdev's setup handler.
+
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_main.c |   18 ++++++++++++++++--
+ drivers/bluetooth/btmrvl_sdio.c |    6 ------
+ 2 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index a4da7c8..e0ae1f4 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -432,6 +432,21 @@ static int btmrvl_open(struct hci_dev *hdev)
+ 	return 0;
+ }
+ 
++static int btmrvl_setup(struct hci_dev *hdev)
++{
++	struct btmrvl_private *priv = hci_get_drvdata(hdev);
++
++	btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
++
++	priv->btmrvl_dev.psmode = 1;
++	btmrvl_enable_ps(priv);
++
++	priv->btmrvl_dev.gpio_gap = 0xffff;
++	btmrvl_send_hscfg_cmd(priv);
++
++	return 0;
++}
++
+ /*
+  * This function handles the event generated by firmware, rx data
+  * received from firmware, and tx data sent from kernel.
+@@ -525,8 +540,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
+ 	hdev->flush = btmrvl_flush;
+ 	hdev->send = btmrvl_send_frame;
+ 	hdev->ioctl = btmrvl_ioctl;
+-
+-	btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
++	hdev->setup = btmrvl_setup;
+ 
+ 	hdev->dev_type = priv->btmrvl_dev.dev_type;
+ 
+diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
+index 13693b7..9b9d6f89 100644
+--- a/drivers/bluetooth/btmrvl_sdio.c
++++ b/drivers/bluetooth/btmrvl_sdio.c
+@@ -1045,12 +1045,6 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
+ 		goto disable_host_int;
+ 	}
+ 
+-	priv->btmrvl_dev.psmode = 1;
+-	btmrvl_enable_ps(priv);
+-
+-	priv->btmrvl_dev.gpio_gap = 0xffff;
+-	btmrvl_send_hscfg_cmd(priv);
+-
+ 	return 0;
+ 
+ disable_host_int:
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0050-Bluetooth-btmrvl-add-calibration-data-download-suppo.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0050-Bluetooth-btmrvl-add-calibration-data-download-suppo.patch
new file mode 100644
index 0000000..ace1699
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0050-Bluetooth-btmrvl-add-calibration-data-download-suppo.patch
@@ -0,0 +1,287 @@
+From 3cbd0a1b055f476973ccc73c5325d559f6490f00 Mon Sep 17 00:00:00 2001
+From: Amitkumar Karwar <akarwar at marvell.com>
+Date: Tue, 1 Oct 2013 12:19:15 -0700
+Subject: Bluetooth: btmrvl: add calibration data download support
+
+A text file containing calibration data in hex format can
+be provided at following path:
+
+/lib/firmware/mrvl/sd8797_caldata.conf
+
+The data will be downloaded to firmware during initialization.
+
+Reviewed-by: Mike Frysinger <vapier at chromium.org>
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Hyuckjoo Lee <hyuckjoo.lee at samsung.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_drv.h  |    8 +++
+ drivers/bluetooth/btmrvl_main.c |  116 +++++++++++++++++++++++++++++++++++++++
+ drivers/bluetooth/btmrvl_sdio.c |    9 ++-
+ drivers/bluetooth/btmrvl_sdio.h |    2 +
+ 4 files changed, 134 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
+index 42f7028..f9d1833 100644
+--- a/drivers/bluetooth/btmrvl_drv.h
++++ b/drivers/bluetooth/btmrvl_drv.h
+@@ -23,6 +23,8 @@
+ #include <linux/bitops.h>
+ #include <linux/slab.h>
+ #include <net/bluetooth/bluetooth.h>
++#include <linux/ctype.h>
++#include <linux/firmware.h>
+ 
+ #define BTM_HEADER_LEN			4
+ #define BTM_UPLD_SIZE			2312
+@@ -41,6 +43,8 @@ struct btmrvl_thread {
+ struct btmrvl_device {
+ 	void *card;
+ 	struct hci_dev *hcidev;
++	struct device *dev;
++	const char *cal_data;
+ 
+ 	u8 dev_type;
+ 
+@@ -91,6 +95,7 @@ struct btmrvl_private {
+ #define BT_CMD_HOST_SLEEP_CONFIG	0x59
+ #define BT_CMD_HOST_SLEEP_ENABLE	0x5A
+ #define BT_CMD_MODULE_CFG_REQ		0x5B
++#define BT_CMD_LOAD_CONFIG_DATA		0x61
+ 
+ /* Sub-commands: Module Bringup/Shutdown Request/Response */
+ #define MODULE_BRINGUP_REQ		0xF1
+@@ -116,6 +121,9 @@ struct btmrvl_private {
+ #define PS_SLEEP			0x01
+ #define PS_AWAKE			0x00
+ 
++#define BT_CMD_DATA_SIZE		32
++#define BT_CAL_DATA_SIZE		28
++
+ struct btmrvl_event {
+ 	u8 ec;		/* event counter */
+ 	u8 length;
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index e0ae1f4..6e7bd4e 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -432,12 +432,128 @@ static int btmrvl_open(struct hci_dev *hdev)
+ 	return 0;
+ }
+ 
++/*
++ * This function parses provided calibration data input. It should contain
++ * hex bytes separated by space or new line character. Here is an example.
++ * 00 1C 01 37 FF FF FF FF 02 04 7F 01
++ * CE BA 00 00 00 2D C6 C0 00 00 00 00
++ * 00 F0 00 00
++ */
++static int btmrvl_parse_cal_cfg(const u8 *src, u32 len, u8 *dst, u32 dst_size)
++{
++	const u8 *s = src;
++	u8 *d = dst;
++	int ret;
++	u8 tmp[3];
++
++	tmp[2] = '\0';
++	while ((s - src) <= len - 2) {
++		if (isspace(*s)) {
++			s++;
++			continue;
++		}
++
++		if (isxdigit(*s)) {
++			if ((d - dst) >= dst_size) {
++				BT_ERR("calibration data file too big!!!");
++				return -EINVAL;
++			}
++
++			memcpy(tmp, s, 2);
++
++			ret = kstrtou8(tmp, 16, d++);
++			if (ret < 0)
++				return ret;
++
++			s += 2;
++		} else {
++			return -EINVAL;
++		}
++	}
++	if (d == dst)
++		return -EINVAL;
++
++	return 0;
++}
++
++static int btmrvl_load_cal_data(struct btmrvl_private *priv,
++				u8 *config_data)
++{
++	int i, ret;
++	u8 data[BT_CMD_DATA_SIZE];
++
++	data[0] = 0x00;
++	data[1] = 0x00;
++	data[2] = 0x00;
++	data[3] = BT_CMD_DATA_SIZE - 4;
++
++	/* Swap cal-data bytes. Each four bytes are swapped. Considering 4
++	 * byte SDIO header offset, mapping of input and output bytes will be
++	 * {3, 2, 1, 0} -> {0+4, 1+4, 2+4, 3+4},
++	 * {7, 6, 5, 4} -> {4+4, 5+4, 6+4, 7+4} */
++	for (i = 4; i < BT_CMD_DATA_SIZE; i++)
++		data[i] = config_data[(i / 4) * 8 - 1 - i];
++
++	print_hex_dump_bytes("Calibration data: ",
++			     DUMP_PREFIX_OFFSET, data, BT_CMD_DATA_SIZE);
++
++	ret = btmrvl_send_sync_cmd(priv, BT_CMD_LOAD_CONFIG_DATA, data,
++				   BT_CMD_DATA_SIZE);
++	if (ret)
++		BT_ERR("Failed to download caibration data\n");
++
++	return 0;
++}
++
++static int
++btmrvl_process_cal_cfg(struct btmrvl_private *priv, u8 *data, u32 size)
++{
++	u8 cal_data[BT_CAL_DATA_SIZE];
++	int ret;
++
++	ret = btmrvl_parse_cal_cfg(data, size, cal_data, sizeof(cal_data));
++	if (ret)
++		return ret;
++
++	ret = btmrvl_load_cal_data(priv, cal_data);
++	if (ret) {
++		BT_ERR("Fail to load calibrate data");
++		return ret;
++	}
++
++	return 0;
++}
++
++static int btmrvl_cal_data_config(struct btmrvl_private *priv)
++{
++	const struct firmware *cfg;
++	int ret;
++	const char *cal_data = priv->btmrvl_dev.cal_data;
++
++	if (!cal_data)
++		return 0;
++
++	ret = request_firmware(&cfg, cal_data, priv->btmrvl_dev.dev);
++	if (ret < 0) {
++		BT_DBG("Failed to get %s file, skipping cal data download",
++		       cal_data);
++		return 0;
++	}
++
++	ret = btmrvl_process_cal_cfg(priv, (u8 *)cfg->data, cfg->size);
++	release_firmware(cfg);
++	return ret;
++}
++
+ static int btmrvl_setup(struct hci_dev *hdev)
+ {
+ 	struct btmrvl_private *priv = hci_get_drvdata(hdev);
+ 
+ 	btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
+ 
++	if (btmrvl_cal_data_config(priv))
++		BT_ERR("Set cal data failed");
++
+ 	priv->btmrvl_dev.psmode = 1;
+ 	btmrvl_enable_ps(priv);
+ 
+diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
+index 9b9d6f89..cef87b0 100644
+--- a/drivers/bluetooth/btmrvl_sdio.c
++++ b/drivers/bluetooth/btmrvl_sdio.c
+@@ -18,7 +18,6 @@
+  * this warranty disclaimer.
+  **/
+ 
+-#include <linux/firmware.h>
+ #include <linux/slab.h>
+ 
+ #include <linux/mmc/sdio_ids.h>
+@@ -102,6 +101,7 @@ static const struct btmrvl_sdio_card_reg btmrvl_reg_88xx = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = {
+ 	.helper		= "mrvl/sd8688_helper.bin",
+ 	.firmware	= "mrvl/sd8688.bin",
++	.cal_data	= NULL,
+ 	.reg		= &btmrvl_reg_8688,
+ 	.sd_blksz_fw_dl	= 64,
+ };
+@@ -109,6 +109,7 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
+ 	.helper		= NULL,
+ 	.firmware	= "mrvl/sd8787_uapsta.bin",
++	.cal_data	= NULL,
+ 	.reg		= &btmrvl_reg_87xx,
+ 	.sd_blksz_fw_dl	= 256,
+ };
+@@ -116,6 +117,7 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
+ 	.helper		= NULL,
+ 	.firmware	= "mrvl/sd8797_uapsta.bin",
++	.cal_data	= "mrvl/sd8797_caldata.conf",
+ 	.reg		= &btmrvl_reg_87xx,
+ 	.sd_blksz_fw_dl	= 256,
+ };
+@@ -123,6 +125,7 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8897 = {
+ 	.helper		= NULL,
+ 	.firmware	= "mrvl/sd8897_uapsta.bin",
++	.cal_data	= NULL,
+ 	.reg		= &btmrvl_reg_88xx,
+ 	.sd_blksz_fw_dl	= 256,
+ };
+@@ -1005,6 +1008,7 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
+ 		struct btmrvl_sdio_device *data = (void *) id->driver_data;
+ 		card->helper = data->helper;
+ 		card->firmware = data->firmware;
++		card->cal_data = data->cal_data;
+ 		card->reg = data->reg;
+ 		card->sd_blksz_fw_dl = data->sd_blksz_fw_dl;
+ 	}
+@@ -1033,6 +1037,8 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
+ 	}
+ 
+ 	card->priv = priv;
++	priv->btmrvl_dev.dev = &card->func->dev;
++	priv->btmrvl_dev.cal_data = card->cal_data;
+ 
+ 	/* Initialize the interface specific function pointers */
+ 	priv->hw_host_to_card = btmrvl_sdio_host_to_card;
+@@ -1215,4 +1221,5 @@ MODULE_FIRMWARE("mrvl/sd8688_helper.bin");
+ MODULE_FIRMWARE("mrvl/sd8688.bin");
+ MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
+ MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
++MODULE_FIRMWARE("mrvl/sd8797_caldata.conf");
+ MODULE_FIRMWARE("mrvl/sd8897_uapsta.bin");
+diff --git a/drivers/bluetooth/btmrvl_sdio.h b/drivers/bluetooth/btmrvl_sdio.h
+index 43d35a6..6872d9e 100644
+--- a/drivers/bluetooth/btmrvl_sdio.h
++++ b/drivers/bluetooth/btmrvl_sdio.h
+@@ -85,6 +85,7 @@ struct btmrvl_sdio_card {
+ 	u32 ioport;
+ 	const char *helper;
+ 	const char *firmware;
++	const char *cal_data;
+ 	const struct btmrvl_sdio_card_reg *reg;
+ 	u16 sd_blksz_fw_dl;
+ 	u8 rx_unit;
+@@ -94,6 +95,7 @@ struct btmrvl_sdio_card {
+ struct btmrvl_sdio_device {
+ 	const char *helper;
+ 	const char *firmware;
++	const char *cal_data;
+ 	const struct btmrvl_sdio_card_reg *reg;
+ 	u16 sd_blksz_fw_dl;
+ };
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0051-Bluetooth-btmrvl-operate-on-16-bit-opcodes-instead-o.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0051-Bluetooth-btmrvl-operate-on-16-bit-opcodes-instead-o.patch
new file mode 100644
index 0000000..544c7d5
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0051-Bluetooth-btmrvl-operate-on-16-bit-opcodes-instead-o.patch
@@ -0,0 +1,146 @@
+From 0b2c54a738a088e6107c97c67dd2325d13b9acaa Mon Sep 17 00:00:00 2001
+From: Bing Zhao <bzhao at marvell.com>
+Date: Thu, 31 Oct 2013 15:08:31 -0700
+Subject: Bluetooth: btmrvl: operate on 16-bit opcodes instead of ogf/ocf
+
+Replace ogf/ocf and its packing with 16-bit opcodes.
+
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_drv.h  |   19 +++++++++++--------
+ drivers/bluetooth/btmrvl_main.c |   21 +++++++++------------
+ 2 files changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
+index f9d1833..e3b49c6 100644
+--- a/drivers/bluetooth/btmrvl_drv.h
++++ b/drivers/bluetooth/btmrvl_drv.h
+@@ -90,12 +90,12 @@ struct btmrvl_private {
+ 
+ #define MRVL_VENDOR_PKT			0xFE
+ 
+-/* Bluetooth commands  */
+-#define BT_CMD_AUTO_SLEEP_MODE		0x23
+-#define BT_CMD_HOST_SLEEP_CONFIG	0x59
+-#define BT_CMD_HOST_SLEEP_ENABLE	0x5A
+-#define BT_CMD_MODULE_CFG_REQ		0x5B
+-#define BT_CMD_LOAD_CONFIG_DATA		0x61
++/* Vendor specific Bluetooth commands */
++#define BT_CMD_AUTO_SLEEP_MODE		0xFC23
++#define BT_CMD_HOST_SLEEP_CONFIG	0xFC59
++#define BT_CMD_HOST_SLEEP_ENABLE	0xFC5A
++#define BT_CMD_MODULE_CFG_REQ		0xFC5B
++#define BT_CMD_LOAD_CONFIG_DATA		0xFC61
+ 
+ /* Sub-commands: Module Bringup/Shutdown Request/Response */
+ #define MODULE_BRINGUP_REQ		0xF1
+@@ -104,6 +104,11 @@ struct btmrvl_private {
+ 
+ #define MODULE_SHUTDOWN_REQ		0xF2
+ 
++/* Vendor specific Bluetooth events */
++#define BT_EVENT_AUTO_SLEEP_MODE	0x23
++#define BT_EVENT_HOST_SLEEP_CONFIG	0x59
++#define BT_EVENT_HOST_SLEEP_ENABLE	0x5A
++#define BT_EVENT_MODULE_CFG_REQ		0x5B
+ #define BT_EVENT_POWER_STATE		0x20
+ 
+ /* Bluetooth Power States */
+@@ -111,8 +116,6 @@ struct btmrvl_private {
+ #define BT_PS_DISABLE			0x03
+ #define BT_PS_SLEEP			0x01
+ 
+-#define OGF				0x3F
+-
+ /* Host Sleep states */
+ #define HS_ACTIVATED			0x01
+ #define HS_DEACTIVATED			0x00
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index 6e7bd4e..ffec74e 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -50,12 +50,10 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
+ 
+ 	if (hdr->evt == HCI_EV_CMD_COMPLETE) {
+ 		struct hci_ev_cmd_complete *ec;
+-		u16 opcode, ocf, ogf;
++		u16 opcode;
+ 
+ 		ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
+ 		opcode = __le16_to_cpu(ec->opcode);
+-		ocf = hci_opcode_ocf(opcode);
+-		ogf = hci_opcode_ogf(opcode);
+ 
+ 		if (priv->btmrvl_dev.sendcmdflag) {
+ 			priv->btmrvl_dev.sendcmdflag = false;
+@@ -63,9 +61,8 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
+ 			wake_up_interruptible(&priv->adapter->cmd_wait_q);
+ 		}
+ 
+-		if (ogf == OGF) {
+-			BT_DBG("vendor event skipped: ogf 0x%4.4x ocf 0x%4.4x",
+-			       ogf, ocf);
++		if (hci_opcode_ogf(opcode) == 0x3F) {
++			BT_DBG("vendor event skipped: opcode=%#4.4x", opcode);
+ 			kfree_skb(skb);
+ 			return false;
+ 		}
+@@ -89,7 +86,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
+ 	}
+ 
+ 	switch (event->data[0]) {
+-	case BT_CMD_AUTO_SLEEP_MODE:
++	case BT_EVENT_AUTO_SLEEP_MODE:
+ 		if (!event->data[2]) {
+ 			if (event->data[1] == BT_PS_ENABLE)
+ 				adapter->psmode = 1;
+@@ -102,7 +99,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
+ 		}
+ 		break;
+ 
+-	case BT_CMD_HOST_SLEEP_CONFIG:
++	case BT_EVENT_HOST_SLEEP_CONFIG:
+ 		if (!event->data[3])
+ 			BT_DBG("gpio=%x, gap=%x", event->data[1],
+ 							event->data[2]);
+@@ -110,7 +107,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
+ 			BT_DBG("HSCFG command failed");
+ 		break;
+ 
+-	case BT_CMD_HOST_SLEEP_ENABLE:
++	case BT_EVENT_HOST_SLEEP_ENABLE:
+ 		if (!event->data[1]) {
+ 			adapter->hs_state = HS_ACTIVATED;
+ 			if (adapter->psmode)
+@@ -121,7 +118,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
+ 		}
+ 		break;
+ 
+-	case BT_CMD_MODULE_CFG_REQ:
++	case BT_EVENT_MODULE_CFG_REQ:
+ 		if (priv->btmrvl_dev.sendcmdflag &&
+ 				event->data[1] == MODULE_BRINGUP_REQ) {
+ 			BT_DBG("EVENT:%s",
+@@ -166,7 +163,7 @@ exit:
+ }
+ EXPORT_SYMBOL_GPL(btmrvl_process_event);
+ 
+-static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no,
++static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 opcode,
+ 				const void *param, u8 len)
+ {
+ 	struct sk_buff *skb;
+@@ -179,7 +176,7 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no,
+ 	}
+ 
+ 	hdr = (struct hci_command_hdr *)skb_put(skb, HCI_COMMAND_HDR_SIZE);
+-	hdr->opcode = cpu_to_le16(hci_opcode_pack(OGF, cmd_no));
++	hdr->opcode = cpu_to_le16(opcode);
+ 	hdr->plen = len;
+ 
+ 	if (len)
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0052-Bluetooth-btmrvl-use-cal-data-from-device-tree-inste.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0052-Bluetooth-btmrvl-use-cal-data-from-device-tree-inste.patch
new file mode 100644
index 0000000..52e045a
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0052-Bluetooth-btmrvl-use-cal-data-from-device-tree-inste.patch
@@ -0,0 +1,282 @@
+From 1eca1c93f473cbcdf88b16d2b3a1880539b4ae4a Mon Sep 17 00:00:00 2001
+From: Bing Zhao <bzhao at marvell.com>
+Date: Fri, 1 Nov 2013 15:28:24 -0700
+Subject: Bluetooth: btmrvl: use cal-data from device-tree instead of conf
+ file
+
+Some ARM versions of Chromebook need to download a new calibration
+data from host driver to firmware. They do have EEPROM but still
+need a piece of new calibration data in test mode.
+
+The cal-data is platform dependent. It's simpler and more feasible
+to use device tree based cal-data instead of configuration file
+based cal-data.
+
+This patch remove configuration file based cal-data downloading
+and replace it using cal-data from device tree.
+
+When CONFIG_OF is not selected, or the specific property is not
+present in the device tree, the calibration downloading will not
+happen.
+
+Cc: Mike Frysinger <vapier at chromium.org>
+Cc: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Hyuckjoo Lee <hyuckjoo.lee at samsung.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_drv.h  |    4 --
+ drivers/bluetooth/btmrvl_main.c |   92 ++++++++-------------------------------
+ drivers/bluetooth/btmrvl_sdio.c |    9 +---
+ drivers/bluetooth/btmrvl_sdio.h |    2 -
+ 4 files changed, 18 insertions(+), 89 deletions(-)
+
+diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
+index e3b49c6..98187f0 100644
+--- a/drivers/bluetooth/btmrvl_drv.h
++++ b/drivers/bluetooth/btmrvl_drv.h
+@@ -23,8 +23,6 @@
+ #include <linux/bitops.h>
+ #include <linux/slab.h>
+ #include <net/bluetooth/bluetooth.h>
+-#include <linux/ctype.h>
+-#include <linux/firmware.h>
+ 
+ #define BTM_HEADER_LEN			4
+ #define BTM_UPLD_SIZE			2312
+@@ -43,8 +41,6 @@ struct btmrvl_thread {
+ struct btmrvl_device {
+ 	void *card;
+ 	struct hci_dev *hcidev;
+-	struct device *dev;
+-	const char *cal_data;
+ 
+ 	u8 dev_type;
+ 
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index ffec74e..17e6039 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -19,7 +19,7 @@
+  **/
+ 
+ #include <linux/module.h>
+-
++#include <linux/of.h>
+ #include <net/bluetooth/bluetooth.h>
+ #include <net/bluetooth/hci_core.h>
+ 
+@@ -429,52 +429,8 @@ static int btmrvl_open(struct hci_dev *hdev)
+ 	return 0;
+ }
+ 
+-/*
+- * This function parses provided calibration data input. It should contain
+- * hex bytes separated by space or new line character. Here is an example.
+- * 00 1C 01 37 FF FF FF FF 02 04 7F 01
+- * CE BA 00 00 00 2D C6 C0 00 00 00 00
+- * 00 F0 00 00
+- */
+-static int btmrvl_parse_cal_cfg(const u8 *src, u32 len, u8 *dst, u32 dst_size)
+-{
+-	const u8 *s = src;
+-	u8 *d = dst;
+-	int ret;
+-	u8 tmp[3];
+-
+-	tmp[2] = '\0';
+-	while ((s - src) <= len - 2) {
+-		if (isspace(*s)) {
+-			s++;
+-			continue;
+-		}
+-
+-		if (isxdigit(*s)) {
+-			if ((d - dst) >= dst_size) {
+-				BT_ERR("calibration data file too big!!!");
+-				return -EINVAL;
+-			}
+-
+-			memcpy(tmp, s, 2);
+-
+-			ret = kstrtou8(tmp, 16, d++);
+-			if (ret < 0)
+-				return ret;
+-
+-			s += 2;
+-		} else {
+-			return -EINVAL;
+-		}
+-	}
+-	if (d == dst)
+-		return -EINVAL;
+-
+-	return 0;
+-}
+-
+-static int btmrvl_load_cal_data(struct btmrvl_private *priv,
+-				u8 *config_data)
++static int btmrvl_download_cal_data(struct btmrvl_private *priv,
++				    u8 *config_data)
+ {
+ 	int i, ret;
+ 	u8 data[BT_CMD_DATA_SIZE];
+@@ -502,54 +458,40 @@ static int btmrvl_load_cal_data(struct btmrvl_private *priv,
+ 	return 0;
+ }
+ 
+-static int
+-btmrvl_process_cal_cfg(struct btmrvl_private *priv, u8 *data, u32 size)
++static int btmrvl_cal_data_dt(struct btmrvl_private *priv)
+ {
++	struct device_node *dt_node;
+ 	u8 cal_data[BT_CAL_DATA_SIZE];
++	const char name[] = "btmrvl_caldata";
++	const char property[] = "btmrvl,caldata";
+ 	int ret;
+ 
+-	ret = btmrvl_parse_cal_cfg(data, size, cal_data, sizeof(cal_data));
++	dt_node = of_find_node_by_name(NULL, name);
++	if (!dt_node)
++		return -ENODEV;
++
++	ret = of_property_read_u8_array(dt_node, property, cal_data,
++					sizeof(cal_data));
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = btmrvl_load_cal_data(priv, cal_data);
++	BT_DBG("Use cal data from device tree");
++	ret = btmrvl_download_cal_data(priv, cal_data);
+ 	if (ret) {
+-		BT_ERR("Fail to load calibrate data");
++		BT_ERR("Fail to download calibrate data");
+ 		return ret;
+ 	}
+ 
+ 	return 0;
+ }
+ 
+-static int btmrvl_cal_data_config(struct btmrvl_private *priv)
+-{
+-	const struct firmware *cfg;
+-	int ret;
+-	const char *cal_data = priv->btmrvl_dev.cal_data;
+-
+-	if (!cal_data)
+-		return 0;
+-
+-	ret = request_firmware(&cfg, cal_data, priv->btmrvl_dev.dev);
+-	if (ret < 0) {
+-		BT_DBG("Failed to get %s file, skipping cal data download",
+-		       cal_data);
+-		return 0;
+-	}
+-
+-	ret = btmrvl_process_cal_cfg(priv, (u8 *)cfg->data, cfg->size);
+-	release_firmware(cfg);
+-	return ret;
+-}
+-
+ static int btmrvl_setup(struct hci_dev *hdev)
+ {
+ 	struct btmrvl_private *priv = hci_get_drvdata(hdev);
+ 
+ 	btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
+ 
+-	if (btmrvl_cal_data_config(priv))
+-		BT_ERR("Set cal data failed");
++	btmrvl_cal_data_dt(priv);
+ 
+ 	priv->btmrvl_dev.psmode = 1;
+ 	btmrvl_enable_ps(priv);
+diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
+index cef87b0..9b9d6f89 100644
+--- a/drivers/bluetooth/btmrvl_sdio.c
++++ b/drivers/bluetooth/btmrvl_sdio.c
+@@ -18,6 +18,7 @@
+  * this warranty disclaimer.
+  **/
+ 
++#include <linux/firmware.h>
+ #include <linux/slab.h>
+ 
+ #include <linux/mmc/sdio_ids.h>
+@@ -101,7 +102,6 @@ static const struct btmrvl_sdio_card_reg btmrvl_reg_88xx = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = {
+ 	.helper		= "mrvl/sd8688_helper.bin",
+ 	.firmware	= "mrvl/sd8688.bin",
+-	.cal_data	= NULL,
+ 	.reg		= &btmrvl_reg_8688,
+ 	.sd_blksz_fw_dl	= 64,
+ };
+@@ -109,7 +109,6 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
+ 	.helper		= NULL,
+ 	.firmware	= "mrvl/sd8787_uapsta.bin",
+-	.cal_data	= NULL,
+ 	.reg		= &btmrvl_reg_87xx,
+ 	.sd_blksz_fw_dl	= 256,
+ };
+@@ -117,7 +116,6 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
+ 	.helper		= NULL,
+ 	.firmware	= "mrvl/sd8797_uapsta.bin",
+-	.cal_data	= "mrvl/sd8797_caldata.conf",
+ 	.reg		= &btmrvl_reg_87xx,
+ 	.sd_blksz_fw_dl	= 256,
+ };
+@@ -125,7 +123,6 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
+ static const struct btmrvl_sdio_device btmrvl_sdio_sd8897 = {
+ 	.helper		= NULL,
+ 	.firmware	= "mrvl/sd8897_uapsta.bin",
+-	.cal_data	= NULL,
+ 	.reg		= &btmrvl_reg_88xx,
+ 	.sd_blksz_fw_dl	= 256,
+ };
+@@ -1008,7 +1005,6 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
+ 		struct btmrvl_sdio_device *data = (void *) id->driver_data;
+ 		card->helper = data->helper;
+ 		card->firmware = data->firmware;
+-		card->cal_data = data->cal_data;
+ 		card->reg = data->reg;
+ 		card->sd_blksz_fw_dl = data->sd_blksz_fw_dl;
+ 	}
+@@ -1037,8 +1033,6 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
+ 	}
+ 
+ 	card->priv = priv;
+-	priv->btmrvl_dev.dev = &card->func->dev;
+-	priv->btmrvl_dev.cal_data = card->cal_data;
+ 
+ 	/* Initialize the interface specific function pointers */
+ 	priv->hw_host_to_card = btmrvl_sdio_host_to_card;
+@@ -1221,5 +1215,4 @@ MODULE_FIRMWARE("mrvl/sd8688_helper.bin");
+ MODULE_FIRMWARE("mrvl/sd8688.bin");
+ MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
+ MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
+-MODULE_FIRMWARE("mrvl/sd8797_caldata.conf");
+ MODULE_FIRMWARE("mrvl/sd8897_uapsta.bin");
+diff --git a/drivers/bluetooth/btmrvl_sdio.h b/drivers/bluetooth/btmrvl_sdio.h
+index 6872d9e..43d35a6 100644
+--- a/drivers/bluetooth/btmrvl_sdio.h
++++ b/drivers/bluetooth/btmrvl_sdio.h
+@@ -85,7 +85,6 @@ struct btmrvl_sdio_card {
+ 	u32 ioport;
+ 	const char *helper;
+ 	const char *firmware;
+-	const char *cal_data;
+ 	const struct btmrvl_sdio_card_reg *reg;
+ 	u16 sd_blksz_fw_dl;
+ 	u8 rx_unit;
+@@ -95,7 +94,6 @@ struct btmrvl_sdio_card {
+ struct btmrvl_sdio_device {
+ 	const char *helper;
+ 	const char *firmware;
+-	const char *cal_data;
+ 	const struct btmrvl_sdio_card_reg *reg;
+ 	u16 sd_blksz_fw_dl;
+ };
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0053-Bluetooth-btmrvl-remove-cal-data-byte-swapping-and-r.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0053-Bluetooth-btmrvl-remove-cal-data-byte-swapping-and-r.patch
new file mode 100644
index 0000000..b34c38e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0053-Bluetooth-btmrvl-remove-cal-data-byte-swapping-and-r.patch
@@ -0,0 +1,102 @@
+From ba51ce6a563bb9622658ad6430dda9b1cdea120c Mon Sep 17 00:00:00 2001
+From: Bing Zhao <bzhao at marvell.com>
+Date: Fri, 1 Nov 2013 15:28:25 -0700
+Subject: Bluetooth: btmrvl: remove cal-data byte swapping and redundant mem
+ copy
+
+The device tree property can define the cal-data in proper order.
+There is no need to swap the bytes in driver.
+Also remove the redundant cal-data memory copy after removing the
+byte swapping.
+
+Cc: Mike Frysinger <vapier at chromium.org>
+Cc: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Hyuckjoo Lee <hyuckjoo.lee at samsung.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+---
+ drivers/bluetooth/btmrvl_drv.h  |    2 +-
+ drivers/bluetooth/btmrvl_main.c |   27 ++++++++++-----------------
+ 2 files changed, 11 insertions(+), 18 deletions(-)
+
+diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
+index 98187f0..7399303 100644
+--- a/drivers/bluetooth/btmrvl_drv.h
++++ b/drivers/bluetooth/btmrvl_drv.h
+@@ -120,7 +120,7 @@ struct btmrvl_private {
+ #define PS_SLEEP			0x01
+ #define PS_AWAKE			0x00
+ 
+-#define BT_CMD_DATA_SIZE		32
++#define BT_CAL_HDR_LEN			4
+ #define BT_CAL_DATA_SIZE		28
+ 
+ struct btmrvl_event {
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index 17e6039..f8c7a15 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -430,28 +430,20 @@ static int btmrvl_open(struct hci_dev *hdev)
+ }
+ 
+ static int btmrvl_download_cal_data(struct btmrvl_private *priv,
+-				    u8 *config_data)
++				    u8 *data, int len)
+ {
+-	int i, ret;
+-	u8 data[BT_CMD_DATA_SIZE];
++	int ret;
+ 
+ 	data[0] = 0x00;
+ 	data[1] = 0x00;
+ 	data[2] = 0x00;
+-	data[3] = BT_CMD_DATA_SIZE - 4;
+-
+-	/* Swap cal-data bytes. Each four bytes are swapped. Considering 4
+-	 * byte SDIO header offset, mapping of input and output bytes will be
+-	 * {3, 2, 1, 0} -> {0+4, 1+4, 2+4, 3+4},
+-	 * {7, 6, 5, 4} -> {4+4, 5+4, 6+4, 7+4} */
+-	for (i = 4; i < BT_CMD_DATA_SIZE; i++)
+-		data[i] = config_data[(i / 4) * 8 - 1 - i];
++	data[3] = len;
+ 
+ 	print_hex_dump_bytes("Calibration data: ",
+-			     DUMP_PREFIX_OFFSET, data, BT_CMD_DATA_SIZE);
++			     DUMP_PREFIX_OFFSET, data, BT_CAL_HDR_LEN + len);
+ 
+ 	ret = btmrvl_send_sync_cmd(priv, BT_CMD_LOAD_CONFIG_DATA, data,
+-				   BT_CMD_DATA_SIZE);
++				   BT_CAL_HDR_LEN + len);
+ 	if (ret)
+ 		BT_ERR("Failed to download caibration data\n");
+ 
+@@ -461,7 +453,7 @@ static int btmrvl_download_cal_data(struct btmrvl_private *priv,
+ static int btmrvl_cal_data_dt(struct btmrvl_private *priv)
+ {
+ 	struct device_node *dt_node;
+-	u8 cal_data[BT_CAL_DATA_SIZE];
++	u8 cal_data[BT_CAL_HDR_LEN + BT_CAL_DATA_SIZE];
+ 	const char name[] = "btmrvl_caldata";
+ 	const char property[] = "btmrvl,caldata";
+ 	int ret;
+@@ -470,13 +462,14 @@ static int btmrvl_cal_data_dt(struct btmrvl_private *priv)
+ 	if (!dt_node)
+ 		return -ENODEV;
+ 
+-	ret = of_property_read_u8_array(dt_node, property, cal_data,
+-					sizeof(cal_data));
++	ret = of_property_read_u8_array(dt_node, property,
++					cal_data + BT_CAL_HDR_LEN,
++					BT_CAL_DATA_SIZE);
+ 	if (ret)
+ 		return ret;
+ 
+ 	BT_DBG("Use cal data from device tree");
+-	ret = btmrvl_download_cal_data(priv, cal_data);
++	ret = btmrvl_download_cal_data(priv, cal_data, BT_CAL_DATA_SIZE);
+ 	if (ret) {
+ 		BT_ERR("Fail to download calibrate data");
+ 		return ret;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0054-Bluetooth-btmrvl-wait-for-HOST_SLEEP_ENABLE-event-in.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0054-Bluetooth-btmrvl-wait-for-HOST_SLEEP_ENABLE-event-in.patch
new file mode 100644
index 0000000..9224e55
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0054-Bluetooth-btmrvl-wait-for-HOST_SLEEP_ENABLE-event-in.patch
@@ -0,0 +1,102 @@
+From 5a937cd5924faab2f1e1328c5b991ed9ce811616 Mon Sep 17 00:00:00 2001
+From: Chin-Ran Lo <crlo at marvell.com>
+Date: Tue, 1 Jul 2014 14:00:14 -0700
+Subject: Bluetooth: btmrvl: wait for HOST_SLEEP_ENABLE event in suspend
+
+commit 396e04f4bb9afefb0744715dc76d9abe18ee5fb0 upstream.
+
+After BT_CMD_HOST_SLEEP_ENABLE command finishes, driver should
+wait until getting BT_EVENT_HOST_SLEEP_ENABLE event to complete
+suspend procedure.
+Without this patch the suspend handler would return success
+earlier. By the time when the BT_EVENT_HOST_SLEEP_ENABLE event
+comes in the controller driver could have already turned off the
+bus clock. This causes kernel crash or system reboot eventually.
+
+Signed-off-by: Chin-Ran Lo <crlo at marvell.com>
+Signed-off-by: Jeff CF Chen <jeffc at marvell.com>
+Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
+Signed-off-by: Bing Zhao <bzhao at marvell.com>
+Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ drivers/bluetooth/btmrvl_drv.h  |    1 +
+ drivers/bluetooth/btmrvl_main.c |   25 ++++++++++++++++++++++++-
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
+index 7399303..9e81a3d0 100644
+--- a/drivers/bluetooth/btmrvl_drv.h
++++ b/drivers/bluetooth/btmrvl_drv.h
+@@ -66,6 +66,7 @@ struct btmrvl_adapter {
+ 	u8 hs_state;
+ 	u8 wakeup_tries;
+ 	wait_queue_head_t cmd_wait_q;
++	wait_queue_head_t event_hs_wait_q;
+ 	u8 cmd_complete;
+ 	bool is_suspended;
+ };
+diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
+index f8c7a15..5a57afb 100644
+--- a/drivers/bluetooth/btmrvl_main.c
++++ b/drivers/bluetooth/btmrvl_main.c
+@@ -112,6 +112,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
+ 			adapter->hs_state = HS_ACTIVATED;
+ 			if (adapter->psmode)
+ 				adapter->ps_state = PS_SLEEP;
++			wake_up_interruptible(&adapter->event_hs_wait_q);
+ 			BT_DBG("HS ACTIVATED!");
+ 		} else {
+ 			BT_DBG("HS Enable failed");
+@@ -252,11 +253,31 @@ EXPORT_SYMBOL_GPL(btmrvl_enable_ps);
+ 
+ int btmrvl_enable_hs(struct btmrvl_private *priv)
+ {
++	struct btmrvl_adapter *adapter = priv->adapter;
+ 	int ret;
+ 
+ 	ret = btmrvl_send_sync_cmd(priv, BT_CMD_HOST_SLEEP_ENABLE, NULL, 0);
+-	if (ret)
++	if (ret) {
+ 		BT_ERR("Host sleep enable command failed\n");
++		return ret;
++	}
++
++	ret = wait_event_interruptible_timeout(adapter->event_hs_wait_q,
++					       adapter->hs_state,
++			msecs_to_jiffies(WAIT_UNTIL_HS_STATE_CHANGED));
++	if (ret < 0) {
++		BT_ERR("event_hs_wait_q terminated (%d): %d,%d,%d",
++		       ret, adapter->hs_state, adapter->ps_state,
++		       adapter->wakeup_tries);
++	} else if (!ret) {
++		BT_ERR("hs_enable timeout: %d,%d,%d", adapter->hs_state,
++		       adapter->ps_state, adapter->wakeup_tries);
++		ret = -ETIMEDOUT;
++	} else {
++		BT_DBG("host sleep enabled: %d,%d,%d", adapter->hs_state,
++		       adapter->ps_state, adapter->wakeup_tries);
++		ret = 0;
++	}
+ 
+ 	return ret;
+ }
+@@ -342,6 +363,7 @@ static void btmrvl_init_adapter(struct btmrvl_private *priv)
+ 	priv->adapter->ps_state = PS_AWAKE;
+ 
+ 	init_waitqueue_head(&priv->adapter->cmd_wait_q);
++	init_waitqueue_head(&priv->adapter->event_hs_wait_q);
+ }
+ 
+ static void btmrvl_free_adapter(struct btmrvl_private *priv)
+@@ -664,6 +686,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv)
+ 	hdev = priv->btmrvl_dev.hcidev;
+ 
+ 	wake_up_interruptible(&priv->adapter->cmd_wait_q);
++	wake_up_interruptible(&priv->adapter->event_hs_wait_q);
+ 
+ 	kthread_stop(priv->main_thread.task);
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0055-Bluetooth-btmrvl-disable-SD8787-AMP-device.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0055-Bluetooth-btmrvl-disable-SD8787-AMP-device.patch
new file mode 100644
index 0000000..0db49ae
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0055-Bluetooth-btmrvl-disable-SD8787-AMP-device.patch
@@ -0,0 +1,36 @@
+From d2ef249cc37a61ec88bc0da0ffcc75799e12f25f Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Tue, 27 Jan 2015 17:39:24 +0200
+Subject: Bluetooth: btmrvl: disable SD8787 AMP device
+
+Disable SD8787 AMP device.
+The device probe gets stuck while configuring a 0x911B device.
+
+Firmware Version 14.66.35.p52 for SD8787 doesn't support BT-AMP.
+
+http://git.marvell.com/?p=mwifiex-firmware.git;a=commit;h=3f45b8c4cc1eb1d102bc3486b19677332dd215ab
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ drivers/bluetooth/btmrvl_sdio.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
+index 9b9d6f89..df577b6 100644
+--- a/drivers/bluetooth/btmrvl_sdio.c
++++ b/drivers/bluetooth/btmrvl_sdio.c
+@@ -134,9 +134,11 @@ static const struct sdio_device_id btmrvl_sdio_ids[] = {
+ 	/* Marvell SD8787 Bluetooth device */
+ 	{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911A),
+ 			.driver_data = (unsigned long) &btmrvl_sdio_sd8787 },
++#ifdef SD8787_AMP
+ 	/* Marvell SD8787 Bluetooth AMP device */
+ 	{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911B),
+ 			.driver_data = (unsigned long) &btmrvl_sdio_sd8787 },
++#endif
+ 	/* Marvell SD8797 Bluetooth device */
+ 	{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912A),
+ 			.driver_data = (unsigned long) &btmrvl_sdio_sd8797 },
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0056-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0056-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch
new file mode 100644
index 0000000..cede6ee
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0056-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch
@@ -0,0 +1,29 @@
+From a865d188d0362cb77a5e900a21d894a52a03a753 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 12 Feb 2015 13:41:56 +0200
+Subject: ARM: i.MX6: cm-fx6: enable i2cmux in defconfig
+
+Enable i2cmux in defconfig.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index 1955172..886dd20 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -233,6 +233,9 @@ CONFIG_FSL_OTP=y
+ CONFIG_MXS_VIIM=y
+ # CONFIG_I2C_COMPAT is not set
+ CONFIG_I2C_CHARDEV=y
++CONFIG_I2C_MUX=y
++CONFIG_I2C_MUX_GPIO=y
++CONFIG_I2C_MUX_PCA954x=y
+ # CONFIG_I2C_HELPER_AUTO is not set
+ CONFIG_I2C_ALGOPCF=m
+ CONFIG_I2C_ALGOPCA=m
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0057-Input-add-hx8520-6-device-driver.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0057-Input-add-hx8520-6-device-driver.patch
new file mode 100644
index 0000000..546abe1
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0057-Input-add-hx8520-6-device-driver.patch
@@ -0,0 +1,562 @@
+From 210c03a6c03a78ff7e5218139cc672cf559e4071 Mon Sep 17 00:00:00 2001
+From: Dmitry Lifshitz <lifshitz at compulab.co.il>
+Date: Sun, 8 Feb 2015 18:54:16 +0200
+Subject: Input: add hx8520/6 device driver
+
+The driver has been taken from the 3.0.35 kernel tree.
+In order to make the driver work with the current kernel:
+1) added the "of_device_id" structure with supported devices.
+2) fixed the parameter list of the input_mt_init_slots() function.
+
+Signed-off-by: Dmitry Lifshitz <lifshitz at compulab.co.il>
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ drivers/input/touchscreen/Kconfig    |   10 +
+ drivers/input/touchscreen/Makefile   |    1 +
+ drivers/input/touchscreen/himax_ts.c |  505 ++++++++++++++++++++++++++++++++++
+ 3 files changed, 516 insertions(+)
+ create mode 100644 drivers/input/touchscreen/himax_ts.c
+
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index 041a3da..4d1a7a2 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -909,4 +909,14 @@ config TOUCHSCREEN_TPS6507X
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called tps6507x_ts.
+ 
++config TOUCHSCREEN_HIMAX
++	tristate "Himax touchscreen support"
++	depends on I2C
++	help
++	  Say Y here if you have a Himax touchscreen and your
++	  board-specific setup code includes that in its table
++	  of I2C devices.
++
++	  If unsure, say N.
++
+ endif
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index a5dde29..cdba9e6 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -73,3 +73,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE)	+= mainstone-wm97xx.o
+ obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE)	+= zylonite-wm97xx.o
+ obj-$(CONFIG_TOUCHSCREEN_W90X900)	+= w90p910_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_TPS6507X)	+= tps6507x-ts.o
++obj-$(CONFIG_TOUCHSCREEN_HIMAX)	+= himax_ts.o
+diff --git a/drivers/input/touchscreen/himax_ts.c b/drivers/input/touchscreen/himax_ts.c
+new file mode 100644
+index 0000000..068e307
+--- /dev/null
++++ b/drivers/input/touchscreen/himax_ts.c
+@@ -0,0 +1,505 @@
++/*
++ * Touch Screen driver for Himax touchscreen controllers used in
++ * DataImage's I2C connected touchscreen panels.
++ *   Copyright (c) 2012 Anders Electronics
++ *   Copyright 2012 CompuLab Ltd, Dmitry Lifshitz <lifshitz at compulab.co.il>
++ *
++ * Based on migor_ts.c
++ *   Copyright (c) 2008 Magnus Damm
++ *   Copyright (c) 2007 Ujjwal Pande <ujjwal at kenati.com>
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU  General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *  General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc.
++ */
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/pm.h>
++#include <linux/slab.h>
++#include <linux/io.h>
++#include <linux/i2c.h>
++#include <linux/timer.h>
++#include <linux/input/mt.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++
++#define HX_MAX_X		480
++#define HX_MAX_Y		800
++
++#define HX_PNT_SIZE		4
++#define HX_EMPTY		0xFFFF
++
++struct himax_ts_initseq_entry {
++	char *cmd;
++	int count;
++	int delay_ms;
++};
++
++struct himax_ts_props_entry {
++	int model;
++	struct himax_ts_initseq_entry *initseq;
++	int initseq_size;
++	int packet_size;
++	int touch_points;
++	bool invert_x;
++	bool invert_y;
++	bool xy_order;
++};
++
++struct himax_ts_priv {
++	struct i2c_client *client;
++	struct himax_ts_props_entry *ts_props;
++	struct input_dev *input;
++	int prev_touches;
++	int irq;
++	char *buf;
++};
++
++static char hx85x_ic_poweron_cmd[]	= {0x81};
++static char hx85x_mcu_poweron_cmd[]	= {0x35, 0x02};
++static char hx85x_senseon_cmd[]		= {0x83};
++static char hx85x_senseoff_cmd[]	= {0x82};
++static char hx85x_get_id_cmd[]		= {0x31};
++static char hx85x_get_event_cmd[]	= {0x85};
++static char hx85x_get_sleep_cmd[]	= {0x63};
++
++static char hx8526_flash_poweron_cmd[]	= {0x36, 0x0F, 0x53};
++static char hx8526_fetch_flash_cmd[]	= {0xDD, 0x04, 0x02};
++
++static char hx8520_flash_poweron_cmd[]	= {0x36, 0x01};
++static char hx8520_speed_mode_cmd[]	= {0x9D, 0x80};
++
++static struct himax_ts_initseq_entry hx8526_initseq[] = {
++	{hx85x_ic_poweron_cmd,     ARRAY_SIZE(hx85x_ic_poweron_cmd), 120},
++	{hx85x_mcu_poweron_cmd,    ARRAY_SIZE(hx85x_mcu_poweron_cmd), 10},
++	{hx8526_flash_poweron_cmd, ARRAY_SIZE(hx8526_flash_poweron_cmd), 10},
++	{hx8526_fetch_flash_cmd,   ARRAY_SIZE(hx8526_fetch_flash_cmd), 10},
++};
++
++static struct himax_ts_initseq_entry hx8520_initseq[] = {
++	{hx85x_ic_poweron_cmd,     ARRAY_SIZE(hx85x_ic_poweron_cmd), 120},
++	{hx8520_speed_mode_cmd,    ARRAY_SIZE(hx8520_speed_mode_cmd), 10},
++	{hx85x_mcu_poweron_cmd,    ARRAY_SIZE(hx85x_mcu_poweron_cmd), 10},
++	{hx8520_flash_poweron_cmd, ARRAY_SIZE(hx8520_flash_poweron_cmd), 10},
++};
++
++static struct himax_ts_props_entry himax_ts_props[] = {
++	{
++		.model		= 0x8520,
++		.initseq	= hx8520_initseq,
++		.initseq_size	= ARRAY_SIZE(hx8520_initseq),
++		.packet_size	= 16,
++		.touch_points	= 2,
++		.invert_y	= true,
++	},
++	{
++		.model		= 0x8526,
++		.initseq	= hx8526_initseq,
++		.initseq_size	= ARRAY_SIZE(hx8526_initseq),
++		.packet_size	= 32,
++		.touch_points	= 5,
++		.xy_order	= true,
++	},
++};
++
++static void himax_ts_set_coords(struct himax_ts_props_entry *props,
++				u32 *px, u32 *py)
++{
++	u32 x = *px;
++	u32 y = *py;
++
++	if (!props->xy_order)
++		swap(x, y);
++
++	if (props->invert_x && x != HX_EMPTY)
++		x = HX_MAX_X - x;
++
++	if (props->invert_y && y != HX_EMPTY)
++		y = HX_MAX_Y - y;
++
++	*px = x;
++	*py = y;
++}
++
++static irqreturn_t himax_ts_isr(int irq, void *data)
++{
++	struct himax_ts_priv *priv = data;
++	struct himax_ts_props_entry *props = priv->ts_props;
++	struct input_dev *input = priv->input;
++	int packet_size = props->packet_size;
++	char *buf = priv->buf;
++	int curr_touches, touch_count, i;
++	u32 x, y;
++	bool was_touched, now_touched, report_event;
++
++	memset(buf, 0, packet_size);
++
++	if (i2c_master_send(priv->client, hx85x_get_event_cmd, 1) != 1) {
++		dev_err(&priv->client->dev, "Unable to write get event cmd\n");
++		return IRQ_HANDLED;
++	}
++
++	if (i2c_master_recv(priv->client, buf, packet_size) != packet_size) {
++		dev_err(&priv->client->dev, "Unable to read events data\n");
++		return IRQ_HANDLED;
++	}
++
++	/*
++	 * Two last bytes in the buffer correspond to invalid data. Next two
++	 * from the end, correspond to touch counter and touch points ids.
++	 */
++
++	/* Retrieve touch points counter. 0x0F corresponds to 0 touches */
++	touch_count = buf[packet_size - 2 - 2] & 0x0F;
++	if (touch_count == 0x0F)
++		touch_count = 0;
++
++	/* According to the Himax code examples, this value can be invalid */
++	if (touch_count > props->touch_points)
++		return IRQ_HANDLED;
++
++	/* Retrieve touch points ids. 0xFF corresponds to 0 touches */
++	curr_touches = buf[packet_size - 2 - 1];
++	if (curr_touches == 0xFF)
++		curr_touches = 0;
++
++	for (i = 0; i < props->touch_points; i++) {
++		x = (buf[i * HX_PNT_SIZE + 0] << 8) | buf[i * HX_PNT_SIZE + 1];
++		y = (buf[i * HX_PNT_SIZE + 2] << 8) | buf[i * HX_PNT_SIZE + 3];
++
++		himax_ts_set_coords(props, &x, &y);
++
++		report_event = false;
++		was_touched = priv->prev_touches & (1 << i);
++		now_touched = curr_touches & (1 << i);
++
++		/* Check for touch state and coordinates consistency */
++		if (now_touched && (x <= HX_MAX_X && y <= HX_MAX_Y)) {
++			report_event = true;
++			dev_dbg(&priv->client->dev, "# %d x=%d y=%d", i, x, y);
++		} else if (was_touched && (x == HX_EMPTY && y == HX_EMPTY)) {
++			report_event = true;
++			dev_dbg(&priv->client->dev, "# %d released", i);
++		}
++
++		if (report_event) {
++			input_mt_slot(priv->input, i);
++			input_mt_report_slot_state(input, MT_TOOL_FINGER,
++							now_touched);
++			if (now_touched) {
++				input_report_abs(input, ABS_MT_POSITION_X, x);
++				input_report_abs(input, ABS_MT_POSITION_Y, y);
++				input_report_abs(input, ABS_MT_PRESSURE, 0xFF);
++			}
++		}
++	}
++
++	input_mt_report_pointer_emulation(input, true);
++	input_sync(input);
++
++	priv->prev_touches = curr_touches;
++
++	return IRQ_HANDLED;
++}
++
++static int himax_ts_setup(struct himax_ts_priv *priv)
++{
++	struct himax_ts_props_entry *props = priv->ts_props;
++	struct i2c_client *client = priv->client;
++	char *cmd = hx85x_get_sleep_cmd;
++	char buf = 0x00;
++	int count, i;
++
++	if (i2c_master_send(client, cmd, 1) != 1)
++		goto err_stop_seq;
++
++	if (i2c_master_recv(client, &buf, 1) != 1) {
++		dev_err(&client->dev, "Failed to read get sleep data\n");
++		return -EBUSY;
++	}
++
++	if (buf != 0) {
++		dev_dbg(&client->dev, "already initialized 0x%02X\n", buf);
++		return 0;
++	}
++
++	for (i = 0; i < props->initseq_size; i++) {
++		cmd = props->initseq[i].cmd;
++		count = props->initseq[i].count;
++
++		if (i2c_master_send(client, cmd, count) != count)
++			goto err_stop_seq;
++
++		msleep(props->initseq[i].delay_ms);
++	}
++
++	return 0;
++
++err_stop_seq:
++	dev_err(&client->dev, "Failed to send I2C command 0x%02X\n", cmd[0]);
++	return -EBUSY;
++}
++
++static int himax_ts_open(struct input_dev *dev)
++{
++	struct himax_ts_priv *priv = input_get_drvdata(dev);
++	struct i2c_client *client = priv->client;
++
++	if (i2c_master_send(client, hx85x_senseon_cmd, 1) != 1) {
++		dev_err(&priv->client->dev, "failed to write sense on cmd\n");
++		return -EBUSY;
++	}
++
++	msleep(100);
++
++	return 0;
++}
++
++static void himax_ts_close(struct input_dev *dev)
++{
++	struct himax_ts_priv *priv = input_get_drvdata(dev);
++	struct i2c_client *client = priv->client;
++
++	if (i2c_master_send(client, hx85x_senseoff_cmd, 1) != 1)
++		dev_err(&priv->client->dev, "failed to write sense off cmd\n");
++}
++
++static struct input_dev *himax_ts_init_input(struct himax_ts_priv *priv)
++{
++	struct input_dev *input;
++
++	input = input_allocate_device();
++	if (!input) {
++		dev_err(&priv->client->dev, "Failed to allocate input dev\n");
++		return NULL;
++	}
++
++	input->name = priv->client->name;
++	input->phys = priv->client->adapter->name,
++	input->id.bustype = BUS_I2C;
++	input->dev.parent = &priv->client->dev;
++	input->open = himax_ts_open;
++	input->close = himax_ts_close;
++
++	__set_bit(EV_KEY, input->evbit);
++	__set_bit(EV_ABS, input->evbit);
++	__set_bit(EV_SYN, input->evbit);
++	__set_bit(BTN_TOUCH, input->keybit);
++	__set_bit(ABS_X, input->absbit);
++	__set_bit(ABS_Y, input->absbit);
++
++	input_set_abs_params(input, ABS_X, 0, HX_MAX_X, 0, 0);
++	input_set_abs_params(input, ABS_Y, 0, HX_MAX_Y, 0, 0);
++	input_set_abs_params(input, ABS_PRESSURE, 0, 0xFF, 0, 0);
++
++	input_set_abs_params(input, ABS_MT_POSITION_X, 0, HX_MAX_X, 0, 0);
++	input_set_abs_params(input, ABS_MT_POSITION_Y, 0, HX_MAX_Y, 0, 0);
++	input_set_abs_params(input, ABS_MT_PRESSURE, 0, 0xff, 0, 0);
++
++	input_mt_init_slots(input, priv->ts_props->touch_points, 0);
++
++	input_set_drvdata(input, priv);
++
++	return input;
++}
++
++static int himax_ts_probe(struct i2c_client *client,
++			const struct i2c_device_id *idp)
++{
++	struct himax_ts_priv *priv;
++	struct himax_ts_props_entry *ts_props = NULL;
++	int error, i;
++	char buf[3];
++	int chip_model;
++
++	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
++		dev_err(&client->dev, "I2C_FUNC_I2C check failed\n");
++		return -EBUSY;
++	}
++
++	if (i2c_master_send(client, hx85x_get_id_cmd, 1) == 1 &&
++		i2c_master_recv(client, buf, 3) == 3) {
++		dev_info(&client->dev, "Found device ID: 0x%02X%02X%02X\n",
++			 buf[0], buf[1], buf[2]);
++	} else {
++		dev_err(&client->dev, "Unable to get DevId\n");
++		return -ENODEV;
++	}
++
++	chip_model = (buf[0] << 8) | buf[1];
++
++	for (i = 0; i < ARRAY_SIZE(himax_ts_props); i++) {
++		if (chip_model == himax_ts_props[i].model) {
++			ts_props = &himax_ts_props[i];
++			break;
++		}
++	}
++
++	if (!ts_props) {
++		dev_err(&client->dev, "Unsupported device model\n");
++		return -ENODEV;
++	} else if (ts_props->model != idp->driver_data) {
++		dev_warn(&client->dev,
++		"Requested model 0x%04X not found, proceed with 0x%04X setup\n",
++			(unsigned int)idp->driver_data, ts_props->model);
++	}
++
++	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
++	if (!priv) {
++		dev_err(&client->dev, "failed to allocate driver data\n");
++		return -ENOMEM;
++	}
++
++	priv->client = client;
++	priv->irq = client->irq;
++	priv->ts_props = ts_props;
++
++	error = himax_ts_setup(priv);
++	if (error)
++		goto err_free_mem;
++
++	priv->buf = kzalloc(priv->ts_props->packet_size, GFP_KERNEL);
++	if (!priv->buf) {
++		dev_err(&client->dev, "failed to allocate read buffer\n");
++		error = -ENOMEM;
++		goto err_free_mem;
++	}
++
++	priv->input = himax_ts_init_input(priv);
++	if (!priv->input) {
++		error = -ENOMEM;
++		goto err_free_mem;
++	}
++
++	error = input_register_device(priv->input);
++	if (error) {
++		dev_err(&client->dev, "Failed to register input device.\n");
++		goto err_free_mem;
++	}
++
++	error = request_threaded_irq(priv->irq, NULL, himax_ts_isr,
++					IRQF_TRIGGER_LOW | IRQF_ONESHOT,
++					client->name, priv);
++	if (error) {
++		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
++		goto err_free_dev;
++	}
++
++	i2c_set_clientdata(client, priv);
++	device_init_wakeup(&client->dev, 1);
++
++	return 0;
++
++err_free_dev:
++	input_unregister_device(priv->input);
++	priv->input = NULL;
++err_free_mem:
++	input_free_device(priv->input);
++	kfree(priv->buf);
++	kfree(priv);
++
++	return error;
++}
++
++static int himax_ts_remove(struct i2c_client *client)
++{
++	struct himax_ts_priv *priv = i2c_get_clientdata(client);
++
++	free_irq(priv->irq, priv);
++	i2c_set_clientdata(client, NULL);
++	input_unregister_device(priv->input);
++	kfree(priv->buf);
++	kfree(priv);
++
++	return 0;
++}
++
++static int himax_ts_suspend(struct device *dev)
++{
++	struct i2c_client *client = to_i2c_client(dev);
++	struct himax_ts_priv *priv = i2c_get_clientdata(client);
++
++	if (device_may_wakeup(&client->dev))
++		enable_irq_wake(priv->irq);
++	else if (i2c_master_send(client, hx85x_senseoff_cmd, 1) != 1)
++		dev_err(&priv->client->dev, "failed to write sense off cmd\n");
++
++	return 0;
++}
++
++static int himax_ts_resume(struct device *dev)
++{
++	struct i2c_client *client = to_i2c_client(dev);
++	struct himax_ts_priv *priv = i2c_get_clientdata(client);
++
++	himax_ts_setup(priv);
++
++	if (i2c_master_send(client, hx85x_senseon_cmd, 1) != 1)
++		dev_err(&priv->client->dev, "failed to write sense on cmd\n");
++
++	msleep(100);
++
++	if (device_may_wakeup(&client->dev))
++		disable_irq_wake(priv->irq);
++
++	return 0;
++}
++
++static SIMPLE_DEV_PM_OPS(himax_ts_pm, himax_ts_suspend, himax_ts_resume);
++
++static const struct i2c_device_id himax_ts_id[] = {
++	{ "hx8520-c"	, 0x8520 },
++	{ "hx8526-a"	, 0x8526 },
++	{ },
++};
++
++static const struct of_device_id himax_ts_dt_ids[] = {
++        { .compatible = "himax,hx8520-c", },
++        { .compatible = "himax,hx8526-a", },
++        { .compatible = "himax,himax_ts", },
++        { /* sentinel */ }
++};
++
++MODULE_DEVICE_TABLE(i2c, himax_ts_id);
++MODULE_DEVICE_TABLE(of, himax_ts_dt_id);
++
++static struct i2c_driver himax_ts_driver = {
++	.driver = {
++		.owner = THIS_MODULE,
++		.name = "himax_ts",
++		.pm = &himax_ts_pm,
++		.of_match_table = himax_ts_dt_ids,
++	},
++	.probe = himax_ts_probe,
++	.remove = himax_ts_remove,
++	.id_table = himax_ts_id,
++};
++
++static int __init himax_ts_init(void)
++{
++	return i2c_add_driver(&himax_ts_driver);
++}
++
++static void __exit himax_ts_exit(void)
++{
++	i2c_del_driver(&himax_ts_driver);
++}
++
++module_init(himax_ts_init);
++module_exit(himax_ts_exit);
++
++MODULE_DESCRIPTION("Himax Touchscreen driver");
++MODULE_LICENSE("GPL v2");
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0058-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0058-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch
new file mode 100644
index 0000000..74d13ff
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0058-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch
@@ -0,0 +1,53 @@
+From c4479a56c0452cc36c022a4bb4a3ec34cc86ff75 Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Mon, 23 Feb 2015 15:54:13 +0200
+Subject: ARM: i.MX6: sb-fx6m: Fix uart1 rts/cts flow control
+
+According to the board schematics uart1 works in DCE mode only.
+Remove the DCEDTE mode flag in the uart1 properties.
+
+Set a correct value in the IOMUXC_UART2_UART_RTS_B_SELECT_INPUT register.
+This value lets connect RTS_B pad to ipp_uart_rts_b when UART is in DCE mode.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+[grinberg at compulab.co.il: removed remnant include from previous patch
+version]
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |   13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index cf2a0eb..8afb83d 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -19,6 +19,14 @@
+ 	model = "CompuLab CM-FX6 on SBC-FX6m";	
+ 	compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q";
+ 
++	iomux_uart2: pinmux at 20E0924 {
++		compatible = "pinctrl-single";
++		reg = <0x20E0000 0x924>;	/* Single register */
++		#address-cells = <1>;
++		#size-cells = <0>;
++		pinctrl-single,register-width = <32>;
++		pinctrl-single,function-mask = <0x4>;
++	};
+ };
+ 
+ &iomuxc {
+@@ -52,9 +60,6 @@
+ &uart2 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pinctrl_uart2>;
+-	/* fsl,dte-mode; */
+ 	fsl,uart-has-rtscts;
+-	dma-names = "rx", "tx";
+-	dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
+ 	status = "okay";
+-};
+\ No newline at end of file
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0059-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0059-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch
new file mode 100644
index 0000000..a056c71
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0059-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch
@@ -0,0 +1,172 @@
+From 87766ae496b6c64e6eac8e2defd0d2078b58cb0a Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 18 Feb 2015 18:25:23 +0200
+Subject: ARM: i.MX6: dts: add i2cmux support for SBC-FX6 boards
+
+Add i2cmux support for SBC-FX6 boards.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sb-fx6.dtsi  |   50 +++++++++++++++++++++++++++++++++-
+ arch/arm/boot/dts/imx6q-sb-fx6m.dtsi |   36 ++++++++++++++++++++++++
+ arch/arm/boot/dts/imx6q-sb-fx6x.dtsi |    6 +---
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |    2 +-
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |    5 ----
+ 5 files changed, 87 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+index acfc572..fc4f347a 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+@@ -11,4 +11,52 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
+-#include "imx6q-sb-fx6x.dtsi"
+\ No newline at end of file
++#include "imx6q-sb-fx6x.dtsi"
++
++/ {
++	i2cmux {
++		compatible = "i2c-mux-gpio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		mux-gpios = <&gpio1 2 0>;
++		i2c-parent = <&i2c1>;
++
++		i2c at 0 {
++			reg = <0>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			pca9555 at 26 {
++			      compatible = "nxp,pca9555";
++			      gpio-controller;
++			      #gpio-cells = <2>;
++			      reg = <0x26>;
++			};
++
++			hx8526 at 4a {
++			      compatible = "himax,himax_ts";
++			      reg = <0x4a>;
++			      gpio_intr = <&gpio1 4 0>;
++			};
++
++			eeprom at 50 {
++				compatible = "at24,24c02";
++				reg = <0x50>;
++				pagesize = <16>;
++			};
++
++		};
++
++		i2c at 1 {
++			reg = <1>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			dvi: edid at 50 {
++				compatible = "fsl,imx6-hdmi-i2c";
++				reg = <0x50>;
++			};
++		};
++
++	};
++};
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+index 5a488f8..a6cc8dd 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+@@ -29,4 +29,40 @@
+ 			gpio-key,wakeup;
+ 		};
+ 	};
++
++	i2cmux {
++		compatible = "i2c-mux-gpio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		mux-gpios = <&gpio1 2 0>;
++		i2c-parent = <&i2c1>;
++
++		i2c at 0 {
++			reg = <0>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			eeprom at 50 {
++				compatible = "at24,24c02";
++				reg = <0x50>;
++				pagesize = <16>;
++			};
++
++			rtc at 56 {
++				compatible = "emmicro,em3027";
++				reg = <0x56>;
++			};
++		};
++
++		i2c at 1 {
++			reg = <1>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			dvi: edid at 50 {
++				compatible = "fsl,imx6-hdmi-i2c";
++				reg = <0x50>;
++			};
++		};
++	};
+ };
+\ No newline at end of file
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+index 9f67b3e..ae70c87 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+@@ -59,11 +59,7 @@
+ &i2c1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pinctrl_i2c1>;
+-	eeprom at 50 {
+-		compatible = "at24,24c02";
+-		reg = <0x50>;
+-		pagesize = <16>;
+-	};
++	status = "disabled";
+ };
+ 
+ /* mmc */
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 6f6ad33..4bba196 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -12,7 +12,7 @@
+ */
+ 
+ /dts-v1/;
+-#include "imx6q-sb-fx6x.dtsi"
++#include "imx6q-sb-fx6.dtsi"
+ #include "imx6q-cm-fx6.dtsi"
+ 
+ / {
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 8afb83d..31d0e8c 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -43,13 +43,8 @@
+ 	};
+ };
+ 
+-
+ &i2c1 {
+ 	status = "okay";
+-	rtc at 56 {
+-		compatible = "emmicro,em3027";
+-		reg = <0x56>;
+-	};
+ };
+ 
+ &usdhc3 {
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0060-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0060-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch
new file mode 100644
index 0000000..9418e89
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0060-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch
@@ -0,0 +1,46 @@
+From f0bb1955a609dd0cb01b377e9b87202dcc680edb Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 12 Feb 2015 13:49:31 +0200
+Subject: ARM: i.MX6: dts: add dvi edid GPIOs
+
+Add dvi edid GPIOs.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sb-fx6x.dtsi |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+index ae70c87..41237c7 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+@@ -32,6 +32,9 @@
+ };
+ 
+ &iomuxc {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>;
++
+ 	imx6q-sb-fx6x {
+ 		/* pins for i2c1 */
+ 		pinctrl_i2c1: i2c1grp {
+@@ -52,6 +55,16 @@
+ 				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
+ 			>;
+ 		};
++
++		/* pins for dvi/ts */
++		pinctrl_dvi0: dvi0grp {
++			fsl,pins = <
++				/* DVI_DDC_SEL */
++				MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000
++				/* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */
++				MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000
++			>;
++		};
+ 	};
+ };
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0061-video-mxc-IPUv3-fb-restore-sync-bits.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0061-video-mxc-IPUv3-fb-restore-sync-bits.patch
new file mode 100644
index 0000000..641e4b1
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0061-video-mxc-IPUv3-fb-restore-sync-bits.patch
@@ -0,0 +1,114 @@
+From 95b971537479219c290923bee0c7454e1d28a077 Mon Sep 17 00:00:00 2001
+From: Dmitry Lifshitz <lifshitz at compulab.co.il>
+Date: Thu, 12 Feb 2015 16:59:53 +0200
+Subject: video: mxc: IPUv3 fb: restore sync bits
+
+Freescale framebuffer driver uses some driver-specific
+proprietary bits in the sync field (like pixel clock polarity).
+
+Xorg driver discards unknown sync bits in the fb_var_screeninfo
+structure. As the results of dropping the proprietary sync bits
+some displays shows various artifacts.
+
+Fix the bug by hacking mxcfb_set_par() callback.
+
+Before applying new var parameters, try to find a match in the mode
+list, skipping proprietary sync bits (FB_MXC_SYNC_MASK).
+
+If the entry is found, copy its FB_MXC_SYNC_MASK bits.
+
+Signed-off-by: Dmitry Lifshitz <lifshitz at compulab.co.il>
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ drivers/video/mxc/mxc_ipuv3_fb.c |   38 ++++++++++++++++++++++++++++++++++++++
+ include/linux/mxcfb.h            |   11 +++++++++++
+ 2 files changed, 49 insertions(+)
+
+diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
+index 3cf386f..ef5b575 100644
+--- a/drivers/video/mxc/mxc_ipuv3_fb.c
++++ b/drivers/video/mxc/mxc_ipuv3_fb.c
+@@ -428,6 +428,28 @@ static bool mxcfb_need_to_set_par(struct fb_info *fbi)
+ 			sizeof(struct fb_var_screeninfo));
+ }
+ 
++static struct fb_videomode *mxc_match_mode(const struct fb_var_screeninfo *var,
++					  struct list_head *head)
++{
++	struct list_head *pos;
++	struct fb_modelist *modelist;
++	struct fb_videomode *m, mode;
++
++	fb_var_to_videomode(&mode, var);
++	list_for_each(pos, head) {
++		modelist = list_entry(pos, struct fb_modelist, list);
++		m = &modelist->mode;
++
++		mode.sync &= ~FB_MXC_SYNC_MASK;
++		mode.sync |= m->sync & FB_MXC_SYNC_MASK;
++
++		if (fb_mode_is_equal(m, &mode))
++			return m;
++	}
++
++	return NULL;
++}
++
+ /*
+  * Set framebuffer parameters and change the operating mode.
+  *
+@@ -583,6 +605,7 @@ static int mxcfb_set_par(struct fb_info *fbi)
+ 
+ 	if (!mxc_fbi->overlay) {
+ 		uint32_t out_pixel_fmt;
++		struct fb_videomode *sync_mode;
+ 
+ 		memset(&sig_cfg, 0, sizeof(sig_cfg));
+ 		if (fbi->var.vmode & FB_VMODE_INTERLACED)
+@@ -596,6 +619,21 @@ static int mxcfb_set_par(struct fb_info *fbi)
+ 			sig_cfg.Hsync_pol = true;
+ 		if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT)
+ 			sig_cfg.Vsync_pol = true;
++
++		/*
++		 * Try to find  matching all parameters, except
++		 * FB_MXC_SYNC_MASK bits in the .sync field.
++		 */
++		sync_mode = mxc_match_mode(&fbi->var, &fbi->modelist);
++		/*
++		 * If entry exists in the mode list and FB_MXC_SYNC_MASK
++		 * bits are empty in the fbi->var.sync (most probably cleared
++		 * by the user space application) then copy it from the found
++		 * mode list entry.
++		 */
++		if (sync_mode && !(fbi->var.sync & FB_MXC_SYNC_MASK))
++			fbi->var.sync = sync_mode->sync;
++
+ 		if (!(fbi->var.sync & FB_SYNC_CLK_LAT_FALL))
+ 			sig_cfg.clk_pol = true;
+ 		if (fbi->var.sync & FB_SYNC_DATA_INVERT)
+diff --git a/include/linux/mxcfb.h b/include/linux/mxcfb.h
+index 67db5ee..e63aa2c 100644
+--- a/include/linux/mxcfb.h
++++ b/include/linux/mxcfb.h
+@@ -23,6 +23,17 @@
+ 
+ #include <uapi/linux/mxcfb.h>
+ 
++#define FB_SYNC_OE_LOW_ACT	0x80000000
++#define FB_SYNC_CLK_LAT_FALL	0x40000000
++#define FB_SYNC_DATA_INVERT	0x20000000
++#define FB_SYNC_CLK_IDLE_EN	0x10000000
++#define FB_SYNC_SHARP_MODE	0x08000000
++#define FB_SYNC_SWAP_RGB	0x04000000
++
++#define FB_MXC_SYNC_MASK	(FB_SYNC_OE_LOW_ACT | FB_SYNC_CLK_LAT_FALL | \
++				 FB_SYNC_DATA_INVERT | FB_SYNC_CLK_IDLE_EN | \
++				 FB_SYNC_SHARP_MODE | FB_SYNC_SWAP_RGB)
++
+ extern struct fb_videomode mxcfb_modedb[];
+ extern int mxcfb_modedb_sz;
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0062-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0062-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch
new file mode 100644
index 0000000..3e6b042
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0062-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch
@@ -0,0 +1,47 @@
+From a4582eafa5ac01ae4191b8079d405f87b4604e94 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 18 Feb 2015 18:48:26 +0200
+Subject: ARM: i.MX6: dts: add backlight support for SBC-FX6 boards
+
+Add backlight support for SBC-FX6 boards.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts |   16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 4bba196..5febb69 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -18,6 +18,14 @@
+ / {
+    model = "CompuLab CM-FX6 on SBC-FX6";
+    compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
++
++	backlight {
++		compatible = "pwm-backlight";
++		pwms = <&pwm3 0 5000000>;
++		brightness-levels = <0 4 8 16 32 64 128 255>;
++		default-brightness-level = <7>;
++	};
++
+ };
+ 
+ &i2c1 {
+@@ -26,4 +34,10 @@
+ 
+ &usdhc3 {
+ 	status = "okay";
+-};
+\ No newline at end of file
++};
++
++&pwm3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_pwm3_1>;
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0063-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0063-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch
new file mode 100644
index 0000000..e90cccb
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0063-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch
@@ -0,0 +1,69 @@
+From 11fb343886f27004c7e0471ac392d15504148e46 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 18 Feb 2015 18:53:01 +0200
+Subject: ARM: i.MX6: dts: rearrangement of the frame buffers definitions
+
+Add a correct frame buffers' definitions
+with regard to the board configuration.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi  |    8 --------
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |    8 ++++++++
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |    8 ++++++++
+ 3 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 3b1a046..7d39f50 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -524,14 +524,6 @@
+ 	status = "okay";
+ };
+ 
+-&mxcfb1 {
+-	status = "okay";
+-};
+-
+-&mxcfb2 {
+-	status = "okay";
+-};
+-
+ &hdmi_core {
+ 	ipu_id = <1>;
+ 	disp_id = <0>;
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 5febb69..8e7432d 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -41,3 +41,11 @@
+ 	pinctrl-0 = <&pinctrl_pwm3_1>;
+ 	status = "okay";
+ };
++
++&mxcfb1 {
++	status = "okay";
++};
++
++&mxcfb2 {
++	status = "okay";
++};
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 31d0e8c..0005eca 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -58,3 +58,11 @@
+ 	fsl,uart-has-rtscts;
+ 	status = "okay";
+ };
++
++&mxcfb1 {
++	status = "okay";
++};
++
++&mxcfb2 {
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0064-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0064-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch
new file mode 100644
index 0000000..557dc00
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0064-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch
@@ -0,0 +1,73 @@
+From b010b5394cf498235391545186c852c5628c36df Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 11 Feb 2015 18:15:42 +0200
+Subject: ARM: i.MX6: iomux: raise DSE for display signals
+
+While drive strength of display signals is configured for 120 Ohm, some
+displays exhibit artifacts.
+Typical drive strength should be around 50 Ohm.
+To fix the the visual artifacts, we raise the drive strength to 48 Ohm.
+
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   36 ++++++++++++++++++++++++++++++++++-
+ 1 file changed, 35 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 7d39f50..9a956ac 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -210,7 +210,7 @@
+ 		disp_id = <0>;
+ 		default_ifmt = "RGB24";
+ 		pinctrl-names = "default";
+-		pinctrl-0 = <&pinctrl_ipu1_1>;
++		pinctrl-0 = <&pinctrl_ipu1_lcd>;
+ 		status = "okay";
+ 	};
+ 
+@@ -268,6 +268,40 @@
+ 			>;
+ 		};
+ 
++		pinctrl_ipu1_lcd: ipu1grp-lcd {
++			fsl,pins = <
++				MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38
++				MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x38
++				MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x38
++				MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x38
++				MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04        0x80000028
++				MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x38
++				MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x38
++				MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x38
++				MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x38
++				MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x38
++				MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x38
++				MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x38
++				MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x38
++				MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x38
++				MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x38
++				MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x38
++				MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x38
++				MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x38
++				MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x38
++				MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x38
++				MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x38
++				MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x38
++				MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x38
++				MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x38
++				MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x38
++				MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x38
++				MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x38
++				MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x38
++				MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x38
++			>;
++		};
++
+ 		/* pins for spi */
+ 		pinctrl_ecspi1: ecspi1grp {
+ 			fsl,pins = <
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0065-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0065-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch
new file mode 100644
index 0000000..ceef1a3
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0065-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch
@@ -0,0 +1,46 @@
+From bbc34de4c1b57e506ad254f330607edfe6cd97a5 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 12 Feb 2015 16:54:04 +0200
+Subject: ARM: i.MX6: cm-fx6: add video mode for KD050C-WVGA
+
+Add video mode for KD050C-WVGA, update the lcdif_modedb with
+the correct parameters for KD050C-WVGA.
+Change mode string for second frame buffer.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts |    1 +
+ drivers/video/mxc/mxc_lcdif.c       |    6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 8e7432d..63f91a6 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -47,5 +47,6 @@
+ };
+ 
+ &mxcfb2 {
++	mode_str ="KD050C-WVGA";
+ 	status = "okay";
+ };
+diff --git a/drivers/video/mxc/mxc_lcdif.c b/drivers/video/mxc/mxc_lcdif.c
+index a0cca1c..9c20235 100644
+--- a/drivers/video/mxc/mxc_lcdif.c
++++ b/drivers/video/mxc/mxc_lcdif.c
+@@ -48,6 +48,12 @@ static struct fb_videomode lcdif_modedb[] = {
+ 	FB_SYNC_CLK_LAT_FALL,
+ 	FB_VMODE_NONINTERLACED,
+ 	0,},
++	{
++	/* 800x480 @ 60 Hz , pixel clk @ 32MHz */
++	"KD050C-WVGA", 60, 800, 480, 30000, 40, 40, 13, 29, 48, 3,
++	FB_SYNC_CLK_LAT_FALL,
++	FB_VMODE_NONINTERLACED,
++	0,},
+ };
+ static int lcdif_modedb_sz = ARRAY_SIZE(lcdif_modedb);
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0066-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0066-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch
new file mode 100644
index 0000000..fab80d3
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0066-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch
@@ -0,0 +1,54 @@
+From fd6adb9e2dd71f2fec823054e32bafb049ab66ed Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 19 Feb 2015 15:45:07 +0200
+Subject: ARM: i.MX6: cm-fx6: refactor the cm-fx6 iomux
+
+Move Marvell Power On and Reset GPIOs into a separate group.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 9a956ac..412e03b 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -239,9 +239,6 @@
+ 				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
+ 				/* POWER_BUTTON */
+ 				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
+-				/* WIFI_PWR_RST */
+-				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x80000000
+-				MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000
+ 			>;
+ 		};
+ 	};
+@@ -387,6 +384,15 @@
+ 			>;
+ 		};
+ 
++		/* pins for wifi/bt */
++		pinctrl_mrvl1: mrvl1grp {
++			fsl,pins = <
++				/* WIFI_PWR_RST */
++				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x80000000
++				MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000
++			>;
++		};
++
+ 		/* pins for pcie */
+ 		pinctrl_pcie: pciegrp {
+ 			fsl,pins = <
+@@ -546,7 +552,7 @@
+ /* wifi/bt */
+ &usdhc1 {
+ 	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usdhc1>;
++	pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>;
+ 	non-removable;
+ 	vmmc-supply = <&awnh387_npoweron>;
+ 	vmmc_aux-supply = <&awnh387_wifi_nreset>;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0067-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0067-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch
new file mode 100644
index 0000000..7663c23
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0067-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch
@@ -0,0 +1,37 @@
+From 2617ce2cbbb304eac16d874ac4dc1e36f78c6efb Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 15 Jan 2015 12:52:56 +0200
+Subject: ARM: i.MX6: dts: gpmi: separate kernel and rootfs
+
+Make separate partitions for kernel and root filesystem on the NAND
+flash.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 412e03b..5ca8993 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -486,6 +486,16 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+ 	status = "okay";
++
++	partition at 0 {
++		label = "linux";
++		reg = <0x0 0x800000>;
++	};
++
++	partition at 800000 {
++		label = "rootfs";
++		reg = < 0x800000 0x0>;
++	};
+ };
+ 
+ /* i2c3 */
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0068-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0068-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
new file mode 100644
index 0000000..1d717df
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0068-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
@@ -0,0 +1,26 @@
+From 06dc75a464f285cdca5c9831ff16499463872d3d Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 4 Feb 2015 17:56:01 +0200
+Subject: ARM: i.MX6: cm-fx6: tag kernel version 3.10.17-cm-fx6-1-beta3
+
+Tag kernel version 3.10.17-cm-fx6-1-beta3.
+This is a new kernel version beta3 release.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index 886dd20..6135d73 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -1,4 +1,4 @@
+-CONFIG_LOCALVERSION="-cm-fx6-1-beta2"
++CONFIG_LOCALVERSION="-cm-fx6-1-beta3"
+ CONFIG_KERNEL_LZO=y
+ CONFIG_SYSVIPC=y
+ CONFIG_NO_HZ=y
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0069-Input-ads7846-make-sure-we-do-not-change-platform-da.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0069-Input-ads7846-make-sure-we-do-not-change-platform-da.patch
new file mode 100644
index 0000000..1316695
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0069-Input-ads7846-make-sure-we-do-not-change-platform-da.patch
@@ -0,0 +1,62 @@
+From 46dfb2fece2b7556f2b91d83bf4955351589abb6 Mon Sep 17 00:00:00 2001
+From: Dmitry Torokhov <dmitry.torokhov at gmail.com>
+Date: Thu, 27 Jun 2013 23:29:25 -0700
+Subject: Input: ads7846 - make sure we do not change platform data
+
+Let's declare platform data a const pointer so that we don't accitentally
+change it. Also fetch it with dev_get_platdata().
+
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>
+---
+ drivers/input/touchscreen/ads7846.c |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
+index 84ccf14..5ff0419 100644
+--- a/drivers/input/touchscreen/ads7846.c
++++ b/drivers/input/touchscreen/ads7846.c
+@@ -961,9 +961,9 @@ static int ads7846_resume(struct device *dev)
+ static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume);
+ 
+ static int ads7846_setup_pendown(struct spi_device *spi,
+-					   struct ads7846 *ts)
++				 struct ads7846 *ts,
++				 const struct ads7846_platform_data *pdata)
+ {
+-	struct ads7846_platform_data *pdata = spi->dev.platform_data;
+ 	int err;
+ 
+ 	/*
+@@ -1003,7 +1003,7 @@ static int ads7846_setup_pendown(struct spi_device *spi,
+  * use formula #2 for pressure, not #3.
+  */
+ static void ads7846_setup_spi_msg(struct ads7846 *ts,
+-				const struct ads7846_platform_data *pdata)
++				  const struct ads7846_platform_data *pdata)
+ {
+ 	struct spi_message *m = &ts->msg[0];
+ 	struct spi_transfer *x = ts->xfer;
+@@ -1203,10 +1203,10 @@ static void ads7846_setup_spi_msg(struct ads7846 *ts,
+ 
+ static int ads7846_probe(struct spi_device *spi)
+ {
++	const struct ads7846_platform_data *pdata = dev_get_platdata(&spi->dev);
+ 	struct ads7846 *ts;
+ 	struct ads7846_packet *packet;
+ 	struct input_dev *input_dev;
+-	struct ads7846_platform_data *pdata = spi->dev.platform_data;
+ 	unsigned long irq_flags;
+ 	int err;
+ 
+@@ -1281,7 +1281,7 @@ static int ads7846_probe(struct spi_device *spi)
+ 		ts->filter = ads7846_no_filter;
+ 	}
+ 
+-	err = ads7846_setup_pendown(spi, ts);
++	err = ads7846_setup_pendown(spi, ts, pdata);
+ 	if (err)
+ 		goto err_cleanup_filter;
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0070-Input-ads7846-add-device-tree-bindings.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0070-Input-ads7846-add-device-tree-bindings.patch
new file mode 100644
index 0000000..abab05b
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0070-Input-ads7846-add-device-tree-bindings.patch
@@ -0,0 +1,293 @@
+From b6ef8ea2213db034115ac99acc52f759037aa693 Mon Sep 17 00:00:00 2001
+From: Daniel Mack <zonque at gmail.com>
+Date: Thu, 27 Jun 2013 23:42:17 -0700
+Subject: Input: ads7846 - add device tree bindings
+
+Signed-off-by: Daniel Mack <zonque at gmail.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>
+---
+ .../devicetree/bindings/input/ads7846.txt          |   91 ++++++++++++++++
+ drivers/input/touchscreen/ads7846.c                |  115 ++++++++++++++++++--
+ 2 files changed, 195 insertions(+), 11 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/input/ads7846.txt
+
+diff --git a/Documentation/devicetree/bindings/input/ads7846.txt b/Documentation/devicetree/bindings/input/ads7846.txt
+new file mode 100644
+index 0000000..5f7619c
+--- /dev/null
++++ b/Documentation/devicetree/bindings/input/ads7846.txt
+@@ -0,0 +1,91 @@
++Device tree bindings for TI's ADS7843, ADS7845, ADS7846, ADS7873, TSC2046
++SPI driven touch screen controllers.
++
++The node for this driver must be a child node of a SPI controller, hence
++all mandatory properties described in
++
++	Documentation/devicetree/bindings/spi/spi-bus.txt
++
++must be specified.
++
++Additional required properties:
++
++	compatible		Must be one of the following, depending on the
++				model:
++					"ti,tsc2046"
++					"ti,ads7843"
++					"ti,ads7845"
++					"ti,ads7846"
++					"ti,ads7873"
++
++	interrupt-parent
++	interrupts		An interrupt node describing the IRQ line the chip's
++				!PENIRQ pin is connected to.
++	vcc-supply		A regulator node for the supply voltage.
++
++
++Optional properties:
++
++	ti,vref-delay-usecs		vref supply delay in usecs, 0 for
++					external vref (u16).
++	ti,vref-mv			The VREF voltage, in millivolts (u16).
++	ti,keep-vref-on			set to keep vref on for differential
++					measurements as well
++	ti,swap-xy			swap x and y axis
++	ti,settle-delay-usec		Settling time of the analog signals;
++					a function of Vcc and the capacitance
++					on the X/Y drivers.  If set to non-zero,
++					two samples are taken with settle_delay
++					us apart, and the second one is used.
++					~150 uSec with 0.01uF caps (u16).
++	ti,penirq-recheck-delay-usecs	If set to non-zero, after samples are
++					taken this delay is applied and penirq
++					is rechecked, to help avoid false
++					events.  This value is affected by the
++					material used to build the touch layer
++					(u16).
++	ti,x-plate-ohms			Resistance of the X-plate,
++					in Ohms (u16).
++	ti,y-plate-ohms			Resistance of the Y-plate,
++					in Ohms (u16).
++	ti,x-min			Minimum value on the X axis (u16).
++	ti,y-min			Minimum value on the Y axis (u16).
++	ti,x-max			Maximum value on the X axis (u16).
++	ti,y-max			Minimum value on the Y axis (u16).
++	ti,pressure-min			Minimum reported pressure value
++					(threshold) - u16.
++	ti,pressure-max			Maximum reported pressure value (u16).
++	ti,debounce-max			Max number of additional readings per
++					sample (u16).
++	ti,debounce-tol			Tolerance used for filtering (u16).
++	ti,debounce-rep			Additional consecutive good readings
++					required after the first two (u16).
++	ti,pendown-gpio-debounce	Platform specific debounce time for the
++					pendown-gpio (u32).
++	pendown-gpio			GPIO handle describing the pin the !PENIRQ
++					line is connected to.
++	linux,wakeup			use any event on touchscreen as wakeup event.
++
++
++Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
++
++	spi_controller {
++		tsc2046 at 0 {
++			reg = <0>;	/* CS0 */
++			compatible = "ti,tsc2046";
++			interrupt-parent = <&gpio1>;
++			interrupts = <8 0>;	/* BOOT6 / GPIO 8 */
++			spi-max-frequency = <1000000>;
++			pendown-gpio = <&gpio1 8 0>;
++			vcc-supply = <&reg_vcc3>;
++
++			ti,x-min = /bits/ 16 <0>;
++			ti,x-max = /bits/ 16 <8000>;
++			ti,y-min = /bits/ 16 <0>;
++			ti,y-max = /bits/ 16 <4800>;
++			ti,x-plate-ohms = /bits/ 16 <40>;
++			ti,pressure-max = /bits/ 16 <255>;
++
++			linux,wakeup;
++		};
++	};
+diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
+index 5ff0419..ea19536 100644
+--- a/drivers/input/touchscreen/ads7846.c
++++ b/drivers/input/touchscreen/ads7846.c
+@@ -27,6 +27,9 @@
+ #include <linux/interrupt.h>
+ #include <linux/slab.h>
+ #include <linux/pm.h>
++#include <linux/of.h>
++#include <linux/of_gpio.h>
++#include <linux/of_device.h>
+ #include <linux/gpio.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+@@ -1201,9 +1204,87 @@ static void ads7846_setup_spi_msg(struct ads7846 *ts,
+ 	spi_message_add_tail(x, m);
+ }
+ 
++#ifdef CONFIG_OF
++static const struct of_device_id ads7846_dt_ids[] = {
++	{ .compatible = "ti,tsc2046",	.data = (void *) 7846 },
++	{ .compatible = "ti,ads7843",	.data = (void *) 7843 },
++	{ .compatible = "ti,ads7845",	.data = (void *) 7845 },
++	{ .compatible = "ti,ads7846",	.data = (void *) 7846 },
++	{ .compatible = "ti,ads7873",	.data = (void *) 7873 },
++	{ }
++};
++MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
++
++static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev)
++{
++	struct ads7846_platform_data *pdata;
++	struct device_node *node = dev->of_node;
++	const struct of_device_id *match;
++
++	if (!node) {
++		dev_err(dev, "Device does not have associated DT data\n");
++		return ERR_PTR(-EINVAL);
++	}
++
++	match = of_match_device(ads7846_dt_ids, dev);
++	if (!match) {
++		dev_err(dev, "Unknown device model\n");
++		return ERR_PTR(-EINVAL);
++	}
++
++	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
++	if (!pdata)
++		return ERR_PTR(-ENOMEM);
++
++	pdata->model = (unsigned long)match->data;
++
++	of_property_read_u16(node, "ti,vref-delay-usecs",
++			     &pdata->vref_delay_usecs);
++	of_property_read_u16(node, "ti,vref-mv", &pdata->vref_mv);
++	pdata->keep_vref_on = of_property_read_bool(node, "ti,keep-vref-on");
++
++	pdata->swap_xy = of_property_read_bool(node, "ti,swap-xy");
++
++	of_property_read_u16(node, "ti,settle-delay-usec",
++			     &pdata->settle_delay_usecs);
++	of_property_read_u16(node, "ti,penirq-recheck-delay-usecs",
++			     &pdata->penirq_recheck_delay_usecs);
++
++	of_property_read_u16(node, "ti,x-plate-ohms", &pdata->x_plate_ohms);
++	of_property_read_u16(node, "ti,y-plate-ohms", &pdata->y_plate_ohms);
++
++	of_property_read_u16(node, "ti,x-min", &pdata->x_min);
++	of_property_read_u16(node, "ti,y-min", &pdata->y_min);
++	of_property_read_u16(node, "ti,x-max", &pdata->x_max);
++	of_property_read_u16(node, "ti,y-max", &pdata->y_max);
++
++	of_property_read_u16(node, "ti,pressure-min", &pdata->pressure_min);
++	of_property_read_u16(node, "ti,pressure-max", &pdata->pressure_max);
++
++	of_property_read_u16(node, "ti,debounce-max", &pdata->debounce_max);
++	of_property_read_u16(node, "ti,debounce-tol", &pdata->debounce_tol);
++	of_property_read_u16(node, "ti,debounce-rep", &pdata->debounce_rep);
++
++	of_property_read_u32(node, "ti,pendown-gpio-debounce",
++			     &pdata->gpio_pendown_debounce);
++
++	pdata->wakeup = of_property_read_bool(node, "linux,wakeup");
++
++	pdata->gpio_pendown = of_get_named_gpio(dev->of_node, "pendown-gpio", 0);
++
++	return pdata;
++}
++#else
++static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev)
++{
++	dev_err(dev, "no platform data defined\n");
++	return ERR_PTR(-EINVAL);
++}
++#endif
++
+ static int ads7846_probe(struct spi_device *spi)
+ {
+-	const struct ads7846_platform_data *pdata = dev_get_platdata(&spi->dev);
++	const struct ads7846_platform_data *pdata;
+ 	struct ads7846 *ts;
+ 	struct ads7846_packet *packet;
+ 	struct input_dev *input_dev;
+@@ -1212,22 +1293,18 @@ static int ads7846_probe(struct spi_device *spi)
+ 
+ 	if (!spi->irq) {
+ 		dev_dbg(&spi->dev, "no IRQ?\n");
+-		return -ENODEV;
+-	}
+-
+-	if (!pdata) {
+-		dev_dbg(&spi->dev, "no platform data?\n");
+-		return -ENODEV;
++		return -EINVAL;
+ 	}
+ 
+ 	/* don't exceed max specified sample rate */
+ 	if (spi->max_speed_hz > (125000 * SAMPLE_BITS)) {
+-		dev_dbg(&spi->dev, "f(sample) %d KHz?\n",
++		dev_err(&spi->dev, "f(sample) %d KHz?\n",
+ 				(spi->max_speed_hz/SAMPLE_BITS)/1000);
+ 		return -EINVAL;
+ 	}
+ 
+-	/* We'd set TX word size 8 bits and RX word size to 13 bits ... except
++	/*
++	 * We'd set TX word size 8 bits and RX word size to 13 bits ... except
+ 	 * that even if the hardware can do that, the SPI controller driver
+ 	 * may not.  So we stick to very-portable 8 bit words, both RX and TX.
+ 	 */
+@@ -1250,17 +1327,25 @@ static int ads7846_probe(struct spi_device *spi)
+ 	ts->packet = packet;
+ 	ts->spi = spi;
+ 	ts->input = input_dev;
+-	ts->vref_mv = pdata->vref_mv;
+-	ts->swap_xy = pdata->swap_xy;
+ 
+ 	mutex_init(&ts->lock);
+ 	init_waitqueue_head(&ts->wait);
+ 
++	pdata = dev_get_platdata(&spi->dev);
++	if (!pdata) {
++		pdata = ads7846_probe_dt(&spi->dev);
++		if (IS_ERR(pdata))
++			return PTR_ERR(pdata);
++	}
++
+ 	ts->model = pdata->model ? : 7846;
+ 	ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100;
+ 	ts->x_plate_ohms = pdata->x_plate_ohms ? : 400;
+ 	ts->pressure_max = pdata->pressure_max ? : ~0;
+ 
++	ts->vref_mv = pdata->vref_mv;
++	ts->swap_xy = pdata->swap_xy;
++
+ 	if (pdata->filter != NULL) {
+ 		if (pdata->filter_init != NULL) {
+ 			err = pdata->filter_init(pdata, &ts->filter_data);
+@@ -1370,6 +1455,13 @@ static int ads7846_probe(struct spi_device *spi)
+ 
+ 	device_init_wakeup(&spi->dev, pdata->wakeup);
+ 
++	/*
++	 * If device does not carry platform data we must have allocated it
++	 * when parsing DT data.
++	 */
++	if (!dev_get_platdata(&spi->dev))
++		devm_kfree(&spi->dev, (void *)pdata);
++
+ 	return 0;
+ 
+  err_remove_attr_group:
+@@ -1437,6 +1529,7 @@ static struct spi_driver ads7846_driver = {
+ 		.name	= "ads7846",
+ 		.owner	= THIS_MODULE,
+ 		.pm	= &ads7846_pm,
++		.of_match_table = of_match_ptr(ads7846_dt_ids),
+ 	},
+ 	.probe		= ads7846_probe,
+ 	.remove		= ads7846_remove,
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0071-Input-ads7846-use-IS_ENABLED-macro.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0071-Input-ads7846-use-IS_ENABLED-macro.patch
new file mode 100644
index 0000000..bec5ee5
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0071-Input-ads7846-use-IS_ENABLED-macro.patch
@@ -0,0 +1,38 @@
+From ff0d27cb984391f20598cc9b874456aa7abe8527 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam at freescale.com>
+Date: Sun, 1 Dec 2013 22:11:26 -0800
+Subject: Input: ads7846 - use IS_ENABLED() macro
+
+Using the IS_ENABLED() macro can make the code shorter and simpler
+
+Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>
+---
+ drivers/input/touchscreen/ads7846.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
+index ea19536..5695786 100644
+--- a/drivers/input/touchscreen/ads7846.c
++++ b/drivers/input/touchscreen/ads7846.c
+@@ -101,7 +101,7 @@ struct ads7846 {
+ 	struct spi_device	*spi;
+ 	struct regulator	*reg;
+ 
+-#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE)
++#if IS_ENABLED(CONFIG_HWMON)
+ 	struct attribute_group	*attr_group;
+ 	struct device		*hwmon;
+ #endif
+@@ -421,7 +421,7 @@ static int ads7845_read12_ser(struct device *dev, unsigned command)
+ 	return status;
+ }
+ 
+-#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE)
++#if IS_ENABLED(CONFIG_HWMON)
+ 
+ #define SHOW(name, var, adjust) static ssize_t \
+ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0072-ARM-dts-cm-fx6-enable-can-bus.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0072-ARM-dts-cm-fx6-enable-can-bus.patch
new file mode 100644
index 0000000..f300db7
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0072-ARM-dts-cm-fx6-enable-can-bus.patch
@@ -0,0 +1,29 @@
+From aa80c45df5aa30d8936005c772cdff38bdf1c15f Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 26 Feb 2015 16:45:42 +0200
+Subject: ARM: dts: cm-fx6: enable can bus
+
+Enable can bus.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 63f91a6..2432f34 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -50,3 +50,9 @@
+ 	mode_str ="KD050C-WVGA";
+ 	status = "okay";
+ };
++
++&flexcan1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_flexcan1_1>;
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0073-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0073-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch
new file mode 100644
index 0000000..044f354
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0073-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch
@@ -0,0 +1,85 @@
+From 74a3c040bd9199f458a1677e6d319fb90f95bc2e Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 25 Feb 2015 20:18:34 +0200
+Subject: ARM: dts: cm-fx6: add tsc2046 touchscreen support
+
+Add tsc2046 touchscreen support.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |   45 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 45 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 5ca8993..704ef4b 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -148,6 +148,13 @@
+ 			vin-supply = <&reg_sata_nstandby1>;
+ 		};
+ 
++		tsc2046reg: tsc2046-reg {
++			compatible = "regulator-fixed";
++			regulator-name = "tsc2046-reg";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++		};
++
+ 	};
+ 
+ 	aliases {
+@@ -393,6 +400,14 @@
+ 			>;
+ 		};
+ 
++		/* pins for tsc2046 pendown */
++		pinctrl_tsc2046: tsc2046grp {
++			fsl,pins = <
++				 /* tsc2046 PENDOWN */
++				MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000
++			>;
++		};
++
+ 		/* pins for pcie */
+ 		pinctrl_pcie: pciegrp {
+ 			fsl,pins = <
+@@ -471,6 +486,36 @@
+ 			reg = <0x100000 0x100000>;
+ 		};
+ 	};
++
++	/* touch controller */
++	touch:	tsc2046 at 1 {
++		pinctrl-names = "default";
++		pinctrl-0 = <&pinctrl_tsc2046>;
++
++		compatible = "ti,tsc2046";
++		vcc-supply = <&tsc2046reg>;
++
++		reg = <1>;	/* CS1 */
++		spi-max-frequency = <1500000>;
++
++		interrupt-parent = <&gpio2>;
++		interrupts = <15 0>;
++		pendown-gpio = <&gpio2 15 0>;
++
++		ti,x-min = /bits/ 16 <0x0>;
++		ti,x-max = /bits/ 16 <0x0fff>;
++		ti,y-min = /bits/ 16 <0x0>;
++		ti,y-max = /bits/ 16 <0x0fff>;
++
++		ti,x-plate-ohms = /bits/ 16 <180>;
++		ti,pressure-max = /bits/ 16 <255>;
++
++		ti,debounce-max = /bits/ 16 <30>;
++		ti,debounce-tol = /bits/ 16 <10>;
++		ti,debounce-rep = /bits/ 16 <1>;
++
++		linux,wakeup;
++	};
+ };
+ 
+ /* eth0 */
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0074-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0074-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch
new file mode 100644
index 0000000..6bc02cd
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0074-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch
@@ -0,0 +1,83 @@
+From b27d16aa31c165d6cf714fc15b2fffb726dceed2 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Thu, 5 Mar 2015 09:59:32 +0200
+Subject: ARM: i.MX6: sb-fx6x: refactoring of the usdhc3 definition
+
+Add uhs pinctrl state for usdhc3.
+This is needed for supporting ultra high speed cards.
+
+Add cd/wp definitions.
+Add a missing property no-1-8-v.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sb-fx6x.dtsi |   32 ++++++++++++++++++++++++++++++--
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |    1 +
+ 2 files changed, 31 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+index 41237c7..372a3c1 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+@@ -53,6 +53,30 @@
+ 				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
+ 				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
+ 				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
++				MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000
++				MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000
++			>;
++		};
++
++		pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */
++			fsl,pins = <
++				MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9
++				MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9
++				MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9
++				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9
++				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9
++				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9
++			>;
++		};
++
++		pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */
++			fsl,pins = <
++				MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9
++				MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9
++				MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9
++				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9
++				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9
++				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9
+ 			>;
+ 		};
+ 
+@@ -77,8 +101,12 @@
+ 
+ /* mmc */
+ &usdhc3 {
+-	pinctrl-names = "default";
++	pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ 	pinctrl-0 = <&pinctrl_usdhc3>;
++	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
++	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
++	cd-gpios = <&gpio7 1 0>;
++	no-1-8-v;
+ 	vmmc-supply = <&reg_3p3v>;
+ 	status = "disabled";
+-};
+\ No newline at end of file
++};
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 2432f34..cd5c011 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -33,6 +33,7 @@
+ };
+ 
+ &usdhc3 {
++	wp-gpios = <&gpio7 0 0>;
+ 	status = "okay";
+ };
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0075-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0075-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch
new file mode 100644
index 0000000..399f822
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0075-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch
@@ -0,0 +1,47 @@
+From 4690b76933f79b433c3cac771ebb8519550113b4 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 18 Mar 2015 14:30:49 +0200
+Subject: ARM: i.MX6: cm-fx6: fix up incorrect compatibilities
+
+Fix up incorrect compatibilities.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi |    9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 704ef4b..8175cee 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -163,8 +163,7 @@
+ 	};
+ 
+ 	sound {
+-		compatible = "fsl,imx6q-cm-fx6-wm8731",
+-			  "fsl,imx-audio-wm8731";
++		compatible = "fsl,imx-audio-wm8731";
+ 		model = "wm8731-audio";
+ 		ssi-controller = <&ssi2>;
+ 		src-port = <2>;
+@@ -174,15 +173,13 @@
+ 	};
+ 
+ 	sound-hdmi {
+-		compatible = "fsl,imx6q-audio-hdmi",
+-			  "fsl,imx-audio-hdmi";
++		compatible = "fsl,imx-audio-hdmi";
+ 		model = "imx-audio-hdmi";
+ 		hdmi-controller = <&hdmi_audio>;
+ 	};
+ 
+ 	sound-spdif {
+-		compatible = "fsl,imx-audio-spdif",
+-			  "fsl,imx-sabreauto-spdif";
++		compatible = "fsl,imx-audio-spdif";
+ 		model = "imx-spdif";
+ 		spdif-controller = <&spdif>;
+ 		spdif-out;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0076-ARM-i.MX6-dts-fix-include-file-order.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0076-ARM-i.MX6-dts-fix-include-file-order.patch
new file mode 100644
index 0000000..73a35e8
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0076-ARM-i.MX6-dts-fix-include-file-order.patch
@@ -0,0 +1,129 @@
+From 7d76c38b10d36782ead47eab2f778289cfa270a7 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Sun, 22 Mar 2015 11:15:08 +0200
+Subject: ARM: i.MX6: dts: fix include file order
+
+Fix include file order.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dts   |    3 ++-
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi  |    2 --
+ arch/arm/boot/dts/imx6q-sb-fx6.dtsi  |    2 --
+ arch/arm/boot/dts/imx6q-sb-fx6m.dtsi |    4 +---
+ arch/arm/boot/dts/imx6q-sb-fx6x.dtsi |    2 --
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts  |    4 +++-
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts |    4 +++-
+ 7 files changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+index a0e423b..14c2d6a 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
+@@ -12,9 +12,10 @@
+  */
+ 
+ /dts-v1/;
++#include "imx6q.dtsi"
+ #include "imx6q-cm-fx6.dtsi"
+ 
+ / {
+ 	model = "CompuLab CM-FX6";
+ 	compatible = "compulab,cm-fx6", "fsl,imx6q";
+-};
+\ No newline at end of file
++};
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index 8175cee..f53d94e 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -11,8 +11,6 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
+-#include "imx6q.dtsi"
+-
+ / {
+ 	memory {
+ 		reg = <0x10000000 0x80000000>;
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+index fc4f347a..4d030f9 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+@@ -11,8 +11,6 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
+-#include "imx6q-sb-fx6x.dtsi"
+-
+ / {
+ 	i2cmux {
+ 		compatible = "i2c-mux-gpio";
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+index a6cc8dd..5e6c859 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+@@ -11,8 +11,6 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
+-#include "imx6q-sb-fx6x.dtsi"
+-
+ / {
+ 	eth at pcie {
+ 		compatible = "intel,i211";
+@@ -65,4 +63,4 @@
+ 			};
+ 		};
+ 	};
+-};
+\ No newline at end of file
++};
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+index 372a3c1..01f73ae 100644
+--- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
++++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+@@ -11,8 +11,6 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
+-#include "imx6q.dtsi"
+-
+ / {
+ 	regulators {
+ 		compatible = "simple-bus";
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index cd5c011..84a6d23 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -12,8 +12,10 @@
+ */
+ 
+ /dts-v1/;
+-#include "imx6q-sb-fx6.dtsi"
++#include "imx6q.dtsi"
+ #include "imx6q-cm-fx6.dtsi"
++#include "imx6q-sb-fx6x.dtsi"
++#include "imx6q-sb-fx6.dtsi"
+ 
+ / {
+    model = "CompuLab CM-FX6 on SBC-FX6";
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 0005eca..817da28 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -12,8 +12,10 @@
+ */
+ 
+ /dts-v1/;
+-#include "imx6q-sb-fx6m.dtsi"
++#include "imx6q.dtsi"
+ #include "imx6q-cm-fx6.dtsi"
++#include "imx6q-sb-fx6x.dtsi"
++#include "imx6q-sb-fx6m.dtsi"
+ 
+ / {
+ 	model = "CompuLab CM-FX6 on SBC-FX6m";	
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0077-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0077-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch
new file mode 100644
index 0000000..4b25082
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0077-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch
@@ -0,0 +1,570 @@
+From 142a9ceafed501e8fa8b815d7f876ae618e082e8 Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Mon, 23 Mar 2015 09:50:04 +0200
+Subject: ARM: i.MX6: dts: rename the sb-fx6 board files
+
+In preparation for DL/S support addition, we rename the files to better
+describe the content and reuse the same DT code.
+Rename the sb-fx6 board files' names
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+[grinberg at compulab.co.il: added a bit more descriptive commit message]
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sb-fx6.dtsi    |   60 -----------------
+ arch/arm/boot/dts/imx6q-sb-fx6m.dtsi   |   66 -------------------
+ arch/arm/boot/dts/imx6q-sb-fx6x.dtsi   |  110 --------------------------------
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts    |    4 +-
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts   |    4 +-
+ arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi  |   60 +++++++++++++++++
+ arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi |   66 +++++++++++++++++++
+ arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi |  110 ++++++++++++++++++++++++++++++++
+ 8 files changed, 240 insertions(+), 240 deletions(-)
+ delete mode 100644 arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+ delete mode 100644 arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+ delete mode 100644 arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+ create mode 100644 arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+ create mode 100644 arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
+ create mode 100644 arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi
+
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
+deleted file mode 100644
+index 4d030f9..0000000
+--- a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi
++++ /dev/null
+@@ -1,60 +0,0 @@
+-/*
+- * Copyright 2014 CompuLab Ltd.
+- *
+- * Author: Valentin Raevsky <valentin at compulab.co.il>
+- *
+- * The code contained herein is licensed under the GNU General Public
+- * License. You may obtain a copy of the GNU General Public License
+- * Version 2 or later at the following locations:
+- *
+- * http://www.opensource.org/licenses/gpl-license.html
+- * http://www.gnu.org/copyleft/gpl.html
+- */
+-
+-/ {
+-	i2cmux {
+-		compatible = "i2c-mux-gpio";
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-		mux-gpios = <&gpio1 2 0>;
+-		i2c-parent = <&i2c1>;
+-
+-		i2c at 0 {
+-			reg = <0>;
+-			#address-cells = <1>;
+-			#size-cells = <0>;
+-
+-			pca9555 at 26 {
+-			      compatible = "nxp,pca9555";
+-			      gpio-controller;
+-			      #gpio-cells = <2>;
+-			      reg = <0x26>;
+-			};
+-
+-			hx8526 at 4a {
+-			      compatible = "himax,himax_ts";
+-			      reg = <0x4a>;
+-			      gpio_intr = <&gpio1 4 0>;
+-			};
+-
+-			eeprom at 50 {
+-				compatible = "at24,24c02";
+-				reg = <0x50>;
+-				pagesize = <16>;
+-			};
+-
+-		};
+-
+-		i2c at 1 {
+-			reg = <1>;
+-			#address-cells = <1>;
+-			#size-cells = <0>;
+-
+-			dvi: edid at 50 {
+-				compatible = "fsl,imx6-hdmi-i2c";
+-				reg = <0x50>;
+-			};
+-		};
+-
+-	};
+-};
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
+deleted file mode 100644
+index 5e6c859..0000000
+--- a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi
++++ /dev/null
+@@ -1,66 +0,0 @@
+-/*
+- * Copyright 2014 CompuLab Ltd.
+- *
+- * Author: Valentin Raevsky <valentin at compulab.co.il>
+- *
+- * The code contained herein is licensed under the GNU General Public
+- * License. You may obtain a copy of the GNU General Public License
+- * Version 2 or later at the following locations:
+- *
+- * http://www.opensource.org/licenses/gpl-license.html
+- * http://www.gnu.org/copyleft/gpl.html
+- */
+-
+-/ {
+-	eth at pcie {
+-		compatible = "intel,i211";
+-		local-mac-address = [FF FF FF FF FF FF];
+-		status = "okay";
+-	};
+-
+-	gpio-keys {
+-		compatible = "gpio-keys";
+-		power {
+-			label = "Power Button";
+-			gpios = <&gpio1 29 1>;
+-			linux,code = <116>; /* KEY_POWER */
+-			gpio-key,wakeup;
+-		};
+-	};
+-
+-	i2cmux {
+-		compatible = "i2c-mux-gpio";
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-		mux-gpios = <&gpio1 2 0>;
+-		i2c-parent = <&i2c1>;
+-
+-		i2c at 0 {
+-			reg = <0>;
+-			#address-cells = <1>;
+-			#size-cells = <0>;
+-
+-			eeprom at 50 {
+-				compatible = "at24,24c02";
+-				reg = <0x50>;
+-				pagesize = <16>;
+-			};
+-
+-			rtc at 56 {
+-				compatible = "emmicro,em3027";
+-				reg = <0x56>;
+-			};
+-		};
+-
+-		i2c at 1 {
+-			reg = <1>;
+-			#address-cells = <1>;
+-			#size-cells = <0>;
+-
+-			dvi: edid at 50 {
+-				compatible = "fsl,imx6-hdmi-i2c";
+-				reg = <0x50>;
+-			};
+-		};
+-	};
+-};
+diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
+deleted file mode 100644
+index 01f73ae..0000000
+--- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi
++++ /dev/null
+@@ -1,110 +0,0 @@
+-/*
+- * Copyright 2014 CompuLab Ltd.
+- *
+- * Author: Valentin Raevsky <valentin at compulab.co.il>
+- *
+- * The code contained herein is licensed under the GNU General Public
+- * License. You may obtain a copy of the GNU General Public License
+- * Version 2 or later at the following locations:
+- *
+- * http://www.opensource.org/licenses/gpl-license.html
+- * http://www.gnu.org/copyleft/gpl.html
+- */
+-
+-/ {
+-	regulators {
+-		compatible = "simple-bus";
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+-		/* regulator for mmc */
+-		reg_3p3v: 3p3v {
+-			compatible = "regulator-fixed";
+-			regulator-name = "3P3V";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			regulator-always-on;
+-		};
+-	};
+-
+-};
+-
+-&iomuxc {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>;
+-
+-	imx6q-sb-fx6x {
+-		/* pins for i2c1 */
+-		pinctrl_i2c1: i2c1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
+-				MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
+-			>;
+-		};
+-
+-		/* pins for mmc */
+-		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
+-				MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000
+-				MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000
+-			>;
+-		};
+-
+-		pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */
+-			fsl,pins = <
+-				MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9
+-				MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9
+-				MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9
+-				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9
+-				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9
+-				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9
+-			>;
+-		};
+-
+-		pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */
+-			fsl,pins = <
+-				MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9
+-				MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9
+-				MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9
+-				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9
+-				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9
+-				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9
+-			>;
+-		};
+-
+-		/* pins for dvi/ts */
+-		pinctrl_dvi0: dvi0grp {
+-			fsl,pins = <
+-				/* DVI_DDC_SEL */
+-				MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000
+-				/* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */
+-				MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000
+-			>;
+-		};
+-	};
+-};
+-
+-/* i2c1 */
+-&i2c1 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_i2c1>;
+-	status = "disabled";
+-};
+-
+-/* mmc */
+-&usdhc3 {
+-	pinctrl-names = "default", "state_100mhz", "state_200mhz";
+-	pinctrl-0 = <&pinctrl_usdhc3>;
+-	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+-	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+-	cd-gpios = <&gpio7 1 0>;
+-	no-1-8-v;
+-	vmmc-supply = <&reg_3p3v>;
+-	status = "disabled";
+-};
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 84a6d23..9d31d15 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -14,8 +14,8 @@
+ /dts-v1/;
+ #include "imx6q.dtsi"
+ #include "imx6q-cm-fx6.dtsi"
+-#include "imx6q-sb-fx6x.dtsi"
+-#include "imx6q-sb-fx6.dtsi"
++#include "imx6qdl-sb-fx6x.dtsi"
++#include "imx6qdl-sb-fx6.dtsi"
+ 
+ / {
+    model = "CompuLab CM-FX6 on SBC-FX6";
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 817da28..a98f1a2 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -14,8 +14,8 @@
+ /dts-v1/;
+ #include "imx6q.dtsi"
+ #include "imx6q-cm-fx6.dtsi"
+-#include "imx6q-sb-fx6x.dtsi"
+-#include "imx6q-sb-fx6m.dtsi"
++#include "imx6qdl-sb-fx6x.dtsi"
++#include "imx6qdl-sb-fx6m.dtsi"
+ 
+ / {
+ 	model = "CompuLab CM-FX6 on SBC-FX6m";	
+diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+new file mode 100644
+index 0000000..4d030f9
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+@@ -0,0 +1,60 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/ {
++	i2cmux {
++		compatible = "i2c-mux-gpio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		mux-gpios = <&gpio1 2 0>;
++		i2c-parent = <&i2c1>;
++
++		i2c at 0 {
++			reg = <0>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			pca9555 at 26 {
++			      compatible = "nxp,pca9555";
++			      gpio-controller;
++			      #gpio-cells = <2>;
++			      reg = <0x26>;
++			};
++
++			hx8526 at 4a {
++			      compatible = "himax,himax_ts";
++			      reg = <0x4a>;
++			      gpio_intr = <&gpio1 4 0>;
++			};
++
++			eeprom at 50 {
++				compatible = "at24,24c02";
++				reg = <0x50>;
++				pagesize = <16>;
++			};
++
++		};
++
++		i2c at 1 {
++			reg = <1>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			dvi: edid at 50 {
++				compatible = "fsl,imx6-hdmi-i2c";
++				reg = <0x50>;
++			};
++		};
++
++	};
++};
+diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
+new file mode 100644
+index 0000000..5e6c859
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
+@@ -0,0 +1,66 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/ {
++	eth at pcie {
++		compatible = "intel,i211";
++		local-mac-address = [FF FF FF FF FF FF];
++		status = "okay";
++	};
++
++	gpio-keys {
++		compatible = "gpio-keys";
++		power {
++			label = "Power Button";
++			gpios = <&gpio1 29 1>;
++			linux,code = <116>; /* KEY_POWER */
++			gpio-key,wakeup;
++		};
++	};
++
++	i2cmux {
++		compatible = "i2c-mux-gpio";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		mux-gpios = <&gpio1 2 0>;
++		i2c-parent = <&i2c1>;
++
++		i2c at 0 {
++			reg = <0>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			eeprom at 50 {
++				compatible = "at24,24c02";
++				reg = <0x50>;
++				pagesize = <16>;
++			};
++
++			rtc at 56 {
++				compatible = "emmicro,em3027";
++				reg = <0x56>;
++			};
++		};
++
++		i2c at 1 {
++			reg = <1>;
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			dvi: edid at 50 {
++				compatible = "fsl,imx6-hdmi-i2c";
++				reg = <0x50>;
++			};
++		};
++	};
++};
+diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi
+new file mode 100644
+index 0000000..01f73ae
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi
+@@ -0,0 +1,110 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/ {
++	regulators {
++		compatible = "simple-bus";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		/* regulator for mmc */
++		reg_3p3v: 3p3v {
++			compatible = "regulator-fixed";
++			regulator-name = "3P3V";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			regulator-always-on;
++		};
++	};
++
++};
++
++&iomuxc {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>;
++
++	imx6q-sb-fx6x {
++		/* pins for i2c1 */
++		pinctrl_i2c1: i2c1grp {
++			fsl,pins = <
++				MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
++				MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for mmc */
++		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
++				MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000
++				MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000
++			>;
++		};
++
++		pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */
++			fsl,pins = <
++				MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9
++				MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9
++				MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9
++				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9
++				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9
++				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9
++			>;
++		};
++
++		pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */
++			fsl,pins = <
++				MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9
++				MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9
++				MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9
++				MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9
++				MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9
++				MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9
++			>;
++		};
++
++		/* pins for dvi/ts */
++		pinctrl_dvi0: dvi0grp {
++			fsl,pins = <
++				/* DVI_DDC_SEL */
++				MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000
++				/* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */
++				MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000
++			>;
++		};
++	};
++};
++
++/* i2c1 */
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c1>;
++	status = "disabled";
++};
++
++/* mmc */
++&usdhc3 {
++	pinctrl-names = "default", "state_100mhz", "state_200mhz";
++	pinctrl-0 = <&pinctrl_usdhc3>;
++	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
++	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
++	cd-gpios = <&gpio7 1 0>;
++	no-1-8-v;
++	vmmc-supply = <&reg_3p3v>;
++	status = "disabled";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0078-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0078-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch
new file mode 100644
index 0000000..7893125
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0078-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch
@@ -0,0 +1,243 @@
+From ef7da7658e6adf062e7b1cdece718b7ec0726162 Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Mon, 23 Mar 2015 09:59:54 +0200
+Subject: ARM: i.MX6: dts: refactor the sbc-fx6 target files
+
+In preparation for DL/S support addition, we move the common code
+to dtsi files for better reuse of the same DT code.
+Refactor the sbc-fx6 target files.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+[grinberg at compulab.co.il: added a bit more descriptive commit message]
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6.dts    |   42 ++--------------------------
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts   |   47 --------------------------------
+ arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi  |   37 +++++++++++++++++++++++++
+ arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi |   47 ++++++++++++++++++++++++++++++++
+ 4 files changed, 86 insertions(+), 87 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+index 9d31d15..1234fb3 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts
+@@ -18,44 +18,6 @@
+ #include "imx6qdl-sb-fx6.dtsi"
+ 
+ / {
+-   model = "CompuLab CM-FX6 on SBC-FX6";
+-   compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
+-
+-	backlight {
+-		compatible = "pwm-backlight";
+-		pwms = <&pwm3 0 5000000>;
+-		brightness-levels = <0 4 8 16 32 64 128 255>;
+-		default-brightness-level = <7>;
+-	};
+-
+-};
+-
+-&i2c1 {
+-	status = "okay";
+-};
+-
+-&usdhc3 {
+-	wp-gpios = <&gpio7 0 0>;
+-	status = "okay";
+-};
+-
+-&pwm3 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_pwm3_1>;
+-	status = "okay";
+-};
+-
+-&mxcfb1 {
+-	status = "okay";
+-};
+-
+-&mxcfb2 {
+-	mode_str ="KD050C-WVGA";
+-	status = "okay";
+-};
+-
+-&flexcan1 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_flexcan1_1>;
+-	status = "okay";
++	model = "CompuLab CM-FX6 on SBC-FX6";
++	compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q";
+ };
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index a98f1a2..19bf948 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -20,51 +20,4 @@
+ / {
+ 	model = "CompuLab CM-FX6 on SBC-FX6m";	
+ 	compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q";
+-
+-	iomux_uart2: pinmux at 20E0924 {
+-		compatible = "pinctrl-single";
+-		reg = <0x20E0000 0x924>;	/* Single register */
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-		pinctrl-single,register-width = <32>;
+-		pinctrl-single,function-mask = <0x4>;
+-	};
+-};
+-
+-&iomuxc {
+-	imx6q-sbc-fx6m {
+-		/* pins for uart2 */
+-		pinctrl_uart2: uart2grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
+-				MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
+-				MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
+-				MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
+-		>;
+-		};
+-	};
+-};
+-
+-&i2c1 {
+-	status = "okay";
+-};
+-
+-&usdhc3 {
+-	status = "okay";
+-};
+-
+-/* rear serial console */
+-&uart2 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_uart2>;
+-	fsl,uart-has-rtscts;
+-	status = "okay";
+-};
+-
+-&mxcfb1 {
+-	status = "okay";
+-};
+-
+-&mxcfb2 {
+-	status = "okay";
+ };
+diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+index 4d030f9..129e88e 100644
+--- a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+@@ -12,6 +12,13 @@
+  */
+ 
+ / {
++	backlight {
++		compatible = "pwm-backlight";
++		pwms = <&pwm3 0 5000000>;
++		brightness-levels = <0 4 8 16 32 64 128 255>;
++		default-brightness-level = <7>;
++	};
++
+ 	i2cmux {
+ 		compatible = "i2c-mux-gpio";
+ 		#address-cells = <1>;
+@@ -58,3 +65,33 @@
+ 
+ 	};
+ };
++
++&i2c1 {
++	status = "okay";
++};
++
++&usdhc3 {
++	wp-gpios = <&gpio7 0 0>;
++	status = "okay";
++};
++
++&pwm3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_pwm3_1>;
++	status = "okay";
++};
++
++&mxcfb1 {
++	status = "okay";
++};
++
++&mxcfb2 {
++	mode_str ="KD050C-WVGA";
++	status = "okay";
++};
++
++&flexcan1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_flexcan1_1>;
++	status = "okay";
++};
+diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
+index 5e6c859..5394364 100644
+--- a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi
+@@ -12,6 +12,15 @@
+  */
+ 
+ / {
++	iomux_uart2: pinmux at 20E0924 {
++		compatible = "pinctrl-single";
++		reg = <0x20E0000 0x924>;	/* Single register */
++		#address-cells = <1>;
++		#size-cells = <0>;
++		pinctrl-single,register-width = <32>;
++		pinctrl-single,function-mask = <0x4>;
++	};
++
+ 	eth at pcie {
+ 		compatible = "intel,i211";
+ 		local-mac-address = [FF FF FF FF FF FF];
+@@ -64,3 +73,41 @@
+ 		};
+ 	};
+ };
++
++&iomuxc {
++	imx6q-sbc-fx6m {
++		/* pins for uart2 */
++		pinctrl_uart2: uart2grp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
++				MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
++				MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
++				MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
++		>;
++		};
++	};
++};
++
++&i2c1 {
++	status = "okay";
++};
++
++&usdhc3 {
++	status = "okay";
++};
++
++/* rear serial console */
++&uart2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_uart2>;
++	fsl,uart-has-rtscts;
++	status = "okay";
++};
++
++&mxcfb1 {
++	status = "okay";
++};
++
++&mxcfb2 {
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0079-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0079-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch
new file mode 100644
index 0000000..62f23cb
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0079-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch
@@ -0,0 +1,1182 @@
+From 280298722217ddc1225d206442352b5102b756d3 Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Mon, 23 Mar 2015 10:12:35 +0200
+Subject: ARM: i.MX6: cm-fx6: separate DL and Quad stuff
+
+Break down the cm-fx6 file into two files in order to
+separate DL and Quad supported features.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+[grinberg at compulab.co.il: fix available memory size and
+rename "dl" to "qdl"]
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-cm-fx6.dtsi   |  553 +------------------------------
+ arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi |  573 +++++++++++++++++++++++++++++++++
+ 2 files changed, 575 insertions(+), 551 deletions(-)
+ create mode 100644 arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+
+diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+index f53d94e..3a10e5e 100644
+--- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi
+@@ -11,75 +11,14 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
+-/ {
+-	memory {
+-		reg = <0x10000000 0x80000000>;
+-	};
+-
+-	leds {
+-		compatible = "gpio-leds";
+-		heartbeat-led {
+-			label = "Heartbeat";
+-			gpios = <&gpio2 31 0>;
+-			linux,default-trigger = "heartbeat";
+-		};
+-	};
++#include "imx6qdl-cm-fx6.dtsi"
+ 
++/ {
+ 	regulators {
+ 		compatible = "simple-bus";
+ 		#address-cells = <1>;
+ 		#size-cells = <0>;
+ 
+-		/* regulator for usb otg */
+-		reg_usb_otg_vbus: usb_otg_vbus {
+-			compatible = "regulator-fixed";
+-			regulator-name = "usb_otg_vbus";
+-			regulator-min-microvolt = <5000000>;
+-			regulator-max-microvolt = <5000000>;
+-			gpio = <&gpio3 22 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator1 for pcie power-on-gpio */
+-		pcie_power_on_gpio: regulator-pcie-power-on-gpio {
+-			compatible = "regulator-fixed";
+-			regulator-name = "regulator-pcie-power-on-gpio";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio2 24 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator for usb hub1 */
+-		reg_usb_h1_vbus: usb_h1_vbus {
+-			compatible = "regulator-fixed";
+-			regulator-name = "usb_h1_vbus";
+-			regulator-min-microvolt = <5000000>;
+-			regulator-max-microvolt = <5000000>;
+-			gpio = <&gpio7 8 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator1 for wifi/bt */
+-		awnh387_npoweron: regulator-awnh387-npoweron {
+-			compatible = "regulator-fixed";
+-			regulator-name = "regulator-awnh387-npoweron";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio7 12 0>;
+-			enable-active-high;
+-		};
+-
+-		/* regulator2 for wifi/bt */
+-		awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
+-			compatible = "regulator-fixed";
+-			regulator-name = "regulator-awnh387-wifi-nreset";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-			gpio = <&gpio6 16 0>;
+-			startup-delay-us = <10000>;
+-		};
+-
+ 		reg_sata_ldo_en: sata_ldo_en {
+ 			compatible = "regulator-fixed";
+ 			regulator-name = "cm_fx6_sata_ldo_en";
+@@ -146,499 +85,11 @@
+ 			vin-supply = <&reg_sata_nstandby1>;
+ 		};
+ 
+-		tsc2046reg: tsc2046-reg {
+-			compatible = "regulator-fixed";
+-			regulator-name = "tsc2046-reg";
+-			regulator-min-microvolt = <3300000>;
+-			regulator-max-microvolt = <3300000>;
+-		};
+-
+-	};
+-
+-	aliases {
+-		mxcfb0 = &mxcfb1;
+-		mxcfb1 = &mxcfb2;
+-	};
+-
+-	sound {
+-		compatible = "fsl,imx-audio-wm8731";
+-		model = "wm8731-audio";
+-		ssi-controller = <&ssi2>;
+-		src-port = <2>;
+-		ext-port = <4>;
+-		audio-codec = <&codec>;
+-		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
+-	};
+-
+-	sound-hdmi {
+-		compatible = "fsl,imx-audio-hdmi";
+-		model = "imx-audio-hdmi";
+-		hdmi-controller = <&hdmi_audio>;
+-	};
+-
+-	sound-spdif {
+-		compatible = "fsl,imx-audio-spdif";
+-		model = "imx-spdif";
+-		spdif-controller = <&spdif>;
+-		spdif-out;
+-		spdif-in;
+-	};
+-
+-	mxcfb1: fb at 0 {
+-		compatible = "fsl,mxc_sdc_fb";
+-		disp_dev = "hdmi";
+-		interface_pix_fmt = "RGB24";
+-		mode_str ="1920x1080M at 60";
+-		default_bpp = <32>;
+-		int_clk = <0>;
+-		late_init = <0>;
+-		status = "disabled";
+-	};
+-
+-	mxcfb2: fb at 1 {
+-		compatible = "fsl,mxc_sdc_fb";
+-		disp_dev = "lcd";
+-		interface_pix_fmt = "RGB24";
+-		mode_str ="1920x1080M at 60";
+-		default_bpp = <32>;
+-		int_clk = <0>;
+-		late_init = <0>;
+-		status = "disabled";
+-	};
+-
+-	lcd at 0 {
+-		compatible = "fsl,lcd";
+-		ipu_id = <0>;
+-		disp_id = <0>;
+-		default_ifmt = "RGB24";
+-		pinctrl-names = "default";
+-		pinctrl-0 = <&pinctrl_ipu1_lcd>;
+-		status = "okay";
+-	};
+-
+-	v4l2_out {
+-		compatible = "fsl,mxc_v4l2_output";
+-		status = "okay";
+-	};
+-};
+-
+-&iomuxc {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_hog>;
+-
+-	hog {
+-		pinctrl_hog: hoggrp {
+-			fsl,pins = <
+-				/* SATA PWR */
+-				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000
+-				MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000
+-				MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
+-				MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000
+-				/* SATA CTRL */
+-				MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000
+-				MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000
+-				MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000
+-				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
+-				/* POWER_BUTTON */
+-				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
+-			>;
+-		};
+-	};
+-
+-	imx6q-cm-fx6 {
+-		/* pins for eth0 */
+-		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
+-			>;
+-		};
+-
+-		pinctrl_ipu1_lcd: ipu1grp-lcd {
+-			fsl,pins = <
+-				MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38
+-				MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x38
+-				MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x38
+-				MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x38
+-				MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04        0x80000028
+-				MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x38
+-				MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x38
+-				MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x38
+-				MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x38
+-				MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x38
+-				MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x38
+-				MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x38
+-				MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x38
+-				MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x38
+-				MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x38
+-				MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x38
+-				MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x38
+-				MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x38
+-				MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x38
+-				MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x38
+-				MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x38
+-				MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x38
+-				MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x38
+-				MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x38
+-				MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x38
+-				MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x38
+-				MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x38
+-				MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x38
+-				MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x38
+-			>;
+-		};
+-
+-		/* pins for spi */
+-		pinctrl_ecspi1: ecspi1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
+-				MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
+-				MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
+-				MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
+-				MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
+-			>;
+-		};
+-
+-		/* pins for nand */
+-		pinctrl_gpmi_nand: gpminandgrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
+-				MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
+-				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
+-				MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
+-				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
+-				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
+-				MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
+-				MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
+-				MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
+-				MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
+-				MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
+-				MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
+-				MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
+-				MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
+-				MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
+-				MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
+-				MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
+-			>;
+-		};
+-
+-		/* pins for i2c2 */
+-		pinctrl_i2c2: i2c2grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
+-				MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
+-			>;
+-		};
+-
+-		/* pins for i2c3 */
+-		pinctrl_i2c3: i2c3grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
+-				MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
+-			>;
+-		};
+-
+-		/* pins for console */
+-		pinctrl_uart4: uart4grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
+-				MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
+-			>;
+-		};
+-
+-		/* pins for usb hub1 */
+-		pinctrl_usbh1: usbh1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
+-			>;
+-		};
+-
+-		/* pins for usb otg */
+-		pinctrl_usbotg: usbotggrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
+-				MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
+-			>;
+-		};
+-
+-		/* pins for wifi/bt */
+-		pinctrl_usdhc1: usdhc1grp {
+-			fsl,pins = <
+-				MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
+-				MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
+-				MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
+-				MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
+-				MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
+-				MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
+-			>;
+-		};
+-
+-		/* pins for wifi/bt */
+-		pinctrl_mrvl1: mrvl1grp {
+-			fsl,pins = <
+-				/* WIFI_PWR_RST */
+-				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x80000000
+-				MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000
+-			>;
+-		};
+-
+-		/* pins for tsc2046 pendown */
+-		pinctrl_tsc2046: tsc2046grp {
+-			fsl,pins = <
+-				 /* tsc2046 PENDOWN */
+-				MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000
+-			>;
+-		};
+-
+-		/* pins for pcie */
+-		pinctrl_pcie: pciegrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
+-				MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
+-			>;
+-		};
+-
+-		/* pins for spdif */
+-		pinctrl_spdif: spdifgrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
+-				MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
+-			>;
+-		};
+-
+-		/* pins for audmux */
+-		pinctrl_audmux: audmuxgrp {
+-			fsl,pins = <
+-				MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
+-				MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
+-				MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
+-				MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
+-				MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
+-				/* master mode pin */
+-				MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
+-			>;
+-		};
+-	};
+-};
+-
+-&cpu0 {
+-	operating-points = <
+-		/* kHz    uV */
+-		996000  1250000
+-		852000  1250000
+-		792000  1150000
+-		396000  975000
+-	>;
+-	fsl,soc-operating-points = <
+-		/* ARM kHz  SOC-PU uV */
+-		996000        1250000
+-		852000        1250000
+-		792000        1175000
+-		396000        1175000
+-	>;
+-};
+-
+-/* spi */
+-&ecspi1 {
+-	fsl,spi-num-chipselects = <2>;
+-	cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_ecspi1>;
+-	status = "okay";
+-
+-	flash: m25p80 at 0 {
+-		#address-cells = <1>;
+-		#size-cells = <1>;
+-		compatible = "st,m25px16", "st,m25p";
+-		spi-max-frequency = <20000000>;
+-		reg = <0>;
+-
+-		partition at 0 {
+-			label = "uboot";
+-			reg = <0x0 0xc0000>;
+-		};
+-
+-		partition at c0000 {
+-			label = "uboot environment";
+-			reg = <0xc0000 0x40000>;
+-		};
+-
+-		partition at 100000 {
+-			label = "reserved";
+-			reg = <0x100000 0x100000>;
+-		};
+-	};
+-
+-	/* touch controller */
+-	touch:	tsc2046 at 1 {
+-		pinctrl-names = "default";
+-		pinctrl-0 = <&pinctrl_tsc2046>;
+-
+-		compatible = "ti,tsc2046";
+-		vcc-supply = <&tsc2046reg>;
+-
+-		reg = <1>;	/* CS1 */
+-		spi-max-frequency = <1500000>;
+-
+-		interrupt-parent = <&gpio2>;
+-		interrupts = <15 0>;
+-		pendown-gpio = <&gpio2 15 0>;
+-
+-		ti,x-min = /bits/ 16 <0x0>;
+-		ti,x-max = /bits/ 16 <0x0fff>;
+-		ti,y-min = /bits/ 16 <0x0>;
+-		ti,y-max = /bits/ 16 <0x0fff>;
+-
+-		ti,x-plate-ohms = /bits/ 16 <180>;
+-		ti,pressure-max = /bits/ 16 <255>;
+-
+-		ti,debounce-max = /bits/ 16 <30>;
+-		ti,debounce-tol = /bits/ 16 <10>;
+-		ti,debounce-rep = /bits/ 16 <1>;
+-
+-		linux,wakeup;
+-	};
+-};
+-
+-/* eth0 */
+-&fec {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_enet>;
+-	phy-mode = "rgmii";
+-	status = "okay";
+-};
+-
+-/* nand */
+-&gpmi {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_gpmi_nand>;
+-	status = "okay";
+-
+-	partition at 0 {
+-		label = "linux";
+-		reg = <0x0 0x800000>;
+-	};
+-
+-	partition at 800000 {
+-		label = "rootfs";
+-		reg = < 0x800000 0x0>;
+-	};
+-};
+-
+-/* i2c3 */
+-&i2c3 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_i2c3>;
+-	status = "okay";
+-
+-	eeprom at 50 {
+-		compatible = "at24,24c02";
+-		reg = <0x50>;
+-		pagesize = <16>;
+ 	};
+ 
+-	codec: wm8731 at 1a {
+-		compatible = "wlf,wm8731";
+-		reg = <0x1a>;
+-		clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>;
+-		clock-names = "pll4", "imx-ssi.1", "cko", "cko2";
+-		AVDD-supply = <&pu_dummy>;
+-		HPVDD-supply = <&pu_dummy>;
+-		DCVDD-supply = <&pu_dummy>;
+-		DBVDD-supply = <&pu_dummy>;
+-	};
+-};
+-
+-&pcie {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_pcie>;
+-	reset-gpio = <&gpio1 26 0>;
+-	vdd-supply = <&pcie_power_on_gpio>;
+-	status = "okay";
+ };
+ 
+ /* sata */
+ &sata {
+ 	status = "okay";
+ };
+-
+-/* console */
+-&uart4 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_uart4>;
+-	status = "okay";
+-};
+-
+-/* usb otg */
+-&usbotg {
+-	vbus-supply = <&reg_usb_otg_vbus>;
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usbotg>;
+-	dr_mode = "otg";
+-	status = "okay";
+-};
+-
+-/* usb hub1 */
+-&usbh1 {
+-	vbus-supply = <&reg_usb_h1_vbus>;
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usbh1>;
+-	status = "okay";
+-};
+-
+-/* wifi/bt */
+-&usdhc1 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>;
+-	non-removable;
+-	vmmc-supply = <&awnh387_npoweron>;
+-	vmmc_aux-supply = <&awnh387_wifi_nreset>;
+-	status = "okay";
+-};
+-
+-&ssi2 {
+-	fsl,mode = "i2s-master";
+-	status = "okay";
+-};
+-
+-&hdmi_core {
+-	ipu_id = <1>;
+-	disp_id = <0>;
+-	status = "okay";
+-};
+-
+-&hdmi_video {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_hdmi_hdcp_1>;
+-	fsl,hdcp;
+-	status = "okay";
+-};
+-
+-&hdmi_audio {
+-	status = "okay";
+-};
+-
+-&spdif {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_spdif>;
+-	status = "okay";
+-};
+-
+-&audmux {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&pinctrl_audmux>;
+-	status = "okay";
+-};
+diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+new file mode 100644
+index 0000000..31086b7
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+@@ -0,0 +1,573 @@
++/*
++ * Copyright 2014 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/ {
++	memory {
++		reg = <0x10000000 0x20000000>;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		heartbeat-led {
++			label = "Heartbeat";
++			gpios = <&gpio2 31 0>;
++			linux,default-trigger = "heartbeat";
++		};
++	};
++
++	regulators {
++		compatible = "simple-bus";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		/* regulator for usb otg */
++		reg_usb_otg_vbus: usb_otg_vbus {
++			compatible = "regulator-fixed";
++			regulator-name = "usb_otg_vbus";
++			regulator-min-microvolt = <5000000>;
++			regulator-max-microvolt = <5000000>;
++			gpio = <&gpio3 22 0>;
++			enable-active-high;
++		};
++
++		/* regulator1 for pcie power-on-gpio */
++		pcie_power_on_gpio: regulator-pcie-power-on-gpio {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-pcie-power-on-gpio";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio2 24 0>;
++			enable-active-high;
++		};
++
++		/* regulator for usb hub1 */
++		reg_usb_h1_vbus: usb_h1_vbus {
++			compatible = "regulator-fixed";
++			regulator-name = "usb_h1_vbus";
++			regulator-min-microvolt = <5000000>;
++			regulator-max-microvolt = <5000000>;
++			gpio = <&gpio7 8 0>;
++			enable-active-high;
++		};
++
++		/* regulator1 for wifi/bt */
++		awnh387_npoweron: regulator-awnh387-npoweron {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-awnh387-npoweron";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio7 12 0>;
++			enable-active-high;
++		};
++
++		/* regulator2 for wifi/bt */
++		awnh387_wifi_nreset: regulator-awnh387-wifi-nreset {
++			compatible = "regulator-fixed";
++			regulator-name = "regulator-awnh387-wifi-nreset";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			gpio = <&gpio6 16 0>;
++			startup-delay-us = <10000>;
++		};
++
++		tsc2046reg: tsc2046-reg {
++			compatible = "regulator-fixed";
++			regulator-name = "tsc2046-reg";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++		};
++
++	};
++
++	aliases {
++		mxcfb0 = &mxcfb1;
++		mxcfb1 = &mxcfb2;
++	};
++
++	sound {
++		compatible = "fsl,imx-audio-wm8731";
++		model = "wm8731-audio";
++		ssi-controller = <&ssi2>;
++		src-port = <2>;
++		ext-port = <4>;
++		audio-codec = <&codec>;
++		audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
++	};
++
++	sound-hdmi {
++		compatible = "fsl,imx-audio-hdmi";
++		model = "imx-audio-hdmi";
++		hdmi-controller = <&hdmi_audio>;
++	};
++
++	sound-spdif {
++		compatible = "fsl,imx-audio-spdif";
++		model = "imx-spdif";
++		spdif-controller = <&spdif>;
++		spdif-out;
++		spdif-in;
++	};
++
++	mxcfb1: fb at 0 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "hdmi";
++		interface_pix_fmt = "RGB24";
++		mode_str ="1920x1080M at 60";
++		default_bpp = <32>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	mxcfb2: fb at 1 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "lcd";
++		interface_pix_fmt = "RGB24";
++		mode_str ="1920x1080M at 60";
++		default_bpp = <32>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	lcd at 0 {
++		compatible = "fsl,lcd";
++		ipu_id = <0>;
++		disp_id = <0>;
++		default_ifmt = "RGB24";
++		pinctrl-names = "default";
++		pinctrl-0 = <&pinctrl_ipu1_lcd>;
++		status = "okay";
++	};
++
++	v4l2_out {
++		compatible = "fsl,mxc_v4l2_output";
++		status = "okay";
++	};
++};
++
++&iomuxc {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hog>;
++
++	hog {
++		pinctrl_hog: hoggrp {
++			fsl,pins = <
++				/* SATA PWR */
++				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000
++				MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000
++				MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
++				MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000
++				/* SATA CTRL */
++				MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000
++				MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000
++				MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000
++				MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
++				/* POWER_BUTTON */
++				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
++			>;
++		};
++	};
++
++	imx6q-cm-fx6 {
++		/* pins for eth0 */
++		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
++			>;
++		};
++
++		pinctrl_ipu1_lcd: ipu1grp-lcd {
++			fsl,pins = <
++				MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38
++				MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x38
++				MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x38
++				MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x38
++				MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04        0x80000028
++				MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x38
++				MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x38
++				MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x38
++				MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x38
++				MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x38
++				MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x38
++				MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x38
++				MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x38
++				MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x38
++				MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x38
++				MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x38
++				MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x38
++				MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x38
++				MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x38
++				MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x38
++				MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x38
++				MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x38
++				MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x38
++				MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x38
++				MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x38
++				MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x38
++				MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x38
++				MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x38
++				MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x38
++			>;
++		};
++
++		/* pins for spi */
++		pinctrl_ecspi1: ecspi1grp {
++			fsl,pins = <
++				MX6QDL_PAD_EIM_D16__ECSPI1_SCLK      0x100b1
++				MX6QDL_PAD_EIM_D17__ECSPI1_MISO      0x100b1
++				MX6QDL_PAD_EIM_D18__ECSPI1_MOSI      0x100b1
++				MX6QDL_PAD_EIM_EB2__GPIO2_IO30      0x100b1
++				MX6QDL_PAD_EIM_D19__GPIO3_IO19      0x100b1
++			>;
++		};
++
++		/* pins for nand */
++		pinctrl_gpmi_nand: gpminandgrp {
++			fsl,pins = <
++				MX6QDL_PAD_NANDF_CLE__NAND_CLE      0xb0b1
++				MX6QDL_PAD_NANDF_ALE__NAND_ALE      0xb0b1
++				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
++				MX6QDL_PAD_NANDF_RB0__NAND_READY_B   0xb000
++				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
++				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
++				MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
++				MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
++				MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
++				MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
++				MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
++				MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
++				MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
++				MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
++				MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
++				MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
++				MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
++			>;
++		};
++
++		/* pins for i2c2 */
++		pinctrl_i2c2: i2c2grp {
++			fsl,pins = <
++				MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
++				MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for i2c3 */
++		pinctrl_i2c3: i2c3grp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
++				MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
++			>;
++		};
++
++		/* pins for console */
++		pinctrl_uart4: uart4grp {
++			fsl,pins = <
++				MX6QDL_PAD_KEY_COL0__UART4_TX_DATA   0x1b0b1
++				MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA   0x1b0b1
++			>;
++		};
++
++		/* pins for usb hub1 */
++		pinctrl_usbh1: usbh1grp {
++			fsl,pins = <
++				MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
++			>;
++		};
++
++		/* pins for usb otg */
++		pinctrl_usbotg: usbotggrp {
++			fsl,pins = <
++				MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
++				MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
++			>;
++		};
++
++		/* pins for wifi/bt */
++		pinctrl_usdhc1: usdhc1grp {
++			fsl,pins = <
++				MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17071
++				MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10071
++				MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
++				MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
++				MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
++				MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
++			>;
++		};
++
++		/* pins for wifi/bt */
++		pinctrl_mrvl1: mrvl1grp {
++			fsl,pins = <
++				/* WIFI_PWR_RST */
++				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x80000000
++				MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000
++			>;
++		};
++
++		/* pins for tsc2046 pendown */
++		pinctrl_tsc2046: tsc2046grp {
++			fsl,pins = <
++				 /* tsc2046 PENDOWN */
++				MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000
++			>;
++		};
++
++		/* pins for pcie */
++		pinctrl_pcie: pciegrp {
++			fsl,pins = <
++				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
++				MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
++			>;
++		};
++
++		/* pins for spdif */
++		pinctrl_spdif: spdifgrp {
++			fsl,pins = <
++				MX6QDL_PAD_GPIO_16__SPDIF_IN  0x1b0b0
++				MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
++			>;
++		};
++
++		/* pins for audmux */
++		pinctrl_audmux: audmuxgrp {
++			fsl,pins = <
++				MX6QDL_PAD_SD2_CMD__AUD4_RXC   0x17059
++				MX6QDL_PAD_SD2_DAT0__AUD4_RXD  0x17059
++				MX6QDL_PAD_SD2_DAT3__AUD4_TXC  0x17059
++				MX6QDL_PAD_SD2_DAT2__AUD4_TXD  0x17059
++				MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
++				/* master mode pin */
++				MX6QDL_PAD_GPIO_5__CCM_CLKO1	0x17059
++			>;
++		};
++	};
++};
++
++&cpu0 {
++	operating-points = <
++		/* kHz    uV */
++		996000  1250000
++		852000  1250000
++		792000  1150000
++		396000  975000
++	>;
++	fsl,soc-operating-points = <
++		/* ARM kHz  SOC-PU uV */
++		996000        1250000
++		852000        1250000
++		792000        1175000
++		396000        1175000
++	>;
++};
++
++/* spi */
++&ecspi1 {
++	fsl,spi-num-chipselects = <2>;
++	cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_ecspi1>;
++	status = "okay";
++
++	flash: m25p80 at 0 {
++		#address-cells = <1>;
++		#size-cells = <1>;
++		compatible = "st,m25px16", "st,m25p";
++		spi-max-frequency = <20000000>;
++		reg = <0>;
++
++		partition at 0 {
++			label = "uboot";
++			reg = <0x0 0xc0000>;
++		};
++
++		partition at c0000 {
++			label = "uboot environment";
++			reg = <0xc0000 0x40000>;
++		};
++
++		partition at 100000 {
++			label = "reserved";
++			reg = <0x100000 0x100000>;
++		};
++	};
++
++	/* touch controller */
++	touch:	tsc2046 at 1 {
++		pinctrl-names = "default";
++		pinctrl-0 = <&pinctrl_tsc2046>;
++
++		compatible = "ti,tsc2046";
++		vcc-supply = <&tsc2046reg>;
++
++		reg = <1>;	/* CS1 */
++		spi-max-frequency = <1500000>;
++
++		interrupt-parent = <&gpio2>;
++		interrupts = <15 0>;
++		pendown-gpio = <&gpio2 15 0>;
++
++		ti,x-min = /bits/ 16 <0x0>;
++		ti,x-max = /bits/ 16 <0x0fff>;
++		ti,y-min = /bits/ 16 <0x0>;
++		ti,y-max = /bits/ 16 <0x0fff>;
++
++		ti,x-plate-ohms = /bits/ 16 <180>;
++		ti,pressure-max = /bits/ 16 <255>;
++
++		ti,debounce-max = /bits/ 16 <30>;
++		ti,debounce-tol = /bits/ 16 <10>;
++		ti,debounce-rep = /bits/ 16 <1>;
++
++		linux,wakeup;
++	};
++};
++
++/* eth0 */
++&fec {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_enet>;
++	phy-mode = "rgmii";
++	status = "okay";
++};
++
++/* nand */
++&gpmi {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_gpmi_nand>;
++	status = "okay";
++
++	partition at 0 {
++		label = "linux";
++		reg = <0x0 0x800000>;
++	};
++
++	partition at 800000 {
++		label = "rootfs";
++		reg = < 0x800000 0x0>;
++	};
++};
++
++/* i2c3 */
++&i2c3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_i2c3>;
++	status = "okay";
++
++	eeprom at 50 {
++		compatible = "at24,24c02";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
++
++	codec: wm8731 at 1a {
++		compatible = "wlf,wm8731";
++		reg = <0x1a>;
++		clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>;
++		clock-names = "pll4", "imx-ssi.1", "cko", "cko2";
++		AVDD-supply = <&pu_dummy>;
++		HPVDD-supply = <&pu_dummy>;
++		DCVDD-supply = <&pu_dummy>;
++		DBVDD-supply = <&pu_dummy>;
++	};
++};
++
++&pcie {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_pcie>;
++	reset-gpio = <&gpio1 26 0>;
++	vdd-supply = <&pcie_power_on_gpio>;
++	status = "okay";
++};
++
++/* console */
++&uart4 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_uart4>;
++	status = "okay";
++};
++
++/* usb otg */
++&usbotg {
++	vbus-supply = <&reg_usb_otg_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usbotg>;
++	dr_mode = "otg";
++	status = "okay";
++};
++
++/* usb hub1 */
++&usbh1 {
++	vbus-supply = <&reg_usb_h1_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usbh1>;
++	status = "okay";
++};
++
++/* wifi/bt */
++&usdhc1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>;
++	non-removable;
++	vmmc-supply = <&awnh387_npoweron>;
++	vmmc_aux-supply = <&awnh387_wifi_nreset>;
++	status = "okay";
++};
++
++&ssi2 {
++	fsl,mode = "i2s-master";
++	status = "okay";
++};
++
++&hdmi_core {
++	ipu_id = <1>;
++	disp_id = <0>;
++	status = "okay";
++};
++
++&hdmi_video {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_hdmi_hdcp_1>;
++	fsl,hdcp;
++	status = "okay";
++};
++
++&hdmi_audio {
++	status = "okay";
++};
++
++&spdif {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_spdif>;
++	status = "okay";
++};
++
++&audmux {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pinctrl_audmux>;
++	status = "okay";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0080-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0080-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch
new file mode 100644
index 0000000..5acaa2f
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0080-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch
@@ -0,0 +1,53 @@
+From 6b509a60d6bb3a661773e66b6ac68b07199f5163 Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Mon, 23 Mar 2015 10:15:50 +0200
+Subject: ARM: i.MX6: dts: add initial support for cm-fx6 DL/S
+
+Add initial support for cm-fx6 DL/S modules.
+
+This patch configures:
+1) serial console
+2) hearbeat led
+3) FreeScale NIC
+4) pcie
+5) Intel I210 NIC
+6) Analog audio wm8731-audio
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+[grinberg at compulab.co.il: fix dtsi file name as per previous patch]
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6dl-cm-fx6.dts |   21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 arch/arm/boot/dts/imx6dl-cm-fx6.dts
+
+diff --git a/arch/arm/boot/dts/imx6dl-cm-fx6.dts b/arch/arm/boot/dts/imx6dl-cm-fx6.dts
+new file mode 100644
+index 0000000..d33d14c
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6dl-cm-fx6.dts
+@@ -0,0 +1,21 @@
++/*
++ * Copyright 2015 CompuLab Ltd.
++ *
++ * Author: Valentin Raevsky <valentin at compulab.co.il>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/dts-v1/;
++#include "imx6dl.dtsi"
++#include "imx6qdl-cm-fx6.dtsi"
++
++/ {
++	model = "CompuLab CM-FX6";
++	compatible = "compulab,cm-fx6", "fsl,imx6dl";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0081-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0081-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch
new file mode 100644
index 0000000..0a572c9
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0081-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch
@@ -0,0 +1,78 @@
+From 02e98ce65cb361c77a7974854fb4a483ce4b09fc Mon Sep 17 00:00:00 2001
+From: Igor Grinberg <grinberg at compulab.co.il>
+Date: Mon, 23 Mar 2015 10:21:26 +0200
+Subject: ARM: i.MX6: dts: add board files for sbc-fx6 DL/S
+
+Add board files for sbc-fx6 DL/S modules and Utilite Value.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+[grinberg at compulab.co.il: fix dtsi files names as per previous patches]
+Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6dl-sbc-fx6.dts  |   23 +++++++++++++++++++++++
+ arch/arm/boot/dts/imx6dl-sbc-fx6m.dts |   23 +++++++++++++++++++++++
+ 2 files changed, 46 insertions(+)
+ create mode 100644 arch/arm/boot/dts/imx6dl-sbc-fx6.dts
+ create mode 100644 arch/arm/boot/dts/imx6dl-sbc-fx6m.dts
+
+diff --git a/arch/arm/boot/dts/imx6dl-sbc-fx6.dts b/arch/arm/boot/dts/imx6dl-sbc-fx6.dts
+new file mode 100644
+index 0000000..723b654
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6dl-sbc-fx6.dts
+@@ -0,0 +1,23 @@
++/*
++* Copyright 2015 CompuLab Ltd.
++*
++* Author: Valentin Raevsky <valentin at compulab.co.il>
++*
++* The code contained herein is licensed under the GNU General Public
++* License. You may obtain a copy of the GNU General Public License
++* Version 2 or later at the following locations:
++*
++* http://www.opensource.org/licenses/gpl-license.html
++* http://www.gnu.org/copyleft/gpl.html
++*/
++
++/dts-v1/;
++#include "imx6dl.dtsi"
++#include "imx6qdl-cm-fx6.dtsi"
++#include "imx6qdl-sb-fx6x.dtsi"
++#include "imx6qdl-sb-fx6.dtsi"
++
++/ {
++	model = "CompuLab CM-FX6 on SBC-FX6";
++	compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6dl";
++};
+diff --git a/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts b/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts
+new file mode 100644
+index 0000000..f66b177
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts
+@@ -0,0 +1,23 @@
++/*
++* Copyright 2015 CompuLab Ltd.
++*
++* Author: Valentin Raevsky <valentin at compulab.co.il>
++*
++* The code contained herein is licensed under the GNU General Public
++* License. You may obtain a copy of the GNU General Public License
++* Version 2 or later at the following locations:
++*
++* http://www.opensource.org/licenses/gpl-license.html
++* http://www.gnu.org/copyleft/gpl.html
++*/
++
++/dts-v1/;
++#include "imx6dl.dtsi"
++#include "imx6qdl-cm-fx6.dtsi"
++#include "imx6qdl-sb-fx6x.dtsi"
++#include "imx6qdl-sb-fx6m.dtsi"
++
++/ {
++	model = "CompuLab CM-FX6 on SBC-FX6m";	
++	compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6dl";
++};
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0082-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0082-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch
new file mode 100644
index 0000000..75a8451
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0082-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch
@@ -0,0 +1,48 @@
+From 6de54d67974a38efb12789e213afec98179225cd Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 23 Mar 2015 11:47:54 +0200
+Subject: ARM: dts: cm-fx6: add build targets for cm-fx6 flavour boards.
+
+Add build targets for cm-fx6 flavour boards.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/Makefile |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index c5f9a19..67f6083 100644
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -113,6 +113,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
+ 	imx53-mba53.dtb \
+ 	imx53-qsb.dtb \
+ 	imx53-smd.dtb \
++	imx6dl-cm-fx6.dtb \
+ 	imx6dl-sabreauto.dtb \
+ 	imx6dl-sabreauto-ecspi.dtb \
+ 	imx6dl-sabreauto-flexcan1.dtb \
+@@ -121,8 +122,11 @@ dtb-$(CONFIG_ARCH_MXC) += \
+ 	imx6dl-sabresd-hdcp.dtb \
+ 	imx6dl-sabresd-ldo.dtb \
+ 	imx6dl-sabresd-pf200.dtb \
++	imx6dl-sbc-fx6.dtb \
++	imx6dl-sbc-fx6m.dtb \
+ 	imx6dl-wandboard.dtb \
+ 	imx6q-arm2.dtb \
++	imx6q-cm-fx6.dtb \
+ 	imx6q-sabreauto.dtb \
+ 	imx6q-sabreauto-ecspi.dtb \
+ 	imx6q-sabreauto-flexcan1.dtb \
+@@ -131,6 +135,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
+ 	imx6q-sabresd.dtb \
+ 	imx6q-sabresd-hdcp.dtb \
+ 	imx6q-sabresd-ldo.dtb \
++	imx6q-sbc-fx6.dtb \
++	imx6q-sbc-fx6m.dtb \
+ 	imx6q-sbc6x.dtb \
+ 	imx6sl-evk.dtb \
+ 	imx6sl-evk-csi.dtb \
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0083-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0083-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
new file mode 100644
index 0000000..07da3f9
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0083-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch
@@ -0,0 +1,26 @@
+From 1f1a6c211430d8db8c2cbd4ff0ee7e0bd1f9d402 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 23 Mar 2015 11:50:04 +0200
+Subject: ARM: i.MX6: cm-fx6: tag kernel version 3.10.17-cm-fx6-1-beta4
+
+Tag kernel version 3.10.17-cm-fx6-1-beta4.
+This is a new kernel version beta4 release.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/configs/cm_fx6_defconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig
+index 6135d73..1367bc2 100644
+--- a/arch/arm/configs/cm_fx6_defconfig
++++ b/arch/arm/configs/cm_fx6_defconfig
+@@ -1,4 +1,4 @@
+-CONFIG_LOCALVERSION="-cm-fx6-1-beta3"
++CONFIG_LOCALVERSION="-cm-fx6-1-beta4"
+ CONFIG_KERNEL_LZO=y
+ CONFIG_SYSVIPC=y
+ CONFIG_NO_HZ=y
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0084-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0084-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch
new file mode 100644
index 0000000..310d087
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0084-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch
@@ -0,0 +1,47 @@
+From 76df5a35a95376c4c13d200b974a101a5f54e750 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 25 Mar 2015 17:39:07 +0200
+Subject: ARM: dts: cm-fx6: change the hdmi_core ipu connection
+
+Change the hdmi_core ipu connection in order to
+allow using the second IPU on quad SBC-FX6 boards with ldb devices.
+SBC-FX6m boards still use an IPU per port.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6q-sbc-fx6m.dts  |    6 ++++++
+ arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi |    4 ++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+index 19bf948..dd8c1c0 100644
+--- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
++++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts
+@@ -21,3 +21,9 @@
+ 	model = "CompuLab CM-FX6 on SBC-FX6m";	
+ 	compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q";
+ };
++
++&hdmi_core {
++	ipu_id = <1>;
++	disp_id = <0>;
++	status = "okay";
++};
+diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+index 31086b7..4f02e30 100644
+--- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+@@ -544,8 +544,8 @@
+ };
+ 
+ &hdmi_core {
+-	ipu_id = <1>;
+-	disp_id = <0>;
++	ipu_id = <0>;
++	disp_id = <1>;
+ 	status = "okay";
+ };
+ 
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0085-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0085-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch
new file mode 100644
index 0000000..5e367cd
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0085-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch
@@ -0,0 +1,90 @@
+From 787f661cc517e7e0c988d8cbab0a2bd1aa1fd5c5 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Wed, 25 Mar 2015 17:55:09 +0200
+Subject: ARM: i.MX6: dts: add ldb support for SBC-FX6 boards
+
+Add ldb support for SBC-FX6 boards.
+LVDS1/0 ports of the SBC-FX6 are configured.
+LVDS0 - IPU1:DISP0 - fb3
+LVDS1 - IPU1:DISP1 - fb5
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi |   24 ++++++++++++++++++++++++
+ arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi |   18 ++++++++++++++++++
+ 2 files changed, 42 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+index 4f02e30..d17a4d1 100644
+--- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+@@ -92,6 +92,8 @@
+ 	aliases {
+ 		mxcfb0 = &mxcfb1;
+ 		mxcfb1 = &mxcfb2;
++		mxcfb2 = &mxcfb3;
++		mxcfb3 = &mxcfb4;
+ 	};
+ 
+ 	sound {
+@@ -140,6 +142,28 @@
+ 		status = "disabled";
+ 	};
+ 
++	mxcfb3: fb at 2 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "ldb";
++		interface_pix_fmt = "RGB666";
++		mode_str ="1366x768M-18 at 60";
++		default_bpp = <16>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
++	mxcfb4: fb at 3 {
++		compatible = "fsl,mxc_sdc_fb";
++		disp_dev = "ldb";
++		interface_pix_fmt = "RGB666";
++		mode_str ="1280x800M-18 at 60";
++		default_bpp = <16>;
++		int_clk = <0>;
++		late_init = <0>;
++		status = "disabled";
++	};
++
+ 	lcd at 0 {
+ 		compatible = "fsl,lcd";
+ 		ipu_id = <0>;
+diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+index 129e88e..85836d7 100644
+--- a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi
+@@ -90,6 +90,24 @@
+ 	status = "okay";
+ };
+ 
++&mxcfb3 {
++	status = "okay";
++};
++
++&mxcfb4 {
++	status = "okay";
++};
++
++&ldb {
++	ipu_id = <1>;
++	disp_id = <0>;
++	ext_ref = <1>;
++	mode = "sep0";
++	sec_ipu_id = <1>;
++	sec_disp_id = <1>;
++	status = "okay";
++};
++
+ &flexcan1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pinctrl_flexcan1_1>;
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/0086-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0086-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch
new file mode 100644
index 0000000..4b2f5b4
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/0086-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch
@@ -0,0 +1,46 @@
+From 28df133aa1f3a26c9611cdd95814dec082b1b109 Mon Sep 17 00:00:00 2001
+From: Valentin Raevsky <valentin at compulab.co.il>
+Date: Mon, 30 Mar 2015 11:29:07 +0300
+Subject: ARM: dts: cm-fx6: IOMUXC_GPR1/6/7 to set correct values
+
+Add IOMUXC_GPR1/6/7 registers to the iomux default pinctrl group.
+The IOMUXC_GPR1 register must have default value in order to let the SoC boot up after a warm reboot.
+IOMUXC_GPR6/7 registers must have a correct value for the ipu QoS priority.
+Otherwise the SoC reports on:
+1) the interrupt that is a result of a time out error during a read access via DIx.
+2) a new frame starts before the previous end-of-frame event.
+
+Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
+---
+ arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+index d17a4d1..cff8d4e 100644
+--- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi
+@@ -11,6 +11,10 @@
+  * http://www.gnu.org/copyleft/gpl.html
+  */
+ 
++#define MX6QDL_GPR1	0x04 0x04 0x000 0x0 0x0
++#define MX6QDL_GPR6	0x18 0x18 0x000 0x0 0x0
++#define MX6QDL_GPR7	0x1c 0x1c 0x000 0x0 0x0
++
+ / {
+ 	memory {
+ 		reg = <0x10000000 0x20000000>;
+@@ -187,6 +191,10 @@
+ 	hog {
+ 		pinctrl_hog: hoggrp {
+ 			fsl,pins = <
++				MX6QDL_GPR1 0x48400005
++				/* ipu3 QoS */
++				MX6QDL_GPR6 0x007f007f
++				MX6QDL_GPR7 0x007f007f
+ 				/* SATA PWR */
+ 				MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000
+ 				MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000
+-- 
+1.7.9.5
+
diff --git a/recipes-kernel/linux/linux-cm-fx6-3.10.17/defconfig b/recipes-kernel/linux/linux-cm-fx6-3.10.17/defconfig
new file mode 100644
index 0000000..a4be268
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6-3.10.17/defconfig
@@ -0,0 +1,457 @@
+CONFIG_LOCALVERSION="-cm-fx6-1-beta4"
+CONFIG_KERNEL_LZO=y
+CONFIG_SYSVIPC=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=18
+CONFIG_CGROUPS=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EXPERT=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_SLUB_DEBUG is not set
+# CONFIG_COMPAT_BRK is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_GPIO_PCA953X=y
+CONFIG_ARCH_MXC=y
+CONFIG_MXC_DEBUG_BOARD=y
+CONFIG_MACH_IMX51_DT=y
+CONFIG_MACH_EUKREA_CPUIMX51SD=y
+CONFIG_SOC_IMX53=y
+CONFIG_SOC_IMX6Q=y
+CONFIG_SOC_IMX6SL=y
+CONFIG_SOC_VF610=y
+CONFIG_MACH_CM_FX6=y
+# CONFIG_SWP_EMULATE is not set
+CONFIG_PCI=y
+CONFIG_PCI_IMX6=y
+CONFIG_SMP=y
+CONFIG_VMSPLIT_2G=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_HIGHMEM=y
+CONFIG_CMDLINE="console=ttymxc3,115200 root=/dev/mmcblk0p1 rootwait"
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_ARM_IMX6_CPUFREQ=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+CONFIG_BINFMT_MISC=m
+CONFIG_PM_RUNTIME=y
+CONFIG_PM_DEBUG=y
+CONFIG_PM_TEST_SUSPEND=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+CONFIG_IPV6=y
+CONFIG_NETFILTER=y
+CONFIG_NETFILTER_DEBUG=y
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
+CONFIG_NETFILTER_XT_TARGET_LED=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_TEE=m
+CONFIG_NETFILTER_XT_TARGET_TRACE=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
+CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
+CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_CPU=m
+CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OSF=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
+CONFIG_NETFILTER_XT_MATCH_U32=m
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_RPFILTER=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT_IPV4=m
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+CONFIG_CAN=y
+CONFIG_CAN_FLEXCAN=y
+CONFIG_BT=m
+CONFIG_BT_MRVL=m
+CONFIG_BT_MRVL_SDIO=m
+CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y
+CONFIG_MAC80211=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_STANDALONE is not set
+CONFIG_CMA=y
+CONFIG_CMA_SIZE_MBYTES=320
+CONFIG_IMX_WEIM=y
+CONFIG_CONNECTOR=y
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_DATAFLASH=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SST25L=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_GPMI_NAND=y
+CONFIG_MTD_NAND_MXC=y
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_EEPROM_AT24=y
+CONFIG_EEPROM_AT25=y
+# CONFIG_SCSI_PROC_FS is not set
+CONFIG_BLK_DEV_SD=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+# CONFIG_SCSI_LOWLEVEL is not set
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_AHCI_IMX=y
+CONFIG_PATA_IMX=y
+CONFIG_NETDEVICES=y
+CONFIG_TUN=m
+# CONFIG_NET_VENDOR_BROADCOM is not set
+CONFIG_CS89x0=y
+CONFIG_CS89x0_PLATFORM=y
+# CONFIG_NET_VENDOR_FARADAY is not set
+CONFIG_IGB=m
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_MICROCHIP is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+CONFIG_SMC91X=y
+CONFIG_SMC911X=y
+CONFIG_SMSC911X=y
+# CONFIG_NET_VENDOR_STMICRO is not set
+CONFIG_ATH_CARDS=y
+CONFIG_ATH6KL=m
+CONFIG_ATH6KL_SDIO=m
+CONFIG_MWIFIEX=m
+CONFIG_MWIFIEX_SDIO=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=m
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_IMX=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_PS2_ELANTECH=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_EGALAX=y
+CONFIG_TOUCHSCREEN_ELAN=y
+CONFIG_TOUCHSCREEN_MAX11801=y
+CONFIG_TOUCHSCREEN_MC13783=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_MMA8450=y
+CONFIG_INPUT_ISL29023=y
+CONFIG_SERIO_SERPORT=m
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_DEVKMEM is not set
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+CONFIG_FSL_OTP=y
+CONFIG_MXS_VIIM=y
+# CONFIG_I2C_COMPAT is not set
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_GPIO=y
+CONFIG_I2C_MUX_PCA954x=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+CONFIG_I2C_IMX=y
+CONFIG_SPI=y
+CONFIG_SPI_IMX=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_SABRESD_MAX8903=y
+CONFIG_IMX6_USB_CHARGER=y
+CONFIG_SENSORS_MAX17135=y
+CONFIG_SENSORS_MAG3110=y
+CONFIG_THERMAL=y
+CONFIG_CPU_THERMAL=y
+CONFIG_IMX_THERMAL=y
+CONFIG_DEVICE_THERMAL=y
+CONFIG_WATCHDOG=y
+CONFIG_IMX2_WDT=y
+CONFIG_MFD_DA9052_I2C=y
+CONFIG_MFD_MC13XXX_SPI=y
+CONFIG_MFD_MC13XXX_I2C=y
+CONFIG_MFD_MAX17135=y
+CONFIG_MFD_SI476X_CORE=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_DUMMY=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_DA9052=y
+CONFIG_REGULATOR_ANATOP=y
+CONFIG_REGULATOR_MC13783=y
+CONFIG_REGULATOR_MC13892=y
+CONFIG_REGULATOR_MAX17135=y
+CONFIG_REGULATOR_PFUZE100=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_RADIO_SUPPORT=y
+CONFIG_VIDEO_V4L2_INT_DEVICE=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_VIDEO_MXC_OUTPUT=y
+CONFIG_VIDEO_MXC_CAPTURE=m
+CONFIG_VIDEO_MXC_CSI_CAMERA=m
+CONFIG_MXC_CAMERA_OV5640=m
+CONFIG_MXC_CAMERA_OV5642=m
+CONFIG_MXC_CAMERA_OV5640_MIPI=m
+CONFIG_MXC_TVIN_ADV7180=m
+CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m
+CONFIG_VIDEO_MXC_IPU_OUTPUT=y
+CONFIG_VIDEO_MXC_PXP_V4L2=y
+CONFIG_SOC_CAMERA=y
+CONFIG_VIDEO_MX3=y
+CONFIG_RADIO_SI476X=y
+CONFIG_SOC_CAMERA_OV2640=y
+CONFIG_DRM=y
+CONFIG_DRM_VIVANTE=y
+CONFIG_FB=y
+CONFIG_FB_MXS=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_L4F00242T03=y
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_FB_MXC_SYNC_PANEL=y
+CONFIG_FB_MXC_LDB=y
+CONFIG_FB_MXC_MIPI_DSI=y
+CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y
+CONFIG_FB_MXC_HDMI=y
+CONFIG_FB_MXC_EINK_PANEL=y
+CONFIG_FB_MXS_SII902X=y
+CONFIG_HANNSTAR_CABC=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_SOC=y
+CONFIG_SND_IMX_SOC=y
+CONFIG_SND_SOC_EUKREA_TLV320=y
+CONFIG_SND_SOC_IMX_CS42888=y
+CONFIG_SND_SOC_IMX_WM8731=y
+CONFIG_SND_SOC_IMX_WM8962=y
+CONFIG_SND_SOC_IMX_SGTL5000=y
+CONFIG_SND_SOC_IMX_SPDIF=y
+CONFIG_SND_SOC_IMX_MC13783=y
+CONFIG_SND_SOC_IMX_HDMI=y
+CONFIG_SND_SOC_IMX_SI476X=y
+CONFIG_USB=y
+CONFIG_USB_OTG=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_PHY=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_MXS_PHY=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_FSL_USB2=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_AUDIO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_MASS_STORAGE=m
+CONFIG_USB_G_SERIAL=m
+CONFIG_MMC=y
+CONFIG_MMC_UNSAFE_RESUME=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=y
+CONFIG_MXC_IPU=y
+CONFIG_MXC_GPU_VIV=y
+CONFIG_MXC_ASRC=y
+CONFIG_MXC_MIPI_CSI2=y
+CONFIG_MXC_MLB150=m
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+CONFIG_RTC_DRV_EM3027=y
+CONFIG_RTC_DRV_MC13XXX=y
+CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_SNVS=y
+CONFIG_DMADEVICES=y
+CONFIG_MXC_PXP_V2=y
+CONFIG_IMX_SDMA=y
+CONFIG_MXS_DMA=y
+CONFIG_STAGING=y
+CONFIG_COMMON_CLK_DEBUG=y
+# CONFIG_IOMMU_SUPPORT is not set
+CONFIG_PWM=y
+CONFIG_PWM_IMX=y
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_QUOTA=y
+CONFIG_QUOTA_NETLINK_INTERFACE=y
+# CONFIG_PRINT_QUOTA_WARNING is not set
+CONFIG_AUTOFS4_FS=y
+CONFIG_FUSE_FS=y
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_JFFS2_FS=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_UTF8=y
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_FTRACE is not set
+CONFIG_KGDB=y
+CONFIG_KGDB_KDB=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_IMX6Q_UART=y
+CONFIG_DEBUG_IMX_UART_PORT=4
+CONFIG_EARLY_PRINTK=y
+CONFIG_SECURITYFS=y
+CONFIG_CRYPTO_USER=y
+CONFIG_CRYPTO_TEST=m
+CONFIG_CRYPTO_CCM=y
+CONFIG_CRYPTO_GCM=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CTS=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_XTS=y
+CONFIG_CRYPTO_MD4=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_RMD128=y
+CONFIG_CRYPTO_RMD160=y
+CONFIG_CRYPTO_RMD256=y
+CONFIG_CRYPTO_RMD320=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_TGR192=y
+CONFIG_CRYPTO_WP512=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_CAMELLIA=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_TWOFISH=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_DEV_FSL_CAAM=y
+CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
+CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y
+CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC7=m
+CONFIG_LIBCRC32C=m
diff --git a/recipes-kernel/linux/linux-cm-fx6_3.10.17.bb b/recipes-kernel/linux/linux-cm-fx6_3.10.17.bb
new file mode 100644
index 0000000..ff864b2
--- /dev/null
+++ b/recipes-kernel/linux/linux-cm-fx6_3.10.17.bb
@@ -0,0 +1,102 @@
+require recipes-kernel/linux/linux-imx.inc
+require recipes-kernel/linux/linux-dtb.inc
+
+SUMMARY = "CompuLab 3.10.17 kernel"
+DESCRIPTION = "Linux kernel for CompuLab cm-fx6 boards."
+
+DEPENDS += "lzop-native bc-native"
+
+SRCBRANCH = "imx_3.10.17_1.0.0_ga"
+SRCREV = "33597e348b2d60dd5c71890ef7b7d3d3fd6e4e97"
+LOCALVERSION = "-cm-fx6"
+
+SRC_URI += "file://defconfig \
+	file://0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch \
+	file://0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch \
+	file://0003-igb-Enable-random-mac-address.patch \
+	file://0004-ARM-i.MX6-cm-fx6-update-defconfig.patch \
+	file://0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch \
+	file://0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch \
+	file://0007-ARM-i.MX6-dts-add-SPDIF-support.patch \
+	file://0008-ARM-i.MX6-dts-add-Power-Button.patch \
+	file://0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch \
+	file://0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch \
+	file://0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch \
+	file://0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch \
+	file://0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch \
+	file://0014-ARM-i.MX6-dts-add-analog-audio-support.patch \
+	file://0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch \
+	file://0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch \
+	file://0017-ARM-i.MX6-dts-enable-v4l2-output.patch \
+	file://0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch \
+	file://0019-igb-Define-the-device-mac-address-in-device-tree.patch \
+	file://0020-ARM-i.MX6-cm-fx6-update-defconfig.patch \
+	file://0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch \
+	file://0022-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch \
+	file://0023-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch \
+	file://0024-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch \
+	file://0025-ARM-i.MX6-override-system_rev-for-cm-fx6-boards.patch \
+	file://0026-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch \
+	file://0027-ARM-i.MX6-dts-add-i2c1-status-okay.patch \
+	file://0028-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch \
+	file://0029-ARM-mxs-change-usb-phy-test-clock-gating.patch \
+	file://0030-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch \
+	file://0031-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch \
+	file://0032-ENGR00317636-ASoC-fsl-hdmi-Disable-NEON-optimization.patch \
+	file://0033-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch \
+	file://0034-mwifiex-use-u32-variables-for-SDIO-read-write-port-b.patch \
+	file://0035-mwifiex-store-SDIO-chip-specific-information-in-sepa.patch \
+	file://0036-mwifiex-replace-unnecessary-u32-variables-with-u8-in.patch \
+	file://0037-mwifiex-code-rearrangement-in-mwifiex_get_rd_port.patch \
+	file://0038-mwifiex-do-port-calculations-separately.patch \
+	file://0039-mwifiex-define-a-macro-for-MPA-base-address.patch \
+	file://0040-mwifiex-code-rearrangement-in-multiport-aggregation-.patch \
+	file://0041-mwifiex-add-support-for-Marvell-SD8897-chipset.patch \
+	file://0042-mtd-m25p80-add-support-for-m25px16.patch \
+	file://0043-ARM-i.MX6-dts-change-issd-gpio-order.patch \
+	file://0044-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch \
+	file://0045-Bluetooth-Use-devname-vhci-module-alias-for-virtual-.patch \
+	file://0046-Bluetooth-Add-support-creating-virtual-AMP-controlle.patch \
+	file://0047-Bluetooth-btmrvl-add-btmrvl_send_sync_cmd-function.patch \
+	file://0048-Bluetooth-btmrvl-get-rid-of-struct-btmrvl_cmd.patch \
+	file://0049-Bluetooth-btmrvl-add-setup-handler.patch \
+	file://0050-Bluetooth-btmrvl-add-calibration-data-download-suppo.patch \
+	file://0051-Bluetooth-btmrvl-operate-on-16-bit-opcodes-instead-o.patch \
+	file://0052-Bluetooth-btmrvl-use-cal-data-from-device-tree-inste.patch \
+	file://0053-Bluetooth-btmrvl-remove-cal-data-byte-swapping-and-r.patch \
+	file://0054-Bluetooth-btmrvl-wait-for-HOST_SLEEP_ENABLE-event-in.patch \
+	file://0055-Bluetooth-btmrvl-disable-SD8787-AMP-device.patch \
+	file://0056-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch \
+	file://0057-Input-add-hx8520-6-device-driver.patch \
+	file://0058-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch \
+	file://0059-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch \
+	file://0060-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch \
+	file://0061-video-mxc-IPUv3-fb-restore-sync-bits.patch \
+	file://0062-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch \
+	file://0063-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch \
+	file://0064-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch \
+	file://0065-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch \
+	file://0066-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch \
+	file://0067-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch \
+	file://0068-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch \
+	file://0069-Input-ads7846-make-sure-we-do-not-change-platform-da.patch \
+	file://0070-Input-ads7846-add-device-tree-bindings.patch \
+	file://0071-Input-ads7846-use-IS_ENABLED-macro.patch \
+	file://0072-ARM-dts-cm-fx6-enable-can-bus.patch \
+	file://0073-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch \
+	file://0074-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch \
+	file://0075-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch \
+	file://0076-ARM-i.MX6-dts-fix-include-file-order.patch \
+	file://0077-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch \
+	file://0078-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch \
+	file://0079-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch \
+	file://0080-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch \
+	file://0081-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch \
+	file://0082-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch \
+	file://0083-ARM-i.MX6-cm-fx6-tag-kernel-version-3.10.17-cm-fx6-1.patch \
+	file://0084-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch \
+	file://0085-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch \
+	file://0086-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch \
+"
+
+COMPATIBLE_MACHINE = "(cm-fx6)"
-- 
1.7.9.5



More information about the meta-freescale mailing list