linux.git
7 years agoMLK-13794: BACKPORT: dmaengine: imx-sdma - correct the dma transfer residue calculation
Nandor Han [Tue, 11 Oct 2016 11:13:41 +0000 (14:13 +0300)]
MLK-13794: BACKPORT: dmaengine: imx-sdma - correct the dma transfer residue calculation

This patch fixes crackling sound reported when running autorun-asrc.sh
and it is a backport of 85f57752b3 ("dmaengine: imx-sdma - correct
the dma transfer residue calculation") from v10-rc6.

Original commit message:

From: Nandor Han <nandor.han@ge.com>
Date: Tue, 11 Oct 2016 14:13:41 +0300
Subject: [PATCH] dmaengine: imx-sdma - correct the dma transfer residue
 calculation

The residue calculation was taking in consideration that dma
transaction status will be always retrieved in the dma callback
used to inform that dma transfer is complete. However this is not
the case for all subsystems that use dma. Some subsystems use a
timer to check the dma status periodically.

Therefore the calculation was updated and residue is calculated
accordingly by a) update the residue calculation taking in
consideration the last used buffer index by using *buf_ptail* variable
and b) chn_real_count (number of bytes transferred) is initialized to
zero, when dma channel is created, to avoid using an uninitialized
value in residue calculation when dma status is checked without
waiting dma complete event.

Signed-off-by: Nandor Han <nandor.han@ge.com>
Acked-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-13843: Ensure PLL1 is bypassed before ARM-PODF is set
Leonard Crestez [Mon, 30 Jan 2017 14:52:53 +0000 (16:52 +0200)]
MLK-13843: Ensure PLL1 is bypassed before ARM-PODF is set

This is a missing piece of 99a978fbde34227a2ab2a3595446b757b5d7c3ab from
linux-imx/imx_4.1.y.

This fixes a hang on imx6sl when attempting to decrease cpufreq
during late boot. This was found through tracing and comparing code with
the imx_4.1.y branch

7 years agoMLK-13833 imx6sll.dtsi: Correct snvs-pwrkey 'wakeup' to 'wakeup-source'
Leonard Crestez [Thu, 26 Jan 2017 15:00:33 +0000 (17:00 +0200)]
MLK-13833 imx6sll.dtsi: Correct snvs-pwrkey 'wakeup' to 'wakeup-source'

Should probably squash into commit 4349481 ("MLK-13303-2 ARM: dts:
imx6sll: add dtsi file")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK-13833 imx6ull.dtsi: Correct snvs_pwrkey 'wakeup' to 'wakeup-source'
Leonard Crestez [Thu, 26 Jan 2017 15:00:32 +0000 (17:00 +0200)]
MLK-13833 imx6ull.dtsi: Correct snvs_pwrkey 'wakeup' to 'wakeup-source'

Should probably squash into commit d1f2e882c28 ("MLK-12627-03 ARM:
dts: imx: Add dtsi file for imx6ull").

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK-13798 tty: serial: imx: Only poke at suspend wakeup bits in noirq phase
Leonard Crestez [Thu, 26 Jan 2017 11:39:02 +0000 (13:39 +0200)]
MLK-13798 tty: serial: imx: Only poke at suspend wakeup bits in noirq phase

This prevents unwanted interrupts coming in early suspend.

Loosely based on 81e8e7d91d81351d9fea4ad7c289b122706640fd from imx_4.1.y:

MLK-11382 tty: serial: imx: disable irq after suspend

Disable rx irq after suspend to avoid interrupt coming in early
resume.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK-13797 v4l2-ioctl: Do not warn on device-specific pixelformat
Leonard Crestez [Fri, 20 Jan 2017 15:36:45 +0000 (17:36 +0200)]
MLK-13797 v4l2-ioctl: Do not warn on device-specific pixelformat

Since commit ba3002045f8022f3a7e88511c4ebd9876a467ac8 the v4l2 core now
sets the v4l2_fmtdesc->description string based on numeric pixelformat
so that drivers no longer have to contain description strings.

This happens even if the driver already filled the description and
prints an ugly warning if the pixelformat is unknown. Reduce this to
pr_debug if the driver provided a description string.

Fixes https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsw-jira.freescale.net%2Fbrowse%2FMLK-13797&data=01%7C01%7Coctavian.purdila%40nxp.com%7C739251a045b045cfee0f08d4414a2972%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=cUsGBObv2wvVfE59KgLujwhlBeRdpR501GplYrYqVrk%3D&reserved=0

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK-13795 ARM: disable CPU_SW_DOMAIN_PAN
Octavian Purdila [Mon, 23 Jan 2017 15:02:41 +0000 (17:02 +0200)]
MLK-13795 ARM: disable CPU_SW_DOMAIN_PAN

The Vivante GPU driver directly accesses userspace memory (coupled
with access_ok checks before) instead of using get/put_user or
copy_to/from_user. This triggers page domain faults such as the one
bellow. While the correct fix would be to fix the driver, this would
cause divergence between our version and Vivante's so until they fix
the driver (if ever) we disable CPU_SW_DOMAIN_PA as a workaround which
introduced this extra checks.

Note: we could have make CPU_SW_DOMAIN_PAN depend on !MXC_GPU_VIV but
there are cases where the vivante driver is built out of tree and
hence we must forcefully disabled it so that out the tree built
drivers don't run into this issue.

Unhandled fault: page domain fault (0x81b) at 0x00a76368
pgd = a8d60000
[00a76368] *pgd=38eb7831, *pte=3b13175f, *ppte=3b131c7f
Internal error: : 81b 1 PREEMPT SMP ARM
Modules linked in: ov5642_camera mxc_v4l2_capture ipu_bg_overlay_sdc
ov5640_camera_mipi_int ipu_still ipu_prp_enc ipu_csi_enc
ov5640_camera_int ipu_fg_overlay_sdc v4l2_int_device mxc_dcic
CPU: 3 PID: 2153 Comm: tiger Tainted: G W 4.9.4-01661-g9190652 #16
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
task: a8ac3700 task.stack: a8db4000
PC is at _RemoveRecordFromProcesDB+0x154/0x17c
LR is at gckOS_ReleaseMutex+0x14/0x24
pc : [<8072ba98>] lr : [<80701190>] psr: 20030013
sp : a8db5ba8 ip : 00000000 fp : a83c5aa8
r10: a83c6000 r9 : 00000000 r8 : 00a7635c
r7 : 00000006 r6 : a889da00 r5 : a83c6000 r4 : 00a7636c
r3 : 00000002 r2 : 00000001 r1 : 00000000 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 38d6004a DAC: 00000051
vddpu: bypassed regulator has no supply!
vddpu: bypassed regulator has no supply!
Process tiger (pid: 2153, stack limit = 0xa8db4210)
Stack: (0xa8db5ba8 to 0xa8db6000)
5ba0: 00000869 00000018 00000006 0000000a a85e1580 00000000
5bc0: 00000008 a8db5c3c c104e024 a83c6000 a8db5ca0 8072cbec 00000187 00000000
5be0: 00000000 c104e004 00000001 ac801d48 00000002 00000001 3c801d40 00000000
5c00: 3c800280 00a78358 4d454d56 00000000 00000000 00000010 00000001 a91d9dc0
5c20: a83c6f40 0000001a 00000869 a8db5c3c 00000869 00000001 00000869 00a76374
5c40: 00000018 3c801d40 00000058 00000000 00000000 00000002 6da83d90 00000000
5c60: 000001fb 00000000 00000000 00000002 00000a00 00000a78 00a75698 00a75c44
5c80: 00a75698 ffffffff ffffffff 6da82000 6da82040 00000869 000000de 00000000
5ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5ce0: 00a76344 00a76408 0000000c 000000a4 a868e02c a8db5d78 00000000 a889da00
5d00: 00000001 00000005 a8db4000 a8bf9180 00000000 8072aba0 a8db5ca0 00000000
5d20: 00000000 80f02d00 00000869 00000000 00000000 00000000 00000005 a8db7200
5d40: a810e000 00000051 00007530 8070647c 00000000 a803cb80 7e943848 00000000
5d60: 00000190 00000000 7e943848 00000000 00000190 00000000 00000013 00000003
5d80: 00000000 009f64e0 00000000 76e6f6a8 7e943868 00000190 00000000 00000003
5da0: 00a75640 00000000 00a78358 00000000 00000002 76d7e858 00a76294 00000000
5dc0: 00000001 000000d9 7e9438e8 9ddc4ccf 04eee266 76fc3cf0 76d7ab38 6a0e53e7
5de0: 0350729f 76d7e968 76ec14de 76ec0ba8 76fc3cf0 76fb1dac 7e943958 76fc4884
5e00: 76fb05f0 76fc4000 aaaaaaab 76fb9728 00000000 0000000d 00000000 00000000
5e20: 7e943948 6a0e53e7 76fba460 00000000 7e943958 76ec14de 7e943960 7e9439cc
5e40: 7e9439b4 76f9e494 7e943960 76fc4ab4 00000007 00000000 00000005 00000000
5e60: 00000001 76fba2a8 76b6e828 00000000 76fba460 76fba2a8 ffffffff 00000000
5e80: 76fba460 76fba2a8 ffffffff 00016040 76d7e858 76fba7f8 00a76208 00000008
5ea0: 00000018 7e9439d8 00a7634c 76db1130 7e94398c 009f54c8 00a76344 00a763d4
5ec0: 00000002 76ec0000 00064554 76fb8870 00000000 76b8a000 00000001 76fc4000
5ee0: 00000000 76fa37ac 00000000 009f54c8 00000005 009f54c8 7e943a04 00000000
5f00: 00000000 76e95428 7e943800 a865d108 a8bf9180 8020ee90 00000100 80131cc8
5f20: 00000002 00000001 a8db5f20 80f86340 00000000 00000000 763ac340 0000001c
5f40: a8ccd540 00000000 a82bd290 00000002 a8ccd548 00000000 7e943a3c 801fe010
5f60: 00000000 00000000 a8bf9180 a8bf9181 7e943800 a8bf9180 00007530 00000005
5f80: a8db4000 00000000 00000000 8020f74c 00002710 00007530 76e953b0 00000036
5fa0: 80107a04 80107840 00002710 00007530 00000005 00007530 7e943800 009f5228
5fc0: 00002710 00007530 76e953b0 00000036 00a78358 00000000 76fc4000 00000000
5fe0: 76e8541c 7e9437ec 76e6e108 76b1b2bc 20030010 00000005 00000000 00000000
[<8072ba98>] (_RemoveRecordFromProcesDB) from [<8072cbec>] (gckVGCOMMAND_Commit+0x774/0x954)
[<8072cbec>] (gckVGCOMMAND_Commit) from [<8072aba0>] (gckVGKERNEL_Dispatch+0x33c/0x4d0)
[<8072aba0>] (gckVGKERNEL_Dispatch) from [<8070647c>] (drv_ioctl+0x11c/0x29c)
[<8070647c>] (drv_ioctl) from [<8020ee90>] (do_vfs_ioctl+0x98/0x920)
[<8020ee90>] (do_vfs_ioctl) from [<8020f74c>] (SyS_ioctl+0x34/0x5c)
[<8020f74c>] (SyS_ioctl) from [<80107840>] (ret_fast_syscall+0x0/0x3c)
Code: e2844010 e59d200c ebffad92 e3a01000 (e5041004)

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-13789 request "gpu2d" and "gpuvg" resets as shared
Octavian Purdila [Mon, 23 Jan 2017 13:18:03 +0000 (15:18 +0200)]
MLK-13789 request "gpu2d" and "gpuvg" resets as shared

These resets are shared at least on im6q, so request them as shared to
avoid devm_reset_control_get() failures since upstream has modified it
to assume exclusive usage.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-13803 dts fixes for ldb-di{0,1}-parent not included
Leonard Crestez [Fri, 20 Jan 2017 12:40:57 +0000 (14:40 +0200)]
MLK-13803 dts fixes for ldb-di{0,1}-parent not included

Signed-off-by: Leonard Crestez <dan-leonard.crestez@nxp.com>
7 years agoMLK-13787 Revert "ARM: dts: imx6qdl-sabresd: Pass the hannstar panel compatible string"
Octavian Purdila [Fri, 20 Jan 2017 11:40:50 +0000 (13:40 +0200)]
MLK-13787 Revert "ARM: dts: imx6qdl-sabresd: Pass the hannstar panel compatible string"

This reverts commit e0884948a48013bb2097f3e61c4f2122b22f6eb1.

The internal fbdev driver does not use the DRM infrastructure hence we
can't use the DRM simple panel driver, we have to stich with display
timings from device tree.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-13720-5: ARM: dts: imx7ulp-evk: support multi rpmsg instances
Robin Gong [Thu, 5 Jan 2017 06:20:55 +0000 (14:20 +0800)]
MLK-13720-5: ARM: dts: imx7ulp-evk: support multi rpmsg instances

Add 'vdev-nums' to imply how many rpmsg instances used in kernel. If
it beyond the 5, please enlarge the 'MAX_VDEV_NUMS' in imx_rpmsg.c

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 0cbc0fdc4cce2c292aded56619d1001f7c936a6f)

7 years agoMLK-13720-6 ARM: imx: mu: remove clk_prepare_enable in resume
Robin Gong [Fri, 6 Jan 2017 02:01:19 +0000 (10:01 +0800)]
MLK-13720-6 ARM: imx: mu: remove clk_prepare_enable in resume

We didn't need to touch MU clock on i.mx7ULP, since it has already
been enabled by M4 side, remove the useless code in resume flow

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 117f17a00b2508c783c13dea090a2896689b5601)

7 years agoMLK-13720-4: regulator: pf1550-regulator-rpmsg: fix "rpmsg_send timeout"
Robin Gong [Thu, 5 Jan 2017 06:15:17 +0000 (14:15 +0800)]
MLK-13720-4: regulator: pf1550-regulator-rpmsg: fix "rpmsg_send timeout"

Sometimes rpmsg callback triggered quickly before reinit_completion, then
cause "rpmsg_send timeout!". Move reinit_completion to the place before
rpmsg_send to make sure the completion is ready before callback triggered.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 8e44277d3f27e5f46232bd705ee9ef594db42575)

7 years agoMLK-13720-3: regulator: pf1550-regulator-rpmsg: use the specific pf1550 rpmsg channel...
Robin Gong [Thu, 5 Jan 2017 06:09:19 +0000 (14:09 +0800)]
MLK-13720-3: regulator: pf1550-regulator-rpmsg: use the specific pf1550 rpmsg channel name

Since multi rpmsg instances supported now, we can use the specific rpmsg
channel name "rpmsg-regulator-channel" instead of "rpmsg-openamp-demo-channel"

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 8a9d73fe43da2833951b428f389aac01aef7cb2a)

7 years agoMLK-13720-2: ARM: imx: mu: fix mu message overwrite issue
Robin Gong [Thu, 5 Jan 2017 05:57:03 +0000 (13:57 +0800)]
MLK-13720-2: ARM: imx: mu: fix mu message overwrite issue

In multi rpmsg instances usecase, mu message maybe overwrite by the
next another rpmsg instance's mu message before this mu message handled.
Add circle buf to save all incoming mu messages to make sure no mu message
overwritten by the next mu interrupt.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 0124df33dc4f7ccfd9692ba66df0f691f03dbac2)

7 years agoMLK-13720-1: ARM: imx: imx_rpmsg: extend rpmsg to support multi instances
Robin Gong [Thu, 5 Jan 2017 05:44:16 +0000 (13:44 +0800)]
MLK-13720-1: ARM: imx: imx_rpmsg: extend rpmsg to support multi instances

Extend rpmsg driver to support multi virtio_devices, because there are more
rpmsg channels on i.mx7ulp, such as pingpong and pf1550.. Every channel
callback only handle the right mu message and ignore if it's not so that
the right channel callback handle it.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 85719b35f4ca66dc6fed18ccfca2545b191a4af1)

7 years agoMLK-13707 ARM: dts: move cd/vsel/rst/wp pin out of pinctrl_hog_1
Haibo Chen [Fri, 6 Jan 2017 09:34:06 +0000 (17:34 +0800)]
MLK-13707 ARM: dts: move cd/vsel/rst/wp pin out of pinctrl_hog_1

For 7ULP, when system suspend, it will in VLLS mode, all pad config
will lost when system resume. For vsel pin, if lost, I/O voltage can't
change from 3.3v to 1.8v, for cd/wp pin, card detect and write protect
function will also not work. So for usdhc cd/wp/rst/vsel pad, need
to set again after system resume, so move this pin out of pinctrl_hog_1.

Besides, cd/wp pin need to be config as GPIO input mode, and rst pin
need to be config to GPIO output mode. This patch also clear the OBE
for cd/wp pin, and clear the IBE for rst pin, otherwise system can't
detect SD3.0 card due to the wrong pad setting.

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

7 years agoMLK-13702 rtc: snvs: make sure set time is working for i.mx7ulp
Anson Huang [Mon, 9 Jan 2017 10:14:29 +0000 (18:14 +0800)]
MLK-13702 rtc: snvs: make sure set time is working for i.mx7ulp

On i.MX7ULP, only waiting for enable bit of SNVS RTC clear is
NOT enough for RTC time program, need to add at least 12us delay,
here adds 38us margins to make sure RTC time can be changed, and
this is NOT harmful for other i.MX.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMGS-2513 [#imx-320] [imx7ulp] RTC suspend/resume stress test met resume failed.
Yuchou Gan [Fri, 6 Jan 2017 18:08:39 +0000 (02:08 +0800)]
MGS-2513 [#imx-320] [imx7ulp] RTC suspend/resume stress test met resume failed.

When on condition that suspend/resume repeatly called and no other gpu command, the command buffer will filled with command comes from gckCOMMAND_Start and not gckCOMMAND_Stall to the hardware, thus lead to command buffer full and waiting for a hardware signal. Because these commands not submit to the hardware to execute, hardware won't  emit such signal, make the gpu hang.

Date: Jan 6, 2017
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
(cherry picked from commit a6553be76f8368442bd976f39a6bc28352c57f99)

7 years agoMGS-2133-3 [#imx-199] refine flat mapping setting for i.MX8
Xianzhong [Fri, 30 Dec 2016 09:55:22 +0000 (17:55 +0800)]
MGS-2133-3 [#imx-199] refine flat mapping setting for i.MX8

allow to set the flat mapping in uboot configuration first.

Date: Dec 30, 2016
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 32c43d676dba1a3b6cdb22b2532547e8888f83b9)

7 years agoMGS-2133-2 [#imx-199] refine gpu power management for i.MX8
Xianzhong [Thu, 29 Dec 2016 08:00:47 +0000 (16:00 +0800)]
MGS-2133-2 [#imx-199] refine gpu power management for i.MX8

Remove IMX8_DISABLE_PM since 8QM/8QXP share the same config.

Date: Dec 29, 2016
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit d4bd1805a8e26a76adc0297817d7123e820a5ece)

7 years agoMGS-2133-1 [#imx-199] remove clk_set_rate for i.MX8 gpu
Xianzhong [Fri, 30 Dec 2016 06:48:49 +0000 (14:48 +0800)]
MGS-2133-1 [#imx-199] remove clk_set_rate for i.MX8 gpu

use dtb clock to set different rate for 8QM/8QXP accordingly,
need remove clk_set_rate in gpu kernel to avoid overwriting.

Date: Dec 30, 2016
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit db19ad8fb86e9eb4311d429fb1448911ecc8cbe9)

7 years agoMLK-13639 mfgtool: Enable PF1550 regulators support in mfg config
ye li [Thu, 22 Dec 2016 10:46:18 +0000 (18:46 +0800)]
MLK-13639 mfgtool: Enable PF1550 regulators support in mfg config

Need to enable PF1550 regulators, otherwise the SD devices/eMMC can't
work.

Signed-off-by: ye li <ye.li@nxp.com>
7 years agoMLK-13636-2 regulator: pf1550-regulator-rmpsg: enable pm_qos to prevent low power...
Robin Gong [Wed, 21 Dec 2016 11:30:06 +0000 (19:30 +0800)]
MLK-13636-2 regulator: pf1550-regulator-rmpsg: enable pm_qos to prevent low power idle

CLKE bit of MU_CR may bring VLS state mess in M4 side, so use pm_qos instead
to prevent i.mx7ulp A7 core enter STOP mode during pf1550 send command by rpmsg

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-13636-1 ARM: imx: mu: resume back MU when enter VLS mode
Robin Gong [Wed, 21 Dec 2016 09:55:03 +0000 (17:55 +0800)]
MLK-13636-1 ARM: imx: mu: resume back MU when enter VLS mode

On i.mx7ulp the whole chip may enter VLS mode which MU power off and
clock gate, so we need resume back for this case.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 1df68be084a7e5229b1676d5ce606fc8a11d8cc3)

7 years agoMGS-2485 [#imx-309] fix gpu baseAddress for 7ulp
Xianzhong [Wed, 21 Dec 2016 06:04:34 +0000 (14:04 +0800)]
MGS-2485 [#imx-309] fix gpu baseAddress for 7ulp

7ulp gc7000NU support new MMU and need set baseAddress as 0 always.
however gckHARDWARE_GetBaseAddress function has wrong programming
and return the invalid baseAddress.
the corrective code use gcvFEATURE_MMU to replace gcvFEATURE_MC20.

Date: Dec 21, 2016
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 41625eed49349053f0faae7fd7ad521df8311bed)

7 years agoMGS-2487 gpu: Set gpu physical base address and size into dts for 7ulp
Meng Mingming [Wed, 21 Dec 2016 09:01:21 +0000 (17:01 +0800)]
MGS-2487 gpu: Set gpu physical base address and size into dts for 7ulp

Set gpu physical base address and size into dts for 7ulp.

Date: Dec 21, 2016
Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
(cherry picked from commit b5ae6ee5c84b8eb197af34d78f572be667ed0574)

7 years agoMGS-2486 [#imx-311] set physBase and physSize with device node
Xianzhong [Wed, 21 Dec 2016 08:10:58 +0000 (16:10 +0800)]
MGS-2486 [#imx-311] set physBase and physSize with device node

phys_baseaddr in device node can be used to set physBase and physSize,
still keep the old configuration when phys_baseaddr is not valid.

Date: Dec 21, 2016
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 7b3cfa451f64409264c84c61561901279c503244)

7 years agoMLK-13607-8 video: mipi-panel: hx8363: change DE polarity to active high
Fancy Fang [Wed, 14 Dec 2016 08:21:51 +0000 (16:21 +0800)]
MLK-13607-8 video: mipi-panel: hx8363: change DE polarity to active high

The NorthWest Logic MIPI DSI only support active low data enable
signal on imx7ulp-evk board.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 33781fd4cf41e2b0f7dfc60b5527755a57aa6aa3)

7 years agoMLK-13607-7 video: mipi_dsi_northwest: add build support for this mipi dsi controller
Fancy Fang [Tue, 29 Nov 2016 07:57:08 +0000 (15:57 +0800)]
MLK-13607-7 video: mipi_dsi_northwest: add build support for this mipi dsi controller

Add kernel build support the NorthWest Logic MIPI DSI module
on the imx7ulp-evk board.

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

7 years agoMLK-13607-6 video: mipi_dsi_northwest: add dsi controller driver code
Fancy Fang [Tue, 6 Dec 2016 01:19:09 +0000 (09:19 +0800)]
MLK-13607-6 video: mipi_dsi_northwest: add dsi controller driver code

The MIPI DSI controller on imx7ulp board comes from NorthWest Logic
which is a completely new DSI module. And this is the driver code
for the new IP.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 99ea590f9898b876215baf70c2f0a7112fc15ad3)

7 years agoMLK-13607-5 ARM: dts: imx7ulp-evk: add mipi dsi support
Fancy Fang [Mon, 5 Dec 2016 10:03:32 +0000 (18:03 +0800)]
MLK-13607-5 ARM: dts: imx7ulp-evk: add mipi dsi support

Add dts support for mipi dsi module on imx7ulp-evk board.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 51584bcf07c6e97631bd22ed7eeb8bd14cbfc61a)

7 years agoMLK-13607-4 video: mxsfb: change enable/disable controller logic.
Fancy Fang [Thu, 8 Dec 2016 05:40:48 +0000 (13:40 +0800)]
MLK-13607-4 video: mxsfb: change enable/disable controller logic.

Change the enable/disable controller logic to support mipi dsi
display on imx7ulp-evk board.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 657d3a052581d517bb6c9cd978b04c4a3194c350)

7 years agoMLK-13607-3 video: mxsfb: add pm_qos to interact with cpuidle
Fancy Fang [Thu, 8 Dec 2016 08:15:45 +0000 (16:15 +0800)]
MLK-13607-3 video: mxsfb: add pm_qos to interact with cpuidle

In imx7ulp board, it doesn't support busfreq but pm_qos to
interact with cpuidle.

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

7 years agoMLK-13607-2 video: mxsfb: add new compatible entry for lcdif on imx7ulp
Fancy Fang [Mon, 5 Dec 2016 09:46:17 +0000 (17:46 +0800)]
MLK-13607-2 video: mxsfb: add new compatible entry for lcdif on imx7ulp

Add the compatible entry specific for imx7ulp platform in lcdif
driver.

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

7 years agoMLK-13607-1 ARM: dts: imx7ulp-evk: add gpio backlight support.
Fancy Fang [Mon, 5 Dec 2016 09:38:23 +0000 (17:38 +0800)]
MLK-13607-1 ARM: dts: imx7ulp-evk: add gpio backlight support.

The mipi dsi panel on imx7ulp-evk board will use gpio to control
lcd backlight.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 763dbfe8a24dd11827f5024327b400f73917d118)

7 years agoof: of_reserved_mem: Ensure cma reserved region not cross the low/high memory
Jason Liu [Wed, 23 Nov 2016 07:42:54 +0000 (15:42 +0800)]
of: of_reserved_mem: Ensure cma reserved region not cross the low/high memory

Need ensure the cma reserved region not cross the low/high memory boundary
when using the dynamic allocation methond through device-tree, otherwise,
kernel will fail to boot up when cma reserved region cross how/high mem.

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: stable@vger.kernel.org
7 years agoMGS-2483 Increase the gpu 2d and 3d frequency to 475M Hz on 7ULP
Yuchou Gan [Tue, 20 Dec 2016 18:09:19 +0000 (02:09 +0800)]
MGS-2483 Increase the gpu 2d and 3d frequency to 475M Hz on 7ULP

Increase the gpu 2d and 3d frequency to 475M Hz on 7ULP

Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
Date: Dec 20, 2016

7 years agoMLK-13621: ASoC: codec: wm8960: fix reset failed in probe
Shengjiu Wang [Tue, 20 Dec 2016 09:25:24 +0000 (17:25 +0800)]
MLK-13621: ASoC: codec: wm8960: fix reset failed in probe

There is occasion that wm8960 reset failed in the beginning,
Especially after board reboot. The issue is found in the
imx7d-sdb board Rev.C. After retry, the reset operation is
successful.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-13632 driver: watchdog: Fix system reset when sending wdog unlock sequence
Bai Ping [Mon, 19 Dec 2016 10:11:07 +0000 (18:11 +0800)]
MLK-13632 driver: watchdog: Fix system reset when sending wdog unlock sequence

For i.MX7ULP wdog, when we want to unlock the wdog with 16bit unlock command,
the two unlock command sequence must be write to WDOG_CNT register within 16 bus
clocks, otherwise, system may be reset unexpected. As writel include memory barrier,
if we use writel to send the unlock command, it may take more time than 16 bus clock,
so we should use writel_relaxed to write the unlock command to the CNT register.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-13601-02 ARM: imx: Add fuse check support for imx6ull
Bai Ping [Tue, 13 Dec 2016 08:57:58 +0000 (16:57 +0800)]
MLK-13601-02 ARM: imx: Add fuse check support for imx6ull

On i.MX6ULL, some part can run at 1GHz or 800MHz setpoint.
we need to use the speed grading fuse to disable the unsupported
setpoint. speed grading fuse define as below:
    2'b00: Reserved;
    2'b01: 528MHz;
    2'b10: 792MHz;
    2b'11: 996Mhz;

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-13601-01 ARM: dts: imx: update the setpoint for imx6ull
Bai Ping [Tue, 13 Dec 2016 08:51:59 +0000 (16:51 +0800)]
MLK-13601-01 ARM: dts: imx: update the setpoint for imx6ull

According to the latest datasheet(Rev.0,09/2016), two new setpoints
are added on i.MX6ULL, 996MHz/1.25V and 792MHz/1.2V. these two setpoints
can only be enabled when LDO is enabled. In order to cover IR drop and
board tolerance, we add a 25mV margin to the voltage.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-13616 ARM: imx: Add low power run voltage change support on i.MX6SLL
Bai Ping [Mon, 21 Nov 2016 06:56:12 +0000 (14:56 +0800)]
MLK-13616 ARM: imx: Add low power run voltage change support on i.MX6SLL

On i.MX6SLL, if all PLLs is bypassed in low power run mode, we can decrease
the VDD_ARM_IN and VDD_SOC_IN voltage to 0.925V to save power. a 25mV margin
is added to cover IR drop and board tolerance.

Add low power run voltage change support for i.MX6SLL.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-13614 input: keyboard: imx: make sure keypad interrupts are enabled in suspend
Anson Huang [Thu, 15 Dec 2016 13:54:30 +0000 (21:54 +0800)]
MLK-13614 input: keyboard: imx: make sure keypad interrupts are enabled in suspend

Change the suspend/resume callback to suspend_noirq/resume_noirq
callback to make sure keypad interrupts are enabled during suspend,
as when there is keypad interrupt coming after suspend callback
is called, the interrupt handler will still be called and it will
disable keypad interrupts, it will cause keypad can NOT generate
interrupts to wake up system from suspend.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13625: ARM: dts: support spdif with imx51 evk expansion card
Shengjiu Wang [Fri, 16 Dec 2016 07:15:06 +0000 (15:15 +0800)]
MLK-13625: ARM: dts: support spdif with imx51 evk expansion card

The HDMI daughter card with sii902x will not be supported in
imx6sll-lpddr3-arm2 board, so use imx51 evk expansion card as spdif
interface

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-13609: ASoC: fsl_sai: fix for synchronize mode
Shengjiu Wang [Mon, 12 Dec 2016 03:52:24 +0000 (11:52 +0800)]
MLK-13609: ASoC: fsl_sai: fix for synchronize mode

TX synchronous with receiver: the RMR should not be changed and
the RCSR.RE should be set in playback.
RX synchronous with transmitter: the TMR should not be changed and
the TCSR.TE should be set in recording.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-13608: mfd: mxc-hdmi-core: fix the dependency of alsa sound
Shengjiu Wang [Wed, 14 Dec 2016 05:02:24 +0000 (13:02 +0800)]
MLK-13608: mfd: mxc-hdmi-core: fix the dependency of alsa sound

When remove sound card build config, there will be error

drivers/built-in.o: In function `mxc_hdmi_register_audio':
vf610_adc.c:(.text+0xd64f8): undefined reference to `_snd_pcm_stream_lock_irqsave'
vf610_adc.c:(.text+0xd6518): undefined reference to `snd_pcm_stream_unlock_irqrestore'
drivers/built-in.o: In function `mxc_hdmi_abort_stream':
vf610_adc.c:(.text+0xd65a4): undefined reference to `_snd_pcm_stream_lock_irqsave'
vf610_adc.c:(.text+0xd65d0): undefined reference to `snd_pcm_stream_unlock_irqrestore'
make: *** [vmlinux] Error 1

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-13610-2 ARM: dts: imx7ulp-evk: add base board sd slot support
Haibo Chen [Thu, 15 Dec 2016 02:58:18 +0000 (10:58 +0800)]
MLK-13610-2 ARM: dts: imx7ulp-evk: add base board sd slot support

On imx7ulp-evk board, the SD slot on base board is conflict with BT/WiFi.
This patch seperate the usdhc1 from imx7ulp-evk.dts, and create new dts.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-13610-1 ARM: dts: add SD3.0 support for usdhc0 on imx7ulp-evk
Haibo Chen [Wed, 14 Dec 2016 11:35:34 +0000 (19:35 +0800)]
MLK-13610-1 ARM: dts: add SD3.0 support for usdhc0 on imx7ulp-evk

Add SD3.0 support for usdhc0 on imx7ulp-evk board. Currently the
usdhc0 root clock is 158.4MHz.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-13619 defconfig: enable lpspi in imx_v7_defconfig
Gao Pan [Thu, 15 Dec 2016 06:38:18 +0000 (14:38 +0800)]
MLK-13619 defconfig: enable lpspi in imx_v7_defconfig

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
7 years agoMLK-13618 arm: dts: enable lpspi3 in imx7ulp-evk.dts
Gao Pan [Thu, 15 Dec 2016 06:34:15 +0000 (14:34 +0800)]
MLK-13618 arm: dts: enable lpspi3 in imx7ulp-evk.dts

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
7 years agoMLK-13617 spi: imx7ulp: add i.MX7ULP lpspi bus driver
Gao Pan [Fri, 25 Mar 2016 08:49:27 +0000 (16:49 +0800)]
MLK-13617 spi: imx7ulp: add i.MX7ULP lpspi bus driver

Add i.MX7ULP lpspi bus driver which can continue operating
in stop modes provided an appropriate clock is available.

It is also designed for low CPU overhead with DMA offloading
of FIFO register accesses.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
7 years agoMLK-13615-1 regulator: pf1550-regulator-rpmsg: should set voltage closest to min_uV
Dong Aisheng [Wed, 14 Dec 2016 22:54:45 +0000 (06:54 +0800)]
MLK-13615-1 regulator: pf1550-regulator-rpmsg: should set voltage closest to min_uV

According to API definition, Set the voltage for the regulator within the
range specified, the driver should select the voltage closest to min_uV.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-9987: Input: imx_keypad: Fix suspend/resume while keypad is pressed
Fabio Estevam [Thu, 11 Dec 2014 15:14:22 +0000 (13:14 -0200)]
MLK-9987: Input: imx_keypad: Fix suspend/resume while keypad is pressed

Since commit commit 560a64749d1dd0ff ("ENGR00318936-2 input: keyboard: imx:
remove usless release interrupt enabled) the following problem happens:

- Keep any keypad key pressed
- Enter low power mode via "echo mem > /sys/power/state"
- Then we are no longer able to wake-up the system via the keypad

The reason for this behaviour is that the KRIE (Release Interrupt) is not
enabled.

In order to fix this problem, we should enable KRIE when a key is pressed
(KPKD bit is set) or enable KDIE when no key is pressed (KPKR is set).

This way we will always have a valid source of keypad interrupt no matter if
the system entered low power mode while a keypad key was pressed or not.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
(cherry picked from commit 5a7ab47e67d1045cb2f5d408c112617dff48dee2)
(cherry picked from commit f75c35512bd3df7dbb26f4a35cf17dcbb6ffb724)

7 years agoENGR00318936-2 input: keyboard: imx: remove usless release interrupt enabled code
Robin Gong [Wed, 18 Jun 2014 06:14:09 +0000 (14:14 +0800)]
ENGR00318936-2 input: keyboard: imx: remove usless release interrupt enabled code

Remove useless code for release interrupt enabled, because we check status by
timer rather than release interrupt. Remove the code which may disable depress
interrupt. Also make sure enable depress interrupt in suspend function.

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

7 years agoENGR00318936-1 input: keyboard: imx: add pm_stay_awake and pm_relax
Robin Gong [Tue, 10 Jun 2014 03:56:49 +0000 (11:56 +0800)]
ENGR00318936-1 input: keyboard: imx: add pm_stay_awake and pm_relax

There is a small window after system suspend but timer scan function
didn't finish timely, in this case,  system enter suspend without kpp
interrupt enabled and failed to resume back if key depressed.We add
pm_stay_awake and pm_relax to make sure system suspend flow abort in
this case.

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

7 years agoMLK-13613: ARM: configs: imx_v7_mfg_defconfig: Enable extcon USB GPIO
Han Xu [Wed, 14 Dec 2016 20:40:21 +0000 (14:40 -0600)]
MLK-13613: ARM: configs: imx_v7_mfg_defconfig: Enable extcon USB GPIO

enable extcon USB GPIO for mfgtool usb mfgtool download

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-13612-3: mtd: spi-nor: add new NOR chip MX25R6435F info
Han Xu [Thu, 27 Oct 2016 15:45:41 +0000 (10:45 -0500)]
MLK-13612-3: mtd: spi-nor: add new NOR chip MX25R6435F info

ULP1 use new QSPI NOR chip MX25R6435F which is not in default id table.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-13612-2: mtd: fsl-quadspi: add QSPI driver on ULP1
Han Xu [Mon, 10 Oct 2016 21:43:35 +0000 (16:43 -0500)]
MLK-13612-2: mtd: fsl-quadspi: add QSPI driver on ULP1

Since QSPI is not in A7 domain on i.MX7ULP, the clock framework doesn't
provide support to handle related clock, add QUIRK to indicate the QSPI
was handled by u-boot. May change the code after clock framework
supports M4 domain.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-13612-1: ARM: dts: enable QSPI for i.MX7ULP1
Han Xu [Wed, 14 Dec 2016 17:38:49 +0000 (11:38 -0600)]
MLK-13612-1: ARM: dts: enable QSPI for i.MX7ULP1

Add one more dts for QSPI on i.MX7ULP1 for mfgtool purpose.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-13587: ARM: config: enable i.MX7ULP in imx_v7_mfg_defconfig
Han Xu [Fri, 9 Dec 2016 16:22:36 +0000 (10:22 -0600)]
MLK-13587: ARM: config: enable i.MX7ULP in imx_v7_mfg_defconfig

enable i.MX7ULP in imx_v7_mfg_defconfig by default.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-13605 ARM: dts: imx7d.dtsi: configure USB burst properly
Peter Chen [Wed, 14 Dec 2016 02:25:54 +0000 (10:25 +0800)]
MLK-13605 ARM: dts: imx7d.dtsi: configure USB burst properly

After testing, it can give the best performance.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13600 ARM: defconfig: imx_v7_defconfig: build-in more USB Ethernet cards
Peter Chen [Tue, 13 Dec 2016 02:45:14 +0000 (10:45 +0800)]
MLK-13600 ARM: defconfig: imx_v7_defconfig: build-in more USB Ethernet cards

To support more users for using NFS based on USB Ethernet.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13597-2 ARM: imx: update i.mx7d ddr3 script
Anson Huang [Mon, 12 Dec 2016 13:01:29 +0000 (21:01 +0800)]
MLK-13597-2 ARM: imx: update i.mx7d ddr3 script

Update i.MX7D DDR3 script to V2.0 for bank interleave.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13597-1 ARM: imx: update i.mx7d lpddr3 script
Anson Huang [Fri, 9 Dec 2016 11:00:53 +0000 (19:00 +0800)]
MLK-13597-1 ARM: imx: update i.mx7d lpddr3 script

Update i.MX7D LPDDR3 script to V2.0 for bank interleave.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13570-9 ARM: defconfig: imx_v7_defconfig: add USB test for host
Peter Chen [Fri, 9 Dec 2016 09:23:41 +0000 (17:23 +0800)]
MLK-13570-9 ARM: defconfig: imx_v7_defconfig: add USB test for host

Add USB test for host, it will be built as module, and this
configuration has already been at mainline imx_v6_v7_defconfig.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-8 usb: chpidea: usbmisc_imx: add non-burst setting for both imx7d and imx7ulp
Peter Chen [Fri, 9 Dec 2016 07:32:46 +0000 (15:32 +0800)]
MLK-13570-8 usb: chpidea: usbmisc_imx: add non-burst setting for both imx7d and imx7ulp

For all imx Socs later than imx6 (including imx6), the USB_nSBUSCFG.AHBBRST
will be set as 0 at dtsi file, so the non-burst setting needs to be
set at non-core register, or there will be no burst for USB AHB/AXI
transfer.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-7 ARM: dts: imx7ulp.dtsi: change burst size as 0x8
Peter Chen [Fri, 9 Dec 2016 07:30:45 +0000 (15:30 +0800)]
MLK-13570-7 ARM: dts: imx7ulp.dtsi: change burst size as 0x8

According to test, 0x8 is better than 0x10.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-6 ARM: configs: imx_v7_defconfig: Enable extcon USB GPIO
Peter Chen [Fri, 2 Dec 2016 07:28:02 +0000 (15:28 +0800)]
MLK-13570-6 ARM: configs: imx_v7_defconfig: Enable extcon USB GPIO

It is used for imx7ulp evk which uses GPIO for USB dual-role switch
function.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-5 usb: chipidea: imx: introduce pmqos for imx7ulp
Peter Chen [Tue, 6 Dec 2016 02:06:31 +0000 (10:06 +0800)]
MLK-13570-5 usb: chipidea: imx: introduce pmqos for imx7ulp

At imx7ulp, if the system enters idle, it will close some clocks and affect
USB transfer. In order to avoid it, we request pmqos to avoid system
entering idle when the USB is in use.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-4 usb: chipidea: usbmisc_imx: add imx7ulp entry
Peter Chen [Tue, 6 Dec 2016 01:41:04 +0000 (09:41 +0800)]
MLK-13570-4 usb: chipidea: usbmisc_imx: add imx7ulp entry

imx7ulp non core register mapping is similar with imx7d, and the
initialization is the same, but lacks of USB charger detection support.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-3 usb: chipidea: core: change extcon usage for imx_4.1.y
Peter Chen [Tue, 6 Dec 2016 01:34:58 +0000 (09:34 +0800)]
MLK-13570-3 usb: chipidea: core: change extcon usage for imx_4.1.y

At v4.1 kernel, we can't get cable type at notifier, but at
extcon-usb-gpio.c notifies both VBUS and ID event, we had to
do special handling for ID event, and omit VBUS event. Current
implementation only supports ID extcon event.

If wakeup event occurs by extcon, it needs to call ci_irq again since the
first ci_irq calling at extcon notifier only wakes up controller, but
do noop for event handling.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-2 usb: phy: phy-mxs-usb: add imx7ulp support
Peter Chen [Tue, 25 Oct 2016 05:34:16 +0000 (13:34 +0800)]
MLK-13570-2 usb: phy: phy-mxs-usb: add imx7ulp support

At imx7ulp, the USB related analog register is located in PHY register
region too, so we need to control PLL at PHY driver directly.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13570-1 ARM: dts: imx7ulp-evk: add USB support
Peter Chen [Wed, 16 Nov 2016 01:20:58 +0000 (09:20 +0800)]
MLK-13570-1 ARM: dts: imx7ulp-evk: add USB support

Add USBOTG1 support, we use GPIO as ID function for dual-role switch.
Besides, #define <dt-bindings/gpio/gpio.h> to imx7ulp.dtsi since
lots of boards may need it.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agousb: chipidea: Consolidate extcon notifiers
Stephen Boyd [Wed, 7 Sep 2016 21:35:07 +0000 (14:35 -0700)]
usb: chipidea: Consolidate extcon notifiers

The two extcon notifiers are almost the same except for the
variable name for the cable structure and the id notifier inverts
the cable->state logic. Make it the same and replace two
functions with one to save some lines. This also makes it so that
the id cable state is true when the id pin is pulled low, so we
change the name of ->state to ->connected to properly reflect
that we're interested in the cable being connected.

Cc: Peter Chen <peter.chen@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Ivan T. Ivanov" <iivanov.xz@gmail.com>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-13418: ASoC: wm8960: workaround no sound issue in master mode
Shengjiu Wang [Mon, 24 Oct 2016 02:15:37 +0000 (10:15 +0800)]
MLK-13418: ASoC: wm8960: workaround no sound issue in master mode

The input MCLK is 12.288MHz, The desired output sysclk is 11.2896MHz
the sample rate is 44100Hz, with the pllprescale=2, postscale=sysclkdiv=1,
some chip may have wrong bclk and lrclk output in master mode. then there
will be no sound.
With the pllprescale=1, postscale=2, the output clock is correct. so use
this configuration to workaround this issue.
Tested 8k/11k/16k/22k/32k/44k/48kHz case.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-13422: ASoC: wm8960: fix the pitch shift issue after suspend/resume
Shengjiu Wang [Fri, 4 Nov 2016 07:47:22 +0000 (15:47 +0800)]
MLK-13422: ASoC: wm8960: fix the pitch shift issue after suspend/resume

Before suspend, the sysclock select pll out as source, after resume
sysclock select the mlck as the source, so the sample rate is changed
the sound's pitch is shifted.
The issue is caused by the commit c1845da3d08de6cf2642fec74f7a46d05de6314d
Which removed the wm8960_configure_clocking() when bias level changes
from STANDBY to PREPARE, this patch is to add it back.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMGS-2455 [#ccc] fix vprofiler issues
Yuchou Gan [Thu, 8 Dec 2016 18:13:39 +0000 (02:13 +0800)]
MGS-2455 [#ccc] fix vprofiler issues

fix for profiler
which add mcz module counter, fix ps instruction count and ps render pixel count when chip not support halti4.

Date: Dec 6, 2016
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
7 years agoMGS-2429 [#imx-282] [MX8] Met gpu hang when repeatly do gles vg stress test on gpu0...
Yuchou Gan [Tue, 6 Dec 2016 17:52:54 +0000 (01:52 +0800)]
MGS-2429 [#imx-282] [MX8] Met gpu hang when repeatly do gles vg stress test on gpu0 and bridged mode. 100%

There are 2 devices in the MX8 board, and each needs a commitMutex, instead of one big commitMutex in the kernel.

Date: Dec 6, 2016
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
7 years agoMGS-1923 [#imx-19] use device mutex to sync command operations
Xianzhong [Mon, 28 Nov 2016 02:33:26 +0000 (10:33 +0800)]
MGS-1923 [#imx-19] use device mutex to sync command operations

kernel mutex cannot be shared with gpu0,gpu1 and bridge mode together.
use device mutex to prevent the sync problem for gpu command operations.

this change is reasonable and fixed one hole in existing implementation.
but this patch cannot fix the GPU hang for MGS-2429.

Date: Nov 28, 2016
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMXSCM-217 imx: keep weak 2p5 power up when ENET WOL wakeup is enabled
Juan Gutierrez [Thu, 3 Nov 2016 23:06:21 +0000 (18:06 -0500)]
MXSCM-217 imx: keep weak 2p5 power up when ENET WOL wakeup is enabled

When ENET wake up is enabled by wake-on-lan (WOL), the weak 2P5
ldo needs to keep power up even for LPDDR2 due to the ENET_PLL is
feed by the weak 2p5 ldo during DSM. If the weak 2P5 ldo is power
down the ENET module is power off hence it is not able to sense the
WOL interrupt and trigger the system resume.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
7 years agoMXSCM-235 dts: add support for scm qwks rev3
Juan Gutierrez [Thu, 24 Nov 2016 21:48:18 +0000 (15:48 -0600)]
MXSCM-235 dts: add support for scm qwks rev3

Add support for SCM i.MX6DQ 1Gb QWKS rev3

Support the next features for 1Gb qwks rev3 boards:

 - Support for fix lpddr2 mode
 - hdcp and enetirq
 - bluetooth and wifi for Murata ZP SDIO dongle

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
7 years agoMXSCM-234 dts: imx: adjust the sd3 drive strength for 6sxscm evb
Juan Gutierrez [Sat, 3 Dec 2016 17:05:08 +0000 (11:05 -0600)]
MXSCM-234 dts: imx: adjust the sd3 drive strength for 6sxscm evb

For some SD Ultra (40MB/s) the drive strength/speed settings
on the iomux ctrl pads for SD3 is not enougn causing some
error by transfering data as below:

mmcblk2: error -84 transferring data, sector 2250553, nr 151,
cmd response 0x900, card status 0x0

Updating the DSE and Speed on the pad ctrl fixes the issue.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
7 years agoMLK-13563 ion: Enable ion driver on imx7ulp
Song Bing [Wed, 30 Nov 2016 07:37:59 +0000 (15:37 +0800)]
MLK-13563 ion: Enable ion driver on imx7ulp

Enable ion driver on imx7ulp

Signed-off-by: Song Bing <bing.song@nxp.com>
7 years agoMLK-13562 ion: Add devicetree bindings for mxc ion
Song Bing [Wed, 30 Nov 2016 08:41:21 +0000 (16:41 +0800)]
MLK-13562 ion: Add devicetree bindings for mxc ion

Add devicetree bindings for mxc ion

Signed-off-by: Song Bing <bing.song@nxp.com>
7 years agoMLK-13583 ARM: imx: fix build warning on i.mx7ulp clock driver
Anson Huang [Thu, 8 Dec 2016 16:17:53 +0000 (00:17 +0800)]
MLK-13583 ARM: imx: fix build warning on i.mx7ulp clock driver

This patch fixes below build warning:

CC      arch/arm/mach-imx/clk-imx7ulp.o
LD      init/built-in.o
arch/arm/mach-imx/clk-imx7ulp.c:42:20: warning: 'cm4_periph_plat_sels' defined but not used [-Wunused-variable]
LD      arch/arm/mach-imx/built-in.o
CC      kernel/module.o
GZIP    kernel/config_data.gz

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13580 ARM: imx: update DGO register to SNVS domain on i.MX7ULP
Anson Huang [Thu, 8 Dec 2016 14:40:35 +0000 (22:40 +0800)]
MLK-13580 ARM: imx: update DGO register to SNVS domain on i.MX7ULP

On i.MX7ULP, the resume entry and parameter are saved
in DGO_GP registers, it has two power domains, one
is normal domain, the other is SNVS domain, if M4 also
enters VLLS mode, DGO needs to be updated into SNVS
domain to avoid power lost and lead to resume fail.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13579-2 ARM: imx: update suspend ocram location on i.mx7ulp
Anson Huang [Thu, 8 Dec 2016 12:12:49 +0000 (20:12 +0800)]
MLK-13579-2 ARM: imx: update suspend ocram location on i.mx7ulp

Adjust i.MX7ULP suspend ocram location from
SRAM_U to SRAM_L, occupy last 16K.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13579-1 ARM: dts: imx7ulp: adjust suspend ocram location
Anson Huang [Thu, 8 Dec 2016 11:46:41 +0000 (19:46 +0800)]
MLK-13579-1 ARM: dts: imx7ulp: adjust suspend ocram location

Adjust suspend ocram location for i.MX7ULP, since previous
location is used by M4.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13557 imx6sll: add fsl,wdog_b and pinmux settings
Peng Fan [Thu, 8 Dec 2016 01:18:32 +0000 (09:18 +0800)]
MLK-13557 imx6sll: add fsl,wdog_b and pinmux settings

Add fsl,wdog_b and pinmux settings.
We need to use wdog_b to trigger pmic reset, when we trigger
wdog_b reset, we should not trigger wdog_reset_b_deb.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 0400ecd8fb3a3772dfb3a68c55960419a63f1650)

7 years agoMLK-13577-5: ARM: dts: imx7ulp-evk: add pf1550 pmic
Robin Gong [Wed, 7 Dec 2016 03:46:13 +0000 (11:46 +0800)]
MLK-13577-5: ARM: dts: imx7ulp-evk: add pf1550 pmic

add pf1550-regulator-rpmsg driver node in dts.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-13577-4: ARM: configs: imx_v7_defconfig: enable pf1550-regulator-rpmsg driver
Robin Gong [Wed, 7 Dec 2016 03:45:09 +0000 (11:45 +0800)]
MLK-13577-4: ARM: configs: imx_v7_defconfig: enable pf1550-regulator-rpmsg driver

enable pf1550-regulator-rpmsg driver by default.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-13577-3 regulator: pf1550-regulator-rpmsg: add pf1550 regulator rpmsg driver
Robin Gong [Wed, 7 Dec 2016 03:41:42 +0000 (11:41 +0800)]
MLK-13577-3 regulator: pf1550-regulator-rpmsg: add pf1550 regulator rpmsg driver

add pf1550 regulator rpmsg driver to control pf1550 on the m4 side
by rpmsg.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-13577-2 ARM: imx7: mu: set ABF0 of MU_CR to notify M4 MU finish initialization
Robin Gong [Wed, 16 Nov 2016 07:39:31 +0000 (15:39 +0800)]
MLK-13577-2 ARM: imx7: mu: set ABF0 of MU_CR to notify M4 MU finish initialization

set ABF0 of MU_CR to let M4 know MU is ready, thus MU can initialize rpmsg
later.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 4969903fc8d32c5e6dfc4fe5f2f68e52aef080bc)

7 years agoMLK-13577-1: ARM: imx: mu: support rpmsg/mu on i.mx7ulp
Robin Gong [Wed, 7 Dec 2016 03:28:45 +0000 (11:28 +0800)]
MLK-13577-1: ARM: imx: mu: support rpmsg/mu on i.mx7ulp

Enable rpmsg/mu support on i.mx7ulp, since some mu register and
rmpsg buffer different as before

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-13575 defconfig: enable lpi2c in defconfig
Gao Pan [Tue, 6 Dec 2016 08:03:51 +0000 (16:03 +0800)]
MLK-13575 defconfig: enable lpi2c in defconfig

Enable lpi2c in defconfig, CONFIG_I2C_IMX_LPI2C=y

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
7 years agoMLK-13573 arm: dts: add sensors node in imx7ulp-evk.dts
Gao Pan [Wed, 7 Dec 2016 01:51:50 +0000 (09:51 +0800)]
MLK-13573 arm: dts: add sensors node in imx7ulp-evk.dts

sensor node: fxas2100x, fxos8700, mpl3115

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
7 years agospi: use sg_next for walking through the allocated scatterlist table
Juan Gutierrez [Wed, 16 Nov 2016 22:45:11 +0000 (16:45 -0600)]
spi: use sg_next for walking through the allocated scatterlist table

A null dereference or Oops exception might occurs when reading at once the
whole content of an spi-nor of big enough size that requires an scatterlist
table that does not fit into one single page.

The spi_map_buf function is ignoring the chained sg case by dereferenceing
the scatterlist elements in an array fashion. This wrongly assumes that
the allocation of the scatterlist elements are contiguous. This is true as
long as the scatterlist table fits within a PAGE_SIZE. However, for
allocation where the scatter table is bigger than that, the pages allocated
by sg_alloc might not be contigous.

The sg table can be properly walked by sg_next instead of using an array.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoMLK-13574-3: ARM: dts: enable audio in a seperate dts
Shengjiu Wang [Mon, 28 Nov 2016 05:38:34 +0000 (13:38 +0800)]
MLK-13574-3: ARM: dts: enable audio in a seperate dts

Audio is in M4 domain, so we need an indepenent dts for audio.
M4 domain is controled by RTOS, this dts is for demo purpose in
linux

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-13574-2: ASoC: fsl_sai: refine driver for ip upgrade
Shengjiu Wang [Mon, 28 Nov 2016 05:38:13 +0000 (13:38 +0800)]
MLK-13574-2: ASoC: fsl_sai: refine driver for ip upgrade

In imx7ulp1, the sai can support two TX channel and two RX
channels, So the usage need to be updated.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>