linux.git
7 years agoarm64: mm: Invalidate both kernel and user ASIDs when performing TLBI
Will Deacon [Thu, 10 Aug 2017 13:13:33 +0000 (14:13 +0100)]
arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI

commit 9b0de864b5bc upstream.

Since an mm has both a kernel and a user ASID, we need to ensure that
broadcast TLB maintenance targets both address spaces so that things
like CoW continue to work with the uaccess primitives in the kernel.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
7 years agoarm64: mm: Add arm64_kernel_unmapped_at_el0 helper
Will Deacon [Tue, 14 Nov 2017 13:58:08 +0000 (13:58 +0000)]
arm64: mm: Add arm64_kernel_unmapped_at_el0 helper

commit fc0e1299da54 upstream.

In order for code such as TLB invalidation to operate efficiently when
the decision to map the kernel at EL0 is determined at runtime, this
patch introduces a helper function, arm64_kernel_unmapped_at_el0, to
determine whether or not the kernel is mapped whilst running in userspace.

Currently, this just reports the value of CONFIG_UNMAP_KERNEL_AT_EL0,
but will later be hooked up to a fake CPU capability using a static key.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
7 years agoarm64: mm: Allocate ASIDs in pairs
Will Deacon [Thu, 10 Aug 2017 13:10:28 +0000 (14:10 +0100)]
arm64: mm: Allocate ASIDs in pairs

commit 0c8ea531b774 upstream.

In preparation for separate kernel/user ASIDs, allocate them in pairs
for each mm_struct. The bottom bit distinguishes the two: if it is set,
then the ASID will map only userspace.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
no MMCF_AARCH32 in arch/arm64/include/asm/mmu.h

7 years agoarm64: mm: Move ASID from TTBR0 to TTBR1
Will Deacon [Thu, 10 Aug 2017 12:19:09 +0000 (13:19 +0100)]
arm64: mm: Move ASID from TTBR0 to TTBR1

commit 7655abb95386 upstream.

In preparation for mapping kernelspace and userspace with different
ASIDs, move the ASID to TTBR1 and update switch_mm to context-switch
TTBR0 via an invalid mapping (the zero page).

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
no pre_ttbr0_update_workaround in arch/arm64/mm/proc.S

7 years agoarm64: mm: Use non-global mappings for kernel space
Will Deacon [Thu, 10 Aug 2017 11:56:18 +0000 (12:56 +0100)]
arm64: mm: Use non-global mappings for kernel space

commit e046eb0c9bf2 upstream.

In preparation for unmapping the kernel whilst running in userspace,
make the kernel mappings non-global so we can avoid expensive TLB
invalidation on kernel exit to userspace.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
skip PTE_RDONLY of PAGE_NONE in arch/arm64/include/asm/pgtable-prot.h

7 years agoMLK-17703-10: drm: imx: dcss: remove unused variable warning
Laurentiu Palcu [Sun, 25 Mar 2018 13:41:52 +0000 (08:41 -0500)]
MLK-17703-10: drm: imx: dcss: remove unused variable warning

dcss_crtc variable was not used anymore and generated a compilation
warning. Remove it.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-9: drm: imx: dcss: align input and output pipe gamut and nonlinearity
Laurentiu Palcu [Fri, 23 Mar 2018 22:36:33 +0000 (17:36 -0500)]
MLK-17703-9: drm: imx: dcss: align input and output pipe gamut and nonlinearity

For better results, output and input pipe gamut and nonlinearity should
match.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-8: drm: imx: dcss: default output pipe gamut to REC709
Laurentiu Palcu [Fri, 23 Mar 2018 22:34:55 +0000 (17:34 -0500)]
MLK-17703-8: drm: imx: dcss: default output pipe gamut to REC709

In case we don't get any information about colorimetry from HDMI sink,
set default gamut to REC709.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-7: drm: imx: dcss: configure output pipe according to what sink supports
Laurentiu Palcu [Fri, 23 Mar 2018 13:25:05 +0000 (08:25 -0500)]
MLK-17703-7: drm: imx: dcss: configure output pipe according to what sink supports

Output pipe tables' configuration was hardcoded. This patch will allow the output
pipe to be configured according to what the sink supports.

Also, since there's no way to pass gamut and nonlinearity settings from userspace,
configure the input pipe as REC2020/REC2084.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-6: drm: imx: dcss: fix output colorimetry in crtc
Laurentiu Palcu [Fri, 23 Mar 2018 13:23:11 +0000 (08:23 -0500)]
MLK-17703-6: drm: imx: dcss: fix output colorimetry in crtc

The detection of the supported output colorimetry was wrong. This patch will
fix that and, also, get rid of the REC2100HLG EOTF setting for now. It produces
bad colors.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-5: drm: imx: dcss: ignore the 8 bit for input pipe
Laurentiu Palcu [Fri, 23 Mar 2018 12:48:13 +0000 (07:48 -0500)]
MLK-17703-5: drm: imx: dcss: ignore the 8 bit for input pipe

Since the input of HDR10 is always 10-bit, ignore 8-bit flags when
setting up the output pipe.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-4: drm: imx: dcss: return the hdr10 table at once
Laurentiu Palcu [Fri, 23 Mar 2018 12:46:48 +0000 (07:46 -0500)]
MLK-17703-4: drm: imx: dcss: return the hdr10 table at once

Don't go through the rest of the list if we found our table. Just return it
immediately.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17703-3: drm: imx: hdp: send the right colorimetry to the sink
Laurentiu Palcu [Thu, 22 Mar 2018 23:10:28 +0000 (18:10 -0500)]
MLK-17703-3: drm: imx: hdp: send the right colorimetry to the sink

Currently, the colorimetry was hardcoded to NONE. However, a sink may support
different types of colorimetry. This patch will allow for the colorimetry to be
set according to what the sink supports.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
7 years agoMLK-17703-2: drm: change HDR metadata infoframe structure
Laurentiu Palcu [Thu, 22 Mar 2018 22:08:10 +0000 (17:08 -0500)]
MLK-17703-2: drm: change HDR metadata infoframe structure

According to ANSI-CTA-861-G specification:
 * EOTF is 8 bit, not 16;
 * metadata type is 8 bit, not 16;
 * There's no "Minimum Content Light Level"

This patch will change the HDR metadata structures to reflect that. Also, this
will fix problems seen on some TVs that were rejecting HDR metadata because
it's size was too big (more than 26 bytes).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
7 years agoMLK-17703-1: drm: imx: dcss: update HDR10 tables
Laurentiu Palcu [Thu, 22 Mar 2018 20:53:24 +0000 (15:53 -0500)]
MLK-17703-1: drm: imx: dcss: update HDR10 tables

The old tables had incorrect CSCBs when YUV formats were being used. That's
because the application used to generate the tables always assumed channel 0 is
graphics even if it was configured as YUV.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17586-4 ARM: dts: improve usdhc root clock rate
Haibo Chen [Sun, 11 Feb 2018 11:07:22 +0000 (19:07 +0800)]
MLK-17586-4 ARM: dts: improve usdhc root clock rate

Confirm with IC, HS400 MAX clock Freq for Instance 0 is 198Mhz
and for Instance 1 is 192MHz, so set the usdhc parent clock at
396MHz, due to current APLL is config to 529.2MHz, use the formula
APLL_PFD clock = APLL * 18 / i, the nearest clock is 381.024MHz when
the i is 25, so the usdhc root clock is 190.512MHz.

But eMMC HS400 can't pass stress test at 190.512MHz, will meet CRC
error sometimes, only when down to 176.4MHz can pass the stress test.

This patch make the usdhc0 and usdhc1 root clock both source from
IMX7ULP_CLK_APLL_PFD1, and set this APLL_PFD1 clcok rate at 352.8MHz,
and set the USDHC0 root clock at 352.8MHz, and set the USDHC1 root
clock at 176.4MHz.

Also remove the clk_prepare_enable() and clk_disable_unprepare() for
APLL_PFD2, bacause U-Boot already gate off APLL_PFD1, not need to do
this again.

Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17586-2 mmc: add HS400 support for iMX7ULP
Haibo Chen [Sun, 11 Feb 2018 08:50:26 +0000 (16:50 +0800)]
MLK-17586-2 mmc: add HS400 support for iMX7ULP

Add HS400 support for iMX7ULP B0.

According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET
before any setting of STROBE_DLL_CTRL register.

USDHC has register bits(bit[27~20] of register STROBE_DLL_CTRL)
for slave sel vaule. If this register bits value is 0,  it needs
256 ref_clk cycles to update slave sel value. IC suggest to set
bit[27~20] to 0x4, it only need 4 ref_clk cycle to update slave
sel vaule. This will short the lock time of slave.

i.MX7ULP B0 will need more time to lock the REF and SLV, so change
to add another 5us delay.

Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17586-1 ARM64: dts: imx7ulp-evk: add eMMC HS200 support for B0 chip
Haibo Chen [Sun, 11 Feb 2018 08:27:41 +0000 (16:27 +0800)]
MLK-17586-1 ARM64: dts: imx7ulp-evk: add eMMC HS200 support for B0 chip

USDHC internal IC data handle bug already fixed on i.MX7ULP B0, so add
HS200 support first.

To let HS200 work on i.MX7ULP REV A3 board, need to do the following
rework, otherwise, switch to HS200 will always meet error, caused by
the voltage change make eMMC work not stable, this rework fix the eMMC
I/O voltage to 1.8v, align with the MMC spec.
1,remove TF sd slot, replace eMMC chip
2,fix eMMC I/O voltage to 1.8v, remove R183, short TP3 and TP89
3,add R107, make eMMC boot work

For i.MX7ULP REV B1 board, do not need this rework, board already fix the
eMMC I/O voltage to 1.8v

Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17912 [IMX8QXP B0] ENABLE SEEK for DECODER on IMX8QXP B0 board
nxa13443 [Mon, 26 Mar 2018 08:13:34 +0000 (16:13 +0800)]
MLK-17912 [IMX8QXP B0] ENABLE SEEK for DECODER on IMX8QXP B0 board

Modify seek for vpu decoder on B0

Signed-off-by: nxa13443 <chaofan.huang@nxp.com>
7 years agoMLK-17487: pxp: fix pxp yuv to yuv generate color dots issue
Guoniu.Zhou [Fri, 23 Mar 2018 03:41:49 +0000 (11:41 +0800)]
MLK-17487: pxp: fix pxp yuv to yuv generate color dots issue

When PxP convert yuyv to nv12 format, some color dots will
introdue to output image. IC recommend that YCBCR_MODE and
BYPASS bit of CSC1_COEF0 should be 1.

Reviewed-by: robby.cai <robby.cai@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
7 years agoMLK-17889 drm/imx: dpu: crtc: Enable irqs before HWs are triggered in ->enable
Liu Ying [Thu, 22 Mar 2018 03:43:46 +0000 (11:43 +0800)]
MLK-17889 drm/imx: dpu: crtc: Enable irqs before HWs are triggered in ->enable

We should enable irqs before HWs are triggered in ->enable and then
wait for shadow loads are done, otherwise we would miss the irqs if
the irqs come right after the triggers although it's not very likely
to happen.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-17878 ARM64: defconfig: built-in xen block back driver
Peng Fan [Wed, 21 Mar 2018 08:08:08 +0000 (16:08 +0800)]
MLK-17878 ARM64: defconfig: built-in xen block back driver

Built-in xen block back driver to avoid insmod
xen-blkback.ko when use xvda from DomU.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK-17902 [IMX8QXP B0]VPU ENCODER and DECODER on IMX8QXP B0 board
nxa13443 [Fri, 23 Mar 2018 12:20:37 +0000 (20:20 +0800)]
MLK-17902 [IMX8QXP B0]VPU ENCODER and DECODER on IMX8QXP B0 board

Add vpu decoder and encoder for imx8qxp b0 board,
decoder can support H265 H264 MPEG2 MPEG4 H263 etc
encoder can support H264

Signed-off-by: nxa13443 <chaofan.huang@nxp.com>
7 years agoMLK-17837-03 ARM: imx_v7_defconfig: enable rpmsg input for i.MX7ULP
Fugang Duan [Mon, 19 Mar 2018 09:45:42 +0000 (17:45 +0800)]
MLK-17837-03 ARM: imx_v7_defconfig: enable rpmsg input for i.MX7ULP

Add rpmsg input config enable for i.MX7ULP.

Reviewed-by: Elven Wang <elven.wang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17837-02 dts: imx7ulp-evk: add rpmsg sensor support
Fugang Duan [Mon, 19 Mar 2018 09:42:57 +0000 (17:42 +0800)]
MLK-17837-02 dts: imx7ulp-evk: add rpmsg sensor support

Enable rpmsg input device like sensor support for i.MX7ULP B0
EVK board.

Reviewed-by: Elven Wang <elven.wang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17837-01 input: misc: rpmsg_input: add rpmsg virtual sensor driver
Fugang Duan [Fri, 16 Mar 2018 06:07:05 +0000 (14:07 +0800)]
MLK-17837-01 input: misc: rpmsg_input: add rpmsg virtual sensor driver

NXP i.MX7ULP EVK boards all sensors connect with M4 core, A core
has to conmunicate with sensors by virtual io bus like rpmsg bus.
The driver implement the virtual sensor input driver to configure
sensors active/idle/delay actions and report the sensors' event to
user space.

Supply below sysfs for user to enable/disable detector and counter,
set poll delay:
/sys/class/misc/step_counter/enable
/sys/class/misc/step_detector/enable
/sys/class/misc/step_counter/poll_delay

Reviewed-by: Elven Wang <elven.wang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17684: drm/bridge: nwl-dsi: Propagate DSI format to the attached panel/bridge
Mirela Rabulea [Tue, 20 Mar 2018 11:01:25 +0000 (13:01 +0200)]
MLK-17684: drm/bridge: nwl-dsi: Propagate DSI format to the attached panel/bridge

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
7 years agoMLK-17543-1: drm/mxsfb: Signal mode changed when bpp changed
Mirela Rabulea [Mon, 19 Mar 2018 13:25:46 +0000 (15:25 +0200)]
MLK-17543-1: drm/mxsfb: Signal mode changed when bpp changed

Add mxsfb_atomic_helper_check to signal mode changed when bpp changed.
This will trigger the execution of disable/enable on
a modeset with different bpp than the current one.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
7 years agoMLK-17788 soc: imx: ipc: not abort when set wake error
Peng Fan [Thu, 22 Mar 2018 03:06:36 +0000 (11:06 +0800)]
MLK-17788 soc: imx: ipc: not abort when set wake error

When irq_set_irq_wake error, it means no irq wakeup capability,
showing the error msg is enough, no need to abort and cause
kernel stop.

For xen, currently we do not support suspend/resume, and
no wu interrupt controller support now, so need to remove
"return err" to avoid kernel stop.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-17892 ARM64: dts: Add cpu cooling device to pmic thermal zone
Bai Ping [Thu, 22 Mar 2018 09:14:39 +0000 (17:14 +0800)]
MLK-17892 ARM64: dts: Add cpu cooling device to pmic thermal zone

Add the cpu cooling device to the PMIC thermal zone on imx8qm and
imx8qxp mek baord.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-17883 mmc: add delay after CMD6 before sending CMD13
Haibo Chen [Wed, 21 Mar 2018 10:26:46 +0000 (18:26 +0800)]
MLK-17883 mmc: add delay after CMD6 before sending CMD13

Android report data timeout issue on the Micron eMMC of i.mx8mscale
evk board. Before using CMD25 to write multi block data, driver will
use CMD6 to flush cache. But some CMD25 will get both data timeout
interrupt and transfer complete interrupt. If add delay after busy
check, and before sending CMD13, this issue gone.

We meet similar issue on Sandisk eMMC before, and already have a
commit 581925fe325a ("MLK-11685-1 mmc: add delay after CMD6 befoer
sending CMD13 for sandisk"), but when cherry-pick to 4.9 branch,
meet conflicts, put the delay in the wrong place. So meet the similar
issue again.

This patch fix this, move the dealy in the right place, right before
CMD13.

Reviewed-by: Dong Aisheng <Aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17621-2 mmc: add feature of setting slot index via devicetree alias
Haibo Chen [Mon, 26 Feb 2018 07:12:18 +0000 (15:12 +0800)]
MLK-17621-2 mmc: add feature of setting slot index via devicetree alias

Add feature of setting slot index via devicetree alias, to hard code the
mmc/sd root device.

The patch requires additional alias_id fix or it won't work.

Note: minor device number keep independent with this device alias.

Refer to the commit 35928d6c6a76 ("mmc: Allow setting slot index via
devicetree alias").

Acked-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agommc: core: simplify ida handling
Heiner Kallweit [Sat, 28 Jan 2017 08:32:35 +0000 (09:32 +0100)]
mmc: core: simplify ida handling

ida handling can be simplified by switching to the ida_simple_
functions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 7413d1f509eb0ee605973c1a6da9911700c80012)

7 years agommc: core: switch to ida_simple_ functions in block.c
Heiner Kallweit [Wed, 1 Feb 2017 18:44:22 +0000 (19:44 +0100)]
mmc: core: switch to ida_simple_ functions in block.c

ida code in block.c can be significantly simplified by switching to
the ida_simple_ functions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit a04848c75bc02858ba98a7af63637728d033d3e8)

7 years agoMLK-17621-1 mmc: remove the feature of setting slot index via devicetree alias
Haibo Chen [Sat, 24 Feb 2018 09:32:01 +0000 (17:32 +0800)]
MLK-17621-1 mmc: remove the feature of setting slot index via devicetree alias

This patch remove the commit 3d8a438c53f3 ("mmc: Allow setting slot index via
devicetree alias"),which wrongly use the function ida_simple_get(), causing
this function return unexpected result when the reserved alias index value is
not 0.

In the meantime, the 'devidx' in the mmc block layer code just impact the minor
device number, no need to align the minor device number and the slot index.

Here remove upper mentioned patch, and will reform the feature of setting slot
index via devicetree alias in the next few patches.

This patch also remove one other related patch:
commit 82f323ade111 ("MLK-12617 mmc: Fix compile error when CONFIG_MMC=m").

Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoarm64: qxp: support read chip unique id
Frank Li [Mon, 19 Mar 2018 08:10:44 +0000 (03:10 -0500)]
arm64: qxp: support read chip unique id

call scfw api get chip unique id

cat /sys/devices/soc0/soc_uid
A264080B57AC1898

Signed-off-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-17828 mfg: utp device support multi instance
Frank Li [Fri, 16 Mar 2018 05:55:19 +0000 (00:55 -0500)]
MLK-17828 mfg: utp device support multi instance

There are two udc devices supported in qxp b0
Change static varible to dynmatic malloc.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-17804-7: dts: add camera display on screen
Guoniu.Zhou [Tue, 20 Mar 2018 03:05:52 +0000 (11:05 +0800)]
MLK-17804-7: dts: add camera display on screen

Add camera display on screen support.

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
7 years agoMLK-17804-6: dts: rename dts for qm ov5640 mipi
Guoniu.Zhou [Thu, 15 Mar 2018 03:11:32 +0000 (11:11 +0800)]
MLK-17804-6: dts: rename dts for qm ov5640 mipi

Rename fsl-imx8qm-mek-mipi-csi2.dts -> fsl-imx8qm-mek-mipi-ov5640.dts
in order to avoid confusion.

Reviewed-by: robby.cai <robby.cai@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 0a47fd9cad688b1664c5c05063f74868f8ab61d4)

7 years agoMLK-17804-5: dts: rename dts file for qxp ov5640 mipi
Guoniu.Zhou [Thu, 15 Mar 2018 03:02:42 +0000 (11:02 +0800)]
MLK-17804-5: dts: rename dts file for qxp ov5640 mipi

Rename fsl-imx8qxp-mek-mipi-csi2 -> fsl-imx8qxp-mek-mipi-ov5640.dts
,in order to avoid confusion.

Reviewed-by: robby.cai <robby.cai@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 5bf58c289a045808a1dd575c588f8a0bf13d832e)

7 years agoMLK-17804-4: dts: change gpio pin for qxp mipi csi
Guoniu.Zhou [Wed, 14 Mar 2018 11:20:32 +0000 (19:20 +0800)]
MLK-17804-4: dts: change gpio pin for qxp mipi csi

Replace mipi gpio pins with generic gpio pins.

Reviewed-by: sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d6ce2512611822178b71bef3d5a566491b8fc146)

7 years agoMLK-17804-3: dts: change gpio pin for qm ov5640 sensor
Guoniu.Zhou [Wed, 14 Mar 2018 11:01:01 +0000 (19:01 +0800)]
MLK-17804-3: dts: change gpio pin for qm ov5640 sensor

Because ov5640 need power and rest pin, so replace mipi
csi gpio with generic gpio controller pins.

Reviewed-by: sandor.yu <sand.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit b2bca258493d10028beb127480c58e66400465fb)

7 years agoMLK-17804-2: dts: change gpio pin for qm mipi csi
Guoniu.Zhou [Wed, 14 Mar 2018 10:34:59 +0000 (18:34 +0800)]
MLK-17804-2: dts: change gpio pin for qm mipi csi

Replace mipi csi gpio pin with generic gpio pin.

Reviewed-by: sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 36b7f6948052d4687fb11b86ec0403869133fc80)

7 years agoMLK-17804-1: dts: fix ISI and MIPI CSI power domain can't enter lp mode
Guoniu.Zhou [Wed, 14 Mar 2018 09:53:05 +0000 (17:53 +0800)]
MLK-17804-1: dts: fix ISI and MIPI CSI power domain can't enter lp mode

MIPI CSI power domain can not enter low power mode because gpio of
mipi csi module occupy the resource, but camera sensor always use
the gpio, so making gpio of gpio3 controlloer replace mipi csi gpio
to control sensor EN and RESET pins.

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d1a018e1fca614f963c17c155f1a42abcce19bdf)

7 years agoMLK-17790-2: CI_PI: add system and runtime suspend/resume
Guoniu.Zhou [Tue, 13 Mar 2018 10:08:16 +0000 (18:08 +0800)]
MLK-17790-2: CI_PI: add system and runtime suspend/resume

1. For QXP, after system suspend and resume, parent of pixel
and per clk will drop, so driver need to restore it. The rate
of pixel and per clk also will miss, so driver have to set it
in resume callback again.

2. I have to power off CI_PI subsystem power domain in resume
callback, otherwise setting clock parent will fail.

3. Driver need free gpio resouce after device do not use it.

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 986098a52e62b89d6f6f7afdb75d17d77649db59)

7 years agoMLK-17790-1: dts: add clocks for CI_PI subsystme
Guoniu.Zhou [Tue, 13 Mar 2018 10:03:02 +0000 (18:03 +0800)]
MLK-17790-1: dts: add clocks for CI_PI subsystme

Because QXP will drop parent clock info of CI_PI SS
after system suspend/resume, so driver need to record
the relationship of clocks.

Reviewed-by: sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d4b94c2b128850bed8ec4c00ce0c0e3f86a05fcd)

7 years agoMLK-17741-3: dts: add dt for ov5640 mipi interface
Guoniu.Zhou [Mon, 12 Mar 2018 01:58:21 +0000 (09:58 +0800)]
MLK-17741-3: dts: add dt for ov5640 mipi interface

Add ov5640 mipi interface support for 8QM.

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 2035e300549ad2d04f09771868a216bb49197034)

7 years agoMLK-17741-2: media: add ov5640 mipi driver
Guoniu.Zhou [Fri, 9 Mar 2018 08:19:37 +0000 (16:19 +0800)]
MLK-17741-2: media: add ov5640 mipi driver

Add driver for ov5640 mipi csi interface.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 860dab368735dcbf248da7b74163ce6048a57514)

7 years agoMLK-17741-1: sensor: add dts for ov5640 mipi interface
Guoniu.Zhou [Fri, 9 Mar 2018 08:07:41 +0000 (16:07 +0800)]
MLK-17741-1: sensor: add dts for ov5640 mipi interface

Add device tree file for ov5640 mipi csi interface.

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4ab38076eeb53756a80ad9f182a9e9177098a373)

7 years agoMLK-17230-12: camera: fixed enum frame interval issue
Guoniu.Zhou [Tue, 6 Feb 2018 03:34:13 +0000 (11:34 +0800)]
MLK-17230-12: camera: fixed enum frame interval issue

when enum frame interval, kernel will be panic. It caused by
an null pointer, so correct the subdev data structure pointer.

ov5640 only support 15fps when mode is 1080P, so add this info
when user enum frame interval.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4089120ce5fbcb253728a23102a62c849b71c88b)

7 years agoMLK-17230-11: dts: disable mjpeg decoder and encoder
Guoniu.Zhou [Mon, 5 Feb 2018 10:23:27 +0000 (18:23 +0800)]
MLK-17230-11: dts: disable mjpeg decoder and encoder

Disable mjpeg decoder and encoder.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 8aac8c4e9cb1778c057ce4170b7c1395aaaf6f1d)

7 years agoMLK-17230-10: mipi_csi: add some subdev ops for compatibility
Guoniu.Zhou [Mon, 5 Feb 2018 08:58:52 +0000 (16:58 +0800)]
MLK-17230-10: mipi_csi: add some subdev ops for compatibility

In order to use the same unit test for both mipi csi and parallel
csi, add pad and video subdev ops in mipi csi driver.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit db9ba4cf63351453fb820270b7ece4d597c49072)

7 years agoMLK-17230-9: max9286: delete redundant 15fps support
Guoniu.Zhou [Mon, 5 Feb 2018 08:50:08 +0000 (16:50 +0800)]
MLK-17230-9: max9286: delete redundant 15fps support

Delete redundant 15fps statements because max9286 does not
support.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 88089e8a6dd5f0d06c7c61562f5a1942840f23e3)

7 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

7 years agoMLK-17230-7: defconfig: enable CI_PI and ov5640 as bulit-in
Guoniu.Zhou [Mon, 5 Feb 2018 08:04:16 +0000 (16:04 +0800)]
MLK-17230-7: defconfig: enable CI_PI and ov5640 as bulit-in

Enable CI_PI and ov5640 as built-in.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit b212fb24351cb4d629161926c0a0a852cdae18f1)

7 years agoMLK-17230-6: sensor: add driver for ov5640 camera sensor
Guoniu.Zhou [Mon, 5 Feb 2018 07:58:39 +0000 (15:58 +0800)]
MLK-17230-6: sensor: add driver for ov5640 camera sensor

Add version3.0 driver for ov5640 camera sensor. It works on DVP
mode

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 64d7dd18ac3c768480df8390ab02a35142a220cd)

7 years agoMLK-17230-5: CI_PI: enable CI_PI SS
Guoniu.Zhou [Mon, 5 Feb 2018 07:43:23 +0000 (15:43 +0800)]
MLK-17230-5: CI_PI: enable CI_PI SS

Add driver for CI_PI controller.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 980ac5f965bd8e94cce8a8c3fa78b1062dbd1727)

7 years agoMLK-17230-4: CI_PI: add dts file for CI_PI SS
Guoniu.Zhou [Mon, 5 Feb 2018 07:26:34 +0000 (15:26 +0800)]
MLK-17230-4: CI_PI: add dts file for CI_PI SS

Add pinmux setting for CI_PI and bridge connection between
CI_PI and camera sensor.

Enable CI_PI and camera sensor ov5640.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 45ba6a1d8303724df9d0934c2eebd385a6c36690)

7 years agoMLK-17230-3: CI_PI: add device nodes for CI_PI SS
Guoniu.Zhou [Mon, 5 Feb 2018 07:17:23 +0000 (15:17 +0800)]
MLK-17230-3: CI_PI: add device nodes for CI_PI SS

Add clock and power domain device nodes for CI_PI subsystem.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 825392c25d2f3d430a877fc34e5268a4bd0324f0)

7 years agoMLK-17230-2: CI_PI: add power domain names for CI_PI ss
Guoniu.Zhou [Mon, 5 Feb 2018 07:12:58 +0000 (15:12 +0800)]
MLK-17230-2: CI_PI: add power domain names for CI_PI ss

Add power domain macro names for CI_PI subsystem.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit fd8318f4455ceafda963681ce05effd0ad81d714)

7 years agoMLK-17230-1: CI_PI: register clocks for CI_PI ss
Guoniu.Zhou [Mon, 5 Feb 2018 06:52:07 +0000 (14:52 +0800)]
MLK-17230-1: CI_PI: register clocks for CI_PI ss

Register clocks for CI_PI subsystem.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d29308ec4fa29addd049c114520d7628e9e921d7)

7 years agoMLK-17843 rtc: rtc-imx-rpmsg: fix alarm enable function
Anson Huang [Tue, 20 Mar 2018 07:25:51 +0000 (15:25 +0800)]
MLK-17843 rtc: rtc-imx-rpmsg: fix alarm enable function

Add missing enable parameter for alarm enable function,
without correct parameter, the "enable" value is a random
value in memory and M4 may disable alarm unexpectedly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-17815-2 ata: imx: imx8qm: configure phy impedance ratio
Richard Zhu [Tue, 13 Mar 2018 09:14:07 +0000 (17:14 +0800)]
MLK-17815-2 ata: imx: imx8qm: configure phy impedance ratio

- To save power consumption, PHY related CLKs can be
gated off after the configurations are done.
- The impedance ratio should be configured refer to
differnet REXT values.
0x6c <--> REXT valuse is 85Ohms
Default values 0x80 <--> REXT value is 100Ohms.
- IMX8QM_HSIO_PHY_X1_APB_CLK is mandatory required when
access SATA PHY registers. Change the power domain to SATA.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-17815-1 dts: arm64: imx8qm: add sata phy region
Richard Zhu [Tue, 13 Mar 2018 09:11:57 +0000 (17:11 +0800)]
MLK-17815-1 dts: arm64: imx8qm: add sata phy region

Add the extra imx8qm sata phy register region,
and the clock phy_apbclk, mandatory required to
access phy registers.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-17829-2 ARM64: imx8mscale: add s3508 touch support in device tree
Haibo Chen [Mon, 12 Mar 2018 10:57:48 +0000 (18:57 +0800)]
MLK-17829-2 ARM64: imx8mscale: add s3508 touch support in device tree

Default disable this touch.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17829 touchscreen: Add synaptics_dsx S3508 i2c touch driver
Haibo Chen [Mon, 5 Mar 2018 09:46:15 +0000 (17:46 +0800)]
MLK-17829 touchscreen: Add synaptics_dsx S3508 i2c touch driver

Add S3508 touch driver support.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17674-4: driver/crypto: CAAM add support for 7ulp
Silvano di Ninno [Fri, 16 Mar 2018 13:49:57 +0000 (14:49 +0100)]
MLK-17674-4: driver/crypto: CAAM add support for 7ulp

Add support for imx7ulp SoC.

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
7 years agoMLK-17674-2: CAAM SM : get base address from device tree
Silvano di Ninno [Fri, 16 Mar 2018 13:48:10 +0000 (14:48 +0100)]
MLK-17674-2: CAAM SM : get base address from device tree

Remove hard coded value for base physical address.
Use device tree to get this value.

i.MX8 with seco is still not address since CAAM uses a private bus
to access secure memory

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
7 years agoMLK-17674-1: sm_store remove CONFIG_OF
Silvano di Ninno [Fri, 16 Mar 2018 13:46:28 +0000 (14:46 +0100)]
MLK-17674-1: sm_store remove CONFIG_OF

I.MX linux only works with device tree support
No need to keep code without CONFIG_OF

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
7 years agoMLK-17819 ARM: imx7ulp: update iomux header for i.MX7ULP B0 silicon
Fugang Duan [Thu, 15 Mar 2018 09:36:29 +0000 (17:36 +0800)]
MLK-17819 ARM: imx7ulp: update iomux header for i.MX7ULP B0 silicon

- Update iomux header for i.MX7ULP B0 silicon.
- Keep the pin func name prefix name is "IMX7ULP_" that align with
  upstreaming kernel.
- Align the pin func name with header file for all dts files.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Shenwei Wang <shenwei.wang@nxp.com>
7 years agoMLK-17787 clk: imx: gate-scu: fix return code
Peng Fan [Tue, 13 Mar 2018 07:43:53 +0000 (15:43 +0800)]
MLK-17787 clk: imx: gate-scu: fix return code

The sc api error code is not compatible with Linux error code,
directly returning the sc api error code to caller is wrong.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-17803 drm/imx: dpu: kms: Correct the way to do DPR manual/auto mode switch
Liu Ying [Wed, 14 Mar 2018 06:10:13 +0000 (14:10 +0800)]
MLK-17803 drm/imx: dpu: kms: Correct the way to do DPR manual/auto mode switch

The DPR works in manual mode for the first frame and we need to
switch it to auto mode so that auto shadow load mechanism works.
The designers require us to switch the DPR manual mode to auto mode
directly for display controllers instead of using the DPR control
done irq handler, because the irq will not come in some cases(which
leads to shadow load failure).  Finer switch operations on DPR
register bits are needed for SW_SHADOW_LOAD_SEL, SHADOW_LOAD_EN,
RUN_EN and REPEAT_EN.  Also, for overlay planes, we need to wait for
a frame additionally in the "on-the-fly" cases to make sure the
switch is successful.  In all, this patch should be able to address
frame dropping and screen tearing issue(due to the shadow load
failure) when users play video on overlay planes.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-17802 drm/imx: dpu: plane: Remove pixel formats unsupported by DPR
Liu Ying [Wed, 14 Mar 2018 03:07:42 +0000 (11:07 +0800)]
MLK-17802 drm/imx: dpu: plane: Remove pixel formats unsupported by DPR

The RGB888/BGR888/NV16/NV61/NV24/NV42 pixel formats are not supported
by DPR.  They cannot get the benefits(i.e., tile resolving and
underrun-proof) from the prefetch engines.  Also, 16bit and 32bit
RGB pixel formats are widely used by GUI, while NV12 pixel format
is the only pixel format supported by VPU.  Thus, it makes little
sense to support the pixel formats which are not supported by DPR.
Another idea is that removing the pixel formats makes the driver
a bit simpler since we don't have to deal with the cases in which
prefetch engines are bypassed.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoRevert "MLK-17750: drm/imx: ldb: Fix build on imx6/7"
Leonard Crestez [Wed, 14 Mar 2018 12:39:28 +0000 (14:39 +0200)]
Revert "MLK-17750: drm/imx: ldb: Fix build on imx6/7"

This reverts commit 414fba94a0f0cbc0ca6c7f445908aa86288a178f.

7 years agoMLK-17799: ARM64: dts: restruct audio power domain tree
Shengjiu Wang [Wed, 14 Mar 2018 07:47:12 +0000 (15:47 +0800)]
MLK-17799: ARM64: dts: restruct audio power domain tree

There is dedicate resource id for audio clocks (PLL_0, PLL_1,
AUDIO_CLK_0, AUDIO_CLK_1), the scfw need user to enable the power
of resource before using it.  The audio clock may used by all
audio devices, but the kernel only allow register one power-domains
for each device note.

So the solution is to add parent-child relationship for them

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-17798: ARM64: dts: configure IOMUXD_COMP_CTL_GPIO_1V8_3V3_GPIORHB
Shengjiu Wang [Wed, 14 Mar 2018 07:25:46 +0000 (15:25 +0800)]
MLK-17798: ARM64: dts: configure IOMUXD_COMP_CTL_GPIO_1V8_3V3_GPIORHB

The ESAI and SPDIF pin are in enet bank, the board is using 3.3v,
so we need to configure the PSW_OVR to zero, whose default setting
is for 2.5V.

Signed-off-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-17796: hdp: Remove duplicate define variable cur_mode
Sandor Yu [Wed, 14 Mar 2018 02:45:10 +0000 (10:45 +0800)]
MLK-17796: hdp:  Remove duplicate define variable cur_mode

variable cur_mode have define in struct of imx_hdp.video.
so remove it in stuct imx_hdp.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17794: ASoC: fsl: Add SND_SOC_IMX_CDNHDMI back
Shengjiu Wang [Wed, 14 Mar 2018 02:44:15 +0000 (10:44 +0800)]
MLK-17794: ASoC: fsl: Add SND_SOC_IMX_CDNHDMI back

The FB_MX8_HDMI is removed, the dependency is changed
to DRM_IMX_HDP.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
7 years agoMLK-11780 PCI: imx: correct some type mistakes
Richard Zhu [Fri, 9 Mar 2018 05:50:29 +0000 (13:50 +0800)]
MLK-11780 PCI: imx: correct some type mistakes

- They should be bitwise logic, not the boolean logic.
- Correct the error return values.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-17792: arm64: configs: i.MX8QM flexspi power domain fix
Han Xu [Tue, 13 Mar 2018 19:56:51 +0000 (14:56 -0500)]
MLK-17792: arm64: configs: i.MX8QM flexspi power domain fix

fix the flexspi power domain for i.MX8QM.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-17750: drm/imx: ldb: Fix build on imx6/7
Leonard Crestez [Fri, 9 Feb 2018 14:54:55 +0000 (16:54 +0200)]
MLK-17750: drm/imx: ldb: Fix build on imx6/7

This code is enabled in upstream imx_v6_v7_defconfig but fails to build
because of sc api calls. Fix this by adding ifdef checks to pixel_link
code.

These calls are already guarded at runtime with checks for devtype
pixel_link_valid_quirks so the empty ifdefed functions will never get
called anyway.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17579 ARM64: dts: correct the pad setting for imx8 usdhc
Haibo Chen [Fri, 9 Feb 2018 10:02:18 +0000 (18:02 +0800)]
MLK-17579 ARM64: dts: correct the pad setting for imx8 usdhc

according to IC suggestion, usdhc clock pad need to be configed as
input/output mode, for other usdhc pad, including the strobe pad, need
to be configed as normal mode.

This patch do the change on the imx8qxp and imx8qm board.

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17782 dma: fsl-edma-v3: fix issue reported by Coverity
Robin Gong [Mon, 12 Mar 2018 18:03:09 +0000 (02:03 +0800)]
MLK-17782 dma: fsl-edma-v3: fix issue reported by Coverity

Fix below issue reported by Coverity, actually, don't need this
condition check here, remove it.

CID undefined (#1 of 1): Wrong operator used (CONSTANT_EXPRESSION_RESULT)operator_confusion:
(16UL /* 1UL << 4 */) | (__u16)(__le16)tcd->csr is always 1/true regardless of the values of its operand.
This occurs as the logical first operand of "&&".

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-17684-3: drm/mxsfb: Add support for new pixel formats in eLCDIF
Mirela Rabulea [Wed, 7 Mar 2018 08:48:21 +0000 (10:48 +0200)]
MLK-17684-3: drm/mxsfb: Add support for new pixel formats in eLCDIF

Add support for the following pixel formats:
16 bpp: RG16 ,BG16, XR15, XB15, AR15, AB15
Set the bus format based on input from the user and panel capabilities.
Save the bus format in crtc->mode.private_flags, the DSI will use it.
Use drm_get_format_name instead of locally defined fourcc_to_str.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
7 years agoMLK-17684-2: drm/bridge: nwl-dsi: Let CRTC dictate the final bus format
Mirela Rabulea [Wed, 7 Mar 2018 08:45:29 +0000 (10:45 +0200)]
MLK-17684-2: drm/bridge: nwl-dsi: Let CRTC dictate the final bus format

Use the bus format that was established by CRTC in
crtc->mode.private_flags.
This will be available during enable phase.

The DSI host will be configured via interface_color_coding
and pixel_format (DPI-2 interface ports).
Previously the interface_color_coding was hardcoded to 24-bit.

Set the DSI pixel format before it is necessary in
nwl_dsi_get_bit_clock, during imx_nwl_dsi_enable.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
7 years agoMLK-17684-1: drm/panel: rm67191: Add support for new bus formats
Mirela Rabulea [Wed, 7 Mar 2018 08:41:31 +0000 (10:41 +0200)]
MLK-17684-1: drm/panel: rm67191: Add support for new bus formats

Do not hardcode pixel_format to 0x77 but calculate it from dsi->format.
Report all the supported bus formats in get_modes:
        MEDIA_BUS_FMT_RGB888_1X24
        MEDIA_BUS_FMT_RGB666_1X18
        MEDIA_BUS_FMT_RGB565_1X16
Change pixelclock from 120 to 132 MHz, or 16 bpp formats will not work.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
7 years agoMLK-17583-2: arm: imx: Fix imx6sl cpuidle build fail without CONFIG_SOC_IMX6SLL
Leonard Crestez [Fri, 9 Feb 2018 14:35:59 +0000 (16:35 +0200)]
MLK-17583-2: arm: imx: Fix imx6sl cpuidle build fail without CONFIG_SOC_IMX6SLL

Fixes commit 91558864ab21 ("MLK-13344-05 ARM: imx: Add cpuidle support on imx6sll")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
7 years agoMLK-17583-1: arm: imx: Fix ifdef check on imx6sll_lpddr2_freq_change
Leonard Crestez [Fri, 9 Feb 2018 14:11:42 +0000 (16:11 +0200)]
MLK-17583-1: arm: imx: Fix ifdef check on imx6sll_lpddr2_freq_change

Fixes commit e9f330efbe16 ("MLK-13344-04 ARM: imx: Add busfreq support on imx6sll")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
7 years agoMGS-3691 fix gpu kernel panic in cache invalidate
Xianzhong [Mon, 12 Mar 2018 19:12:17 +0000 (03:12 +0800)]
MGS-3691 fix gpu kernel panic in cache invalidate

kernel panic when run opencl cts test_buffers on mScale850D,
use get_user and put_user to touch and validate user memory,

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMMIOT-30 staging: android: uapi: add secure_ion.h
Olivier Masse [Thu, 1 Feb 2018 14:02:12 +0000 (15:02 +0100)]
MMIOT-30 staging: android: uapi: add secure_ion.h

Signed-off-by: Olivier Masse <olivier.masse@nxp.com>
7 years agoMMIOT-35-1 arm64: dts: imx8mq drm: create dts for drm purpose
Antoine Bouyer [Wed, 17 Jan 2018 16:47:28 +0000 (17:47 +0100)]
MMIOT-35-1 arm64: dts: imx8mq drm: create dts for drm purpose

Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
7 years agoMMIOT-35-1 arm64: dts: imx8mq: add dts node pointers
Antoine Bouyer [Thu, 7 Sep 2017 14:41:02 +0000 (16:41 +0200)]
MMIOT-35-1 arm64: dts: imx8mq: add dts node pointers

These pointers are required for drm dts

Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
7 years agoDocumentation: add fsl-heap and imx-ion-pool docs
Antoine Bouyer [Wed, 7 Feb 2018 15:12:56 +0000 (16:12 +0100)]
Documentation: add fsl-heap and imx-ion-pool docs

Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
7 years agodevicetree: add linux,ion-heap-unmapped compatible
Antoine Bouyer [Wed, 7 Feb 2018 15:10:55 +0000 (16:10 +0100)]
devicetree: add linux,ion-heap-unmapped compatible

Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
7 years agoMMIOT-6-2 android: ion: add carveouts for Freescale i.MX8MQ DCSS and VPU
Hervé Fache [Thu, 7 Sep 2017 14:41:02 +0000 (16:41 +0200)]
MMIOT-6-2 android: ion: add carveouts for Freescale i.MX8MQ DCSS and VPU

Signed-off-by: Hervé Fache <herve.fache@nxp.com>
Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
MMIOT-6-2 android: ion: Minor changes for readability

Signed-off-by: Alexandre Jutras <alexandre.jutras@nxp.com>
7 years agostaging/ion: fix unmapped heap conditional support
Etienne Carriere [Mon, 18 Sep 2017 09:54:27 +0000 (11:54 +0200)]
staging/ion: fix unmapped heap conditional support

Fixes: 7c7d9c446252 "staging/ion: CONFIG_ION_UNMAPPED_HEAP conditions unmapped heap"

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Joakim Bech <joakim.bech@linaro.org>
(cherry picked from commit bf829aa7c001c085a47c715e04cb3c347b1a38f8
 linaro repo https://github.com/linaro-swg/linux.git
 tag optee-v4.9-20171005)

7 years agostaging/ion: ARM64 supports ION_UNMAPPED_HEAP
Etienne Carriere [Mon, 18 Sep 2017 09:54:19 +0000 (11:54 +0200)]
staging/ion: ARM64 supports ION_UNMAPPED_HEAP

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Joakim Bech <joakim.bech@linaro.org>
(cherry picked from commit 916d9f36e107c37a88cb15924e0da8c5a572f90a
 linaro repo https://github.com/linaro-swg/linux.git
 tag optee-v4.9-20171005)

7 years agostaging/ion: CONFIG_ION_UNMAPPED_HEAP conditions unmapped heap
Etienne Carriere [Fri, 8 Sep 2017 11:56:26 +0000 (13:56 +0200)]
staging/ion: CONFIG_ION_UNMAPPED_HEAP conditions unmapped heap

Condition ION unmapped heap implementation to architectures that
currently support it. ARM is one of these.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
(cherry picked from commit 7c7d9c446252829aa138c87c47a937e2a3b4fd26
 linaro repo https://github.com/linaro-swg/linux.git
 tag optee-v4.9-20171005)

7 years agoion: fix unmapped heap test settings **not for mainline**
Etienne Carriere [Thu, 24 Aug 2017 13:44:46 +0000 (15:44 +0200)]
ion: fix unmapped heap test settings **not for mainline**

If one enables ION_DUMMY_UNMAPPED_HEAP without providing the target
unmapped heap configuration settings (physical base address and size),
the kernel cannot build. This situation occurs in Linux test build
cases, i.e running the allmodconfig configuration.

This change overcomes the issue by providing default null settings for
both ION_DUMMY_UNMAPPED_BASE and ION_DUMMY_UNMAPPED_SIZE.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit ac0c2c26b9819c5e95d56cb2d8937de0357eecaa
 linaro repo https://github.com/linaro-swg/linux.git
 tag optee-v4.9-20171005)

7 years agoion: unmapped heap support in ion dummy driver **not for mainline**
Etienne Carriere [Thu, 23 Mar 2017 13:03:05 +0000 (14:03 +0100)]
ion: unmapped heap support in ion dummy driver **not for mainline**

Add configuration ION_DUMMY_UNMAPPED_HEAP to enable optional definition
of a statically defined "unmapped" heap for test purpose: kernel config
must provide the memory pool base address and byte size.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
(cherry picked from commit 961993fde60ebd06715d1433f8eb265471a0f38c
 linaro repo https://github.com/linaro-swg/linux.git
 tag optee-v4.9-20171005)