linux.git
7 years agoMLK-10629-4 mmc: sdhci: remove MMC_CAP_NEEDS_POLL
Dong Aisheng [Thu, 9 Apr 2015 08:23:24 +0000 (16:23 +0800)]
MLK-10629-4 mmc: sdhci: remove MMC_CAP_NEEDS_POLL

This will cause meaningless CPU overhead by polling the card at backgroud
if the CD is broken.
Most board does not intend to use this function, so remove it.
Platform driver could add it for test if needed.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Conflicts:
drivers/mmc/host/sdhci.c

7 years agoMGS-577 ARM: Export the cache management symbols when !MULTI_CACHE
Shawn Xiao [Fri, 17 Apr 2015 02:48:09 +0000 (10:48 +0800)]
MGS-577 ARM: Export the cache management symbols when !MULTI_CACHE

When compiling a GPU module without CONFIG_MULTI_CACHE enabled, the
compiler prompt warning which says symbol v7_dma_map_area and
v7_dma_flush_area not exported. And when insmod GPU module, it also
warns the above two symbols not found, which cause insmod module failed.

This patch export these dma access functions and fix these issues.

Signed-off-by: Shawn Xiao <b49994@freescale.com>
7 years agoMLK-11763-2 imx_v7_defconfig: add Broadcom bcmdhd driver support
Dong Aisheng [Thu, 12 Mar 2015 09:26:19 +0000 (17:26 +0800)]
MLK-11763-2 imx_v7_defconfig: add Broadcom bcmdhd driver support

Add Broadcom bcmdhd driver support.
BTW, the in kernel upstream brcmfmac driver is removed to avoid confusion.
And Atheros driver is also removed which is not supported anymore.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-11763-1 bcmdhd: make the driver work for 4.1 kernel
Dong Aisheng [Mon, 26 Oct 2015 10:42:43 +0000 (18:42 +0800)]
MLK-11763-1 bcmdhd: make the driver work for 4.1 kernel

Fixing a lot of compiling issues due to kernel upgrade and then
make it work on 4.1 kernel.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-11403: I2C: imx: restore pin setting for i2c
Gao Pan [Tue, 25 Aug 2015 06:00:32 +0000 (14:00 +0800)]
MLK-11403: I2C: imx: restore pin setting for i2c

restore pin setting for i2c in suspend/resume

Signed-off-by: Gao Pan <gaopan@freescale.com>
7 years agoMLK-11550-1: regulator: pfuze100: restore some registers after LPSR for pfuze3000
Robin Gong [Tue, 15 Sep 2015 04:46:39 +0000 (12:46 +0800)]
MLK-11550-1: regulator: pfuze100: restore some registers after LPSR for pfuze3000

Some registers on pfuze3000 will lost after exit from LPSR, need restore them,
otherwise system may reboot with below command after system enter LPSR one time:

root@imx7d_all:~# echo enabled > /sys/class/tty/ttymxc0/power/wakeup
root@imx7d_all:~# echo mem > /sys/power/state

because LDOGCTL not recover as 1. Add 'fsl,lpsr-mode' property to this case,
please add this property if your board support LPSR mode as imx7d-12x12-lpddr3-arm2
board.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11391 ARM: imx: make sure SNVS clk is enabled during suspend
Anson Huang [Wed, 19 Aug 2015 17:11:42 +0000 (01:11 +0800)]
MLK-11391 ARM: imx: make sure SNVS clk is enabled during suspend

As SNVS clk may be disabled in kernel to save power(~1mA),
but during suspend/resume, we have to access SNVS register
to do MMDC retention and power down SoC etc.., need to
make sure SNVS clk is enabled before accessing its register.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11415: ARM: dts: fix the pinctrl conflict on i.MX7D 12x12 lpddr3 ARM2 board
Han Xu [Tue, 25 Aug 2015 19:08:03 +0000 (14:08 -0500)]
MLK-11415: ARM: dts: fix the pinctrl conflict on i.MX7D 12x12 lpddr3 ARM2 board

fix the pin conflict between ECSPI with MIPI and EPDC on i.MX7D 12x12 lpddr3 ARM2 board.

Signed-off-by: Han Xu <b45815@freescale.com>
7 years agoMLK-11074: ARM:dts: fix mipi pin conflict with ecspi1
Han Xu [Tue, 9 Jun 2015 15:27:00 +0000 (10:27 -0500)]
MLK-11074: ARM:dts: fix mipi pin conflict with ecspi1

mipi pins conflict with ecspi1 on i.MX7D 12x12 lpddr3 ARM2 board, manage
the mipi pins in a individual group to solve the issue.

Signed-off-by: Han Xu <b45815@freescale.com>
7 years agoMLK-11402 ARM: dts : add i2c IOMUX sleep state
Gao Pan [Thu, 11 Jun 2015 08:45:47 +0000 (16:45 +0800)]
MLK-11402 ARM: dts : add i2c IOMUX sleep state

Add i2c IOMUX sleep state for imx7d-12x12-lpddr3-arm2.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11571 [MX7D-12LPDDR3] LCD: Screen still shows with weak backlight after system...
Fancy Fang [Fri, 9 Oct 2015 08:35:26 +0000 (16:35 +0800)]
MLK-11571 [MX7D-12LPDDR3] LCD: Screen still shows with weak backlight after system entered suspend mode. 100%

The 'backlight' and 'pwm1' are disabled due to the lpsr mode
not ready in the previous patch in the imx7d-12x12-lpddr3-arm2
dts. So they should be enabled again after lpsr ready.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11658 ARM: dts: imx7d-12x12-lpddr3-arm2: enable v4l2 output
Robby Cai [Tue, 29 Sep 2015 10:25:30 +0000 (18:25 +0800)]
MLK-11658 ARM: dts: imx7d-12x12-lpddr3-arm2: enable v4l2 output

enable v4l2 output feature on i.MX7D 12x12 LPDDR3 ARM2 board.

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11550-2: ARM: dts: imx7d-12x12-lpddr3-arm2: add 'fsl,lpsr-mode' for pfuze3000
Robin Gong [Tue, 15 Sep 2015 04:53:57 +0000 (12:53 +0800)]
MLK-11550-2: ARM: dts: imx7d-12x12-lpddr3-arm2: add 'fsl,lpsr-mode' for pfuze3000

Add 'fsl,lpsr-mode' property to support LPSR mode on arm2 board.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11438-5 ARM: dts: enable lcdif and pxp
Robby Cai [Fri, 28 Aug 2015 07:28:31 +0000 (15:28 +0800)]
MLK-11438-5 ARM: dts: enable lcdif and pxp

Enabled lcdif and pxp as lpsr mode is supported.

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11438-3 ARM: dts: imx7d: add lpsr mode for lcdif
Robby Cai [Thu, 27 Aug 2015 12:42:22 +0000 (20:42 +0800)]
MLK-11438-3 ARM: dts: imx7d: add lpsr mode for lcdif

Add lpsr mode for lcdif

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11473 ARM: dts: add sim1 IOMUX sleep state for imx7d-12x12-lpddr3-arm2
Gao Pan [Tue, 1 Sep 2015 03:45:20 +0000 (11:45 +0800)]
MLK-11473 ARM: dts: add sim1 IOMUX sleep state for imx7d-12x12-lpddr3-arm2

SIM1 IOMUX is changed into reset state in LPSR mode. This patch
adds sim1 IOMUX sleep state in dts for IOMUX restoring.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11454 ARM: dts: imx7d-12x12-lpddr3-arm2: enable USB function
Peter Chen [Fri, 28 Aug 2015 07:39:48 +0000 (15:39 +0800)]
MLK-11454 ARM: dts: imx7d-12x12-lpddr3-arm2: enable USB function

It doesn't need to do any changes when using lpsr mode for USB.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agoMLK-11409-1: ARM: dts: imx7d-12x12-lpddr3-arm2.dts
Robin Gong [Tue, 25 Aug 2015 06:25:22 +0000 (14:25 +0800)]
MLK-11409-1: ARM: dts: imx7d-12x12-lpddr3-arm2.dts

Restore pinhogs after exit from lpsr mode.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11511 ARM: imx: force ARM into wfi during LPSR enter
Anson Huang [Mon, 7 Sep 2015 14:23:01 +0000 (22:23 +0800)]
MLK-11511 ARM: imx: force ARM into wfi during LPSR enter

During stress test of LPSR using RTC alarm, sometimes
RTC alarm fail to fire, the control register(offset 0x38)
is changed and RTC alarm is disabled, according to
design team, when enter LPSR with programming SNVS
to shutdown PMIC, SNVS need some time to finish power
down process, better to put ARM into wfi during this
window.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-15 ARM: imx: add gpcv2 save/restore for lpsr
Anson Huang [Mon, 27 Jul 2015 11:17:06 +0000 (19:17 +0800)]
MLK-11281-15 ARM: imx: add gpcv2 save/restore for lpsr

Redo necessary gpcv2 initialization after resume from
LPSR mode, as its state is lost in lpsr mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-14: ARM: imx: restore RC_OSC after LPSR
Robin Gong [Thu, 11 Jun 2015 07:49:38 +0000 (15:49 +0800)]
MLK-11281-14: ARM: imx: restore RC_OSC after LPSR

Restore RC_OSC after LPSR resume back, otherwise,
low power idle will never works normally.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-13 ARM: imx: add gpio save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:23:23 +0000 (23:23 +0800)]
MLK-11281-13 ARM: imx: add gpio save/restore for lpsr

Add GPIO state retention support for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-12 ARM: imx: add system counter save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:21:39 +0000 (23:21 +0800)]
MLK-11281-12 ARM: imx: add system counter save/restore for lpsr

Add system counter state retention for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-11 ARM: imx: add gpt1 save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:20:15 +0000 (23:20 +0800)]
MLK-11281-11 ARM: imx: add gpt1 save/restore for lpsr

Add GPT1 state retention support for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-10 ARM: imx: add ccm save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:18:19 +0000 (23:18 +0800)]
MLK-11281-10 ARM: imx: add ccm save/restore for lpsr

When exit from LPSR mode, CCM settings will be lost, so
we need to do CCM state retention support to make sure
after resume from LPSR mode, clk tree settings are same
as before entering LPSR;

Due to hardware design requirement, CCM clk root registers
access needs their parents enabled, so we use special
sequence to restore PLLs, PFDs, ROOTs, and LPCGs.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-9 ARM: imx: add debug uart io save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:15:29 +0000 (23:15 +0800)]
MLK-11281-9 ARM: imx: add debug uart io save/restore for lpsr

When exit from lpsr mode, iomuxc's io/pad settings will
be lost, although driver resume callback will restore
module io settings from sleep mode to default mode, debug
uart needs to be enabled earlier to support
"no_console_suspend" case.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-8 ARM: imx: add iomuxc gpr save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:12:54 +0000 (23:12 +0800)]
MLK-11281-8 ARM: imx: add iomuxc gpr save/restore for lpsr

Add IOMUXC GPR state retention support for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-7 ARM: imx: add low power ocram save/restore
Anson Huang [Fri, 31 Jul 2015 15:08:06 +0000 (23:08 +0800)]
MLK-11281-7 ARM: imx: add low power ocram save/restore

In LPSR mode, low power ocram can NOT contain its memory any
more, need to support state retention to make sure its memory
is correct after resume from LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
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>