linux.git
7 years agoMLK-17362-04 bcmdhd: fix build warning for .reg_notifier callback
Fugang Duan [Thu, 11 Jan 2018 09:08:54 +0000 (17:08 +0800)]
MLK-17362-04 bcmdhd: fix build warning for .reg_notifier callback

drivers/net/wireless/bcmdhd/wl_cfg80211.c: In function 'wl_setup_wiphy':
drivers/net/wireless/bcmdhd/wl_cfg80211.c:8253:28: warning: assignment from incompatible pointer type
  wdev->wiphy->reg_notifier = wl_cfg80211_reg_notifier;

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17362-03 ARM: imx_v7_defconfig: enable configs for QCA9377-3
Fugang Duan [Fri, 3 Nov 2017 09:01:45 +0000 (17:01 +0800)]
MLK-17362-03 ARM: imx_v7_defconfig: enable configs for QCA9377-3

Add some necessary configs for qualcomm wifi QCA9377-3.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17362-02 arm: dts: imx7ulp-evk: add qualcomm Qca9377-3 bt wifi support
Fugang Duan [Fri, 3 Nov 2017 05:40:18 +0000 (13:40 +0800)]
MLK-17362-02 arm: dts: imx7ulp-evk: add qualcomm Qca9377-3 bt wifi support

Add qualcomm Qca9377-3 bt wifi support for i.MX7ULP B0 chip
EVK RevA3 board.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17362-01 Changes for wireless and cfg80211 for v4.9.11 support
Nakul Kachhwaha [Tue, 28 Feb 2017 06:17:01 +0000 (11:47 +0530)]
MLK-17362-01 Changes for wireless and cfg80211 for v4.9.11 support

[Patch] Pulling the following commits and some general changes
from custom v3.10 kernel for supporting qcacld2.0 on kernel v4.9.11.
1. cfg80211: Using new wiphy flag WIPHY_FLAG_DFS_OFFLOAD
When flag WIPHY_FLAG_DFS_OFFLOAD is defined, the driver would handle
all the DFS related operations. Therefore the kernel needs to ignore
the DFS state that it uses to block the userspace calls to the driver
through cfg80211 APIs. Also it should treat the userspace calls to
start radar detection as a no-op.

Please note that changes in util.c is not picked up explicitly.
Kernel v4.9.11 uses wrapper cfg80211_get_chans_dfs_required which takes
care of this change.

Change-Id: I9dd2076945581ca67e54dfc96dd3dbc526c6f0a2
IRs-Fixed: 202686

2. New db.txt from git/sforshee/wireless-regdb.git
CONFIG_CFG80211_INTERNAL_REGDB is enabled in build. This causes
kernel warn messages as db.txt is empty. A new db.txt is added
from:
git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git

IRs-Fixed: 202686

3. Picked up the declaration and definition of the function
cfg80211_is_gratuitous_arp_unsolicited_na

Change-Id: I1e4083a2327c121073226aa6b75bb6b5b97cec00
CRs-fixed: 1079453

Signed-off-by: Nakul Kachhwaha <nkachh@codeaurora.org>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-15070-4: ARM64: defconfig: build in sound card for audio board of mscale
Shengjiu Wang [Thu, 18 Jan 2018 05:00:48 +0000 (13:00 +0800)]
MLK-15070-4: ARM64: defconfig: build in sound card for audio board of mscale

build in AK4458, AK5558, AK4497

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15070-3: ARM64: dts: enable audio codec on the audio board of mscale
Shengjiu Wang [Thu, 18 Jan 2018 04:55:42 +0000 (12:55 +0800)]
MLK-15070-3: ARM64: dts: enable audio codec on the audio board of mscale

Enable the AK4458, AK5558, and AK4497 with mode 0. For ak4497 use
same SAI interface with AK4458, so move ak4497 device node to
a separate dts.

The AK4458 support maximum 16 channels, the AK5558 support maximum 8
channels, AK4497 is for stereo.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15070-2: ASoC: fsl: Add machine driver for AK4497
Daniel Baluta [Mon, 31 Jul 2017 10:57:43 +0000 (13:57 +0300)]
MLK-15070-2: ASoC: fsl: Add machine driver for AK4497

This glues SAI interface with AK4497 DAC codec on i.MX boards.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15070-1: ASoC: codecs: Add support for AK4497 DAC
Daniel Baluta [Mon, 31 Jul 2017 10:56:30 +0000 (13:56 +0300)]
MLK-15070-1: ASoC: codecs: Add support for AK4497 DAC

AK4497 is a 32-bit 2ch DAC, supporting up to 6 types
of digital filters and accepts up to 768kHz PCM data
and 22.4MHz DSD data.

This is based on original code received from Asahi Kasei
with the following modifications:

* there is now a .component_driver inside snd_soc_codec_driver holding
  the controls, dapm_widgets and dap_routes.
* Remove akdbgprt
* Use module_i2c_driver
* Add NXP copyright
* Use symbolic names for registers
* Fix coding style issues
* fix function parameters indentation
* remove multiple empty newlines
* convert C++ style comments to C style comments
* fix spaces and tabs at the end of the line.
* remove braces {} for single block statements
* Make pointers const
* Fix lines over 80 chars
* Don't initialize statics to 0
* Use usleep_range instead of msleep
* Fx vendor prefix
* Add DT bindings documentation for ak4497 codec
* Remove regmap default functions
* Use devm_kzalloc
* Fix MAX_REGISTERS value
* Add $self as module author
* Remove .owner field
* Make ak4497_init_reg return void

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15071-2: ASoC: fsl: Add machine driver for AK5558
Shengjiu Wang [Wed, 27 Dec 2017 06:54:52 +0000 (14:54 +0800)]
MLK-15071-2: ASoC: fsl: Add machine driver for AK5558

Add machine driver for i.MX boards that have AK5558 ADC attached to SAI.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15071-1: ASoC: codecs: Add AK5558 ADC driver
Mihai Serban [Tue, 13 Jun 2017 11:52:28 +0000 (14:52 +0300)]
MLK-15071-1: ASoC: codecs: Add AK5558 ADC driver

The AK555x series is a 32-bit, 768 kHz sampling, differential input A/D
converter for digital audio systems. The datasheet is available here:
https://www.akm.com/akm/en/file/datasheet/AK5558VN.pdf

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15033-2: ASoC: fsl: Add machine driver for AK4458
Mihai Serban [Tue, 11 Jul 2017 15:24:52 +0000 (18:24 +0300)]
MLK-15033-2: ASoC: fsl: Add machine driver for AK4458

Add machine driver for i.MX boards that have AK4458 DAC attached to SAI.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15033-1: ASoC: codecs: Add support for AK4458 DAC
Mihai Serban [Tue, 6 Jun 2017 09:12:08 +0000 (12:12 +0300)]
MLK-15033-1: ASoC: codecs: Add support for AK4458 DAC

The AK4458 is a 32-bit 8ch Premium DAC, its datasheet is available here:
https://www.akm.com/akm/en/file/datasheet/AK4458VN.pdf

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-17352 defconfig: imx_v7_defconfig: enable SIMv2 in defconfig
Gao Pan [Mon, 8 Jan 2018 09:11:20 +0000 (17:11 +0800)]
MLK-17352 defconfig: imx_v7_defconfig: enable SIMv2 in defconfig

To enable SIMv2 for imx6ul/imx7d, both CONFIG_MXC_SIMv2
and CONFIG_ARCH_MXC have to be enabled.

This patch enables these two config in imx_v7_defconfig for
SIMv2 support.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
7 years agoMLK-17319-3 defconfig: enable EMVSIM in defconfig
Gao Pan [Thu, 21 Dec 2017 06:54:53 +0000 (14:54 +0800)]
MLK-17319-3 defconfig: enable EMVSIM in defconfig

enable EMVSIM in defconfig

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
7 years agoMLK-17319-2 arm64: dts: add emvsim0 device node for imx8qm-mek
Gao Pan [Mon, 8 Jan 2018 08:59:04 +0000 (16:59 +0800)]
MLK-17319-2 arm64: dts: add emvsim0 device node for imx8qm-mek

add emvsim0 device node for imx8qm-mek to support EMVSIM

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
7 years agoMLK-17319-1 imx8: sim: add driver to support EMVSIM module
Gao Pan [Mon, 8 Jan 2018 09:10:31 +0000 (17:10 +0800)]
MLK-17319-1 imx8: sim: add driver to support EMVSIM module

The EMVSIM module is designed to facilitate communication to
Smart Cards compatible to the EMV ver4.3 standard and compatible
with ISO/IEC 7816-3 Standard.

This patch adds driver to support EMVSIM module for imx8.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
7 years agoMLK-17366-2 usb: cdns3: decrease autosuspend timeout
Peter Chen [Fri, 12 Jan 2018 07:26:12 +0000 (15:26 +0800)]
MLK-17366-2 usb: cdns3: decrease autosuspend timeout

Cadence3 low power sequence doesn't allow too much time gap
between xhci bus suspend and controller suspend,
otherwise, the disconnection will be seen between them.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17366-1 usb: cdns3: improve USB PHY operation
Peter Chen [Fri, 12 Jan 2018 07:23:44 +0000 (15:23 +0800)]
MLK-17366-1 usb: cdns3: improve USB PHY operation

Improve USB PHY operation, and keep 32K clock for RX detection
all the time, it can fix SS connection can't be recognition
from U3.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agousb: dwc3: Don't reinitialize core during host bus-suspend/resume
Manu Gautam [Wed, 27 Sep 2017 11:19:20 +0000 (16:49 +0530)]
usb: dwc3: Don't reinitialize core during host bus-suspend/resume

Driver powers-off PHYs and reinitializes DWC3 core and gadget on
resume. While this works fine for gadget mode but in host
mode there is not re-initialization of host stack. Also, resetting
bus as part of bus_suspend/resume is not correct which could affect
(or disconnect) connected devices.
Fix this by not reinitializing core on suspend/resume in host mode
for HOST only and OTG/drd configurations.

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit 689bf72c6e0dc97493ba14d82f6762456f8f244a)

7 years agoMLK-17399 ARM64: dts: imx8mq: enable usb3 link PM
Jun Li [Wed, 17 Jan 2018 16:16:57 +0000 (00:16 +0800)]
MLK-17399 ARM64: dts: imx8mq: enable usb3 link PM

Enable USB3 hardware link power management, so the link can enter
U1 and U2 if there is no data transfer if the deivce can support
them.

Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMLK-17385: dma: imx-sdma: update sdma script for multi fifo on SAI
Robin Gong [Tue, 16 Jan 2018 09:52:49 +0000 (17:52 +0800)]
MLK-17385: dma: imx-sdma: update sdma script for multi fifo on SAI

update sdma script for multi fifo SAI on i.mx8MQ.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-17368-4: drm: imx: dcss: add modifier checks
Laurentiu Palcu [Fri, 12 Jan 2018 13:23:38 +0000 (15:23 +0200)]
MLK-17368-4: drm: imx: dcss: add modifier checks

This patch activates modifiers in CRTC and adds checks in the
atomic_check() callback so that only the allowed modifiers are accepted.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17368-3: drm: imx: dcss: Add support for tiled formats
Laurentiu Palcu [Fri, 12 Jan 2018 13:18:51 +0000 (15:18 +0200)]
MLK-17368-3: drm: imx: dcss: Add support for tiled formats

This patch effectively enables DTRC module in DCSS to decode tiled
formats from VPU:
 * uncompressed G1;
 * uncompressed G2;
 * compressed G2;

Compressed G2 formats need to pass on the decompression table offsets,
by using the 'dtrc_dec_ofs' property. This is a 64 bit value like below:

64--------48----------32---------16---------0
|<- chroma table ofs ->|<- luma table ofs ->|

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17368-2: drm: imx: dcss: split dcss_ctxld_write
Laurentiu Palcu [Fri, 12 Jan 2018 11:56:58 +0000 (13:56 +0200)]
MLK-17368-2: drm: imx: dcss: split dcss_ctxld_write

In order for DTRC to work properly, we need to be able to write the DCTL
registers (to switch banks), just before activating CTXLD. However,
__dcss_ctxld_enable() function is usually called from irq context, or
whn the mutex is taken. Hence, create a function the can be called from
irq context.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17368-1: drm: add fourcc codes for Verisilicon tiled formats
Bing Song [Fri, 5 Jan 2018 06:33:51 +0000 (08:33 +0200)]
MLK-17368-1: drm: add fourcc codes for Verisilicon tiled formats

These formats will be used by VPU and DCSS.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMA-11120 Fix screen mess with colorful grids issue on mx6dl ard board
Richard Liu [Mon, 15 Jan 2018 17:22:43 +0000 (01:22 +0800)]
MA-11120 Fix screen mess with colorful grids issue on mx6dl ard board

The issue is reported on mx6dl ard board after add ion cacheable memory
support in patch "MA-10928 Add system contiguous heap to ion", root cause
is GPU will enable MMU when physical address large than 0x80000000.
ARD board has 2GB memory if not set base address GPU MMU will be enabled
and when GPU mapped address pass to 2D there will have problem. Fix the
issue by set phys_baseaddr=256M in mx6dl board dts, mx6q board already
set phys_baseaddr.

Change-Id: I11935900801ffe811a2c12f37ecbac13a34245f6
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
7 years agoMLK-17370 video: fbdev: mxc_edid: change '640x480' mode clock
Fancy Fang [Mon, 15 Jan 2018 07:34:13 +0000 (15:34 +0800)]
MLK-17370 video: fbdev: mxc_edid: change '640x480' mode clock

For the '640x480' cea mode, change the 'pixclock' from
39722 ps to 39683 ps to satisfy the imx7ulp hdmi display
requirement.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-17371 gpu: imx: dpu: framegen: Use better timeout value to wait for ENSTS
Liu Ying [Fri, 12 Jan 2018 09:42:21 +0000 (17:42 +0800)]
MLK-17371 gpu: imx: dpu: framegen: Use better timeout value to wait for ENSTS

The DPU spec tells us that we need to wait for all pending frames to
be completed when a display stream is disabled.  It turns out
that the hardcoded 60-microsecond timeout value is not enough for
some low refresh rate video modes, e.g., 1920x1080@24, which makes
the display stream be disabled incorrectly(leave the hardware an
incorrect machine status).  The SoC design indicates that there are
two pending frames to complete in the worst case.  This patch waits
for at most three frame duration(which is enough for sure) so that
the hardware may flush out all the pending frames.  In case the clock
subsystem provides us a pixel clock with wrong rate and causes the
timeout value be unreasonably long, we truncate it to wait for at
most three seconds.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-17369: soc:imx8qm/qxp: Add controls for display controller resets
Oliver Brown [Fri, 12 Jan 2018 16:56:11 +0000 (10:56 -0600)]
MLK-17369: soc:imx8qm/qxp: Add controls for display controller resets

"
commit cfdb9821531da523fd1f01536eb67c8b8451477f
Author: Oliver Brown <oliver.brown@nxp.com>
Date:   Tue Jan 2 07:46:06 2018 -0600

    dc: Add controls for display controller resets.
"

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
7 years agoMLK-17367 imx8: pm-domains: fix restore parent for clk_stat_may_lost case
Dong Aisheng [Fri, 12 Jan 2018 10:38:09 +0000 (18:38 +0800)]
MLK-17367 imx8: pm-domains: fix restore parent for clk_stat_may_lost case

imx8_rsrc_clk->parent may be cleared during last probe failure.
So we need explicitly call CLK APIs clk_get_parent to get the cached
parent for the later restore. Otherwise, it may reparent to NULL parent
which results in 0 clk rate.

Fixes: 05caa1390f88cb (" MLK-17363-1 imx8: pm-domain: fix clock parent restore issue after suspend/resume")
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-17275-15: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Remove dsi/lvds specific dts files
Robert Chiras [Tue, 9 Jan 2018 09:18:34 +0000 (11:18 +0200)]
MLK-17275-15: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Remove dsi/lvds specific dts files

Delete the dst files specific to dsi/lvds nodes for the 8QXP LPDDR4
platform.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-14: arm64: dts: fsl-imx8qm-lpddr4-arm2: Remove dsi/lvds specific dts files
Robert Chiras [Tue, 9 Jan 2018 09:13:27 +0000 (11:13 +0200)]
MLK-17275-14: arm64: dts: fsl-imx8qm-lpddr4-arm2: Remove dsi/lvds specific dts files

Delete the dst files specific to dsi/lvds nodes for the 8QM LPDDR4 platform.
Also, update the existing it6263 dts files accordingly.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-13: arm64: dts: fsl-imx8qxp-mek: Remove dsi/lvds specific dts files
Robert Chiras [Thu, 4 Jan 2018 12:43:45 +0000 (14:43 +0200)]
MLK-17275-13: arm64: dts: fsl-imx8qxp-mek: Remove dsi/lvds specific dts files

Delete the dst files specific to dsi/lvds nodes for the 8QXP MEK platform.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-12: arm64: dts: fsl-imx8qm-mek: Remove dsi/lvds specific dts files
Robert Chiras [Thu, 4 Jan 2018 12:41:49 +0000 (14:41 +0200)]
MLK-17275-12: arm64: dts: fsl-imx8qm-mek: Remove dsi/lvds specific dts files

Delete the dst files specific to dsi/lvds nodes for the 8QM MEK platform.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-11: dts: imx8qxp-lpddr4: Enable IT6263 and ADV7535
Robert Chiras [Tue, 9 Jan 2018 08:52:28 +0000 (10:52 +0200)]
MLK-17275-11: dts: imx8qxp-lpddr4: Enable IT6263 and ADV7535

Final step for the OF_DYNAMIC support: enable the LVDS and MIPI-DSI to
HDMI converter nodes by default in the main DTS file for each platform.
This patch enables these nodes for i.MX8QXP LPDDR4 board.
Also, use adi,dsi-channel = <1> for ADV7535, since the panel can only work
on channel 0. By using channel 1 for ADV7535, we can have them work
simultaneously: one on DSI0 and the other on DSI1.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-10: dts: imx8qm-lpddr4: Enable IT6263 and ADV7535
Robert Chiras [Mon, 8 Jan 2018 14:39:43 +0000 (16:39 +0200)]
MLK-17275-10: dts: imx8qm-lpddr4: Enable IT6263 and ADV7535

Final step for the OF_DYNAMIC support: enable the LVDS and MIPI-DSI to
HDMI converter nodes by default in the main DTS file for each platform.
This patch enables these nodes for i.MX8QM LPDDR4 board.
Also, use adi,dsi-channel = <1> for ADV7535, since the panel can only work
on channel 0. By using channel 1 for ADV7535, we can have them work
simultaneously: one on DSI0 and the other on DSI1.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-9: dts: imx8qxp-mek: Enable IT6263 and ADV7535
Robert Chiras [Thu, 4 Jan 2018 11:25:38 +0000 (13:25 +0200)]
MLK-17275-9: dts: imx8qxp-mek: Enable IT6263 and ADV7535

Final step for the OF_DYNAMIC support: enable the LVDS and MIPI-DSI
to HDMI converter nodes by default in the main DTS file for each
platform.
This patch enables these nodes for i.MX8QXP MEK board.
Also, use adi,dsi-channel = <1> for ADV7535, since the panel can
only work on channel 0. By using channel 1 for ADV7535, we can have them
work simultaneously: one on DSI0 and the other on DSI1.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17275-8: dts: imx8qm-mek: Enable IT6263 and ADV7535
Robert Chiras [Thu, 21 Dec 2017 12:19:15 +0000 (14:19 +0200)]
MLK-17275-8: dts: imx8qm-mek: Enable IT6263 and ADV7535

Final step for the OF_DYNAMIC support: enable the LVDS and MIPI-DSI to
HDMI converter nodes by default in the main DTS file for each platform.
This patch enables these nodes for i.MX8QM MEK board.
Also, use adi,dsi-channel = <1> for ADV7535, since the panel can only
work on channel 0. By using channel 1 for ADV7535, we can have them work
simultaneously: one on DSI0 and the other on DSI1.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17275-7: drm/bridge: adv7511: Add dsi-channel property
Robert Chiras [Thu, 21 Dec 2017 12:10:42 +0000 (14:10 +0200)]
MLK-17275-7: drm/bridge: adv7511: Add dsi-channel property

Add a new property "adi,dsi-channel" to allow the user specify the DSI
channel to be used when communicating with DSI peripheral.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17275-6: arm64: defconfig: Add support for OF_OVERLAY
Robert Chiras [Thu, 21 Dec 2017 09:34:56 +0000 (11:34 +0200)]
MLK-17275-6: arm64: defconfig: Add support for OF_OVERLAY

Enable CONFIG_OF_OVERLAY, so we can use the OF_DYNAMIC API in order to
dynamically reconfigure the devicetree at runtime, based on i2c probing.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17275-4: drm/imx: nwl_dsi-imx: Update driver for reconfig
Robert Chiras [Thu, 21 Dec 2017 09:14:16 +0000 (11:14 +0200)]
MLK-17275-4: drm/imx: nwl_dsi-imx: Update driver for reconfig

Initially, this driver was designed to work with NWL driver as a
drm_bridge and it is required for this to work, otherwise it will defer.
When CONFIG_OF_DYNAMIC is used, the NWL bridge can be disabled by it's
remote endpoint, it that endpoint is an i2c capable device and it fails
to find a physical device on the expected i2c address.
If the NWL drm_bridge is disabled, since this driver it is required by
the master DRM device, just do nothing, so the drm_encoder won't be
created. So, if the NWL drm_bridge is missing, this driver will just do
nothing, in order to not interfere with the other available devices
required by the DRM master.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17275-3: drm/bridge: nwl-dsi: Fix remove/detach
Robert Chiras [Thu, 21 Dec 2017 09:06:44 +0000 (11:06 +0200)]
MLK-17275-3: drm/bridge: nwl-dsi: Fix remove/detach

Add a check in detach function, so that the mipi_dsi_host_unregister
will occur only if the host was registered.
Also, remove the unnecessary calls to host_unregister from probe and
remove functions.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17275-2: drm/bridge: it6263: Add support for OF_DYNAMIC
Robert Chiras [Thu, 21 Dec 2017 09:04:22 +0000 (11:04 +0200)]
MLK-17275-2: drm/bridge: it6263: Add support for OF_DYNAMIC

When CONFIG_OF_DYNAMIC is used, and this driver is enabled in
devicetree, but fails to probe a physical i2c client, it should disable
it's remote endpoint, so that the DRM master device won't fail to bind
the other available devices.
Usually, the remote endpoint of this device is a DRM encoder. If a DRM
encoder fails to bind, the DRM master device will also fail to bind.
This is why, we should disable the encoder node dynamically in
devicetree.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17275-1: drm/bridge: adv7511: Add support for OF_DYNAMIC
Robert Chiras [Thu, 21 Dec 2017 08:59:20 +0000 (10:59 +0200)]
MLK-17275-1: drm/bridge: adv7511: Add support for OF_DYNAMIC

When CONFIG_OF_DYNAMIC is used, and this driver is enabled in
devicetree, but fails to probe a physical i2c client, it should disable
it's remote endpoint, so that the DRM master device won't fail to bind
the other available devices.
Usually, the remote endpoint of this device is a DRM encoder. If a DRM
encoder fails to bind, the DRM master device will also fail to bind.
This is why, we should disable the encoder node dynamically in
devicetree.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17363-2 imx8: pm-domain: clocks list should be initialized only once.
Ranjani Vaidyanathan [Wed, 10 Jan 2018 17:52:54 +0000 (11:52 -0600)]
MLK-17363-2 imx8: pm-domain: clocks list should be initialized only once.

The clocks list associated with a PD is the same across all devices
attached to the same PD. Re-initializing it each time a new device is
attached results in missing some clocks.

[ Aisheng: "Improve commit message" ]

Reviewed-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
7 years agoMLK-17363-1 imx8: pm-domain: fix clock parent restore issue after suspend/resume
Ranjani Vaidyanathan [Wed, 10 Jan 2018 17:51:26 +0000 (11:51 -0600)]
MLK-17363-1 imx8: pm-domain: fix clock parent restore issue after suspend/resume

Currently the clock parent actually is failed to be restored in power
domain driver due to the set_parent will bail out early as the clk core
already cached the same old parent.

Implement a CLK_SET_PARENT_NOCACHE flag in clk core and register all
SC mux clocks with this flag to make sure the clk core won't bypass
the SC clock parent setting.

[ Aisheng: "Add commit message" ]

Reviewed-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
7 years agoMLK-17280-2: arm64: dts: fsl-imx8qxp-mek: Add DSI panel reset-gpio
Robert Chiras [Fri, 5 Jan 2018 09:59:01 +0000 (11:59 +0200)]
MLK-17280-2: arm64: dts: fsl-imx8qxp-mek: Add DSI panel reset-gpio

Add the reset-gpio property for the DSI panels so that power ON/OFF can
work properly.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-17280-1: drm: panel: rm67191: Fix power on sequence
Robert Chiras [Fri, 5 Jan 2018 11:41:44 +0000 (13:41 +0200)]
MLK-17280-1: drm: panel: rm67191: Fix power on sequence

According to the vendor driver sample there is a sleep after the exit
sleep and display on commands, but it seems that these sleeps are only
causing stability issues when the display signal is sent to the panel,
so remove them.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMGS-3565 [#ccc] fix coverity issue 1477294
Yuchou Gan [Wed, 10 Jan 2018 18:14:44 +0000 (02:14 +0800)]
MGS-3565 [#ccc] fix coverity issue 1477294

unmap_attachment to free the sg_table when failed to call _DmabufAttach

Date: Jan 10, 2018
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
7 years agoMLK-17355-1: ASoC: fsl_mqs: Fix potential uninitialized pointer read
Viorel Suman [Tue, 9 Jan 2018 14:01:49 +0000 (16:01 +0200)]
MLK-17355-1: ASoC: fsl_mqs: Fix potential uninitialized pointer read

Initialize gpr_np in order to avoid potential unitialized
pointer read in the section following the "out:" label.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-17311-5 drm/imx: dpu: Configure prefetch for dpu blit
Meng Mingming [Wed, 27 Dec 2017 02:30:51 +0000 (10:30 +0800)]
MLK-17311-5 drm/imx: dpu: Configure prefetch for dpu blit

Configure prefetch with source frame info for dpu blit.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
7 years agoMLK-17311-4 gpu: imx: dpu: Configure dprc to enable prefetch
Meng Mingming [Wed, 27 Dec 2017 02:29:00 +0000 (10:29 +0800)]
MLK-17311-4 gpu: imx: dpu: Configure dprc to enable prefetch

Configure dprc to enable prefetch for dpu blit.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
7 years agoMLK-17311-3 drm,imx: Add struct drm_imx_dpu_frame_info
Meng Mingming [Wed, 27 Dec 2017 02:17:52 +0000 (10:17 +0800)]
MLK-17311-3 drm,imx: Add struct drm_imx_dpu_frame_info

Add struct drm_imx_dpu_frame_info.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
7 years agoMLK-17311-2 gpu: imx: imx8_dprc: No need to round up height to 64
Meng Mingming [Wed, 27 Dec 2017 02:11:36 +0000 (10:11 +0800)]
MLK-17311-2 gpu: imx: imx8_dprc: No need to round up height to 64

It's necessary to make DPR baddr lie on the alignment block,
but no need to round up height to 64.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
7 years agoMLK-17311-1 gpu: imx: dpu: common: Set SC_C_KACHUNK_CNT as 32
Meng Mingming [Wed, 27 Dec 2017 01:52:09 +0000 (09:52 +0800)]
MLK-17311-1 gpu: imx: dpu: common: Set SC_C_KACHUNK_CNT as 32

The SC_C_KACHUNK_CNT is for dpu blit and represents
how many cycle counts is need to trigger DPR after
DPU shadow being loaded. The initial value is 0x20,
and will change to 0 after the first frame if not set.
So it need be set with a value greater than 0x20.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
7 years agoMLK-17341-6: dts: update mipi csi i2c power domain name
Sandor Yu [Mon, 8 Jan 2018 03:57:31 +0000 (11:57 +0800)]
MLK-17341-6: dts: update mipi csi i2c power domain name

Update mipi csi i2c power domain name.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17341-5: imx8x: Rename imx8 mipi csi i2c power domain
Sandor Yu [Mon, 8 Jan 2018 03:55:33 +0000 (11:55 +0800)]
MLK-17341-5: imx8x: Rename imx8 mipi csi i2c power domain

Rename imx8x mipi csi i2c power domain.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17341-4: clk: Rename mipi csi i2c power domain name
Sandor Yu [Mon, 8 Jan 2018 03:53:51 +0000 (11:53 +0800)]
MLK-17341-4: clk: Rename mipi csi i2c power domain name

rename mipi csi i2c power domain name

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17341-3: dts: Add power up pin for imx8qxp
Sandor Yu [Thu, 4 Jan 2018 11:00:39 +0000 (19:00 +0800)]
MLK-17341-3: dts: Add power up pin for imx8qxp

Add gpio0_mipi_csi0 propriety.
Add power up pin for max9286.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17341-2: dts: Add mipi csi gpio propriety
Sandor Yu [Thu, 4 Jan 2018 09:20:27 +0000 (17:20 +0800)]
MLK-17341-2: dts: Add mipi csi gpio propriety

Add mipi csi0/csi1 GPIO propriety.
Add pinctrl setting for mipi_csi0/1 GPIO.
Add power up pin for max9286.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17341-1: max9286: Add power up pin setting
Sandor Yu [Thu, 4 Jan 2018 09:19:51 +0000 (17:19 +0800)]
MLK-17341-1: max9286: Add power up pin setting

Add power up pin setting for max9286 driver.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-17312-5 usb: cdns3: improve the role switch process
Peter Chen [Tue, 2 Jan 2018 06:45:15 +0000 (14:45 +0800)]
MLK-17312-5 usb: cdns3: improve the role switch process

Current design tries to switch role no matter it is a dual-role device
or a single-role device. It produces extra switch process, and have an
error message at console when tries to start a non-exist role.

In this commit, we do below changes
- The role switch work queue is only for dual-role or peripheral-only
device.
- For peripheral-only device, we need to switch role to CDNS3_ROLE_END
since we need to close vbus and turn off clocks at this role when the
cable is disconnected from the host; And we do noop when the external
cable indicates we are host.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17312-4 usb: cdns3: gadget: fix the recognition issue when connection before...
Peter Chen [Fri, 29 Dec 2017 08:43:59 +0000 (16:43 +0800)]
MLK-17312-4 usb: cdns3: gadget: fix the recognition issue when connection before load module

At imx8qm/imx8qxp A0 chip, there is a vbus toggle issue, so we need to
force the vbus as high before connection, otherwise, there will be endless
connect/disconnect interrupts for USB2 and causes enumeration failure.
The current work flow only cover this during the role switch, but omit
it when the connection has established at module probe routine.

This patch fixes it by moving force vbus operation to cdns_set_role to
cover both static and dynamic recognition issue.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17312-3 usb: cdns3: gadget: configure all endpoints before set configuration
Peter Chen [Wed, 27 Dec 2017 09:00:22 +0000 (17:00 +0800)]
MLK-17312-3 usb: cdns3: gadget: configure all endpoints before set configuration

Cadence IP has one limitation that all endpoints must be configured
(Type & MaxPacketSize) before setting configuration through hardware
register, it means we can't change endpoints configuration after
set_configuration.

In this patch, we add non-control endpoint through usb_ss->ep_match_list,
which is added when the gadget driver uses usb_ep_autoconfig to configure
specific endpoint; When the udc driver receives set_configurion request,
it goes through usb_ss->ep_match_list, and configure all endpoints
accordingly.

At usb_ep_ops.enable/disable, we only enable and disable endpoint through
ep_cfg register which can be changed after set_configuration, and do
some software operation accordingly.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17312-2 usb: cdns3: gadget: improve comments
Peter Chen [Wed, 27 Dec 2017 03:22:27 +0000 (11:22 +0800)]
MLK-17312-2 usb: cdns3: gadget: improve comments

Fix typos and some error comments

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17312-1 usb: cdns3: gadget: prepare setup packet buffer before receiving it
Peter Chen [Wed, 27 Dec 2017 03:09:11 +0000 (11:09 +0800)]
MLK-17312-1 usb: cdns3: gadget: prepare setup packet buffer before receiving it

At current setup packet handling flow, the setup packet buffer
is only prepared after the controller receives the setup packet,
then stores it at its internal buffer, and trigger DESCMIS interrupt
(Transfer descriptor missing) to prepare TRB for it.

The shortcoming of this design is there is an extra DESCMIS interrupt,
and consume more time on enumeration process. As an improvement,
we parepare setup buffer beforehand, it is prepared at below situations:
- After bus reset has finished.
- For non-data stage setup transfers, prepare it before sending ACK for
status stage.
- For data stage setup transfers, prepare it after data stage but
before sending ACK for status stage.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17344-2: ARM64: dts: add constraint-rate for hdmi of imx8qm
Shengjiu Wang [Fri, 5 Jan 2018 05:14:52 +0000 (13:14 +0800)]
MLK-17344-2: ARM64: dts: add constraint-rate for hdmi of imx8qm

In imx8qm the hdmi audio sound is breaking from time to time, the
reason is that the DPLL jitter issue cause that HDMI can't lock
this clock internally, that some audio data is dropped. It is
hardware issue, here we add software workaround.

We tried two method:
1. Changed Audio PLL setting to use non-fractional multiplier
(768MHz=24MHz*32). This setting is significantly improving HDMI Audio
but audio is still breaking from time to time.
2. Generated HDMI TX audio clock from external audio codec
(24MHz clock => SLSlice[0] => MCLKOUT => External CODEC ref clock to PLL
=> ESAI Audio clock => loopback to HDMI TX SAI => HDMI TX).
HDMI TX audio is clear.

The second method depends on external codec, for we want to keep
the independence of driver, so we use the method 1.

For method 1, we need to set a dedicate rate for HDMI, we use the
AUDIO_PLL1, but which is conflict with AMIX, so we disable AMIX in
hdmi dts and only support 48kHz for HDMI audio

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-17344-1: ASoC: imx-cdnhdmi: get constraint rate from dts
Shengjiu Wang [Fri, 5 Jan 2018 05:14:15 +0000 (13:14 +0800)]
MLK-17344-1: ASoC: imx-cdnhdmi: get constraint rate from dts

Constraint rate depends on the clock rata of cpu dai, which is
defined in dts, so we add constraint-rate property in dts, then
driver can get it.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-17258 ARM64: dts: add off-on-delay for usdhc vmmc-supply regulator
Haibo Chen [Fri, 22 Dec 2017 03:27:35 +0000 (11:27 +0800)]
MLK-17258 ARM64: dts: add off-on-delay for usdhc vmmc-supply regulator

For the slot support SD3.0 card, during system suspend, if plug out
the sd card, and insert another SD3.0 card, after system resume back,
SD3.0 card can't be recognized as SD3.0 card, just SD2.0 card.

This is because the time delay between vmmc regulator off and on is
too small. SD spec require the Card Vdd shall be lowered to less than
0.5v for a minimum period for 1ms. And the hardware regulator also need
some time to drop the Card Vdd from 3.3v to 0.5v. This patch add the
off-on-delay in vmmc-supply regulator adding the upper two limitation
into consideration.

This patch relay on the commit 878bff7648f5 ("MLK-14638-1 regulator:
fixed: add off_on_delay support").

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-17334: imx8: pm-domains: fix array overflow issue
Shengjiu Wang [Wed, 3 Jan 2018 10:22:03 +0000 (18:22 +0800)]
MLK-17334: imx8: pm-domains: fix array overflow issue

When the resource id is larger than 512, the wakeup_rsrc_id array
will overflow, then the resource may always power on.
So align the IRQ with resource number to fix the issue.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-17309-4: ASoC: fsl_hifi: fix crash issue when destination not align
Weiguang Kong [Tue, 26 Dec 2017 10:50:31 +0000 (18:50 +0800)]
MLK-17309-4: ASoC: fsl_hifi: fix crash issue when destination not align

When loading the codec libs in driver, if the destination is
not 4-bytes alignment when doing memset_hifi(), the driver
will print a warning message and the driver may crash in some
cases.

So by changing the memset() function and aligning the virtual address
based on the physical address to fix this issue.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-17309-3: ASoC: fsl_hifi: get free memory from hifi framework
Weiguang Kong [Tue, 26 Dec 2017 10:37:14 +0000 (18:37 +0800)]
MLK-17309-3: ASoC: fsl_hifi: get free memory from hifi framework

In order to manage the memory simply, all the memory which is
shared between hifi driver and hifi framework are managed by
hifi framework.

So when the driver wants to get free memory, it can send
"ICM_PI_LIB_MEM_ALLOC" command to hifi framework, then hifi
framework will return the address of available memory to
driver. When the driver wants to release the memory, it can
send "ICM_PI_LIB_MEM_FREE" command to hifi framework, the hifi
framework will mark this memory available.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-17309-2: ASoC: fsl_hifi: use new way to realize multi-codec
Weiguang Kong [Tue, 26 Dec 2017 10:57:27 +0000 (18:57 +0800)]
MLK-17309-2: ASoC: fsl_hifi: use new way to realize multi-codec

In current hifi driver, some resources are shared when multi
codec decodes together. When switching between multi-codec,
the hifi driver and framework need to save and restore the shared
resources,this will waster time and complicate the hifi driver.

So by distributing private resources for each codec to avoid
this problem. When the user space wants to enable a new codec,
it can send "HIFI4_CLIENT_REGISTER" command to hifi driver to apply
an available resource, the driver will send a client id to
user space. When the user space wants to release the resource,
it can send "HIFI4_CLIENT_UNREGISTER" command to hifi driver,
then the driver will mark this resource available.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-17309-1: uapi: mxc_hifi4: provide new interface for user space
Weiguang Kong [Tue, 26 Dec 2017 10:57:10 +0000 (18:57 +0800)]
MLK-17309-1: uapi: mxc_hifi4: provide new interface for user space

In order to avoid license problem of Cadence header files, these
license files has been wrappered into a library and new interface
has been abstracted to replace the interface of Cadence header
files.

So update the mxc_hifi4.h file to provide new interface for
user space to use.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-17332: ARM: imx: pm-rpmsg: remove workqueue delay
Robin Gong [Wed, 3 Jan 2018 05:51:59 +0000 (13:51 +0800)]
MLK-17332: ARM: imx: pm-rpmsg: remove workqueue delay

With the latest M4 image on i.mx7ULP, which assume life cycle rpmsg is the
first channel sending message during AP bootup, we should remove the delay
timing window which other rpmsg channel may fall in, otherwise, such rpmsg
channel may probe failed as pf1550 regulator rpmsg driver.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Tested-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMA-10971 [8M-EVK]system cannot resume with mipi display
guoyin.chen [Thu, 28 Dec 2017 13:20:45 +0000 (21:20 +0800)]
MA-10971 [8M-EVK]system cannot resume with mipi display

In andorid UI framework, we will send DRM_MODE_DPMS_OFF
to drm driver before we request kernel into suspend sate
And send DRM_MODE_DPMS_ON after we resume kernel. mxsfb_resume
should just recover the sate before kernel into suspend.
Otherwise the mxsfb->connector is reset for DRM_MODE_DPMS_OFF,
mxsfb drm driver have below kernel panic when resuming from suspend

Unable to handle kernel NULL pointer dereference at virtual address 000000f4
pgd = ffff8000aa8ea000
[000000f4] *pgd=00000000ea8e9003, *pud=00000000ea4d6003, *pmd=0000000000000000
Internal error: Oops: 96000006 [#1] PREEMPT SMP
Modules linked in: ath10k_pci ath10k_core ath
CPU: 2 PID: 2693 Comm: system_server Not tainted 4.9.68-00922-g707b2da-dirty #35
Hardware name: Freescale i.MX8MQ EVK (DT)
task: ffff8000b92d1b00 task.stack: ffff8000aad60000
PC is at mxsfb_crtc_enable+0xa4/0x538
LR is at mxsfb_crtc_enable+0x4dc/0x538
[<ffff00000871b5cc>] mxsfb_crtc_enable+0xa4/0x538
[<ffff00000871a6fc>] mxsfb_resume+0x68/0x84
[<ffff000008725f08>] platform_pm_resume+0x24/0x4c
[<ffff00000873271c>] dpm_run_callback+0x40/0x1f0
[<ffff0000087336b0>] device_resume+0xac/0x284
[<ffff000008734bec>] dpm_resume+0x11c/0x374
[<ffff00000873526c>] dpm_resume_end+0x14/0x28
[<ffff00000811e558>] suspend_devices_and_enter+0x134/0x2f8
[<ffff00000811ead0>] pm_suspend+0x3b4/0x678
[<ffff00000811ceec>] state_store+0x80/0x9c
[<ffff000008445068>] kobj_attr_store+0x14/0x24
[<ffff0000082c51d8>] sysfs_kf_write+0x40/0x50
[<ffff0000082c43e0>] kernfs_fop_write+0xb0/0x1e0
[<ffff000008242708>] vfs_write+0xac/0x1d0
[<ffff000008243be4>] SyS_write+0x50/0xb0
[<ffff000008082ef0>] el0_svc_naked+0x24/0x28

Change-Id: Ia2c4d0ef42e4a2761209fd678ace35804b40a387
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
7 years agoMLK-17320 arm: imx: update copyright for i.mx7ulp
Anson Huang [Wed, 27 Dec 2017 19:17:54 +0000 (03:17 +0800)]
MLK-17320 arm: imx: update copyright for i.mx7ulp

Correct copyright issue introduced by commit:
(468f38d MLK-17317 arm: imx: add no_console_suspend
support for i.mx7ulp vlls mode)

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-17317 arm: imx: add no_console_suspend support for i.mx7ulp vlls mode
Anson Huang [Wed, 27 Dec 2017 16:54:19 +0000 (00:54 +0800)]
MLK-17317 arm: imx: add no_console_suspend support for i.mx7ulp vlls mode

LPUART driver currently turns off clocks during device
suspend phase, but in i.MX7ULP platform low level suspend
routine, lpuart will be saved/restored during suspend/resume,
to avoid system hang caused by accessing lpuart registers
without clocks enable, add console_suspend_enabled check for
lpuart register save/restore.

SCG1 SOSCDIV register needs to be saved/restored anyway,
move it to asm code, all SCG1 registers will be restored
there.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Rviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agodrm: Pass CRTC ID in userspace vblank events
Ander Conselvan de Oliveira [Tue, 4 Apr 2017 16:52:21 +0000 (17:52 +0100)]
drm: Pass CRTC ID in userspace vblank events

With the atomic API, it is possible that a single commit affects
multiple crtcs. If the user requests an event with that commit, one
event will be sent for each CRTC, but it is not possible to distinguish
which crtc an event is for in user space. To solve this, the reserved
field in struct drm_vblank_event is repurposed to include the crtc_id
which the event is for.

The DRM_CAP_CRTC_IN_VBLANK_EVENT is added to allow userspace to query if
the crtc field will be set properly.

[daniels: Rebased, using Maarten's forward-port.]

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170404165221.28240-2-daniels@collabora.com
7 years agoMLK-17314-3 arm: dts: imx7ulp: update nmi irq number
Anson Huang [Wed, 27 Dec 2017 14:26:44 +0000 (22:26 +0800)]
MLK-17314-3 arm: dts: imx7ulp: update nmi irq number

On i.MX7ULP B0 chip, NMI irq number is changed,
update it to make VLLS/VLPS work.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17314-2 arm: imx: fix build warning
Anson Huang [Wed, 27 Dec 2017 12:25:58 +0000 (20:25 +0800)]
MLK-17314-2 arm: imx: fix build warning

Fix build warning introduced by below commit:
(556d2d5 MLK-16750-5: arm: imx: support using psci to handle power stuff)

arch/arm/mach-imx/pm-imx7ulp.c: In function 'imx7ulp_pm_common_init':
arch/arm/mach-imx/pm-imx7ulp.c:747:17: warning:
'sram_paddr' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17314-1 arm: imx: remove snvs pcc save/restore
Anson Huang [Wed, 27 Dec 2017 11:06:05 +0000 (19:06 +0800)]
MLK-17314-1 arm: imx: remove snvs pcc save/restore

On i.MX7ULP B0, SNVS is located in M4 domain, remove
snvs pcc save/restore to avoid imprecise abort after
resume:

Restarting tasks ... Unhandled fault:
imprecise external abort (0x1c06) at 0x00040000
pgd = b173c000
[00040000] *pgd=9169d835, *pte=00000000, *ppte=00000000
done.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-7 arm: dts: imx7ulp: update cpu set-points
Anson Huang [Tue, 26 Dec 2017 12:31:46 +0000 (20:31 +0800)]
MLK-17293-7 arm: dts: imx7ulp: update cpu set-points

According to datasheet Rev-D, on B0 part, below CPU
freq needs to be supported:

500MHz for RUN mode;
720MHz for HSRUN mode.

Update opp table accordingly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-6 cpufreq: imx7ulp: support new set-points
Anson Huang [Tue, 26 Dec 2017 12:25:52 +0000 (20:25 +0800)]
MLK-17293-6 cpufreq: imx7ulp: support new set-points

According to datasheet Rev-D, on B0 part, below CPU
freq needs to be supported:

500MHz for RUN mode;
720MHz for HSRUN mode.

To achieve best accurate frequency for CPU, adjust
SPLL's frequency for SPLL_PFD0 which is CPU's
clock source:

SPLL 528MHz -> SPLL_PFD0 500.2MHz;
SPLL 480MHz -> SPLL_PFD0 720MHz;

Remove CPU RUN/HSRUN mode switch, since it is implemented
as clock mux, whenever clock parent is switched, the
RUN/HSRUN mode will be changed accordingly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-5 clk: imx7ulp: adjust clk tree for B0 chip
Anson Huang [Tue, 26 Dec 2017 12:18:41 +0000 (20:18 +0800)]
MLK-17293-5 clk: imx7ulp: adjust clk tree for B0 chip

On i.MX7ULP B0 chip, snvs is located in M4 domain, remove
snvs clock from linux clock tree;

Use SMC PMCTRL RUNM field for ARM clock mux instead
of reserved register in SCG, as when CPU frequency changes,
RUNM field will switch between RUN and HSRUN, ARM clock
source will be changed accordingly, so RUNM can be used as
a clock mux.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-4 arm: dts: imx7ulp: remove snvs node
Anson Huang [Tue, 26 Dec 2017 12:17:42 +0000 (20:17 +0800)]
MLK-17293-4 arm: dts: imx7ulp: remove snvs node

On i.MX7ULP B0 chip, SNVS is located in M4 domain,
remove it from dtsi.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-3 arm: imx_v7_defconfig: enable rpmsg rtc by default
Anson Huang [Tue, 26 Dec 2017 11:00:56 +0000 (19:00 +0800)]
MLK-17293-3 arm: imx_v7_defconfig: enable rpmsg rtc by default

Enable rpmsg rtc by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-2 arm: dts: imx7ulp: add rpmsg rtc node
Anson Huang [Tue, 26 Dec 2017 10:59:55 +0000 (18:59 +0800)]
MLK-17293-2 arm: dts: imx7ulp: add rpmsg rtc node

Add rpmsg rtc node for i.MX7ULP.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-17293-1 rtc: add rpmsg rtc support for i.MX7ULP
Anson Huang [Tue, 26 Dec 2017 10:53:20 +0000 (18:53 +0800)]
MLK-17293-1 rtc: add rpmsg rtc support for i.MX7ULP

On i.MX7ULP B0 chip, SNVS is located on M4 domain,
all RTC related functions need to use RPMSG channel
to communicate with M4 to proceed hardware operation.

The RTC RPMSG channel index is 6.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMGS-2914-2 [#imx-587] [8QM/qxp] Disable depth compression
Yuchou Gan [Tue, 26 Dec 2017 15:54:37 +0000 (23:54 +0800)]
MGS-2914-2 [#imx-587] [8QM/qxp] Disable depth compression

Disable the depth compression will make gles cts fail. We will fix
this failure later. Temporarily Enable it so that wouldn't block the release.

Date: Dec 26, 2017
Signed-off-by Yuchou Gan yuchou.gan@nxp.com

7 years agoMLK-17290-06 arm64: dts: gpio: add mipi csi SS gpio clock and power domain
Fugang Duan [Wed, 20 Dec 2017 09:54:33 +0000 (17:54 +0800)]
MLK-17290-06 arm64: dts: gpio: add mipi csi SS gpio clock and power domain

GPIO in MIPI CSI SS also has its related ipg clock and power
domain, add them.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-17290-05 gpio: mxc: save and restore gpio controller registers when power off
Fugang Duan [Mon, 25 Dec 2017 09:44:28 +0000 (17:44 +0800)]
MLK-17290-05 gpio: mxc: save and restore gpio controller registers when power off

Save gpio controller registers before power off, and then restore these
registers after power on. There have two cases need to save/restore regs:
  a. If sub_irqs/sub_gpios are not free/released, device suspend() force
     runtime suspend and power domain off in suspended stage, it needs to
     keep the previous registers value after device resume back.
  b. If some sub_irqs set irq type just one time, then irqchip should restore
     the registers for correct irq type.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-17290-04 gpio: mxc: add runtime pm support
Fugang Duan [Tue, 19 Dec 2017 07:47:08 +0000 (15:47 +0800)]
MLK-17290-04 gpio: mxc: add runtime pm support

Add runtime pm support to automatically enable the ipg clock and power
domain if present.

To save power, suggest all sub-devices of the gpiochip/irq domain should
dynamically manage gpio/irq resouces like:
gpio:
gpiod_request()
... //set gpio direction
gpiod_free()
irq:
devm_request_irq() //=> module active
devm_free_irq() //=>module is non-active or runtime idle

Since the driver support irqchip and gpiochip, any irq/gpio resouce requested
by other modules the gpio controller clock and power domain should be enabled.
And the irqchip's parent's clock and power also should be enabled if irq resouce
requested.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-17290-03 drm/bridge: request/free irq in dynamical
Fugang Duan [Tue, 19 Dec 2017 05:36:00 +0000 (13:36 +0800)]
MLK-17290-03 drm/bridge: request/free irq in dynamical

Request/free irq in dynamical can runtime manage the irq domain's
clock and power if irq domain support runtime pm and manage its
clock in its pm callback.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Acked-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17290-02 i2c: imx-lpi2c: manage irq resource request/release in runtime pm
Fugang Duan [Thu, 21 Dec 2017 01:14:33 +0000 (09:14 +0800)]
MLK-17290-02 i2c: imx-lpi2c: manage irq resource request/release in runtime pm

Manage irq resource request/release in runtime pm to save irq domain's
power.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-17290-01 irqchip: imx-irqsteer: add runtime pm support
Fugang Duan [Thu, 21 Dec 2017 01:03:57 +0000 (09:03 +0800)]
MLK-17290-01 irqchip: imx-irqsteer: add runtime pm support

Add runtime pm to manage irqsteer clock and its power domain in system
idle and suspend status to save power.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
7 years agoMGS-3531 [#imx-865] fix gpu kernel panic issue
Xianzhong [Fri, 22 Dec 2017 20:56:32 +0000 (04:56 +0800)]
MGS-3531 [#imx-865] fix gpu kernel panic issue

it is reproduced easily with multiple es11 cts tests,
gpu kernel panic in function _ConvertLogical2Physical.

need remove mdl from global list before destroy map list,
this can prevent the wrong access on the freed map data.

Date: Dec 22, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMA-10617 [#imx-836] Fix CtsMediaTestCases module test uncompleted issue
Richard Liu [Wed, 20 Dec 2017 20:26:48 +0000 (04:26 +0800)]
MA-10617 [#imx-836] Fix CtsMediaTestCases module test uncompleted issue

CtsMediaTestCases module CTS test can't uncompleted due to native crash,
the crash is due to memory leak in drm gralloc, when total leak reach to
4GB it will report mmap fail and cause CTS thread crash.

Crash log:
12-02 08:14:51.982 1156 25401 E gralloc-viv: gralloc_vivante_lock#573: failed to mmap
12-02 08:14:51.982 1156 25401 E gralloc-viv: gralloc_lock#136: err=-25
12-02 08:14:51.982 1156 25401 E gralloc : gralloc_lock lock memory failed
12-02 08:14:51.982 1156 25401 W GraphicBufferMapper: lock(0xed4c2740, ...) failed: 5
12-02 08:14:51.982 1156 25401 F SoftwareRenderer: frameworks/av/media/libstagefright/
colorconversion/SoftwareRenderer.cpp:230 CHECK_EQ( 0,mapper.lock( buf->handle,
GRALLOC_USAGE_SW_WRITE_OFTEN, bounds, &dst)) failed: 0 vs. 5

Dec. 20, 2017
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
7 years agoMLK-17204-3 gpu: imx: dpu: Free command buffer when deinit
Meng Mingming [Mon, 25 Dec 2017 09:20:34 +0000 (17:20 +0800)]
MLK-17204-3 gpu: imx: dpu: Free command buffer when deinit

Free command buffer when deinit.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
7 years agoMLK-17257-2: drm: imx: dcss: use the WRSCL/RDSRC modules
Laurentiu Palcu [Tue, 19 Dec 2017 11:38:44 +0000 (13:38 +0200)]
MLK-17257-2: drm: imx: dcss: use the WRSCL/RDSRC modules

This patch makes the necessary changes so that, for downscaling ratios
more than 3:1 and up to 7:1 (for video) and 5:1 (for graphics), the
WRSCL/RDSRC path will be used. This way the DRAM bandwidth will be lower
and spread evenly across the frame time.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>