linux.git
7 years agoMLK-17014-3 ARM64: dts: imx8mq: move hdmi 'port@0' node to dtsi file
Fancy Fang [Tue, 28 Nov 2017 09:55:42 +0000 (17:55 +0800)]
MLK-17014-3 ARM64: dts: imx8mq: move hdmi 'port@0' node to dtsi file

It is better to put the hdmi 'port@0' node definition
to 'fsl-imx8mq.dtsi' file.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-17014-2 ARM64: dts: imx8mq: move 'display-subsystem' node to dtsi file
Fancy Fang [Tue, 28 Nov 2017 09:44:08 +0000 (17:44 +0800)]
MLK-17014-2 ARM64: dts: imx8mq: move 'display-subsystem' node to dtsi file

It is better to put the 'display-subsystem' node definition
to 'fsl-imx8mq.dtsi' file.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-17014-1 ARM64: dts: imx8mq: move 'dcss_disp0' node to dtsi file
Fancy Fang [Tue, 28 Nov 2017 09:32:21 +0000 (17:32 +0800)]
MLK-17014-1 ARM64: dts: imx8mq: move 'dcss_disp0' node to dtsi file

The 'dcss_disp0' node definition is better to be put
into the dcss node definition in 'fsl-imx8mq.dtsi'.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16671-8 - [i.MX8QXP/Malone]: Add vpu malone decoder
Zhou Peng-B04994 [Tue, 28 Nov 2017 09:45:24 +0000 (17:45 +0800)]
MLK-16671-8 - [i.MX8QXP/Malone]: Add vpu malone decoder

Fix compiler warning 'unused variable'

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
7 years agoMLK-16604-3 dt-bindings: usb: xhci: add usb3-resume-missing-cas property
Li Jun [Tue, 28 Nov 2017 14:25:07 +0000 (22:25 +0800)]
MLK-16604-3 dt-bindings: usb: xhci: add usb3-resume-missing-cas property

There is already one quirk for usb3 xhci flag XHCI_MISSING_CAS, for
those platform with OF we can use usb3-resume-missing-cas to enable
this quirk to work around usb3 resume from system sleep.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16604-2 arm64: dts: imx8mq: add usb3-resume-missing-cas for usb3
Li Jun [Tue, 28 Nov 2017 14:12:21 +0000 (22:12 +0800)]
MLK-16604-2 arm64: dts: imx8mq: add usb3-resume-missing-cas for usb3

Add usb3-resume-missing-cas property for imx8mq usb3 to work around
the usb3 resume if the usb3 device plugged in while in system sleep.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16604-1 usb: host: xhci-plat: add XHCI_MISSING_CAS quirk
Li Jun [Tue, 28 Nov 2017 13:43:18 +0000 (21:43 +0800)]
MLK-16604-1 usb: host: xhci-plat: add XHCI_MISSING_CAS quirk

i.MX8MQ USB3 host needs XHCI_MISSING_CAS quirk to warm reset the port to
enum the USB3 device plugged in while system sleep, as the port state is
stuck in polling mode after resume.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16820-5 dt-bindings: typec: add documentation for tcpci
Li Jun [Tue, 28 Nov 2017 11:18:44 +0000 (19:18 +0800)]
MLK-16820-5 dt-bindings: typec: add documentation for tcpci

TCPCI stands for typec port controller interface, its implementation
has full typec port control with power delivery support, it's a
standard i2c slave with GPIO input as irq interface, detail see spec
"Universal Serial Bus Type-C Port Controller Interface Specification
Revision 1.0, Version 1.1"

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16820-4 dt-bindings: typec: add basic typec properties
Li Jun [Tue, 28 Nov 2017 11:17:20 +0000 (19:17 +0800)]
MLK-16820-4 dt-bindings: typec: add basic typec properties

port-type is required for any typec port; default-role is only required
for drp; power source capable needs src-pdos; power sink capable needs
snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16820-3 arm64: dts: fsl-imx8qxp-mek: use sink-disable for typec
Li Jun [Thu, 23 Nov 2017 13:48:47 +0000 (21:48 +0800)]
MLK-16820-3 arm64: dts: fsl-imx8qxp-mek: use sink-disable for typec

As we need drp config for typec data role, so change the port type
to be drp and add a sink-disable property for it.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16820-2 staging: typec: tcpci: add sink_disable flag for source only power
Li Jun [Thu, 23 Nov 2017 13:44:36 +0000 (21:44 +0800)]
MLK-16820-2 staging: typec: tcpci: add sink_disable flag for source only power

As we need to use DRP config for data role, but the power role is source only,
so introduce a property sink-disable to avoid sink vbus command.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16820-1 staging: typec: tcpm: don't do source debounce if remote keep Rp
Li Jun [Wed, 15 Nov 2017 15:52:30 +0000 (23:52 +0800)]
MLK-16820-1 staging: typec: tcpm: don't do source debounce if remote keep Rp

While TRY.SRC, if the remote keeps the Rp and we also enable Rp,
there will be a disconnect, this disconnect should be ignored,
then either the remote further enable Rd before timeout to have
a succeed TRY.SRC, or TRY.SRC timeout and start to sink.

Signed-off-by: Li Jun <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-17012 ARM: dts: imx: update vdd_soc setpoint voltage on imx6sll
Bai Ping [Tue, 28 Nov 2017 07:58:28 +0000 (15:58 +0800)]
MLK-17012 ARM: dts: imx: update vdd_soc setpoint voltage on imx6sll

According to the latest datasheet(Rev. 0.2, 11/2017), the
VDD_SOC_IN voltage can be set to 1.15V always, no constrain
between VDD_SOC_IN and VDD_ARM_IN, so change the voltage
of VDD_SOC_IN for 996MHz setpoint to 1.175V as other setpoints.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14697 ARM: dts: imx: update the setpoint data of imx6sll
Bai Ping [Fri, 14 Apr 2017 07:57:41 +0000 (15:57 +0800)]
MLK-14697 ARM: dts: imx: update the setpoint data of imx6sll

According to the latest datasheet(Rev.0 4/2017), The voltage of
996MHz should be updated to 1.23V. For NXP's Pfuze PMIC chip, the
minimum voltage step is 25mV, we need to set the voltage of 996MHz
to 1.25V. In order to cover board tolerance and IR drop, we add
25mV margin. Then the 996MHz setpoint voltage is 1.275V.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 4d40b3a6149e53f60f3cc6a14da1f2ffc55efb8e)

7 years agoMLK-16942: dts: Remove disp_apb clock rate setting
Robert Chiras [Tue, 28 Nov 2017 07:53:44 +0000 (09:53 +0200)]
MLK-16942: dts: Remove disp_apb clock rate setting

The patch that moved the dcss node from fsl-imx8mq-evk.dts to
fsl-imx8mq.dtsi reverted Sandor's patch 8c9aa9e which removed the APB
clock from assigned-clocks, this way breaking the HDMI CEC
functionality.
This patch re-applies the changes made initially in 8c9aa9e.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-17005: linux-imx: serial: fsl_lpuart: Clear LOOP mode when requested
Abel Vesa [Mon, 27 Nov 2017 16:10:11 +0000 (18:10 +0200)]
MLK-17005: linux-imx: serial: fsl_lpuart: Clear LOOP mode when requested

The LOOP mode remained always set after first use.
If the ioctl tiocmset gets called with TIOCMBIC for TIOCM_LOOP,
UARTCTRL_LOOPS needs to be cleared in the LPUART control register.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16988: watchdog: imx8_wdt: stop watchdog while suspend
Robin Gong [Mon, 27 Nov 2017 03:12:42 +0000 (11:12 +0800)]
MLK-16988: watchdog: imx8_wdt: stop watchdog while suspend

Since watchdog on i.mx8 is a software watchdog in scfw side, it should be
stopped while kernel enter system suspend if watchdog fired. Otherwise,
unexpected watchdog reset will happen. Restore back if watchdog fired too.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16834-02 dts: Add display port only dts for imx8qm arm2
Sandor Yu [Thu, 16 Nov 2017 06:38:10 +0000 (14:38 +0800)]
MLK-16834-02 dts: Add display port only dts for imx8qm arm2

Add fsl-imx8qm-lpddr4-arm2-dp.dts for display port only.
Move hdmi sound propriety from fsl-imx8qm-lpddr4-arm2.dts
to fsl-imx8qm-lpddr4-arm2-dp.dts because hdmi sound should
enable with hdmi driver.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit c9db9489e7589c148f178056df22eda574b2c3ec)

7 years agoMLK-16946-4: hdp: Add mutex for mailbox access
Sandor Yu [Fri, 24 Nov 2017 09:59:00 +0000 (17:59 +0800)]
MLK-16946-4: hdp: Add mutex for mailbox access

Add mutex for mailbox access.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16946-3: dts: Add hdmi interrupt to iMX8MQ
Sandor Yu [Thu, 23 Nov 2017 04:24:23 +0000 (12:24 +0800)]
MLK-16946-3: dts: Add hdmi interrupt to iMX8MQ

Add hdmi interrupt to iMX8MQ dts.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16946-2: hdmi: Enable cable hotplug detect function
Sandor Yu [Thu, 23 Nov 2017 06:39:53 +0000 (14:39 +0800)]
MLK-16946-2: hdmi: Enable cable hotplug detect function

-Enable HDMI/DP cable hotplug detect function.
-Remove HPD polling thread function.
-Move HDMI/DP FW init and download function
before hdmi drm register.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16946-1: hdp: Reduce timeout counter for hdp functions
Sandor Yu [Thu, 23 Nov 2017 04:26:32 +0000 (12:26 +0800)]
MLK-16946-1: hdp: Reduce timeout counter for hdp functions

Reduce hdp function r/w timeout counter.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16973-10 arm64: dts: fsl-imx8qm-mek: Add JDI WUXGA LVDS panel support on LVDS1
Liu Ying [Fri, 24 Nov 2017 02:45:06 +0000 (10:45 +0800)]
MLK-16973-10 arm64: dts: fsl-imx8qm-mek: Add JDI WUXGA LVDS panel support on LVDS1

This patch adds JDI WUXGA LVDS panel(on LVDS1) support
for the i.MX8QM MEK platform.
Note that the i.MX8QM MEK board needs a hardware rework
to add a 0ohm resistor for R211 to make the PWM backlight
work for the panel.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-9 arm64: dts: fsl-imx8qm-lpddr4-arm2: Add JDI WUXGA LVDS panel support...
Liu Ying [Fri, 24 Nov 2017 02:43:43 +0000 (10:43 +0800)]
MLK-16973-9 arm64: dts: fsl-imx8qm-lpddr4-arm2: Add JDI WUXGA LVDS panel support on LVDS1

This patch adds JDI WUXGA LVDS panel(on LVDS1) support
for the i.MX8QM LPDDR4 ARM2 platform.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-8 arm64: dts: fsl-imx8qm-mek: Add LVDS0/1 PWM backlight support
Liu Ying [Fri, 24 Nov 2017 02:40:17 +0000 (10:40 +0800)]
MLK-16973-8 arm64: dts: fsl-imx8qm-mek: Add LVDS0/1 PWM backlight support

This patch adds LVDS0/1 PWM backlight support
for the i.MX8QM MEK platform.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-7 arm64: dts: fsl-imx8qm-lpddr4-arm2: Add LVDS0/1 PWM backlight support
Liu Ying [Fri, 24 Nov 2017 02:39:34 +0000 (10:39 +0800)]
MLK-16973-7 arm64: dts: fsl-imx8qm-lpddr4-arm2: Add LVDS0/1 PWM backlight support

This patch adds LVDS0/1 PWM backlight support
for the i.MX8QM LPDDR4 ARM2 platform.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-6 arm64: dtsi: fsl-imx8qm: Add lvds0/1_pwm nodes
Liu Ying [Fri, 24 Nov 2017 02:38:35 +0000 (10:38 +0800)]
MLK-16973-6 arm64: dtsi: fsl-imx8qm: Add lvds0/1_pwm nodes

This patch adds lvds0/1_pwm device tree nodes for the i.MX8QM SoC.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-5 arm64: defconfig: Build in generic PWM backlight driver
Liu Ying [Fri, 24 Nov 2017 05:56:56 +0000 (13:56 +0800)]
MLK-16973-5 arm64: defconfig: Build in generic PWM backlight driver

This patch builds in the generic PWM backlight driver.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-4 pwm: imx: Use ipg and per clks in ->config, ->enable and ->disable
Liu Ying [Thu, 23 Nov 2017 08:03:10 +0000 (16:03 +0800)]
MLK-16973-4 pwm: imx: Use ipg and per clks in ->config, ->enable and ->disable

For the i.MX8QM SoC, it turns out that both ipg and per clocks
are needed to be enabled when the PWM registers are configured.
Hence, we use the two clocks in the ->config, ->enable and
disable hooks.  For other SoCs unlike i.MX8QM, it could bring
some additional trivial power consumptions due to the additional
active ipg clock when PWM is enabled.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-3 arm64: defconfig: Build in DRM simple panel driver
Liu Ying [Fri, 24 Nov 2017 06:25:30 +0000 (14:25 +0800)]
MLK-16973-3 arm64: defconfig: Build in DRM simple panel driver

This patch builds in the DRM simple panel driver.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-2 drm/panel: simple: Add support for JDI TX26D202VM0BWA panel
Liu Ying [Mon, 20 Nov 2017 07:40:19 +0000 (15:40 +0800)]
MLK-16973-2 drm/panel: simple: Add support for JDI TX26D202VM0BWA panel

This patch adds support for Japan Display Inc. 10.1" TX26D202VM0BWA
WUXGA(1920x1200) TFT LCD panel with LVDS interface.
The panel has dual LVDS channels.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16973-1 dt-bindings: display: Add JDI TX26D202VM0BWA LCD panel bindings
Liu Ying [Fri, 24 Nov 2017 07:34:03 +0000 (15:34 +0800)]
MLK-16973-1 dt-bindings: display: Add JDI TX26D202VM0BWA LCD panel bindings

The JDI TX26D202VM0BWA LCD panel is a 10.1" panel
with a 1920x1200 (WUXGA) resolution.
The panel has dual LVDS channels.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16989-4 ARM64: dts: imx8mq: remove '_drm' postfix for all display nodes
Fancy Fang [Tue, 28 Nov 2017 02:46:45 +0000 (10:46 +0800)]
MLK-16989-4 ARM64: dts: imx8mq: remove '_drm' postfix for all display nodes

Since the display subsystem is using DRM framework by
default, it is unnecessary to keep '_drm' postfix in
the device node names anymore to indicate that they
are DRM devices.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16982 PCI: imx: fix the failure of the msi verification
Richard Zhu [Mon, 27 Nov 2017 05:06:15 +0000 (13:06 +0800)]
MLK-16982 PCI: imx: fix the failure of the msi verification

Failed to verify the MSI in the EP RC system.
Root cause: the MSI address is not fetched corretly.
The second port of iMX8MQ EVK board should be used
as EP port, not the first one.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
7 years agoMLK-16671-7 - [i.MX8QXP/Malone]: Add vpu malone decoder
Zhou Peng-B04994 [Tue, 28 Nov 2017 01:14:22 +0000 (09:14 +0800)]
MLK-16671-7 - [i.MX8QXP/Malone]: Add vpu malone decoder

Fix random hang issue, need to handle below cases:
- Image done and DBE done may not be triggered at the same time
- Software interrupt maybe overwritten on mulit-core environment

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
7 years agoMLK-17006: arm64: dts: fix the imx8qxp nand pin conflict with usdhc1
Han Xu [Mon, 27 Nov 2017 21:17:41 +0000 (15:17 -0600)]
MLK-17006: arm64: dts: fix the imx8qxp nand pin conflict with usdhc1

fix the pin conflict between nand and usdhc1 on imx8qxp validation
board.

BuildInfo:
 - SCFW daea284c, IMX-MKIMAGE 90fbac1a, ATF
 - U-Boot 2017.03-00713-g345bcc2

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16956: ASoC: fsl_asrc: fix error with S24_3LE format bitstream
Shengjiu Wang [Mon, 27 Nov 2017 02:51:49 +0000 (10:51 +0800)]
MLK-16956: ASoC: fsl_asrc: fix error with S24_3LE format bitstream

The error is "aplay: pcm_write:2023: write error: Input/output error"

query the caps of dma, then update the hw parameters according
the caps. for EDMA can't support 24bit sample, but we didn't
add any constraint, that cause issues.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-16989-3 ARM64: dts: imx8mq: remove unused device nodes
Fancy Fang [Mon, 27 Nov 2017 06:31:03 +0000 (14:31 +0800)]
MLK-16989-3 ARM64: dts: imx8mq: remove unused device nodes

The below legacy fbdev related device nodes are not
used anymore:

   a. dcss
   b. lcdif
   c. mipi_dsi
   d. hdmi

So remove them from IMX8MQ platform to make the dts
more clean.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16989-2 ARM64: dts: imx8mq: remove legacy fbdev dtbs
Fancy Fang [Mon, 27 Nov 2017 06:11:35 +0000 (14:11 +0800)]
MLK-16989-2 ARM64: dts: imx8mq: remove legacy fbdev dtbs

Remove below three dtbs related to legacy fbdev
on IMX8MQ platform:

   1. fsl-imx8mq-evk-4k.dtb
   2. fsl-imx8mq-evk-fbdev.dtb
   3. fsl-imx8mq-evk-lcdif-dsi.dtb

since the fbdev drivers are not supported and
maintained anymore.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16989-1 ARM64: dts: imx8mq-evk: correct the include dtb names
Fancy Fang [Mon, 27 Nov 2017 06:19:36 +0000 (14:19 +0800)]
MLK-16989-1 ARM64: dts: imx8mq-evk: correct the include dtb names

After changing the default dtb on IMX8MQ EVK platform
from 'fsl-imx8mq-evk-fbdev.dts' to 'fsl-imx8mq-evk.dts'
by commit '73590d0be046a0b7e051191eed8065a1e43da0af',
the dtbs included in 'fsl-imx8mq-evk-m4.dts' and
'fsl-imx8mq-evk-pcie1-m2.dts' should be also changed
to 'fsl-imx8mq-evk.dts'.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16953: drm: imx: dcss: Add propriety to change global alpha priority
Laurentiu Palcu [Fri, 24 Nov 2017 14:59:20 +0000 (16:59 +0200)]
MLK-16953: drm: imx: dcss: Add propriety to change global alpha priority

This patch adds 'use_global_alpha' property to the primary plane, so that
one can choose whether to use global alpha instead of per-pixel alpha,
when the framebuffer has per-pixel alpha.

Framebuffers that do not have per-pixel alpha will always use global
alpha.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-15473-8: crypto: caam: Disable CAAM JR1 according to SCFW update
Aymen Sghaier [Tue, 21 Nov 2017 17:31:35 +0000 (18:31 +0100)]
MLK-15473-8: crypto: caam: Disable CAAM JR1 according to SCFW update

  After CAAM JR1 has been moved to SECO,
 imx-sc-firmware commit 36ff24f36b56 ("Move CAAM JR1 to SECO FW."),
 Linux no longer boots and rises a kernel panic at "caam_probe".
  So the CAAM JR1 should be disabled in the device-tree.

Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Silvano Di Ninno <silvano.dininno@nxp.com>
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-16977-3 media: camera: refine the reset sequence for camera
Robby Cai [Fri, 24 Nov 2017 10:57:29 +0000 (18:57 +0800)]
MLK-16977-3 media: camera: refine the reset sequence for camera

adjust the init sequence for camera thus no rework will be required
for DVDD_1V5.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
7 years agoMLK-16977-2 media: v4l_cap: don't support suspend when camera is running
Robby Cai [Fri, 24 Nov 2017 10:52:54 +0000 (18:52 +0800)]
MLK-16977-2 media: v4l_cap: don't support suspend when camera is running

Don't support suspend/resume by checking if camera is running.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
7 years agoMLK-16977-1 media: v4l_cap: implement S_FMT ioctl
Robby Cai [Fri, 24 Nov 2017 10:39:13 +0000 (18:39 +0800)]
MLK-16977-1 media: v4l_cap: implement S_FMT ioctl

gsteamer uses S_FMT ioctl to set the resolution instead of using
S_PARM ioctl. The S_PARM ioctl depends on the capture mode which is
not in the common way.
This patch uses a common method to set the picture resulotion.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
7 years agoMLK-16954: drm: imx: dcss: adjust context loader trigger values
Laurentiu Palcu [Fri, 24 Nov 2017 13:03:28 +0000 (15:03 +0200)]
MLK-16954: drm: imx: dcss: adjust context loader trigger values

Apparently, when DCSS has to fight for data on the bus with other
processes, exists the risk for the scaler to freeze. Previous setting
used the documentation recommendation for setting the DB context loader
trigger time. Unfortunately, with that value, under high stress, the RGB
planes will go black and scaler will freeze.

This patch sets the SB/DB context loader triggers to a values
obtained through repeated tests that proved to provide the best user
experience (i.e. planes will not go black).

However, the underlining issue remains and HW needes to prioritize the
DCSS read operations.

With this workaround, under high stress, the RGB planes may experience
some flickering but they will not freeze.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMGS-3448: gpu-viv: fix 6.2.4 remaning issues
Xianzhong [Fri, 24 Nov 2017 14:57:33 +0000 (22:57 +0800)]
MGS-3448: gpu-viv: fix 6.2.4 remaning issues

include more GPU bug-fxings for Android DRM feature

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agodrm/edid: complete CEA modedb(VIC 1-107)
Shashank Sharma [Thu, 13 Jul 2017 15:33:08 +0000 (21:03 +0530)]
drm/edid: complete CEA modedb(VIC 1-107)

CEA-861-F specs defines new video modes to be used with
HDMI 2.0 EDIDs. The VIC range has been extended from 1-64 to
1-107.

Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now
to be able to parse new CEA modes using the existing methods, we have
to complete the modedb (VIC=65 onwards).

This patch adds:
- Timings for existing CEA video modes (from VIC=65 till VIC=92)
- Newly added 4k modes (from VIC=93 to VIC=107).

The patch was originaly discussed and reviewed here:
https://patchwork.freedesktop.org/patch/135810/

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
V2: Rebase
V3: Rebase
V4: Added native bit handling as per CEA-861-F spec (Ville)
V5: Fix timings for VIC 77:1920x1080 and 104:3840x2160p (Ville)
    Remove unnecessary paranthesis from function svd_to_vic (Ville)
    Added r-b (Neil)
V6: Rebase
V7: Fix indentation for modes from VIC 80

Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-3-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix up remaining formatting/indentation issues]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
(cherry picked from commit 8ec6e0755565192b328059b64f982adabbecda78)
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agovideo: Add new aspect ratios for HDMI 2.0
Shashank Sharma [Mon, 17 Oct 2016 12:04:39 +0000 (17:34 +0530)]
video: Add new aspect ratios for HDMI 2.0

HDMI 2.0/CEA-861-F introduces two new aspect ratios:
- 64:27
- 256:135

This patch adds enumeration for the new aspect ratios
in the existing aspect ratio list.

V2: rebase
V3: rebase
V4: Added r-b from Jose, Ack by Tomi

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1476705880-15600-4-git-send-email-shashank.sharma@intel.com
(cherry picked from commit a6e78b3e1406575323b30b65890ee3c29930fb27)
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16918: arm64: dts: fsl-imx8mq-evk: Fix dsi conflicts
Robert Chiras [Thu, 23 Nov 2017 12:31:43 +0000 (14:31 +0200)]
MLK-16918: arm64: dts: fsl-imx8mq-evk: Fix dsi conflicts

The MIPI-DSI nodes related to ADV7535 are in conflict with OV5640
MIPI-CSI camera, since they share the same address on the same i2c bus:
0x3c. In order to make DSI work with ADV7535 adapter, the OV5640 camera
needs to be disabled.
Also, for LCDIF (MXSFB), the irqsteer_dcss module needs to be disabled,
otherwise it will interfere in the suspend/resume routines.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-16750-7 arm: dts: add dedicated dts for OP-TEE
Peng Fan [Fri, 10 Nov 2017 05:59:49 +0000 (13:59 +0800)]
MLK-16750-7 arm: dts: add dedicated dts for OP-TEE

Add dedicated dts for OP-TEE.
The modification is about ocram partition. The default dtsi
use lower ocram area for low power things. But i.MX
chips TZASC could only protect OCRAM from high address to low address.
So modify the OCRAM space for OP-TEE.

The PSCI/OPTEE firmware node will be dynamically created in OP-TEE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16750-6 arm: imx7d: cpuidle: Fix missing decrement of master_lpi
Peng Fan [Thu, 27 Jul 2017 01:15:31 +0000 (09:15 +0800)]
MLK-16750-6 arm: imx7d: cpuidle: Fix missing decrement of master_lpi

This fixes commit ("MLK15034: ARM: cpuidle imx7d: Check
IPIs manually before LPI").

In this patch, also need to take care of psci part.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16750-5: arm: imx: support using psci to handle power stuff
Peng Fan [Thu, 2 Nov 2017 01:58:50 +0000 (09:58 +0800)]
MLK-16750-5: arm: imx: support using psci to handle power stuff

Support using PSCI to handle Power stuff.
Use PSCI to differentiate secure/non-secure kernel.
i.MX7 LPSR mode not implemented now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16750-4 clk: imx6sx: keep TZASC clock on
Peng Fan [Thu, 2 Nov 2017 01:56:36 +0000 (09:56 +0800)]
MLK-16750-4 clk: imx6sx: keep TZASC clock on

Keep TZASC clock on. With TEE enabled, TZASC enabled, if disable
tzasc clock, system may hang up.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16750-3 arm: imx6sx: busfreq: lock L2 cache instead of disabling it
Peng Fan [Thu, 2 Nov 2017 01:47:42 +0000 (09:47 +0800)]
MLK-16750-3 arm: imx6sx: busfreq: lock L2 cache instead of disabling it

In non-secure mode, L2 cache can NOT be disabled, lock
L2 cache instead of disabling it to avoid L2 cache
access DDR.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16750-2 arm: imx: busfreq: lock L2 cache instead of disabling it
Anson Huang [Thu, 30 Mar 2017 14:24:56 +0000 (22:24 +0800)]
MLK-16750-2 arm: imx: busfreq: lock L2 cache instead of disabling it

In non-secure mode, L2 cache can NOT be disabled, lock
L2 cache instead of disabling it to avoid L2 cache
access DDR.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Peng Fan<peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16750-1 arch: arm: imx_v7_defconfig Enable PSCI and TEE
Peng Fan [Thu, 2 Nov 2017 01:35:55 +0000 (09:35 +0800)]
MLK-16750-1 arch: arm: imx_v7_defconfig Enable PSCI and TEE

Default enable PSCI and TEE.
If no psci optee node in dts, it works as before.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agotee: optee: add const to tee_driver_ops and tee_desc structures
Bhumika Goyal [Thu, 29 Jun 2017 09:35:04 +0000 (15:05 +0530)]
tee: optee: add const to tee_driver_ops and tee_desc structures

Add const to tee_desc structures as they are only passed as an argument
to the function tee_device_alloc. This argument is of type const, so
declare these structures as const too.
Add const to tee_driver_ops structures as they are only stored in the
ops field of a tee_desc structure. This field is of type const, so
declare these structure types as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 96e72ddeec4546fda0e194298c2ee39e394a3ab7)

7 years agotee: tee_shm: Constify dma_buf_ops structures.
Arvind Yadav [Sat, 1 Jul 2017 12:26:06 +0000 (17:56 +0530)]
tee: tee_shm: Constify dma_buf_ops structures.

dma_buf_ops are not supposed to change at runtime. All functions
working with dma_buf_ops provided by <linux/dma-buf.h> work with
const dma_buf_ops. So mark the non-const structs as const.

File size before:
   text    data     bss     dec     hex filename
   2026     112       0    2138     85a drivers/tee/tee_shm.o

File size After adding 'const':
   text    data     bss     dec     hex filename
   2138       0       0    2138     85a drivers/tee/tee_shm.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 53e3ca5cee24f5fafe4e9ff5fe4b230e1a1b85ed)

7 years agotee: add ARM_SMCCC dependency
Arnd Bergmann [Wed, 10 May 2017 19:05:16 +0000 (21:05 +0200)]
tee: add ARM_SMCCC dependency

For the moment, the tee subsystem only makes sense in combination with
the op-tee driver that depends on ARM_SMCCC, so let's hide the subsystem
from users that can't select that.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
(cherry picked from commit e84188852a7239d7a144af12f7e5dac8fa88600b)

7 years agotee: optee: fix uninitialized symbol 'parg'
Jens Wiklander [Mon, 15 May 2017 09:09:28 +0000 (11:09 +0200)]
tee: optee: fix uninitialized symbol 'parg'

Fixes the static checker warning in optee_release().
error: uninitialized symbol 'parg'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit efb14036bd7f8914f721e1e82891d4ba617cc784)

7 years agotee: add forward declaration for struct device
Jerome Forissier [Wed, 31 May 2017 08:50:27 +0000 (10:50 +0200)]
tee: add forward declaration for struct device

tee_drv.h references struct device, but does not include device.h nor
platform_device.h. Therefore, if tee_drv.h is included by some file
that does not pull device.h nor platform_device.h beforehand, we have a
compile warning. Fix this by adding a forward declaration.

Submitted upstream, see link below.

Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-May/509790.html
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 2e26af92fd860371fd65a2c16306cce4508285a1)

7 years agotee: optee: interruptible RPC sleep
tiger-yu99 [Fri, 5 May 2017 16:20:32 +0000 (00:20 +0800)]
tee: optee: interruptible RPC sleep

Prior to this patch RPC sleep was uninterruptible since msleep() is
uninterruptible. Change to use msleep_interruptible() instead.

Signed-off-by: Tiger Yu <tigeryu99@hotmail.com>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit a9980e947ec97297e03d2332d6beff06f5131a98)

7 years agotee: optee: sync with new naming of interrupts
David Wang [Thu, 16 Feb 2017 08:43:44 +0000 (16:43 +0800)]
tee: optee: sync with new naming of interrupts

In the latest changes of optee_os, the interrupts' names are
changed to "native" and "foreign" interrupts.

Signed-off-by: David Wang <david.wang@arm.com>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 39e6519a3f135b143dee4d4fb5ac0438e75454e2)

7 years agooptee: support asynchronous supplicant requests
Jens Wiklander [Fri, 23 Dec 2016 12:13:39 +0000 (13:13 +0100)]
optee: support asynchronous supplicant requests

Adds support for asynchronous supplicant requests, meaning that the
supplicant can process several requests in parallel or block in a
request for some time.

Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260 pager=y/n)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit c0b5b087a78777155603b0eb68dd9f9ab971330c)

7 years agotee: add TEE_IOCTL_PARAM_ATTR_META
Jens Wiklander [Fri, 23 Dec 2016 12:13:34 +0000 (13:13 +0100)]
tee: add TEE_IOCTL_PARAM_ATTR_META

Adds TEE_IOCTL_PARAM_ATTR_META with can be used to indicate meta
parameters when communicating with user space. These meta parameters can
be used by supplicant support multiple parallel requests at a time.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Modified from: From: https://github.com/linaro-swg/linux.git
 Conflicts:
drivers/tee/tee_core.c
(cherry picked from commit 66d81fcf145fdc55322c0a11764c76a43d90ecad)

7 years agotee: add tee_param_is_memref() for driver use
Jens Wiklander [Fri, 23 Dec 2016 12:13:27 +0000 (13:13 +0100)]
tee: add tee_param_is_memref() for driver use

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 747f68059436ac55c330ebffc5176b79006aafcf)

7 years agotee: indicate privileged dev in gen_caps
Jens Wiklander [Thu, 16 Feb 2017 08:07:02 +0000 (09:07 +0100)]
tee: indicate privileged dev in gen_caps

Mirrors the TEE_DESC_PRIVILEGED bit of struct tee_desc:flags into struct
tee_ioctl_version_data:gen_caps as TEE_GEN_CAP_PRIVILEGED in
tee_ioctl_version()

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 627497c586eb6074f0241d772bd0b795b709f9ba)

7 years agotee: add kernel internal client interface **not for mainline**
Jens Wiklander [Thu, 19 Nov 2015 12:29:35 +0000 (13:29 +0100)]
tee: add kernel internal client interface **not for mainline**

Adds a kernel internal TEE client interface to be used by other drivers.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 860c46087c99c24073cc722b12c0017bb0ce0a79)

7 years agotee: new ioctl to a register tee_shm from a dmabuf file descriptor
Etienne Carriere [Thu, 27 Oct 2016 21:18:35 +0000 (23:18 +0200)]
tee: new ioctl to a register tee_shm from a dmabuf file descriptor

This change allows userland to create a tee_shm object that refers
to a dmabuf reference.

Userland provides a dmabuf file descriptor as buffer reference.
The created tee_shm object exported as a brand new dmabuf reference
used to provide a clean fd to userland. Userland shall closed this new
fd to release the tee_shm object resources. The initial dmabuf resources
are tracked independently through original dmabuf file descriptor.

Once the buffer is registered and until it is released, TEE driver
keeps a refcount on the registered dmabuf structure.

This change only support dmabuf references that relates to physically
contiguous memory buffers.

New tee_shm flag to identify tee_shm objects built from a registered
dmabuf: TEE_SHM_EXT_DMA_BUF. Such tee_shm structures are flagged both
TEE_SHM_DMA_BUF and TEE_SHM_EXT_DMA_BUF.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 41e21e5c405530590dc2dd10b2a8dbe64589840f)

7 years agoinclude/linux/arm-smccc.h: avoid sign extension problem
Jens Wiklander [Tue, 24 May 2016 11:16:44 +0000 (13:16 +0200)]
include/linux/arm-smccc.h: avoid sign extension problem

Prior to this patch the ARM_SMCCC_FAST_CALL constant was of an unsigned
type causing unwanted sign extension. This patch explicitly selects an
unsigned type for the constant.

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU Aarch64)
Reported-by: Saksham Jain <sakjain92@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From https://github.com/linaro-swg/linux.git
(cherry picked from commit 253e93086578d3f737cd16e79efb95cc6a833195)

7 years agoDocumentation: tee subsystem and op-tee driver
Jens Wiklander [Mon, 1 Jun 2015 14:15:25 +0000 (16:15 +0200)]
Documentation: tee subsystem and op-tee driver

Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 6a6e77006fcdba89708214556c6d560323e850fc)

7 years agotee: add OP-TEE driver
Jens Wiklander [Tue, 14 Apr 2015 12:33:20 +0000 (14:33 +0200)]
tee: add OP-TEE driver

Adds a OP-TEE driver which also can be compiled as a loadable module.

* Targets ARM and ARM64
* Supports using reserved memory from OP-TEE as shared memory
* Probes OP-TEE version using SMCs
* Accepts requests on privileged and unprivileged device
* Uses OPTEE message protocol version 2 to communicate with secure world

Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3)
Tested-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 4fb0a5eb364d239722e745c02aef0dbd4e0f1ad2)

7 years agotee: generic TEE subsystem
Jens Wiklander [Wed, 11 Mar 2015 13:39:39 +0000 (14:39 +0100)]
tee: generic TEE subsystem

Initial patch for generic TEE subsystem.
This subsystem provides:
* Registration/un-registration of TEE drivers.
* Shared memory between normal world and secure world.
* Ioctl interface for interaction with user space.
* Sysfs implementation_id of TEE driver

A TEE (Trusted Execution Environment) driver is a driver that interfaces
with a trusted OS running in some secure environment, for example,
TrustZone on ARM cpus, or a separate secure co-processor etc.

The TEE subsystem can serve a TEE driver for a Global Platform compliant
TEE, but it's not limited to only Global Platform TEEs.

This patch builds on other similar implementations trying to solve
the same problem:
* "optee_linuxdriver" by among others
  Jean-michel DELORME<jean-michel.delorme@st.com> and
  Emmanuel MICHEL <emmanuel.michel@st.com>
* "Generic TrustZone Driver" by Javier González <javier@javigon.com>

Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3)
Tested-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 967c9cca2cc50569efc65945325c173cecba83bd)

7 years agodt/bindings: add bindings for optee
Jens Wiklander [Thu, 21 May 2015 05:47:09 +0000 (07:47 +0200)]
dt/bindings: add bindings for optee

Introduces linaro prefix and adds bindings for ARM TrustZone based OP-TEE
implementation.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit c8bfafb1594435889b571b79325011e8b7fd087b)

7 years agoMLK-16947: ARM64: dts: imx8qxp: add assigned-clocks for audio node
Shengjiu Wang [Wed, 22 Nov 2017 08:07:21 +0000 (16:07 +0800)]
MLK-16947: ARM64: dts: imx8qxp: add assigned-clocks for audio node

add assigned-clocks for audio node, spdif and sai for the assigned
-clocks is bound with power-domains. if the clock is needed by
the device, should add it in dts.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-16949: arm64: dtsi: fsl-imx8mq: Reorganize dcss nodes
Robert Chiras [Mon, 20 Nov 2017 17:23:00 +0000 (19:23 +0200)]
MLK-16949: arm64: dtsi: fsl-imx8mq: Reorganize dcss nodes

Currently, the DCSS and HDMI DRM specific nodes are in
fsl-imx8mq-evk.dts file, while the old content of fsl-imx8mq-evk.dts file is in
fsl-imx8mq-evk-fbdev.dts.
Since, this creates confusion., move back the contents of
fsl-imx8mq-evk-fbdev.dts into fsl-imx8mq-evk.dts, and dcss_drm/hdmi_drm
nodes into main file: fsl-imx8mq.dtsi.
Therefore, the fbdev specific files will be derived from
fsl-imx8mq-evk-fbdev.dts, while the main DTS will be based on DRM
drivers which are define in fsl-imx8mq-evk.dts.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16943 mipi-csi: Add run time pm support
Robby Cai [Wed, 22 Nov 2017 10:58:59 +0000 (18:58 +0800)]
MLK-16943 mipi-csi: Add run time pm support

Add run time PM support for MIPI CSI (tested on iMX8MQ)

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-9 dts: add MIPI CSI2 support on iMX8MQ
Robby Cai [Wed, 22 Nov 2017 05:38:15 +0000 (13:38 +0800)]
MLK-16919-9 dts: add MIPI CSI2 support on iMX8MQ

on EVK board, the camera on MIPI CSI1 and CSI2 port shares the same I2C bus
and the camera has the same slave address. So it's not possible to enable
two ports at same time. The first port is enabled by default. Here to create
a separate dts file to enable second port.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-8 defconfig: add MIPI_CSI/Camera Support on iMX8MQ
Robby Cai [Tue, 21 Nov 2017 22:16:11 +0000 (06:16 +0800)]
MLK-16919-8 defconfig: add MIPI_CSI/Camera Support on iMX8MQ

Add MIPI_CSI/Camera Support on iMX8MQ EVK board

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-7 media: v4l2: capture: add handler for two-8bit-sensor mode
Robby Cai [Wed, 22 Nov 2017 03:32:08 +0000 (11:32 +0800)]
MLK-16919-7 media: v4l2: capture: add handler for two-8bit-sensor mode

Add handling to parse two-8bit-sensor mode

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-6 dts: add property 'fsl,two-8bits-sensor-mode' for CSI
Robby Cai [Wed, 22 Nov 2017 03:22:15 +0000 (11:22 +0800)]
MLK-16919-6 dts: add property 'fsl,two-8bits-sensor-mode' for CSI

add property 'fsl,two-8bits-sensor-mode' for CSI on iMX8MQ

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ
Robby Cai [Tue, 21 Nov 2017 20:59:06 +0000 (04:59 +0800)]
MLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ

Add a new version (yet another version) driver for MIPI CSI2.
The reason we use a separate version is that PHY setting is quit different,
and the existing MIPI CSI2 driver uses new Media Framework, while the camera
and CSI driver not yet. After convert all drivers to new Media Framework,
consider combine these two versions.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-4 dts: iMX8MQ: add csi/mipi_csi/camera support
Robby Cai [Tue, 21 Nov 2017 20:01:01 +0000 (04:01 +0800)]
MLK-16919-4 dts: iMX8MQ: add csi/mipi_csi/camera support

Add CSI bridge, MIPI CSI, and camera support

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-3 driver: clk: add CLKO2 for iMX8MQ
Robby Cai [Tue, 21 Nov 2017 19:40:31 +0000 (03:40 +0800)]
MLK-16919-3 driver: clk: add CLKO2 for iMX8MQ

Add CLKO2 for i.MX8MQ
Set parent for MIPI CSI1/2 CORE/PHY_REF/ESC

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-2 media: v4l2: csi: refine the mipi mode check method
Robby Cai [Tue, 21 Nov 2017 19:32:34 +0000 (03:32 +0800)]
MLK-16919-2 media: v4l2: csi: refine the mipi mode check method

check the property 'fsl,mipi-mode' before parse 'csi-mux-mipi' since
some SoC don't need to set mux for it.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16919-1 ARM: dts: add a new property to indicate mipi mode for csi
Robby Cai [Tue, 21 Nov 2017 19:16:21 +0000 (03:16 +0800)]
MLK-16919-1 ARM: dts: add a new property to indicate mipi mode for csi

in previous version, the property 'csi-mux-mipi' is used to set GPR for MIPI
mode, but on some SoC like iMX8MQ (reuse the CSI) there's no GPR MUX setting
for it.
Add a new property 'fsl,mipi-mode' and check this first for the mode.
If it's MIPI mode, then parse 'csi-mux-mipi'.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16942-2: dts: Remove disp_apb clock rate setting
Sandor Yu [Wed, 22 Nov 2017 07:24:06 +0000 (15:24 +0800)]
MLK-16942-2: dts: Remove disp_apb clock rate setting

disp_apb clock is hdmi core root.
It has enabled and configurated by ROM code and
clock rate should keep in 133MHz when device bootup.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 5dfa629c82af77408c8f0ed8f01a5e68e80899ba)

7 years agoMLK-16942-1: hdmi-cec: Update clock rate to 133MHz
Sandor Yu [Wed, 22 Nov 2017 07:22:12 +0000 (15:22 +0800)]
MLK-16942-1: hdmi-cec: Update clock rate to 133MHz

After apply HDMI FW ROM patch to mscale B0.
The HDMI core clock will run at 133MHz.
Update hdmi cec clock rate.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 4198c8f6677eff3e6e50ca17f3d1b7f6e6f8b8c3)

7 years agoMLK-16941: hdmi: check video mode with cmdline mode
Sandor Yu [Wed, 22 Nov 2017 10:29:31 +0000 (18:29 +0800)]
MLK-16941: hdmi: check video mode with cmdline mode

when EDID function is disabled, the cmdline mode is
the max support video mode.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 4bdf485762441578a50a1b1586777f1291dd32e5)

7 years agoMLK-16938 ARM64: dts: imx8: refine the imx8 dts
Richard Zhu [Wed, 22 Nov 2017 08:24:03 +0000 (16:24 +0800)]
MLK-16938 ARM64: dts: imx8: refine the imx8 dts

- Add the clk_req property for imx8 pcie, make sure that
the clk_req would be active.
- Correct the spell mistake of pcie pinctrl on imx8qxp.
- Fix the potential conflication with the usage of SC MU,
remove the useless "fsl,imx8-mu" of rpmsg.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16918-18: arm64: configs: enable mxsfb DRM driver
Robert Chiras [Tue, 21 Nov 2017 08:08:07 +0000 (10:08 +0200)]
MLK-16918-18: arm64: configs: enable mxsfb DRM driver

Enable MXSFB DRM driver as built-in in defconfig and disable the FB_MXC
driver from fbdev since its compatible string is conflicting with the
DRM driver.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-17: drm/imx: Add support for suspend/resume in nwl_dsi-imx
Robert Chiras [Wed, 22 Nov 2017 09:47:48 +0000 (11:47 +0200)]
MLK-16918-17: drm/imx: Add support for suspend/resume in nwl_dsi-imx

Update the IMX_NWL_DSI DRM driver to support the PM Runtime and
System Sleep suspend/resume routines.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-16: drm/mxsfb: Add support for suspend/resume
Robert Chiras [Wed, 22 Nov 2017 09:47:18 +0000 (11:47 +0200)]
MLK-16918-16: drm/mxsfb: Add support for suspend/resume

Update the MXSFB DRM driver to support the PM Runtime and System
Sleep suspend/resume routines.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-15: drm/bridge: Update adv7511 driver with some regs for adv7535
Robert Chiras [Fri, 17 Nov 2017 09:37:09 +0000 (11:37 +0200)]
MLK-16918-15: drm/bridge: Update adv7511 driver with some regs for adv7535

The low refresh rate register for ADV7535 is in 0x4A instead of 0xFB. In
order to correctly handle these differences, add the new type ADV7535.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-14: arm64: dts: fsl-imx8mq-evk: Enable mipi-dsi with lcdif
Robert Chiras [Thu, 9 Nov 2017 07:38:05 +0000 (09:38 +0200)]
MLK-16918-14: arm64: dts: fsl-imx8mq-evk: Enable mipi-dsi with lcdif

Enabled LCDIF-DSI-ADV7535 and LCDIF-DSI-RM67191 paths on MX8MQ EVK
development board.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-13: arm64: dtsi: fsl-imx8mq: Add mipi-dsi-specific nodes
Robert Chiras [Thu, 9 Nov 2017 07:37:06 +0000 (09:37 +0200)]
MLK-16918-13: arm64: dtsi: fsl-imx8mq: Add mipi-dsi-specific nodes

Add support for mipi-dsi DRM driver in DTS files for i.MX8mq platform.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-12: arm64:dts: fsl-imx8qm-lpddr4-arm2: Update dts files for nwl-mipi-dsi...
Robert Chiras [Thu, 9 Nov 2017 12:07:00 +0000 (14:07 +0200)]
MLK-16918-12: arm64:dts: fsl-imx8qm-lpddr4-arm2: Update dts files for nwl-mipi-dsi bridge

Now, the NWL MIPI-DSI driver is implemented as a real bridge and uses
the "nwl,mipi-dsi" compatible.
This patch updates the ADV7535 and RM67191 specific DTS files to
8QXP-MEK.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-11: arm64: dts: fsl-imx8qm-lpddr4-arm2: Update dts files for nwl-mipi-dsi...
Robert Chiras [Thu, 9 Nov 2017 12:06:38 +0000 (14:06 +0200)]
MLK-16918-11: arm64: dts: fsl-imx8qm-lpddr4-arm2: Update dts files for nwl-mipi-dsi bridge

Now, the NWL MIPI-DSI driver is implemented as a real bridge and uses
the "nwl,mipi-dsi" compatible.
This patch updates the ADV7535 and RM67191 specific DTS files to 8QXP.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16918-10: arm64: dtsi: fsl-imx8qxp: Update dtsi for nwl-mipi-dsi
Robert Chiras [Thu, 9 Nov 2017 12:06:16 +0000 (14:06 +0200)]
MLK-16918-10: arm64: dtsi: fsl-imx8qxp: Update dtsi for nwl-mipi-dsi

Now, the NWL MIPI-DSI driver is implemented as a real bridge and uses
the "nwl,mipi-dsi" compatible.
This patch updates the mipi-dsi nodes to comply with the new design of
NWL and NWL_IMX drivers.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>