linux.git
7 years agoMLK-11281-6 ARM: imx: add lpsr support for imx7d
Anson Huang [Thu, 23 Jul 2015 11:05:16 +0000 (19:05 +0800)]
MLK-11281-6 ARM: imx: add lpsr support for imx7d

Add LPSR mode support if dtb contains "fsl,enable-lpsr" property,
when echo mem to make system enter DSM mode, whole SOC will be
powered down except LPSR, SNVS domain and DDR chip's power,
that means all modules in SOC domain will be powered down,
including ccm, iomuxc, gpc....

So, all drivers need to restore their iomux settings and
clk settings after resume;

When system enters LPSR mode, can be waked up by long press
ON/OFF button or using RTC alarm.

In LPSR mode resume, ROM will read the entry point in LPSR
register, make DRAM exit retention mode and jump to DRAM
to resume kernel immediately, so before entering LPSR mode,
we need to set the resume entry correctly in LPSR register
and clear it after resume.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-5 ARM: dts: only enable necessary modules for LPSR mode
Anson Huang [Thu, 23 Jul 2015 10:50:12 +0000 (18:50 +0800)]
MLK-11281-5 ARM: dts: only enable necessary modules for LPSR mode

Add property "fsl,enable-lpsr" to enable lpsr mode by default,
when this property is set, DSM mode will go into LPSR mode.

As many modules save/restore is NOT ready, to make tiny
kernel enter/exit LPSR mode work, only enable those
necessary modules for now.

Other modules will be enabled after their drivers are
ready to support LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-4 ARM: imx: add iomuxc lpsr gpr node for imx7d
Anson Huang [Thu, 23 Jul 2015 10:49:05 +0000 (18:49 +0800)]
MLK-11281-4 ARM: imx: add iomuxc lpsr gpr node for imx7d

Add LPSR GPR node to support LPSR mode on i.MX7D.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-3 pinctrl: pinctrl-imx: add suspend/resume for LPSR
Robin Gong [Thu, 11 Jun 2015 09:23:32 +0000 (17:23 +0800)]
MLK-11281-3 pinctrl: pinctrl-imx: add suspend/resume for LPSR

To support pinctl hog restore after LPSR resume back,
add suspend/resume in pinctrl driver.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11758 dts: mx6ul evk: set regulator wlreg_on always on
Fugang Duan [Mon, 26 Oct 2015 06:07:55 +0000 (14:07 +0800)]
MLK-11758 dts: mx6ul evk: set regulator wlreg_on always on

Murata adapter VDDIO is derived from sd slot VMMC supply, if usdhc cannot
detect sd/sdio card, VMMC is shutdown that causes VDDIO has no voltage, and
bt cannot work. So BT depends on VDDIO/VMMC.

Now the workaround is set wlreg_on alwasys on, usdhc can detect wifi card
and supply VMMC 3.3V voltage, so that Murata adapter VDDIO has power supply.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit f17b5e5be37875e05794621eacf386ec25adf223)

7 years agoMLK-11748 ARM: dts: imx7d-12x12-lpddr3-arm2-sai: configure gpio1_12 pin to non GPIO...
Zidan Wang [Fri, 23 Oct 2015 03:49:03 +0000 (11:49 +0800)]
MLK-11748 ARM: dts: imx7d-12x12-lpddr3-arm2-sai: configure gpio1_12 pin to non GPIO function before lpsr suspend

It's hardware issue that if there are interrupts in GPIO1, the system
will not enter lpsr suspend state.

gpio1_12 pin is used as headphone detect pin for wm8958 sound card. If
headphone is not plugged in, the gpio1_12 pin is high level. When lpsr
suspend without headphone plugged in, gpio will be powered down and
there will be a interrupt in the gpio1_12 pin.

So we should avoid thus interrupt. We fix this issue by configuring
gpio1_12 pin to non GPIO function before lpsr suspend.

Because ALSA will set SAI pins to sleep state before suspend, and will
not set them to default state after resume if cpu dai is not active. So
we'd better remove non SAI pins from SAI pin group, and let iomuxc to
control the gpio pin state.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit b3e988b838388f901d471a6938d0fb67b9bcad3b)

Conflicts:
arch/arm/boot/dts/imx7d-12x12-lpddr3-arm2.dts

7 years agoMLK-11722 mxc IPUv3: PRE: Correct block mode bad update window calculation
Liu Ying [Fri, 16 Oct 2015 03:26:59 +0000 (11:26 +0800)]
MLK-11722 mxc IPUv3: PRE: Correct block mode bad update window calculation

In order to workaround the PRE SoC bug recorded by errata ERR009624, the
software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL
register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode.

In non-small y resolution cases(>9 lines), we choose to check the STORE_BLOCK_Y
field of the register HW_PRE_STRORE_ENGINE_STATUS to determine the bad window
to update the SDW_UDPATE bit of the PRE_CTRL register.  According to the
description of the STRORE_BLOCK_Y field in block mode, the field indicates the
Y coordinate of the block currently being rendered.  Thus, we should round up
the real display y resolution to 4 lines to align with the block high(the out-
standing lines are cropped by PRG and IPU).  To maximize the safe window, we
just need to avoid updating the shadow bit during the last block of lines.
To conclude, the bad window for block mode is (store_block_y == 0 ||
store_block_y >= DIV_ROUND_UP(y_resolution, 4) - 1).

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11749: pinctrl: support pinctrl setting assertion via gpios
Shawn Guo [Mon, 15 Jul 2013 08:31:53 +0000 (16:31 +0800)]
MLK-11749: pinctrl: support pinctrl setting assertion via gpios

It's pretty common that on some reference design or validation boards,
one pin could be used by two devices on board, and the pin route is
controlled by a GPIO.  So to assert the pin for given device, not only
the pinmux controller in SoC needs to be set up properly but also the
GPIO needs to be pulled up/down.

The patch adds support of a device tree property "pinctrl-assert-gpios"
under client device node.  It plays pretty much like a board level pin
multiplexer, and steers the pin route by controlling the GPIOs.  When
client device has the property represent in its node, pinctrl device
tree mapping function will firstly pull up/down the GPIOs to assert the
pins for the device at board level.

[shawn.guo: cherry-pick commit e5a718edab82 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
7 years agoMLK-10853-2 dts: imx6ul-ddr3-arm2: add flexcan2 support
Dong Aisheng [Wed, 29 Apr 2015 11:15:33 +0000 (19:15 +0800)]
MLK-10853-2 dts: imx6ul-ddr3-arm2: add flexcan2 support

Flexcan2 on ddr3 arm2 board is conflict with uart2, thus a new dts
imx6ul-14x14-ddr3-arm2-flexcan2.dts with uart2 disabled is introduced to
resolve such confliction.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 14d7595a2f1622c72de1bc534cf18b9e828140ea)

Conflicts:
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/imx6ul-ddr3-arm2.dts

7 years agoMLK-11093-2 dts: imx6ul-14x14-ddr3-arm2-emmc: enable HS200 support
Dong Aisheng [Thu, 11 Jun 2015 09:01:16 +0000 (17:01 +0800)]
MLK-11093-2 dts: imx6ul-14x14-ddr3-arm2-emmc: enable HS200 support

Add ultra high speed mode pinctrl states to support eMMC HS200.
HW rework needed that changing both NVCC_SD and NVCC_NAND to 1.8v.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit f0f86b3bcd0ae1b1405f752862bde9745222372d)

7 years agoMLK-11093-1 dts: imx6ul-14x14-ddr-arm2: add SD1 eMMC support
Dong Aisheng [Thu, 11 Jun 2015 06:40:17 +0000 (14:40 +0800)]
MLK-11093-1 dts: imx6ul-14x14-ddr-arm2: add SD1 eMMC support

The eMMC signals are reused from SD1 slot signals on MX6UL ARM2 board.
Thus a new dts is introduced to avoid such pin confliction.
Before using this dts, user has to do hw rework to connect eMMC IO
signals and disconnect SD1 Slot signals.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit e46408ad15bed829e6f254ced16524fcfe99176f)

Conflicts:
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/imx6ul-14x14-ddr3-arm2.dts

7 years agoMLK-10584 bcmdhd: fix connect Adhoc network warnings
Dong Aisheng [Mon, 25 May 2015 11:13:05 +0000 (19:13 +0800)]
MLK-10584 bcmdhd: fix connect Adhoc network warnings

As part of starting up IBSS,  CFG80211 driver needs BSS information to be
plumbed into it. Hence in DHD we call cfg80211_infrom_bss() and it needs whole
frame consist of IEs contained in beacon frame. But FW was passing frame buffer
with some extra bytes preceded and when same is plumbed into CFG80211 it was not
able to decode the frame and it ignores the frame as result we get such warnings.
Using latest FW delivered by Broadcom to fix the issue.

As well as wl_cfg80211.c changes are essential. This change is actually fix certain
warnings seen when moving between IBSS and BSS network mode.
Changes must be done in wl_cfg80211_change_virtual_iface() which you can find at
wl_cfg80211.c and this file is not specific wl tool.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit a6a35af7350b26c1e30cc14aa2ad6e117ab260dc)

7 years agoMLK-10717 bcmdhd: fix rmmod warnings when associated with AP
Dong Aisheng [Wed, 20 May 2015 09:14:41 +0000 (17:14 +0800)]
MLK-10717 bcmdhd: fix rmmod warnings when associated with AP

Should call cfg80211_disconnected() when do rmmod if associcated with AP before..

root@imx7d_all:~# modprobe -r bcmdhd
dhd_prot_ioctl : bus is down. we have nothing to do
dhd_wlfc_deinit():3268, ampdu_hostreorder get failed Err = -1
dhd_prot_ioctl : bus is down. we have nothing to do
dhd_wlfc_deinit():3291 failed to enable/disable bdcv2 tlv signaling Err = -1
CFG80211-ERROR) wl_cfg80211_disconnect : Reason 3
dhd_prot_ioctl : bus is down. we have nothing to do
CFG80211-ERROR) wl_cfg80211_disconnect : error (-1)
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1057 at net/wireless/core.c:953 cfg80211_netdev_notifier_call+0x3f4/0x468()
Modules linked in: bcmdhd(-) evbug
CPU: 1 PID: 1057 Comm: modprobe Not tainted 3.14.38-02140-g3418ee9 #1074
[<80014a40>] (unwind_backtrace) from [<80011698>] (show_stack+0x10/0x14)
[<80011698>] (show_stack) from [<80705f90>] (dump_stack+0x7c/0xbc)
[<80705f90>] (dump_stack) from [<8002fbe0>] (warn_slowpath_common+0x6c/0x88)
[<8002fbe0>] (warn_slowpath_common) from [<8002fc98>] (warn_slowpath_null+0x1c/0x24)
[<8002fc98>] (warn_slowpath_null) from [<806b2d4c>] (cfg80211_netdev_notifier_call+0x3f4/0x468)
[<806b2d4c>] (cfg80211_netdev_notifier_call) from [<8004e044>] (notifier_call_chain+0x44/0x84)
[<8004e044>] (notifier_call_chain) from [<8004e148>] (raw_notifier_call_chain+0x18/0x20)
[<8004e148>] (raw_notifier_call_chain) from [<8059b218>] (rollback_registered_many+0x1dc/0x340)
[<8059b218>] (rollback_registered_many) from [<8059b3a4>] (rollback_registered+0x28/0x3c)
[<8059b3a4>] (rollback_registered) from [<8059c658>] (unregister_netdevice_queue+0x54/0xb0)
[<8059c658>] (unregister_netdevice_queue) from [<8059c6cc>] (unregister_netdev+0x18/0x20)
[<8059c6cc>] (unregister_netdev) from [<7f00ef84>] (dhd_detach+0x238/0x474 [bcmdhd])
[<7f00ef84>] (dhd_detach [bcmdhd]) from [<7f05621c>] (dhdsdio_release+0x40/0x1c0 [bcmdhd])
[<7f05621c>] (dhdsdio_release [bcmdhd]) from [<7f0569fc>] (dhdsdio_disconnect+0x3c/0x94 [bcmdhd])
[<7f0569fc>] (dhdsdio_disconnect [bcmdhd]) from [<7f0493a8>] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
[<7f0493a8>] (bcmsdh_remove [bcmdhd]) from [<7f04ade8>] (bcmsdh_sdmmc_remove+0x4c/0x64 [bcmdhd])
[<7f04ade8>] (bcmsdh_sdmmc_remove [bcmdhd]) from [<804baff8>] (sdio_bus_remove+0x30/0xf8)
[<804baff8>] (sdio_bus_remove) from [<80346c94>] (__device_release_driver+0x70/0xcc)
[<80346c94>] (__device_release_driver) from [<803473bc>] (driver_detach+0xac/0xb0)
[<803473bc>] (driver_detach) from [<80346994>] (bus_remove_driver+0x4c/0xa0)
[<80346994>] (bus_remove_driver) from [<7f05f930>] (dhd_module_cleanup+0x2c/0x3c [bcmdhd])
[<7f05f930>] (dhd_module_cleanup [bcmdhd]) from [<80084c54>] (SyS_delete_module+0x11c/0x17c)
[<80084c54>] (SyS_delete_module) from [<8000e3e0>] (ret_fast_syscall+0x0/0x30)
---[ end trace 89522c1a1370465d ]---
dhd_detach(): thread:dhd_watchdog_thread:291 terminated OK
dhd_dpc_thread: Unexpected up_cnt 0
dhd_detach(): thread:dhd_dpc:292 terminated OK
CFG80211-ERROR) wl_event_handler : was terminated
wl_destroy_event_handler(): thread:wl_event_handler:290 terminated OK
unregister wifi platform drivers
wifi_platform_bus_enumerate device present 0
mmc1: card 0001 removed

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 740bef7011441010f6183662d452304dca7c7adf)

7 years agoMLK-11065-8 bcmdhd: fixed build errors with 3.9.2 toolchain
Dong Aisheng [Tue, 24 Mar 2015 08:02:34 +0000 (16:02 +0800)]
MLK-11065-8 bcmdhd: fixed build errors with 3.9.2 toolchain

  CC [M]  drivers/net/wireless/bcmdhd/dhd_ip.o
  LD [M]  fs/udf/udf.o
drivers/net/wireless/bcmdhd/dhd_common.c:108:22: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
  DHD_COMPILED " on " __DATE__ " at " __TIME__;
                      ^
drivers/net/wireless/bcmdhd/dhd_common.c:108:38: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
  DHD_COMPILED " on " __DATE__ " at " __TIME__;

Drop debug version with build date/time.
The kernel already has this information, and individual drivers
shouldn't duplicate that.  This also eliminates the use of __DATE__ and
__TIME__, which make the build non-deterministic.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 3f47e9588c8acf5c4cc5079e746bc05e7d5c69ec)

7 years agoMLK-11065-7 bcmdhd: call wifi_card_detect in wifi_platform_bus_enumerate
Dong Aisheng [Thu, 9 Apr 2015 08:36:06 +0000 (16:36 +0800)]
MLK-11065-7 bcmdhd: call wifi_card_detect in wifi_platform_bus_enumerate

Without this, WiFi can not work when re-insmod module because
the card is not reset in rmmod.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 25ce53802b419f3b2002c5345abee1b85827c688)

7 years agoMLK-11065-6 bcmdhd: fix warning when rmmod module
Dong Aisheng [Fri, 3 Apr 2015 09:15:13 +0000 (17:15 +0800)]
MLK-11065-6 bcmdhd: fix warning when rmmod module

root@imx7d_all:~# rmmod bcmdhd
dhd_prot_ioctl : bus is down. we have nothing to do
dhd_wlfc_deinit():3268, ampdu_hostreorder get failed Err = -1
dhd_prot_ioctl : bus is down. we have nothing to do
dhd_wlfc_deinit():3291 failed to enable/disable bdcv2 tlv signaling Err = -1
dhd_detach(): thread:dhd_watchdog_thread:2d4 terminated OK
dhd_dpc_thread: Unexpected up_cnt 0
dhd_detach(): thread:dhd_dpc:2d5 terminated OK
CFG80211-ERROR) wl_event_handler : was terminated
wl_destroy_event_handler(): thread:wl_event_handler:2d3 terminated OK
------------[ cut here ]------------
Kernel BUG at 800d12b0 [verbose debug info unavailable]
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in: bcmdhd(-) evbug
CPU: 0 PID: 755 Comm: rmmod Not tainted 3.14.28-7D_alpha #1
task: a8a31680 ti: a841a000 task.ti: a841a000
PC is at kfree+0x17c/0x180
LR is at wiphy_unregister+0x15c/0x1cc
pc : [<800d12b0>]    lr : [<806b0cf8>]    psr: 40070013
sp : a841be28  ip : 00000000  fp : a901396c
r10: 7f078dc0  r9 : a9240120  r8 : a9240380
r7 : a9240000  r6 : a9010000  r5 : ab73af20  r4 : a9240120
r3 : 00000000  r2 : ab75a000  r1 : 00000000  r0 : 7f079220
Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c53c7d  Table: a863406a  DAC: 00000015
Process rmmod (pid: 755, stack limit = 0xa841a238)
Stack: (0xa841be28 to 0xa841c000)
be20:                   7f079220 a9240120 00000000 a9010000 a9240000 a9240380
be40: a9240120 7f078dc0 a901396c 806b0cf8 00000000 7f078dc0 a901396c 805962b4
be60: 7f07cea0 a8433800 a8ae3840 a9240380 a9010000 a9013000 a9240380 7f02b088
be80: 00000000 00000000 a9010000 a9013000 a9010000 7f07cea0 7f078dc0 7f00f00c
bea0: 00000001 a850f800 7f078dc0 a865b3c0 00000081 8000e5e4 a841a000 00000000
bec0: 00000000 7f05588c 7f078dc0 a850f800 00000000 7f056080 7f056044 a865b180
bee0: a865b340 7f048944 a8fe7800 a865b3c0 7f07acd4 7f04a37c 7f04a330 a8487408
bf00: a8487400 804baf10 a8487408 7f07acd4 a848743c 803476b4 7f07acd4 a8487408
bf20: 7f07acd4 80347dc4 7f07acd4 7f07ad38 00000800 803473b4 00000000 7f05f158
bf40: 7f05f12c 80083be8 00000000 00000000 7f07ad38 00000800 a841bf4c 646d6362
bf60: 00006468 00000000 8108f030 a8a31680 a8a31a30 00000000 00000000 8004605c
bf80: a89c4d80 a841a018 8000e5e4 a841bfb0 a841a000 00011330 00000000 7ecc5e1c
bfa0: 00000002 8000e460 00000000 7ecc5e1c 01b05d3c 00000800 76f26104 00002002
bfc0: 00000000 7ecc5e1c 00000002 00000081 7ecc5f0a 00000001 01b05d08 00000000
bfe0: 76eebeb0 7ecc5bfc 00016e3c 76eebebc 60080010 01b05d3c efdff749 faff7bf3
[<800d12b0>] (kfree) from [<806b0cf8>] (wiphy_unregister+0x15c/0x1cc)
[<806b0cf8>] (wiphy_unregister) from [<7f02b088>] (wl_free_wdev+0x2c/0xf8 [bcmdhd])
[<7f02b088>] (wl_free_wdev [bcmdhd]) from [<7f00f00c>] (dhd_detach+0x274/0x430 [bcmdhd])
[<7f00f00c>] (dhd_detach [bcmdhd]) from [<7f05588c>] (dhdsdio_release+0x40/0x1cc [bcmdhd])
[<7f05588c>] (dhdsdio_release [bcmdhd]) from [<7f056080>] (dhdsdio_disconnect+0x3c/0xa0 [bcmdhd])
[<7f056080>] (dhdsdio_disconnect [bcmdhd]) from [<7f048944>] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
[<7f048944>] (bcmsdh_remove [bcmdhd]) from [<7f04a37c>] (bcmsdh_sdmmc_remove+0x4c/0x64 [bcmdhd])
[<7f04a37c>] (bcmsdh_sdmmc_remove [bcmdhd]) from [<804baf10>] (sdio_bus_remove+0x30/0xf8)
[<804baf10>] (sdio_bus_remove) from [<803476b4>] (__device_release_driver+0x70/0xcc)
[<803476b4>] (__device_release_driver) from [<80347dc4>] (driver_detach+0xac/0xb0)
[<80347dc4>] (driver_detach) from [<803473b4>] (bus_remove_driver+0x4c/0xa0)
[<803473b4>] (bus_remove_driver) from [<7f05f158>] (dhd_module_cleanup+0x2c/0x3c [bcmdhd])
[<7f05f158>] (dhd_module_cleanup [bcmdhd]) from [<80083be8>] (SyS_delete_module+0x11c/0x17c)
[<80083be8>] (SyS_delete_module) from [<8000e460>] (ret_fast_syscall+0x0/0x30)
Code: e1a01005 e1a02006 e8bd4ff8 eafffef1 (e7f001f2)
---[ end trace ca749705cd612037 ]---
Segmentation fault

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 8d019afe680fd7f20e42159daf2da7d9bfc94577)

7 years agoMLK-11065-4 wireless: make bcmdhd wireless driver functionally
Dong Aisheng [Wed, 4 Feb 2015 08:00:47 +0000 (16:00 +0800)]
MLK-11065-4 wireless: make bcmdhd wireless driver functionally

1. Add dummy regulator in dts which is must required by bcmdhd driver
2. Workaround to add dummy sdio_reset_comm as suggested by Broadcom guy
because driver always failed in this function porting from Android kernel,
root cause unknown.
3. enable driver dts function, inband irq, built as module
4. comment out the hard code in wifi_plat_dev_drv_probe which has to parse
oob irq gpio properties and gpio regulators from device tree even the driver
does not use it.
5. warning fix

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit fb572304245ab19b79a101c66f0c658a555cc3fe)

7 years agoMLK-11065-3 wireless: bcmdhd: make work driver on 3.14 kernel
Dong Aisheng [Mon, 9 Feb 2015 09:40:43 +0000 (17:40 +0800)]
MLK-11065-3 wireless: bcmdhd: make work driver on 3.14 kernel

Add missing file delivered by Broadcom to make driver work on L3.14.y kernel.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit b795547e37c3b68ed019e5d0b9daa3fc6474f623)

7 years agoMLK-11065-2 wireless: add bcmdhd wireless driver into compilation
Dong Aisheng [Wed, 4 Feb 2015 07:56:14 +0000 (15:56 +0800)]
MLK-11065-2 wireless: add bcmdhd wireless driver into compilation

Add bcmdhd driver into compilation

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit ca87be10e248965ed724b2f28e76f78187c22161)

7 years agoMLK-11065-1 wireless: add bcmdhd_1_141_72 driver
Dong Aisheng [Wed, 4 Feb 2015 07:54:59 +0000 (15:54 +0800)]
MLK-11065-1 wireless: add bcmdhd_1_141_72 driver

It's default driver delivered by Broadcom.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 5595dca69a1135dba8a1fbc9159d00cf31356c1a)

7 years agoMLK-11502 dts: imx7d-sdb: change ramp up delay for VDD_SD1 regulator
Haibo Chen [Tue, 15 Sep 2015 08:59:30 +0000 (16:59 +0800)]
MLK-11502 dts: imx7d-sdb: change ramp up delay for VDD_SD1 regulator

Currently the ramp up delay for VDD_SD1 regulator is 1s, the delay
is added in the following patch:

   commit 558c8cde973b9b2abf9a69e3be5a887d38185da3
   MLK-11277 dts: imx7d-sdb: add ramp up delay for VDD_SD1 regulator

Here we find this delay will also impact the sd1 resume time cost, and
1s is too much for the sd1 resume, so we try to reduce the delay time
of this VDD_SD1 regulator, finally 200ms pass our test.

This patch change the ramp up delay for VDD_SD1 regulator from 1s to
200ms.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
(cherry picked from commit 16523e1bd8613c38b8182da36fdae99564980e24)

7 years agoMLK-11370 dts: imx6ul-evk: enhance driver strength of sd clk signal
Dong Aisheng [Fri, 14 Aug 2015 08:04:19 +0000 (16:04 +0800)]
MLK-11370 dts: imx6ul-evk: enhance driver strength of sd clk signal

The SD CLK signal measured by scope shows the signal rise/fall time
does not meet the spec requirement, need increase the pad driver
strength to meet the spec.
The pad setting value is given by the HW team which has been verified
from scope.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit e4944a51c4bb950a8f13e421eefc000a87350e23)
(cherry picked from commit f491804bc93ebd15adb3222ff4774d14eb714491)

7 years agoMLK-10392-3 dts: imx7d-sdb: add flexcan support
Dong Aisheng [Tue, 10 Mar 2015 11:58:04 +0000 (19:58 +0800)]
MLK-10392-3 dts: imx7d-sdb: add flexcan support

Add flexcan support.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 22f6dd8e62b3a1f0557201b046b8491eedb8a97f)

Conflicts:
arch/arm/boot/dts/imx7d-sdb.dts

7 years agoMLK-10392-1 dts: imx7d-arm2: add flexcan support
Dong Aisheng [Wed, 21 Oct 2015 07:27:39 +0000 (15:27 +0800)]
MLK-10392-1 dts: imx7d-arm2: add flexcan support

New dts file imx7d-12x12-lpddr3-arm2-flexcan.dts introduced due to pin conflict
with enet1 and sai1.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-10211 can: flexcan: fix resume failed issue
Dong Aisheng [Wed, 11 Feb 2015 07:12:44 +0000 (15:12 +0800)]
MLK-10211 can: flexcan: fix resume failed issue

We can observe the following error during system resume.
dpm_run_callback(): platform_pm_resume+0x0/0x4c returns -110
PM: Device 2090000.can failed to resume: error -110

It is caused by the flexcan is in disable state and the clock is disabled
by default while the CAN is not up. During resume, the calling of
flexcan_chip_enable will obviously fail due to no clock.

The issue only happened when CAN device is not up. If CAN is up, clock is there
and no issue will happen.

Because the CAN is always in disabled state by default if it's not up.
We don't have to disable it again during suspend and enable it after resume.
This patch simply the suspend/resume to only enter/exit disabled mode if CAN
is up.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit d976d7c9d408c1275075d5870ccf6cb425720434)

7 years agoMLK-10131 flexcan: fix wakeup unwork issue
Dong Aisheng [Thu, 22 Jan 2015 13:48:07 +0000 (21:48 +0800)]
MLK-10131 flexcan: fix wakeup unwork issue

Original code will always disable flexcan during suspend no matter whether
wakeup feature is enabled.
It's caused by merge issue when doing kernel upgrade.

Fix it by removing that disable code.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 55c8670332973d3184816d3d16c2c3e07681c781)

7 years agoMLK-10131 ENGR00300439-5 can: flexcan: parse stop mode control bits from device tree
Dong Aisheng [Mon, 24 Feb 2014 06:25:12 +0000 (14:25 +0800)]
MLK-10131 ENGR00300439-5 can: flexcan: parse stop mode control bits from device tree

Starting from IMX6, the flexcan stop mode control bits is SoC specific,
move it out of IP driver and parse it from devicetree.
It's good from maintain perspective and can avoid adding too many SoC
specifi bits in driver but with no IP changes when the IMX SoC series
keep growing.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 97b99b59c9f09d58ea35f3c0cf58665c20f2e292)
(cherry picked from commit 6355208605715f7cb9ea8c37e29c577785f66898)

Conflicts:
arch/arm/boot/dts/imx6qdl.dtsi

7 years agoMLK-10131 ENGR00286724-8 can: flexcan: add self wakeup support
Dong Aisheng [Wed, 6 Nov 2013 11:10:28 +0000 (19:10 +0800)]
MLK-10131 ENGR00286724-8 can: flexcan: add self wakeup support

If wakeup is enabled, enter stop mode, else enter disabled mode.
Self wake can only work on stop mode.
For imx6q, the stop request has to be mannually assert on
IOMUX GPR13[28:29] register, we use syscon to control that bit.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 7f8ef8eeb2bd93d75eb4c970bcaabcfd499d348d)
(cherry picked from commit 496fef522e515488147cce3adcc7f101bb532805)

7 years agoMLK-10131 ENGR00286724-4 can: flexcan: add platform_data for transceiver_switch
Dong Aisheng [Wed, 10 Sep 2014 08:55:17 +0000 (16:55 +0800)]
MLK-10131 ENGR00286724-4 can: flexcan: add platform_data for transceiver_switch

It's used for transceiver_switch.

NOTE: it's newly added since it's deleted by upstream before.
However, the driver is still using it, so have to add it.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 53109634188e672b807a7256afbf10db0d9a6574)

7 years agoMLK-11738 dts: mx6ul: add Murata BT/WiFi module support for 9x9 evk
Dong Aisheng [Mon, 19 Oct 2015 03:31:21 +0000 (11:31 +0800)]
MLK-11738 dts: mx6ul: add Murata BT/WiFi module support for 9x9 evk

Add Murata Type ZP module support for 9x9 evk.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
(cherry picked from commit 26e76b8d1fcae367e7a16ba5a4a399a8116f3d5e)

7 years agoMLK-11711-02 ARM: dts: imx7d-12x12-lpddr3-arm2-mqs: enable mqs sound card support...
Zidan Wang [Wed, 14 Oct 2015 11:18:15 +0000 (19:18 +0800)]
MLK-11711-02 ARM: dts: imx7d-12x12-lpddr3-arm2-mqs: enable mqs sound card support in lpsr mode

enable mqs sound card support in lpsr mode

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
7 years agoMLK-11711-01 ARM: dts: imx7d-12x12-lpddr3-arm2-sai: enable sai<->wm8958 sound card...
Zidan Wang [Wed, 14 Oct 2015 11:11:42 +0000 (19:11 +0800)]
MLK-11711-01 ARM: dts: imx7d-12x12-lpddr3-arm2-sai: enable sai<->wm8958 sound card support in lpsr mode

enable sai<->wm8958 sound card support in lpsr mode

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
7 years agoMLK-11570-02 ASoC: wm8994: store/restore context in codec driver suspend/resume
Zidan Wang [Tue, 13 Oct 2015 10:25:19 +0000 (18:25 +0800)]
MLK-11570-02 ASoC: wm8994: store/restore context in codec driver suspend/resume

For lpsr mode, the codec will be power down, the register value will be lost,
so we should store the context at the end of codec suspend, and load the
registers at the beginning of codec resume.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit e35e15983e14caf48dadf235bc6b33014818c62e)

7 years agoMLK-11741 cpufreq: imx: fix a potential issue in the imx7 cpufreq driver
Bai Ping [Tue, 20 Oct 2015 16:26:21 +0000 (00:26 +0800)]
MLK-11741 cpufreq: imx: fix a potential issue in the imx7 cpufreq driver

The 'OR' operation should be '||', so fix it.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11740 ARM: defconfig: change the cpufreq default governor to ondemand
Bai Ping [Tue, 20 Oct 2015 11:24:51 +0000 (19:24 +0800)]
MLK-11740 ARM: defconfig: change the cpufreq default governor to ondemand

Change the cpufreq default governor to the ondemand governor.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11705 thermal: imx: make the critical trip temp changable for test
Bai Ping [Tue, 13 Oct 2015 18:46:13 +0000 (02:46 +0800)]
MLK-11705 thermal: imx: make the critical trip temp changable for test

In order to test the critical trip point funtion, the
critical trip point temp should be writable from userspace.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11739-2 ARM: dts: imx6qdl: fec interrupt should be in GPC domain
Anson Huang [Mon, 19 Oct 2015 09:34:54 +0000 (17:34 +0800)]
MLK-11739-2 ARM: dts: imx6qdl: fec interrupt should be in GPC domain

GPC irq domain is child domain of GIC, all of platform
irqs should be inside GPC domain.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11698 ARM: imx: correct stop_mode_config bit offset
Anson Huang [Wed, 14 Oct 2015 09:50:01 +0000 (17:50 +0800)]
MLK-11698 ARM: imx: correct stop_mode_config bit offset

STOP_MODE_CONFIG field of PMU_MISC0 register are different
on different i.MX6 SoC, weak2P5 can only be enabled when
STOP_MODE_CONFIG is clear, need to read STOP_MODE_CONFIG
setting before enabling weak2P5, so the register field
must be correct, the definition are as below:

i.MX6Q/DL: bit[12];
i.MX6SL: bit[12:11], but only bit[11] is valid, so use bit[11];
i.MX6SX/UL: bit[11:10].

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11491 ARM: imx: dis-connect vddhigh_in and vddsnvs_in for imx6ul
Anson Huang [Wed, 2 Sep 2015 16:02:22 +0000 (00:02 +0800)]
MLK-11491 ARM: imx: dis-connect vddhigh_in and vddsnvs_in for imx6ul

To achieve lower power number in low power idle, on the boards
which has higher vddhigh_in than vddsnvs_in, need to dis-connect
vddhigh_in and vddsnvs_in internally to make vddhigh_in's power
low enough to meet the design target.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11728-03 ARM: dts: remove the non-existed dts file from Makefile
Fugang Duan [Mon, 19 Oct 2015 06:52:47 +0000 (14:52 +0800)]
MLK-11728-03 ARM: dts: remove the non-existed dts file from Makefile

Remove the non-existed dts file from Makefile.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Conflicts:
arch/arm/boot/dts/Makefile

7 years agoMLK-11728-02 ARM: dts: imx6x: add Murata BT support
Fugang Duan [Mon, 19 Oct 2015 03:11:13 +0000 (11:11 +0800)]
MLK-11728-02 ARM: dts: imx6x: add Murata BT support

The patch re-enable Murata BT as commit 117ba2ebb3fd define.
Since commit:76946e805b5d don't set murata bt/wifi as default in dtb and
add extra dts file to support Murata BT/WIFI, to align with this commit,
move BT support in the extra dts file.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Conflicts:
arch/arm/boot/dts/imx6q-sabresd-uart.dts

7 years agoMLK-11725 dts: imx6: add Murata BT/WiFi module support
Dong Aisheng [Thu, 15 Oct 2015 07:39:02 +0000 (15:39 +0800)]
MLK-11725 dts: imx6: add Murata BT/WiFi module support

Add Murata Type ZP (BCM4339) module support on below platforms:
- i.MX6Q/DL/QP SabreSD(SD2 slot) + Murata adapter V2.0
- i.MX6SX SDB (SD3+SD2 slot) + Murata adapter V1.0 & SD EXT card
- i.MX6SL EVK (SD1+SD3 slot) + Murata adapter V1.0 & SD EXT card
- i.MX6UL SDB RevC (SD1 slot) + Murata adapter V2.0

Note: MX6Q/DL/QP SabreSD board requires HW rework.
Please refer to rework guide specified in schematic.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
Conflicts:
arch/arm/boot/dts/Makefile

7 years agoMLK-11683 dts: imx6qp-sabresd: enhance uSDHC clk pad driver strength
Dong Aisheng [Sat, 10 Oct 2015 09:22:57 +0000 (17:22 +0800)]
MLK-11683 dts: imx6qp-sabresd: enhance uSDHC clk pad driver strength

The old driver strength of uSDHC clk pad of two slot can not work well
on the new imx6qp sabresd board because we can easily meet CRC errors
due to signal quality issue, especially with a SDIO card.
Enhance the driver strength of the CLK pad from 0x10059 to 0x10071
to avoid such issue

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
(cherry picked from commit 59a54039528cc2a7df30ee62e37bc47487c163e4)

7 years agoMLK-11647 ARM: dts: imx6qp-sabresd: Correct DOVDD supply for mipi camera
Robby Cai [Mon, 28 Sep 2015 10:01:27 +0000 (18:01 +0800)]
MLK-11647 ARM: dts: imx6qp-sabresd: Correct DOVDD supply for mipi camera

DOVDD ( GEN_1V8 ) is supplied by SW4 on i.MX6dqp-sabresd board
This patch corrects it.

Signed-off-by: Robby Cai <r63905@freescale.com>
(cherry picked from commit 50f1b6782d3ee8644129f98caff12c183411230c)

7 years agoMLK-11624 ARM: dts: imx6qp-sabresd: Correct DOVDD supply for camera
Robby Cai [Thu, 24 Sep 2015 12:03:03 +0000 (20:03 +0800)]
MLK-11624 ARM: dts: imx6qp-sabresd: Correct DOVDD supply for camera

DOVDD ( GEN_1V8 ) is supplied by SW4 on i.MX6dqp-sabresd board
This patch corrects it.

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11617 ARM: imx: enable pcie support on imx6qp sd
Richard Zhu [Fri, 18 Sep 2015 08:39:40 +0000 (16:39 +0800)]
MLK-11617 ARM: imx: enable pcie support on imx6qp sd

enable pcie support on imx6qp sd board

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
7 years agoMLK-11615 ARM: dts: imx6qp-sabresd: Enable prefetch for the four mxcfbs
Liu Ying [Thu, 24 Sep 2015 03:30:21 +0000 (11:30 +0800)]
MLK-11615 ARM: dts: imx6qp-sabresd: Enable prefetch for the four mxcfbs

This patch enables the prefetch feature for the four mxcfbs.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11614 ARM: dts: imx6qp-sabresd: Enable prefetch resolve gasket(PRG) engines
Liu Ying [Thu, 24 Sep 2015 03:25:33 +0000 (11:25 +0800)]
MLK-11614 ARM: dts: imx6qp-sabresd: Enable prefetch resolve gasket(PRG) engines

This patch enables the two prefetch resolve gasket(PRG) engines on the
imx6qp-sabresd platform.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11613 ARM: dts: imx6qp-sabresd: Enable prefetch engines
Liu Ying [Thu, 24 Sep 2015 03:16:18 +0000 (11:16 +0800)]
MLK-11613 ARM: dts: imx6qp-sabresd: Enable prefetch engines

This patch enables the four prefetch engines on the imx6qp-sabresd platform.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11704 net: fec: fix MDIO read/write timeout when ethx down/up after suspend/resume
Fugang Duan [Thu, 15 Oct 2015 09:38:29 +0000 (17:38 +0800)]
MLK-11704 net: fec: fix MDIO read/write timeout when ethx down/up after suspend/resume

This reverts commit 12fee3d24574bd084e8b6fa1dcaf84a084298c9a.

The commit:12fee3d24574 intruduce MDIO read/write timeout when Ethernet
down and up after Mega/Fast off. The patch just revert the patch.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11724: ARM: dts: add mqs support mx6sx-sd-exp1 board
Shengjiu Wang [Thu, 18 Jun 2015 11:09:46 +0000 (19:09 +0800)]
MLK-11724: ARM: dts: add mqs support mx6sx-sd-exp1 board

Add mqs support for mx6sx-sd-exp1 board

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-11687 video: mxsfb: remove timestamp in wait for vsync ioctl
Fancy Fang [Wed, 14 Oct 2015 09:37:13 +0000 (17:37 +0800)]
MLK-11687 video: mxsfb: remove timestamp in wait for vsync ioctl

Remove the timestamp usage in the 'MXCFB_WAIT_FOR_VSYNC'
ioctl handler, since the 64 bit timestamp would cause
data overflow when writing it to user memory.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit 4bfbf67a384f1292d217769b77858c08f38fe658)

Conflicts:
drivers/video/mxsfb.c

7 years agoMLK-11602 arm: imx: set imx6qdl eim_slow clk to 135Mhz
Gao Pan [Tue, 13 Oct 2015 10:27:45 +0000 (18:27 +0800)]
MLK-11602 arm: imx: set imx6qdl eim_slow clk to 135Mhz

weim nor read performance drop 32% compared with L3.10.53_1.1.0_GA because
eim_slow clk rate drops. This patch set the eim_slow clk to 135Mhz to improve
the performance.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agospi: check tx_buf and rx_buf in spi_unmap_msg
Robin Gong [Thu, 16 Apr 2015 02:54:18 +0000 (10:54 +0800)]
spi: check tx_buf and rx_buf in spi_unmap_msg

Some spi device drivers use the same tx_buf and rx_buf repeatly for better
performance such as driver/input/touchsreen/ads7846.c, but spi core grab tx_buf
/rx_buf of transfer and set them as dummy_tx/dummy_rx once they are NULL. Thus,
in the second time the tx_buf/rx_buf will be replaced by dummy_tx/dummy_rx and
the data which produced by the last tx or rx may be wrongly sent to the device
or handled by the upper level protocol. This patch just keep the orignal value
of tx_buf/rx_buf if they are NULL after this transfer processed.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit bcd1c2dc8b54060ccb864130a83277d2dc1ff24e)

7 years agoMLK-11239 ARM: dts: imx7d-sdb-touch: correct the format of u16 values
Haibo Chen [Mon, 13 Jul 2015 07:23:54 +0000 (15:23 +0800)]
MLK-11239 ARM: dts: imx7d-sdb-touch: correct the format of u16 values

In tsc2046 touch driver, the values such as ti,x-min is defined as a u16
value. the driver use API of_property_read_u16() read the value. For these
u16 value, the dts entry should be like:
    property = /bits/ 16 <0x5000>;
This describe the property as a u16 value.

if the dts entry write like following:
property = <0x5000>;
of subsystem will read this property as a u32 value in default. Due to the
DTB file is big-endian, and our memory system is little endian, this will
make the driver can't read the correct value.

This patch correct the format of u16 values, and set the default value defined
in tsc2046 touch driver.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
(cherry picked from commit a08be6b632438098eb7947ce8c0ce8af29575241)

7 years agoMLK-10961-3 imx_v7_defconfig: enable tsc2046 touch screen controller
Haibo Chen [Fri, 22 May 2015 07:32:13 +0000 (15:32 +0800)]
MLK-10961-3 imx_v7_defconfig: enable tsc2046 touch screen controller

Enable tsc2046/ads7846 touch screen controller

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
(cherry picked from commit 2e805b48fd0f32b18653f5b5666c29f191d77753)

7 years agoMLK-10961-1 arm: dts: imx7d-sdb-touch.dts: add support for touch screen
Haibo Chen [Fri, 22 May 2015 07:25:11 +0000 (15:25 +0800)]
MLK-10961-1 arm: dts: imx7d-sdb-touch.dts: add support for touch screen

Add an new dts file: imx7d-sdb-touch.dts.This file add tsc2046 touch
screen controller support. Due to the pin PENIRQ of tsc2046 is conflict
with the interrupt pin of HDMI, so in this patch, disable the HDMI.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
(cherry picked from commit b690c1093a3a88a99da366200362fb4ae8172f9b)

Conflicts:
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/imx7d-sdb.dts

7 years agoMGS-1133 porting vivante drm driver to 4.1 kernel.
Yang Dong [Tue, 13 Oct 2015 13:10:39 +0000 (21:10 +0800)]
MGS-1133 porting vivante drm driver to 4.1 kernel.

Port imx_3.14.y vivante drm driver to 4.1 kernel.

Date: Oct 13, 2015
Signed-off-by Yang Dong <b56112@freescale.com>

7 years agoMLK-11703-9: ARM: dts: imx_v7_defconfig: add battery driver
Robin Gong [Tue, 13 Oct 2015 09:40:54 +0000 (17:40 +0800)]
MLK-11703-9: ARM: dts: imx_v7_defconfig: add battery driver

add battery driver in imx_v7_defconfig

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11703-7: ARM: dts: imx6qdl-sabresd: add retain-state-suspended property in dts
Robin Gong [Tue, 21 Jan 2014 02:44:12 +0000 (10:44 +0800)]
MLK-11703-7: ARM: dts: imx6qdl-sabresd: add retain-state-suspended property in dts

cherry-pick below patch:

ENGR00295892-2: ARM: dts: imx6qdl-sabresd: add retain-state-suspended property in dts

Add property "retain-state-suspended" in dts.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit aff480769c26ff7f64059f9631b10e8177c4791b)
(cherry picked from commit 4a029915c4693b16db4806f078504cc86f34c069)

7 years agoMLK-11703-6: ARM: imx6: Add charging led support on Sabresd board
Robin Gong [Tue, 3 Dec 2013 06:59:05 +0000 (14:59 +0800)]
MLK-11703-6: ARM: imx6: Add charging led support on Sabresd board

cherry-pick below patch:

ENGR00290496-1 ARM: imx6: Add charging led support on Sabresd board

Enable led lighting while the board in charging status. Implement it on Sabresd
board.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 7a47183634c524f5ac11c60fe555b0b18c0fe7e0)
(cherry picked from commit 28b266aa0bdd531b8eb43a76435f2fcc658bab84)

7 years agoMLK-11703-5: ARM: dts: imx6: add battery device node in dts file
Robin Gong [Fri, 5 Sep 2014 06:53:09 +0000 (14:53 +0800)]
MLK-11703-5: ARM: dts: imx6: add battery device node in dts file

cherry-pick below patch:

ENGR00330406-1: ARM: dts: imx6: add battery device node in dts file

Add battery device node on imx6q/dl-sabresd and imx6sl-evk board

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 1f2670578decd4a527208864ab3a014d840773f6)

7 years agoMLK-11703-4: sabresd_battery: fix usb charger detect when resume back on mx6sl
Robin Gong [Fri, 15 Nov 2013 10:29:03 +0000 (18:29 +0800)]
MLK-11703-4: sabresd_battery: fix usb charger detect when resume back on mx6sl

cherry-pick below patch:

ENGR00288351 sabresd_battery: fix usb charger detect when resume back on mx6sl

Fix  below redundant log after first resume back on mx6slevk:
max8903-charger max8903.12: USB Charger Connected

It's caused by not add enough prepare for uok&dok which are connected, such as
i.MX6SL-EVK. In this case the board only support DC charger detect, so we
didn't need judge the uok pin for USB charger detect, although uok share with
dok pin.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit c5ba4940a72e8124db7ef91a67b337df4e45e3b0)
(cherry picked from commit bcd7f8e5e19528abfc1c095049b55b3d409b27af)

7 years agoMLK-11703-3: power: sabresd_battery: remove check charger offset on mx6slevk
Robin Gong [Fri, 30 Aug 2013 07:29:10 +0000 (15:29 +0800)]
MLK-11703-3: power: sabresd_battery: remove check charger offset on mx6slevk

cherry-pick below patch:

ENGR00277663-3 power: sabresd_battery: remove check charger offset on mx6slevk

No need check the charger offset on mx6slevk, since there is no adc converter

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 7683c62cf2290629f09983744d5a3987a4d64669)
(cherry picked from commit 5f29715585ae82a435aa5ba0fe6393a53c10f87d)

7 years agoMLK-11703-2: power: sabresd_battery: add sabresd_battery driver
Robin Gong [Tue, 13 Aug 2013 09:49:54 +0000 (17:49 +0800)]
MLK-11703-2: power: sabresd_battery: add sabresd_battery driver

cherry-pick below patch:
ENGR00275004-4: power: sabresd_battery: add sabresd_battery driver

Add sabresd battery driver which based on Max8903 charger IC.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 19ac2dfcd1e0ea3f1ae231cfc230315eaa9a41be)
(cherry picked from commit b9e81012c21d3318a633a4447797e4a52676c760)

7 years agoMLK-11703-1: input: touchscreen: max11801_ts: Add DCM mode for max11801 ADC
Robin Gong [Tue, 13 Aug 2013 08:58:26 +0000 (16:58 +0800)]
MLK-11703-1: input: touchscreen: max11801_ts: Add DCM mode for max11801 ADC

cherry-pick below patch:

ENGR00275004-1 input: touchscreen: max11801_ts: Add DCM mode for max11801 ADC

We need add DCM mode/AUX mode for ADC converter function of max11801, so that
it can be used to read voltage of battery. Meanwhile, let the driver based on
device tree. The patchset is based on below patch (V3.5.7):

commit 4001774cf51f0140ae7e4e8e0ec1d86475790682
Author: Rong Dian <b38775@freescale.com>
Date:   Fri Jan 18 14:24:28 2013 +0800

    Engr00240284-1 MAX11801: Add DCM aux adc sample function

        1.Add direct conversion mode operations
2.Add aux adc sample function

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 57b11d40431336c28f15a8a67af41907948c42b6)
(cherry picked from commit 0cf609eb332e206fa6dac3df25ae906c7ab8bd4c)

7 years agoMGS-1132 ARM: Kconfig: increase FORCE_MAX_ZONEORDER for ARCH_MXC
Xianzhong [Tue, 13 Oct 2015 08:50:25 +0000 (16:50 +0800)]
MGS-1132 ARM: Kconfig: increase FORCE_MAX_ZONEORDER for ARCH_MXC

Need increase the FORCE_MAX_ZONEORDER to 14 for high resolution camera
(GPU 2D user case). The default value 11(4MB) is not enough now.

Signed-off-by: Jason Liu <r64343@freescale.com>
(cherry picked from commit fff642ffe868cb55f5caec0501e36fd28b6ece50)

7 years agoMLK-11702-2 ARM: dts: imx6sx-sabreauto: add dts support for pxp v4l2 output
Fancy Fang [Tue, 13 Oct 2015 08:00:57 +0000 (16:00 +0800)]
MLK-11702-2 ARM: dts: imx6sx-sabreauto: add dts support for pxp v4l2 output

Add dts support for pxp v4l2 output on imx6sx sabreauto
board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11702-1 ARM: dts: imx6sx-sabreauto: add dts support for pxp
Fancy Fang [Tue, 13 Oct 2015 07:58:55 +0000 (15:58 +0800)]
MLK-11702-1 ARM: dts: imx6sx-sabreauto: add dts support for pxp

Add dts support for pxp module on the imx6sx sabreauto
board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11701-2 ARM: dts: imx6sx-sdb: add dts support for pxp v4l2 output
Fancy Fang [Tue, 13 Oct 2015 07:53:38 +0000 (15:53 +0800)]
MLK-11701-2 ARM: dts: imx6sx-sdb: add dts support for pxp v4l2 output

Add dts support for pxp v4l2 output on imx6sx sdb
board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11701-1 ARM: dts: imx6sx-sdb: add dts support for pxp
Fancy Fang [Tue, 13 Oct 2015 07:49:23 +0000 (15:49 +0800)]
MLK-11701-1 ARM: dts: imx6sx-sdb: add dts support for pxp

Add dts support for pxp module on the imx6sx sdb
board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11699-2 ARM: dts: imx6sx-sabreauto: add dts support for ldb
Fancy Fang [Tue, 13 Oct 2015 07:12:42 +0000 (15:12 +0800)]
MLK-11699-2 ARM: dts: imx6sx-sabreauto: add dts support for ldb

Add dts support for ldb module on the imx6sx
sabreauto board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11699-1 ARM: dts: imx6sx-sabreauto: add dts support for backlight and pwm4
Fancy Fang [Tue, 13 Oct 2015 07:08:46 +0000 (15:08 +0800)]
MLK-11699-1 ARM: dts: imx6sx-sabreauto: add dts support for backlight and pwm4

Add dts support for backlight and pwm4 modules on
imx6sx sabreauto board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-10089 arm: imx: Add 198MHz OPP for i.MX6SX
Bai Ping [Tue, 13 Jan 2015 14:19:53 +0000 (22:19 +0800)]
MLK-10089 arm: imx: Add 198MHz OPP for i.MX6SX

Update the i.MX6SX operating points to comply with the latest
datasheet. Latest i.MX6SX datasheet of Rev.F, 1/2015 adds the
198MHz setpoint. For the RevB board, the VDD_ARM and ADD_SOC
are connected together, so the voltage for 198MHz needs to be
set to 1.175V. for the general setting, add a 25mV margin to
cover the board IR drop.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 62bd7207e6346f404589ed8305971c9815d2cf8b)

7 years agoMLK-11281-1: input: keyboard: gpio_keys: add pinctl set in suspend and resume
Robin Gong [Tue, 16 Jun 2015 10:49:35 +0000 (18:49 +0800)]
MLK-11281-1: input: keyboard: gpio_keys: add pinctl set in suspend and resume

Add pinctrl restore to support LPSR.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit f7d40aa30ca2fe337ba9bb8f7eaca4393db900be)

7 years agoMLK-11693-2: ARM: dts: imx7d-12x12-lpddr3-arm2: add gpio keys
Robin Gong [Mon, 12 Oct 2015 08:25:36 +0000 (16:25 +0800)]
MLK-11693-2: ARM: dts: imx7d-12x12-lpddr3-arm2: add gpio keys

add gpio keys.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11693-1: ARM: dts: imx6qdl-sabreauto: add gpio keys
Robin Gong [Mon, 12 Oct 2015 08:23:34 +0000 (16:23 +0800)]
MLK-11693-1: ARM: dts: imx6qdl-sabreauto: add gpio keys

add gpio keys, please attach main board to test this function, since those
gpio pins are located on main board.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11692 ARM: dts: imx6sl-evk: add lcdif dts support
Fancy Fang [Mon, 12 Oct 2015 08:05:22 +0000 (16:05 +0800)]
MLK-11692 ARM: dts: imx6sl-evk: add lcdif dts support

Add lcdif dts support on imx6sl evk board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11691 ARM: dts: imx6sl-evk: add pxp v4l2 output support
Fancy Fang [Mon, 12 Oct 2015 07:18:49 +0000 (15:18 +0800)]
MLK-11691 ARM: dts: imx6sl-evk: add pxp v4l2 output support

Add pxp v4l2 output support for imx6sl evk board.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11690: dts: Add hdcp dtb file for imx6q/dl sabreSD board
Sandor Yu [Mon, 12 Oct 2015 07:14:52 +0000 (15:14 +0800)]
MLK-11690: dts: Add hdcp dtb file for imx6q/dl sabreSD board

Add hdcp dtb file for imx6q/dl sabresd board.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-11684: mipi dsi: Porting mxc mipi dsi driver from 3.14.y
Sandor Yu [Sat, 10 Oct 2015 09:37:28 +0000 (17:37 +0800)]
MLK-11684: mipi dsi: Porting mxc mipi dsi driver from 3.14.y

Initial the mxc mipi dsi driver.
Baseline copied from imx_3.14.y branch.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-11606-02: dts: Enable mxc dcic drive
Sandor Yu [Sat, 10 Oct 2015 08:07:56 +0000 (16:07 +0800)]
MLK-11606-02: dts: Enable mxc dcic drive

Add dcic driver property to imx6q/dl sabresd/auto
and imx6sx sdb board.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-11606-01: dcic: Porting dcic driver from 3.14.y
Sandor Yu [Sat, 10 Oct 2015 07:45:29 +0000 (15:45 +0800)]
MLK-11606-01: dcic: Porting dcic driver from 3.14.y

Initial the mxc dcic driver.
Baseline copied from imx_3.14.y branch.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-10008 ARM: imx6qdl: Enable pcie on imx6qdl sabreauto
Richard Zhu [Tue, 23 Sep 2014 02:25:01 +0000 (10:25 +0800)]
MLK-10008 ARM: imx6qdl: Enable pcie on imx6qdl sabreauto

- enable pcie on imx6qdl sabreauto boards.

Signed-off-by: Richard Zhu <richard.zhu@freescale.com>
(cherry picked from commit 21c4323d54ec3a25bb73deb98d23ddd1bb3c6c03)

7 years agoMLK-11685-7 mmc: core: add delay for SD3.0 UHS mode switch
Dong Aisheng [Wed, 6 Aug 2014 05:04:09 +0000 (13:04 +0800)]
MLK-11685-7 mmc: core: add delay for SD3.0 UHS mode switch

We may meet the following errors with a SD3.0 DDR50 cards during reboot test.
mmc0: new ultra high speed DDR50 SDHC card at address aaaa
mmcblk0: mmc0:aaaa SU08G 7.40 GiB
mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
mmcblk0: retrying using single block read
mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
end_request: I/O error, dev mmcblk0, sector 0
.....
Buffer I/O error on device mmcblk0, logical block 0
 mmcblk0: unable to read partition table

The root cause is still unknown.
Since there's an errata of Sandisk eMMC card before that it requires delay for CMD6
for eMMC DDR mode to work stable, we also suspect the SD3.0 DDR requires similar delay.
(Still not confirmed by Sandisk)
By adding the delay, the overnight reboot test(run 2000+ times) did not
show the issue anymore. Originally it can easy show the error after about 20 times of
reboot test.

So this patch would be the temporary workaround for Sandisk SD3.0 DDR50 mode
unstable issue.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit ef3bce5feb2ed36c9f4483287454d35ae330dbe3)
(cherry picked from commit c0cbde8a248036fae1768f232385290c23eddbd7)
(cherry picked from commit 138bab9f78ea2285b6e7c7cd6c8cd956def44003)
(cherry picked from commit 12d7e80e7505027feed3eb1ee6d037b1e6df249b)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-11685-6 mmc: sdhci-esdhc-imx: do not enable wakeup by default
Dong Aisheng [Tue, 24 Jun 2014 09:25:03 +0000 (17:25 +0800)]
MLK-11685-6 mmc: sdhci-esdhc-imx: do not enable wakeup by default

After adding mega fast support, the default enabled usdhc wakeup will block
M/F to gate off power domain.
To avoid this issue, we only claim wakeup capability and reply on user to enable
it via sysfs according to real needs.
The drawback of such change is that for SDIO WiFi Wakeup On Wireless feature,
User has to enable both uSDHC and WiFi WoW wakeup mannually to make
WoW work well.

BTW, due to the wakeup feature is controller itself, so we do not need to reply
on WiFi PM flags to enable it.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 58f91ff6f6719fef44f5122ae1d8a5df7e0061d5)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
drivers/mmc/host/sdhci-esdhc-imx.c

7 years agoMLK-11685-5 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl
Dong Aisheng [Fri, 17 Jan 2014 02:23:22 +0000 (10:23 +0800)]
MLK-11685-5 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl

The usdhc of i.MX6Q/DL can work well under low power mode without
request high bus freq. So we do not need request bus freq for i.MX6Q/DL.
It can save power for i.MX6D/DL due to it saves a lot busfreq switch
cost as well as the CPU time runing on high bus freq after switch
during low power mode.

A new flag ESDHC_FLAG_BUSFREQ is added to indicated this requirement.
Currently only i.MX6SL is using it.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 3b954ce55b56dfce195d65b84913ff3c0fcb9f82)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
drivers/mmc/host/sdhci-esdhc-imx.c

7 years agoMLK-11685-4 mmc: sdhci: do not enable card cd wakeup for gpio case
Dong Aisheng [Mon, 13 Jan 2014 10:27:58 +0000 (18:27 +0800)]
MLK-11685-4 mmc: sdhci: do not enable card cd wakeup for gpio case

Do not need to enable the controller card cd interrupt wakeup
if using GPIO as card detect since it's meaningless.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit e66bb4978fe4b4fb96e81a1a083c16f84f5aa710)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-11685-3 mmc: sdhci: do not enable card detect interrupt for gpio cd type
Dong Aisheng [Tue, 31 Dec 2013 08:22:44 +0000 (16:22 +0800)]
MLK-11685-3 mmc: sdhci: do not enable card detect interrupt for gpio cd type

Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
we also do not need to handle controller native card detect interrupt
for gpio as card detect case.
If we wrong enabled the card detect interrupt for gpio case,
it will cause a lot of unexpected card detect interrupts during data transfer
which should not happen.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 2bf47f78bee173798e6d6f360b12defd945c936c)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
drivers/mmc/host/sdhci.c

7 years agoMLK-11685-2 sdhci-esdhc-imx: use bus freq in runtime pm
Dong Aisheng [Mon, 11 Nov 2013 06:53:58 +0000 (14:53 +0800)]
MLK-11685-2 sdhci-esdhc-imx: use bus freq in runtime pm

Request BUS_FREQ_HIGH when bus is busy and then release BUS_FREQ_HIGH
when bus becomes idle.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 64994f7115573c9ede53b51536b2c15f7cf0112a)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
drivers/mmc/host/sdhci-esdhc-imx.c

7 years agoMLK-11685-1 mmc: add delay after CMD6 befoer sending CMD13 for sandisk
Ryan QIAN [Wed, 16 Jan 2013 02:23:28 +0000 (10:23 +0800)]
MLK-11685-1 mmc: add delay after CMD6 befoer sending CMD13 for sandisk

- Some sandisk emmc cards need certain delay befor sending cmd13 after cmd6.
Original CR: ENGR174296 (commit: fd031f9)

Acked-by: Aisheng Dong <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
(cherry picked from commit f942bf1db36355d46f38792601594949f3f2c71b)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
drivers/mmc/core/mmc_ops.c

7 years agoMLK-11676 ARM: imx_v7_defconfig: disable CONFIG_SWP_EMULATE
Shengjiu Wang [Fri, 9 Oct 2015 08:56:41 +0000 (16:56 +0800)]
MLK-11676 ARM: imx_v7_defconfig: disable CONFIG_SWP_EMULATE

According to the help text in the config SWP_EMULATE in arch/arm/mm/Kconfig:

"In some older versions of glibc [<=2.8] SWP is used during futex trylock()
operations with the assumption that the code will not be preempted. This
invalid assumption may be more likely to fail with SWP emulation enabled,
leading to deadlock of the user application."

The audio codec toolchain version is gcc-4.1.1-glibc-2.4, we need turn off
the CONFIG_SWP_EMULATE in the imx_v7_defconfig.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-10629-6 dts: imx7d-sdb: do not enable wlreg_on always
Dong Aisheng [Thu, 9 Apr 2015 09:05:24 +0000 (17:05 +0800)]
MLK-10629-6 dts: imx7d-sdb: do not enable wlreg_on always

Broadcom WiFi requires reset by operating wlreg_on regulator
when doing insmod/rmmod.
Keep wlreg_on will cause card state wrong and unable to re-insmod.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit d65683e1d0717fa039ebd4c55562e6ee745354b7)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-10629-5 dts: imx7d-sdb: remove non-removable property of wifi host
Dong Aisheng [Thu, 9 Apr 2015 08:25:48 +0000 (16:25 +0800)]
MLK-10629-5 dts: imx7d-sdb: remove non-removable property of wifi host

The card detect of Broadcom WiFi on uSDHC2 port can not function
well with a non-removalbe card. Because MMC core only enumerate
one time for non-removable card which is not work for Broadcom WiFI.
So remove it.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit ed4c1c749c755839775ff4ad2078e659fec18650)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
arch/arm/boot/dts/imx7d-sdb.dts

7 years agoMLK-10629-3 dts: imx7d-sdb: add wifi-host property for usdhc2
Dong Aisheng [Thu, 9 Apr 2015 08:19:35 +0000 (16:19 +0800)]
MLK-10629-3 dts: imx7d-sdb: add wifi-host property for usdhc2

There's a Broadcom WiFi on usdhc2.
Add this property due to Broadcom WiFi driver needs call wifi_card_detect
function.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 72015985537b5bd14ac7b0c97860ab26309ad1a1)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-10629-2 mmc: sdhci-esdhc-imx: implement wifi_card_detect function
Dong Aisheng [Thu, 9 Apr 2015 08:16:09 +0000 (16:16 +0800)]
MLK-10629-2 mmc: sdhci-esdhc-imx: implement wifi_card_detect function

WiFi driver could call wifi_card_detect function to re-detect card,
this is required by some special WiFi cards like broadcom WiFi.
To use this function, a new property is introduced to indicate a wifi host.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 74e71dd0aebb9e931f02aefa3dd1990cbe642ae4)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt

7 years agoMLK-10629-1 dts: imx7d-sdb: add the integrated Broadcom WiFi chip support
Dong Aisheng [Wed, 11 Mar 2015 11:01:53 +0000 (19:01 +0800)]
MLK-10629-1 dts: imx7d-sdb: add the integrated Broadcom WiFi chip support

Add Broadcom WiFi chip BCM4339 on board support.
Need adds a bcmdhd_wlan@0 node for WiFi driver to probe properly.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 24b44a415df9a27036b843284a179448dcc5fe20)
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Conflicts:
arch/arm/boot/dts/imx7d-sdb.dts

7 years agoMLK-11316-4 video: mxc ipuv3 fb: Change on-the-fly switch mechanism for PRE workaround
Liu Ying [Fri, 11 Sep 2015 09:36:39 +0000 (17:36 +0800)]
MLK-11316-4 video: mxc ipuv3 fb: Change on-the-fly switch mechanism for PRE workaround

In order to workaround the PRE SoC bug recorded by errata ERR009624, the
software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL
register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode.

Instead of setting the PRE_CTRL register any time we want to do on-the-fly
switch(PRE keeps working before and after the switch), we change to set the
register in the on-the-fly configuration interrupt(EOF) handler.  This way,
we may avoid encountering the problematic PRE automatic writing cycle for sure.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 6218cbcf34f5fb7910a824a8d31cc58819d0bd00)

7 years agoMLK-11316-3 video: mxc ipuv3 fb: Change pan display mechanism for PRE workaround
Liu Ying [Fri, 11 Sep 2015 08:03:06 +0000 (16:03 +0800)]
MLK-11316-3 video: mxc ipuv3 fb: Change pan display mechanism for PRE workaround

In order to workaround the PRE SoC bug recorded by errata ERR009624, the
software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL
register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode.

The software mechanism to set the PRE_CTRL register is different for PRE Y
resolution higher than 9 lines and lower than or equal to 9 lines.

For cases in which Y resolution is higher than 9 lines, before we update PRE
shadow, we just need to wait until the PRE store engine status runs out of
the problematic PRE automatic writing window.

While for cases in which Y resolutin is lower than or equal to 9 lines, we
have to update PRE shadow in the buffer flip interrupt handler.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit bd9c14e24aaf67926dfd31bd819ab0c87129fe4b)

7 years agoMLK-11316-2 mxc IPUv3: PRE: Define small Y resolution
Liu Ying [Fri, 11 Sep 2015 08:09:57 +0000 (16:09 +0800)]
MLK-11316-2 mxc IPUv3: PRE: Define small Y resolution

In order to workaround the PRE SoC bug recorded by errata ERR009624, the
software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL
register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode.

The software mechanism to set the PRE_CTRL register is different for PRE Y
resolution higher than 9 lines and lower than or equal to 9 lines.  So,
this patch defines the small Y resolution and adds a helper to check the
Y resolution.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit cf7df46e3b1d2142ff354498982194247bf07fea)