linux.git
7 years agoMLK-16819-2: defconfig: Add CEC config
Sandor Yu [Wed, 15 Nov 2017 08:03:30 +0000 (16:03 +0800)]
MLK-16819-2: defconfig: Add CEC config

Add CEC to defconfig.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16819-1: CEC: Add HDMI CEC driver
Sandor Yu [Wed, 15 Nov 2017 07:55:30 +0000 (15:55 +0800)]
MLK-16819-1: CEC: Add HDMI CEC driver

Add iMX8 HDMI CEC function.
Support CEC MSG TX and RX function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16841-2: ARM64: dts: freescale: fsl-imx8mq: add 'fsl,ratio-1-1'
Robin Gong [Thu, 16 Nov 2017 09:28:57 +0000 (17:28 +0800)]
MLK-16841-2: ARM64: dts: freescale: fsl-imx8mq: add 'fsl,ratio-1-1'

Add fsl,ratio-1-1 into mscale B0 chip. Please remove this property if you
want to run A0 chip.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-16841-1: dma: imx-sdma: add clock ration 1:1 check
Robin Gong [Thu, 16 Nov 2017 09:23:40 +0000 (17:23 +0800)]
MLK-16841-1: dma: imx-sdma: add clock ration 1:1 check

On i.mx8 mscale B0 chip, AHB/SDMA clock ratio 2:1 can't be supportted,
since SDMA clock ration has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-16842 drm/imx: core: Add 32bit ioctrls support for 64bit processors
Liu Ying [Thu, 16 Nov 2017 09:17:21 +0000 (17:17 +0800)]
MLK-16842 drm/imx: core: Add 32bit ioctrls support for 64bit processors

Since we have 64bit processors running imx-drm, we should support
32bit ioctrls for them.

Reported-by: Ivan Liu <xiaowen.liu@nxp.com>
Tested-by: Ivan Liu <xiaowen.liu@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16836 PCI: imx: add the bus freq sysfile interface
Richard Zhu [Wed, 15 Nov 2017 04:57:23 +0000 (12:57 +0800)]
MLK-16836 PCI: imx: add the bus freq sysfile interface

To support the bus freq power saving mode, add the
sysfile interface.
request bus high: echo 1 > /sys/devices/platform/xxxxxxxx.pcie/bus_freq
release bus high: echo 1 > /sys/devices/platform/xxxxxxxx.pcie/bus_freq

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16838 tty: serial: imx: add busfreq support for DMA mode
Fugang Duan [Thu, 16 Nov 2017 08:31:13 +0000 (16:31 +0800)]
MLK-16838 tty: serial: imx: add busfreq support for DMA mode

Add busfreq support for DMA mode.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-16765-8 ARM64: dts: freescale: fsl-imx8qxp: enable PWRON key in dts
Robin Gong [Mon, 13 Nov 2017 07:49:38 +0000 (15:49 +0800)]
MLK-16765-8 ARM64: dts: freescale: fsl-imx8qxp: enable PWRON key in dts

Enable PWRON key in dts.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-7 ARM64: dts: freescale: fsl-imx8qm: enable PWRON key in dts
Robin Gong [Mon, 13 Nov 2017 07:48:16 +0000 (15:48 +0800)]
MLK-16765-7 ARM64: dts: freescale: fsl-imx8qm: enable PWRON key in dts

Enable PWRON key in dts.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-6 ARM64: configs: defconfig: enable imx_sc_pwrkey driver
Robin Gong [Tue, 7 Nov 2017 09:32:45 +0000 (17:32 +0800)]
MLK-16765-6 ARM64: configs: defconfig: enable imx_sc_pwrkey driver

Enable imx_sc_pwrkey driver by default.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-5 soc: imx: sc: ipc: enable SC_IRQ_BUTTON
Robin Gong [Tue, 7 Nov 2017 09:30:54 +0000 (17:30 +0800)]
MLK-16765-5 soc: imx: sc: ipc: enable SC_IRQ_BUTTON

Enable SC_IRQ_BUTTON interrupt in SCU side.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-4 input: keyboard: imx_sc_pwrkey: add powerkey driver on i.mx8QM/QXP
Robin Gong [Tue, 7 Nov 2017 09:27:11 +0000 (17:27 +0800)]
MLK-16765-4 input: keyboard: imx_sc_pwrkey: add powerkey driver on i.mx8QM/QXP

This powerkey driver is a virtual driver based on scfw which control
SNVS ON/OFF in SCU side. The key interrupt triggered by MU notfication

BuildInfo:
   - SCFW e7d95e1e, IMX-MKIMAGE 05d3d4a7, ATF 93dd1cc
   - U-Boot 2017.03-00684-g28c5243

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-3 rtc: rtc-imx-sc: check group interrupt type
Robin Gong [Tue, 7 Nov 2017 09:18:44 +0000 (17:18 +0800)]
MLK-16765-3 rtc: rtc-imx-sc: check group interrupt type

Check group interrupt type and irq status type supported, return directlly
if it's not the right group and interrupt status.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-2 soc: imx: sc: ipc: add 'group' into notificaiton
Robin Gong [Tue, 7 Nov 2017 09:04:23 +0000 (17:04 +0800)]
MLK-16765-2 soc: imx: sc: ipc: add 'group' into notificaiton

Add one more 'group' parameter to notification so that rtc/temperature
driver can check if this MU interrupt is for themselves or not. Worst
case as before, different irq group with the same irq_status can't be
distinguished, such as 'SC_IRQ_BUTTON' and 'SC_IRQ_RTC'(all is 1), which
means both notification will be called once any of both interrupts
triggered. Besides, refine check irq_status code.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16765-1: soc: i.MX8: Update to the latest SCFW API
Robin Gong [Mon, 13 Nov 2017 10:04:31 +0000 (18:04 +0800)]
MLK-16765-1: soc: i.MX8: Update to the latest SCFW API

Update since new button/wdog interface added on scfw:
commit e7d95e1e306a

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16835 ARM64: dts: imx8mq-evk-pcie1-m2: enable usdhc2 node
Fugang Duan [Thu, 16 Nov 2017 06:50:36 +0000 (14:50 +0800)]
MLK-16835 ARM64: dts: imx8mq-evk-pcie1-m2: enable usdhc2 node

i.MX8MQ EVK RevA0/A1 board PCIe M.2 rework for 1CQ WIFI has
pin conflict with usdhc2 node, so disable the node in the extended
dts file. But for EVK RevB1/B2 board, there have no pin conflict
with usdhc1 node.

The change drop RevA0/A1 board PCIe M.2 WIFI support, and only support
RevB1/B2 or later boards. Then usdhc2 can work now.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16833 ARM64: dts: freescale: imx8mq: enable over-drive mode by default
Anson Huang [Thu, 16 Nov 2017 13:46:22 +0000 (21:46 +0800)]
MLK-16833 ARM64: dts: freescale: imx8mq: enable over-drive mode by default

As all the EVK boards except A0 support over-drive mode,
so enable it in default EVK board dtb and remove over
drive mode dtb.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16830 PCI: imx: fix boot failulre when the pll is not locked
Richard Zhu [Wed, 15 Nov 2017 09:11:40 +0000 (17:11 +0800)]
MLK-16830 PCI: imx: fix boot failulre when the pll is not locked

Return the error when the pll is not locked.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
7 years agoMLK-16817-2 PCI: imx: enable the pm on imx8qm/qxp
Richard Zhu [Tue, 14 Nov 2017 05:36:31 +0000 (13:36 +0800)]
MLK-16817-2 PCI: imx: enable the pm on imx8qm/qxp

Enable the pcie pm on imx8qm/qxp

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16817-1 ARM64: imx: add the pcie per clk for imx8qm/qxp
Richard Zhu [Mon, 13 Nov 2017 09:32:16 +0000 (17:32 +0800)]
MLK-16817-1 ARM64: imx: add the pcie per clk for imx8qm/qxp

Add the pcie per clk for imx8qm/qxp.
Since it is mandatory required in imx8qm/qxp pcie pm.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16829 ARM64: dts: remove unused cpu idle state on imx8mq
Bai Ping [Thu, 16 Nov 2017 02:21:57 +0000 (10:21 +0800)]
MLK-16829 ARM64: dts: remove unused cpu idle state on imx8mq

The cluster level can NOT be power down on i.MX8MQ, so the cluster
level idle state can be removed. Only core level power down is used
for cpuidle support.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMGS-3367 [#imx-809] fix cma_release dump with ctrl-c
Xianzhong [Tue, 14 Nov 2017 19:07:35 +0000 (03:07 +0800)]
MGS-3367 [#imx-809] fix cma_release dump with ctrl-c

need release user memory before close the drmfb handle,
there is no galcore kernel interface for immediate free.

add new interface to release the user memory by force,

[  112.487090] [<ffff0000081748c0>] free_contig_range+0xa0/0xc0
[  112.492757] [<ffff0000081d944c>] cma_release+0x94/0xc0
[  112.497900] [<ffff0000085e344c>]
dma_release_from_contiguous+0x2c/0x38
[  112.504432] [<ffff000008095ab8>]
__dma_free_coherent.isra.14+0x50/0xb8
[  112.510962] [<ffff000008095b7c>] __dma_free+0x5c/0x90
[  112.516022] [<ffff0000085c56b4>] drm_gem_cma_free_object+0xa4/0x130
[  112.522293] [<ffff0000085a6384>] drm_gem_object_free+0x1c/0x58
[  112.528130] [<ffff0000085a646c>]
drm_gem_object_unreference_unlocked+0x54/0x130
[  112.535445] [<ffff0000085a65c0>]
drm_gem_object_handle_unreference_unlocked+0x60/0xb0
[  112.543281] [<ffff0000085a6664>]
drm_gem_object_release_handle+0x54/0x90
[  112.549989] [<ffff0000083c085c>] idr_for_each+0xb4/0x118
[  112.555304] [<ffff0000085a73cc>] drm_gem_release+0x24/0x38
[  112.560794] [<ffff0000085a62dc>] drm_release+0x28c/0x318
[  112.566111] [<ffff0000081df344>] __fput+0x8c/0x1d0
[  112.570906] [<ffff0000081df4ec>] ____fput+0xc/0x18
[  112.575705] [<ffff0000080d7e84>] task_work_run+0xc4/0xe0
[  112.581020] [<ffff0000080c0770>] do_exit+0x2d0/0x970
[  112.585988] [<ffff0000080c0e78>] do_group_exit+0x38/0xa0
[  112.591306] [<ffff0000080caf8c>] get_signal+0x1f4/0x508
[  112.596536] [<ffff000008087970>] do_signal+0x70/0x550
[  112.601591] [<ffff000008088080>] do_notify_resume+0x90/0xb0
[  112.607168] [<ffff000008082ddc>] work_pending+0x8/0x10

Date: Nov 14, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Reviewed-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Reviewed-by: Yuchou Gan <yuchou.gan@nxp.com>
7 years agoMGS-1633-2 [#imx-811] fix build for gpu bus frequency
Xianzhong [Wed, 15 Nov 2017 17:14:51 +0000 (01:14 +0800)]
MGS-1633-2 [#imx-811] fix build for gpu bus frequency

need remove IMX8_SCU_CONTROL to include busfreq-imx.h

Date: Nov 15, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMLK-16821 ARM64: dts: freescale: imx8mq: increase CMA size to 1GB
Anson Huang [Wed, 15 Nov 2017 14:48:27 +0000 (22:48 +0800)]
MLK-16821 ARM64: dts: freescale: imx8mq: increase CMA size to 1GB

Increase CMA size to 1GB to support dual 4K video playback.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMGS-1633 [#2235] Replace CONFIG_PM_RUNTIME with CONFIG_PM
Shawn Xiao [Mon, 22 Feb 2016 06:48:25 +0000 (14:48 +0800)]
MGS-1633 [#2235] Replace CONFIG_PM_RUNTIME with CONFIG_PM

Since 4.1, linux kernel has dropped CONFIG_PM_RUNTIME macro. And
CONFIG_PM is used instead. GPU driver should be synced with the change.

Date Feb 22, 2016

Signed-off-by: Shawn Xiao <b49994@freescale.com>
7 years agoMLK-16813 drm/imx: core: Set driver data to NULL when we bailout from ->bind()
Liu Ying [Tue, 14 Nov 2017 05:18:46 +0000 (13:18 +0800)]
MLK-16813 drm/imx: core: Set driver data to NULL when we bailout from ->bind()

We need to set driver data to NULL when we bailout from ->bind(),
otherwise it would be leaked to the system power management operations
and cause invalid driver data being used there.

Reported-by: Anson Huang <Anson.Huang@nxp.com>
Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16810 ARM64: dts: freescale: imx8mq: set timer stop flag in suspend
Anson Huang [Tue, 14 Nov 2017 13:02:21 +0000 (21:02 +0800)]
MLK-16810 ARM64: dts: freescale: imx8mq: set timer stop flag in suspend

System counter's clock is disabled in suspend, set flag
for arch timer driver's awareness.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16812 drm/imx: ldb: Let system PM behave properly when we are unbinded
Liu Ying [Tue, 14 Nov 2017 05:28:41 +0000 (13:28 +0800)]
MLK-16812 drm/imx: ldb: Let system PM behave properly when we are unbinded

The system power management operations should get correct driver data
before going on to further handling.  When the component is unbinded,
driver data should be set to NULL so that the system power management
may be bypassed(return early).  This way, we may prevent the system power
management from using any invalid driver data.

Fixes: 915ac0ad7369 ("MLK-16581-7 drm/imx: ldb: Add system power management support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16695-4: mipi_csi: fix build error
Guoniu.Zhou [Tue, 14 Nov 2017 08:24:56 +0000 (16:24 +0800)]
MLK-16695-4: mipi_csi: fix build error

Delete #ifdef CONFIG_PM_SLEEP statement which
lead to build error.

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

7 years agoMLK-16695-3: mipi_csi: Change printk to dev_dbg
Guoniu.Zhou [Fri, 10 Nov 2017 03:09:21 +0000 (11:09 +0800)]
MLK-16695-3: mipi_csi: Change printk to dev_dbg

Messages in ISI irq handler are for debugging, so
change printk to dev_dbg for this purpose.

The width and height of image information need output
in debug process.

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

7 years agoMLK-16695-2: mipi_csi: Add pm suspend and resume support
Guoniu.Zhou [Fri, 10 Nov 2017 03:01:46 +0000 (11:01 +0800)]
MLK-16695-2: mipi_csi: Add pm suspend and resume support

Add power manager suspend and resume support for ISI

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

7 years agoMLK-16695-1: mipi_csi: Add pm suspend and resume
Guoniu.Zhou [Fri, 10 Nov 2017 01:58:20 +0000 (09:58 +0800)]
MLK-16695-1: mipi_csi: Add pm suspend and resume

Add mipi_csi power manager suspend and resume support.

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

7 years agoMLK-16777 PCI: imx: enable pcie pm on mscale
Richard Zhu [Tue, 14 Nov 2017 02:22:16 +0000 (10:22 +0800)]
MLK-16777 PCI: imx: enable pcie pm on mscale

Enable the PCIE PM on mScale.
- Refine the codes.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16798-2: arm64: defconfig: CONFIG_AHCI_IMX=y
Leonard Crestez [Fri, 10 Nov 2017 11:43:22 +0000 (13:43 +0200)]
MLK-16798-2: arm64: defconfig: CONFIG_AHCI_IMX=y

Enabling sata on imx8qm was done by adding "default y", this should just
be modified in config instead.

Fixes: 1d09794d6387 ("MLK-16684-3 ata: imx: enable imx8qm sata")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
7 years agoMLK-16798-1: ata: imx: Fix AHCI_IMX Kconfig dependency
Leonard Crestez [Thu, 9 Nov 2017 18:53:06 +0000 (20:53 +0200)]
MLK-16798-1: ata: imx: Fix AHCI_IMX Kconfig dependency

Enabling sata on imx8qm was done by adding "default y", this should just
be modified in config instead.

Also fix the dependency list to include SOC_IMX53 || COMPILE_TEST.

Fixes: 1d09794d6387 ("MLK-16684-3 ata: imx: enable imx8qm sata")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
7 years agoMLK-16801-1: arm64: dts: fsl-imx8qm-lpddr4-arm2: Add DTS for 4 displays.
Oliver Brown [Mon, 13 Nov 2017 00:59:32 +0000 (18:59 -0600)]
MLK-16801-1: arm64: dts: fsl-imx8qm-lpddr4-arm2: Add DTS for 4 displays.

Add DTS for 4 displays: 2 LVDS with it6263 and 2 MIPI with adv7535.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
7 years agoMLK-15473-7: crypto: caam: Fix CAAM driver build for i.MX6
Aymen Sghaier [Mon, 13 Nov 2017 09:56:02 +0000 (10:56 +0100)]
MLK-15473-7: crypto: caam: Fix CAAM driver build for i.MX6

  Add a check for CONFIG_HAVE_IMX8_SOC befor imx8_get_soc_revision() call
 to avoid i.MX6 build fail. The generic imx_get_soc_revision() call is
 not ready to use.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-16698-5: arm64: defconfig: Build in RM67191 panel driver
Robert Chiras [Wed, 25 Oct 2017 13:56:37 +0000 (16:56 +0300)]
MLK-16698-5: arm64: defconfig: Build in RM67191 panel driver

Enable the Raydium RM67171 drm panel driver as built-in in defconfig.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16698-4: arm64: dts: fsl-imx8qxp-mek: Enable mipi-dsi with rm67191
Oliver Brown [Fri, 27 Oct 2017 19:30:46 +0000 (14:30 -0500)]
MLK-16698-4: arm64: dts: fsl-imx8qxp-mek: Enable mipi-dsi with rm67191

Enable the MIPI-DSI to RM67191 OLED display panel path on the MX8QXP MEK
board.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16698-3: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Enable mipi-dsi with rm67191
Robert Chiras [Thu, 2 Nov 2017 12:41:31 +0000 (14:41 +0200)]
MLK-16698-3: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Enable mipi-dsi with rm67191

Enable the MIPI-DSI to RM67191 OLED display panel path on the MX8QXP
LPDDR4 board.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16698-2: arm64: dts: fsl-imx8qm-lpddr4-arm2: Enable mipi-dsi with rm67191
Robert Chiras [Fri, 27 Oct 2017 11:51:34 +0000 (14:51 +0300)]
MLK-16698-2: arm64: dts: fsl-imx8qm-lpddr4-arm2: Enable mipi-dsi with rm67191

Enable the MIPI-DSI to RM67191 OLED display panel path on the MX8QM
LPDDR4 development board.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16698-1: drm/panel: Add panel driver for Raydium RM67191
Robert Chiras [Mon, 16 Oct 2017 13:24:59 +0000 (16:24 +0300)]
MLK-16698-1: drm/panel: Add panel driver for Raydium RM67191

Add support for the OLED display based on MIPI-DSI protocol from Raydium:
RM67191.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16804-08 driver: soc: Reduce NOC/AHB/MAIN_AXI to save SOC power for audio playback
Anson Huang [Wed, 8 Nov 2017 10:17:22 +0000 (18:17 +0800)]
MLK-16804-08 driver: soc: Reduce NOC/AHB/MAIN_AXI to save SOC power for audio playback

reduce the NOC, main AXI and AHB bus clock frequency to save power when DDR enter low
frequency mode. VDDSOC is ~195mA during video play, and ~180mA in idle.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16804-07 ARM64: dts: Add cpuidle state info node for imx8mq
Bai Ping [Fri, 10 Nov 2017 09:01:12 +0000 (17:01 +0800)]
MLK-16804-07 ARM64: dts: Add cpuidle state info node for imx8mq

Add cpuidle states node for imx8mq.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16804-06 driver: soc: Optimize the DDR frequency in audio playback case
Bai Ping [Wed, 8 Nov 2017 09:58:00 +0000 (17:58 +0800)]
MLK-16804-06 driver: soc: Optimize the DDR frequency in audio playback case

If audio device is the only that access to ddr memory, the DDR
frequency can be reduce to 25MHz to save power. when DDR run in
25MHz frequency, the memory bandwidth is about 66MB/s, it can
meet the performance requirement for audio only case.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16804-05 driver: soc: add the irq affinity call for child irqchip on imx8mq
Bai Ping [Wed, 8 Nov 2017 09:55:20 +0000 (17:55 +0800)]
MLK-16804-05 driver: soc: add the irq affinity call for child irqchip on imx8mq

On i.MX8MQ, we need the handle the correspoding IMR registers in gpc
to make sure the IRQ affinity to the specific core can be wakeup
successfully from power down idle state.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16804-04 driver: irqchip: Add IPI SW workaround for imx8mq
Bai Ping [Wed, 8 Nov 2017 09:48:47 +0000 (17:48 +0800)]
MLK-16804-04 driver: irqchip: Add IPI SW workaround for imx8mq

On i.MX8MQ, when the CPU core is in power down state,
the IPI can NOT wakeup the core anymore(ERR011171), so using the
external IRQ32 to wakeup the core in power down idle
state successfully.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16804-03 driver: clk: Add video pll2 output gate clk on imx8mq
Bai Ping [Wed, 8 Nov 2017 09:44:23 +0000 (17:44 +0800)]
MLK-16804-03 driver: clk: Add video pll2 output gate clk on imx8mq

The Video PLL2 has a output enable bit to do clk gate,
So we need to register this gate to save power.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16804-02 arm64: configs: enable the system counter timer for nxp imx8
Bai Ping [Mon, 13 Nov 2017 03:23:24 +0000 (11:23 +0800)]
MLK-16804-02 arm64: configs: enable the system counter timer for nxp imx8

Enable the system counter timer by default.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16804-01 driver: clocksource: Add nxp system counter broadcast timer
Bai Ping [Sun, 5 Nov 2017 07:31:09 +0000 (15:31 +0800)]
MLK-16804-01 driver: clocksource: Add nxp system counter broadcast timer

On NXP i.MX8MQ SOC, it has system counter module for ARM
generic timer implementation. In this system counter module
it also has compare frame module to provide timer support.
So we can use it as an alternative clockevent device for
broadcast timer purpose when CPU core enter power down state
with local timer stopped.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
7 years agoMLK-16806 - [i.MX8QXP/Malone]: segment fault in gdb environment
Zhou Peng-B04994 [Mon, 13 Nov 2017 04:07:57 +0000 (12:07 +0800)]
MLK-16806 - [i.MX8QXP/Malone]: segment fault in gdb environment

function wait_event_interruptible_timeout may return some special value
in gdb debug environment, so we need to add additional check to these
return values, otherwise, interrupt will reported wrongly

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
7 years agoMLK-16805 - [i.MX8MQ/Hantro]: Enable runtime bus frequency
Zhou Peng-B04994 [Mon, 13 Nov 2017 04:00:38 +0000 (12:00 +0800)]
MLK-16805 - [i.MX8MQ/Hantro]: Enable runtime bus frequency

Add operation to request/release bus in runtime suspend/resume functions

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
7 years agoMLK-16803 arm64: dts: imx8mq-evk: removed the reserved ATF space
Peng Fan [Mon, 13 Nov 2017 01:05:34 +0000 (09:05 +0800)]
MLK-16803 arm64: dts: imx8mq-evk: removed the reserved ATF space

ATF has been moved to OCRAM, there is no need to reserve space
for ATF in DRAM space.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16800: dma: mxs-dma: correctly handle mxs-dma clock
Han Xu [Fri, 10 Nov 2017 23:37:22 +0000 (17:37 -0600)]
MLK-16800: dma: mxs-dma: correctly handle mxs-dma clock

enable mxs-dma clock before HW reset and disable clock after it.

BuildInfo:
- SCFW 15d20cde, IMX-MKIMAGE ff9860c5, ATF
- U-Boot 2017.03-00003-gd09f5db

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16799-2: mtd: flexspi: support runtime pm for flexspi
Han Xu [Fri, 10 Nov 2017 21:33:24 +0000 (15:33 -0600)]
MLK-16799-2: mtd: flexspi: support runtime pm for flexspi

enabled runtime pm for flexspi, also removed the redundant clock.
Tested with the latest SCFW and ATF.

BuildInfo:
- SCFW 15d20cde, IMX-MKIMAGE ff9860c5, ATF
- U-Boot 2017.03-00003-gd09f5db

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16799-1: arm64: dts: remove the unnecessary clock for flexspi
Han Xu [Fri, 10 Nov 2017 21:29:36 +0000 (15:29 -0600)]
MLK-16799-1: arm64: dts: remove the unnecessary clock for flexspi

flexspi only need one clock source, removed the redundant one from
device tree.

BuildInfo:
- SCFW 15d20cde, IMX-MKIMAGE ff9860c5, ATF 0
- U-Boot 2017.03-00003-gd09f5db

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-15473-6: crypto: caam: Enable CAAM driver for i.MX8 QuadXPlus
Aymen Sghaier [Fri, 10 Nov 2017 09:02:01 +0000 (10:02 +0100)]
MLK-15473-6: crypto: caam: Enable CAAM driver for i.MX8 QuadXPlus

 Add caam node to fsl-imx8qxp device-tree

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-15473-5: crypto: caam: Enable CAAM driver for i.MX8 QuadMax
Aymen Sghaier [Fri, 10 Nov 2017 09:01:38 +0000 (10:01 +0100)]
MLK-15473-5: crypto: caam: Enable CAAM driver for i.MX8 QuadMax

 Add caam node to fsl-imx8qm device-tree

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-15473-4: crypto: caam: Enable CAAM driver for i.MX8 mScale
Aymen Sghaier [Fri, 10 Nov 2017 09:00:50 +0000 (10:00 +0100)]
MLK-15473-4: crypto: caam: Enable CAAM driver for i.MX8 mScale

 Add caam node to fsl-imx8mq device-tree

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-15473-3: defconfig: Enable CONFIG_CRYPTO_DEV_FSL_CAAM
Aymen Sghaier [Fri, 10 Nov 2017 08:59:58 +0000 (09:59 +0100)]
MLK-15473-3: defconfig: Enable CONFIG_CRYPTO_DEV_FSL_CAAM

 Enable the CAAM driver flag in defconfig file.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-15473-2: fsl-sec4.txt: Update CAAM device-tree documentation
Aymen Sghaier [Fri, 10 Nov 2017 08:55:39 +0000 (09:55 +0100)]
MLK-15473-2: fsl-sec4.txt: Update CAAM device-tree documentation

 Add a new property in device tree specific to i.MX8 only: first-jr-index.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agoMLK-15473-1: crypto: caam: Add CAAM driver support for iMX8 soc family
Aymen Sghaier [Fri, 10 Nov 2017 08:53:57 +0000 (09:53 +0100)]
MLK-15473-1: crypto: caam: Add CAAM driver support for iMX8 soc family

  Enable CAAM driver for i.MX8 family:
   - Use a Job ring for RNG instantiation rather than DECO, even
     for i.MX6/7 families.
   - Use of aliased CAAM registers instead of original registers in page 0
     since page 0 is no more accessible in i.MX8 family except mScale.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
7 years agodrm: Add four ioctls for managing drm mode object leases [v7]
Keith Packard [Wed, 8 Nov 2017 13:09:28 +0000 (15:09 +0200)]
drm: Add four ioctls for managing drm mode object leases [v7]

drm_mode_create_lease

        Creates a lease for a list of drm mode objects, returning an
        fd for the new drm_master and a 64-bit identifier for the lessee

drm_mode_list_lesees

        List the identifiers of the lessees for a master file

drm_mode_get_lease

        List the leased objects for a master file

drm_mode_revoke_lease

        Erase the set of objects managed by a lease.

This should suffice to at least create and query leases.

Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:

 * query ioctls only query the master associated with
   the provided file.

 * 'mask_lease' value has been removed

 * change ioctl has been removed.

Changes for v3 suggested in part by Dave Airlie <airlied@gmail.com>

 * Add revoke ioctl.

Changes for v4 suggested by Dave Airlie <airlied@gmail.com>

 * Expand on the comment about the magic use of &drm_lease_idr_object
 * Pad lease ioctl structures to align on 64-bit boundaries

Changes for v5 suggested by Dave Airlie <airlied@gmail.com>

 * Check for non-negative object_id in create_lease to avoid debug
   output from the kernel.

Changes for v6 provided by Dave Airlie <airlied@gmail.com>
 * For non-universal planes add primary/cursor planes to lease

   If we aren't exposing universal planes to this userspace client,
   and it requests a lease on a crtc, we should implicitly export the
   primary and cursor planes for the crtc.

   If the lessee doesn't request universal planes, it will just see
   the crtc, but if it does request them it will then see the plane
   objects as well.

   This also moves the object look ups earlier as a side effect, so
   we'd exit the ioctl quicker for non-existant objects.

 * Restrict leases to crtc/connector/planes.

   This only allows leasing for objects we wish to allow.

Changes for v7 provided by Dave Airlie <airlied@gmail.com>

 * Check pad args are 0
 * Check create flags and object count are valid.
 * Check return from fd allocation
 * Refactor lease idr setup and add some simple validation
 * Use idr_mutex uniformly (Keith)

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
7 years agodrm: Check mode object lease status in all master ioctl paths [v4]
Keith Packard [Wed, 8 Nov 2017 10:53:11 +0000 (12:53 +0200)]
drm: Check mode object lease status in all master ioctl paths [v4]

Attempts to modify un-leased objects are rejected with an error.
Information returned about unleased objects is modified to make them
appear unusable and/or disconnected.

Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:

 * With the change in the __drm_mode_object_find API to pass the
   file_priv along, we can now centralize most of the lease-based
   access checks in that function.

 * A few places skip that API and require in-line checks.

Changes for v3 provided by Dave Airlie <airlied@redhat.com>

 * remove support for leasing encoders.
 * add support for leasing planes.

Changes for v4

 * Only call drm_lease_held if DRIVER_MODESET.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
7 years agodrm: Add drm_object lease infrastructure [v5]
Keith Packard [Tue, 7 Nov 2017 16:41:10 +0000 (18:41 +0200)]
drm: Add drm_object lease infrastructure [v5]

This provides new data structures to hold "lease" information about drm mode
setting objects, and provides for creating new drm_masters which have access to
a subset of the available drm resources.

An 'owner' is a drm_master which is not leasing the objects from another
drm_master, and hence 'owns' them.

A 'lessee' is a drm_master which is leasing objects from some other drm_master.
Each lessee holds the set of objects which it is leasing from the lessor.

A 'lessor' is a drm_master which is leasing objects to another drm_master. This
is the same as the owner in the current code.

The set of objects any drm_master 'controls' is limited to the set of objects it
leases (for lessees) or all objects (for owners).

Objects not controlled by a drm_master cannot be modified through the various
state manipulating ioctls, and any state reported back to user space will be
edited to make them appear idle and/or unusable. For instance, connectors always
report 'disconnected', while encoders report no possible crtcs or clones.

The full list of lessees leasing objects from an owner (either directly, or
indirectly through another lessee), can be searched from an idr
in the drm_master of the owner.

Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:

* Sub-leasing has been disabled.

* BUG_ON for lock checking replaced with lockdep_assert_held

* 'change' ioctl has been removed.

* Leased objects can always be controlled by the lessor; the
  'mask_lease' flag has been removed

* Checking for leased status has been simplified, replacing
  the drm_lease_check function with drm_lease_held.

Changes in v3, some suggested by Dave Airlie <airlied@gmail.com>

* Add revocation. This allows leases to be effectively revoked by
  removing all of the objects they have access to. The lease itself
  hangs around as it's hanging off a file.

* Free the leases IDR when the master is destroyed

* _drm_lease_held should look at lessees, not lessor

* Allow non-master files to check for lease status

Changes in v4, suggested by Dave Airlie <airlied@gmail.com>

* Formatting and whitespace changes

Changes in v5 (airlied)

* check DRIVER_MODESET before lease destroy call
* check DRIVER_MODESET for lease revoke (Chris)
* Use idr_mutex uniformly for all lease elements of struct drm_master. (Keith)

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
7 years agodrm: Pass struct drm_file * to __drm_mode_object_find [v2]
Keith Packard [Wed, 8 Nov 2017 12:08:19 +0000 (14:08 +0200)]
drm: Pass struct drm_file * to __drm_mode_object_find [v2]

This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.

v2: Also fix up vboxvideo driver in staging

[airlied: merging early as this is an API change]

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
7 years agodrm: Add new LEASE debug level
Keith Packard [Tue, 7 Nov 2017 16:28:37 +0000 (18:28 +0200)]
drm: Add new LEASE debug level

Separate out lease debugging from the core.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
7 years agoMLK-16748-03: dts: Add fsl-imx8mq-evk-drm.dts for drm driver
Sandor Yu [Thu, 9 Nov 2017 08:31:03 +0000 (16:31 +0800)]
MLK-16748-03: dts: Add fsl-imx8mq-evk-drm.dts for drm driver

Enable DCSS DRM and HDMI DRM driver.
Disable DCSS Framebuffer and HDMI Framebuffer driver.

Set IMX8MQ_CLK_DISP_APB_SRC source from IMX8MQ_SYS2_PLL_125M temporary,
will be set back to IMX8MQ_SYS1_PLL_800M
after DCSS APB clock affect HDMI Core clock issue resolved on B0 SOC.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16748-02: HDMI: Support iMX8MQ HDMI in HDMI DRM driver
Sandor Yu [Fri, 13 Oct 2017 07:37:19 +0000 (15:37 +0800)]
MLK-16748-02: HDMI: Support iMX8MQ HDMI in HDMI DRM driver

-Add iMX8MQ HDMI function support in iMX8 HDMI DRM driver.
-EDID read function supported for iMX8MQ.
-Move iMX8QM clock management functions and pixel link
setting functions to iMX8QM SOC specific struct.
-replace printk with pr_info, dev_warn and dev_err.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-16748-01: HDMI: Add iMX8MQ HDMI PHY config function
Sandor Yu [Fri, 13 Oct 2017 04:33:10 +0000 (12:33 +0800)]
MLK-16748-01: HDMI: Add iMX8MQ HDMI PHY config function

Add iMX8MQ HDMI PHY configuration source code
to iMX8 HDMI DRM driver.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoPM / Runtime: Defer resuming of the device in pm_runtime_force_resume()
Ulf Hansson [Thu, 13 Oct 2016 14:58:54 +0000 (16:58 +0200)]
PM / Runtime: Defer resuming of the device in pm_runtime_force_resume()

When the pm_runtime_force_suspend|resume() helpers were invented, we still
had CONFIG_PM_RUNTIME and CONFIG_PM_SLEEP as separate Kconfig options.

To make sure these helpers worked for all combinations and without
introducing too much of complexity, the device was always resumed in
pm_runtime_force_resume().

More precisely, when CONFIG_PM_SLEEP was set and CONFIG_PM_RUNTIME was
unset, we needed to resume the device as the subsystem/driver couldn't
rely on using runtime PM to do it.

As the CONFIG_PM_RUNTIME option was merged into CONFIG_PM a while ago, it
removed this combination, of using CONFIG_PM_SLEEP without the earlier
CONFIG_PM_RUNTIME.

For this reason we can now rely on the subsystem/driver to use runtime PM
to resume the device, instead of forcing that to be done in all cases. In
other words, let's defer the runtime resume to a later point when it's
actually needed.

Complemented by: Dong Aisheng:
Used to fix a already runtime suspended device gets force resume
too early to access other non-available devices. e.g. I2C.

[Cherry-picked-by: Dong Aisheng <aisheng.dong@nxp.com>

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
7 years agoMLK-16757-2 can: flexcan: implement runtime pm
Dong Aisheng [Tue, 31 Oct 2017 10:06:44 +0000 (18:06 +0800)]
MLK-16757-2 can: flexcan: implement runtime pm

Implement runtime PM which will:
1) Keep device in suspend state (clocks disabled) if it's not openned
2) Make Power Domain framework be able to shutdown the corresponding power
domain of this device.

Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-16757-1 can: flexcan: disable clocks during suspend
Dong Aisheng [Mon, 30 Oct 2017 11:13:38 +0000 (19:13 +0800)]
MLK-16757-1 can: flexcan: disable clocks during suspend

Flexcan will be stopped during suspend if no wakeup function required
and enabled after resume accordingly. During this period, we could
explicitly disable clocks.

We do this by moving the clk_prepare_enable/clk_disable_unprepare into
flexcan_chip_start and flexcan_chip_stop functions which will be called
during suspend/resume function.

Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-16735 usb: host: add XHCI_CDNS_HOST flag
Peter Chen [Thu, 9 Nov 2017 08:58:40 +0000 (16:58 +0800)]
MLK-16735 usb: host: add XHCI_CDNS_HOST flag

The NXP Cadence XHCI host has the same issue with Intel's,
it is triggered by reboot test, the test case is described
at this jira ticket.

BuildInfo:
- SCFW 8dcff26, IMX-MKIMAGE ea027c4b, ATF
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16738: ARM64: dts: qxp-mek: amix: move SAIs MCLKs to AUD_PLL1
Viorel Suman [Fri, 10 Nov 2017 08:32:31 +0000 (10:32 +0200)]
MLK-16738: ARM64: dts: qxp-mek: amix: move SAIs MCLKs to AUD_PLL1

Move AMIX SAIs MCLKs to AUD_PLL1 and double the frequency
in order to support 64k rate.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
7 years agoMLK-16775-2 usb: xhci: plat: only do high bus freq for runtime pm
Li Jun [Thu, 9 Nov 2017 16:16:48 +0000 (00:16 +0800)]
MLK-16775-2 usb: xhci: plat: only do high bus freq for runtime pm

Remove xhci_suspend and xhci_resume as i.MX8MQ dwc3 can't support it,
add high bus request and release, and enable runtime pm by default.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agousb: host: plat: Enable xHCI plat runtime PM
Baolin Wang [Wed, 19 Apr 2017 13:55:45 +0000 (16:55 +0300)]
usb: host: plat: Enable xHCI plat runtime PM

Enable the xHCI plat runtime PM for parent device to suspend/resume
xHCI. Also call pm_runtime_forbid() in probe() function to force users
to explicitly enable runtime pm using power/control in sysfs, in case
some parent devices didn't implement runtime PM callbacks.

[set do_wakeup to true when runtime suspending -Mathias]
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b0c69b4bace3703a29e08dda2b5a10e1073cb9cd)

7 years agousb: xhci: plat: Enable async suspend/resume
Andrew Bresticker [Fri, 7 Apr 2017 14:56:49 +0000 (17:56 +0300)]
usb: xhci: plat: Enable async suspend/resume

USB host controllers can take a significant amount of time to suspend
and resume, adding several hundred miliseconds to the kernel resume
time. Since the XHCI controller has no outside dependencies (other than
clocks, which are suspended late/resumed early), allow it to suspend and
resume asynchronously.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c70a1529b29cb1362ade5dd113313fb945e32c3e)

7 years agoMLK-16775-1 usb: dwc3: gadget: add high bus freq support
Li Jun [Tue, 7 Nov 2017 17:19:26 +0000 (01:19 +0800)]
MLK-16775-1 usb: dwc3: gadget: add high bus freq support

Add high bus request for connection to host in reset handling,
and high bus release for disconnection.

Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMGS-3349 [#ccc] [imx8qm] Met segmentation fault when run GLES samples stress on GPU0...
Yuchou Gan [Fri, 10 Nov 2017 13:34:41 +0000 (21:34 +0800)]
MGS-3349 [#ccc] [imx8qm] Met segmentation fault when run GLES samples stress on GPU0, GPU1 and bridged mode

cma limit feature is for gpu/dpu/vpu buffer sharing,
cma preempt feature is required for gpu mmu table setup.

remove cma limit flag for video memory since imx8 g2d use ion.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
7 years agoMLK-16738: ASoC: fsl: amix: move SAIs MCLKs to AUD_PLL1
Viorel Suman [Thu, 9 Nov 2017 15:28:59 +0000 (17:28 +0200)]
MLK-16738: ASoC: fsl: amix: move SAIs MCLKs to AUD_PLL1

Move AMIX SAIs MCLKs to AUD_PLL1 and double the frequency
in order to support 64k rate.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoRevert "MLK-16738: ASoC: fsl: amix: remove support for 64k and 96k rates"
Viorel Suman [Thu, 9 Nov 2017 15:28:58 +0000 (17:28 +0200)]
Revert "MLK-16738: ASoC: fsl: amix: remove support for 64k and 96k rates"

This reverts commit 0cc882c2d72c ("MLK-16738: ASoC: fsl: amix: remove
support for 64k and 96k rates").

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-16347-14: arm64: dts: fsl-imx8qxp-mek: Enable mipi-dsi with adv7535
Robert Chiras [Wed, 13 Sep 2017 11:52:50 +0000 (14:52 +0300)]
MLK-16347-14: arm64: dts: fsl-imx8qxp-mek: Enable mipi-dsi with adv7535

Enable the MIPI-DSI to ADV7535 DSI2HDMI converter path on the MX8QXP MEK
development board.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-13: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Enable mipi-dsi with adv7535
Robert Chiras [Mon, 16 Oct 2017 12:51:06 +0000 (15:51 +0300)]
MLK-16347-13: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Enable mipi-dsi with adv7535

Enable the MIPI-DSI to ADV7535 DSI2HDMI converter path on the MX8QXP LPDDR4
development board.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-12: arm64: dtsi: fsl-imx8qxp: Add mipi-dsi specific nodes
Robert Chiras [Mon, 16 Oct 2017 12:50:25 +0000 (15:50 +0300)]
MLK-16347-12: arm64: dtsi: fsl-imx8qxp: Add mipi-dsi specific nodes

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

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-11: clk: imx: imx8qxp: Add missing MIPI DSI clocks
Robert Chiras [Tue, 31 Oct 2017 15:26:19 +0000 (17:26 +0200)]
MLK-16347-11: clk: imx: imx8qxp: Add missing MIPI DSI clocks

Add missing clocks for MIPI-DSI SS: RX_ESC and TX_ESC
Also added the posibility to select clock parents for MIPI-DSI versus
LVDS.
The SCFW was changed, so now the LVDS pixel and phy clocks need to
specify their parrents.
Also, the TX_ESC and RX_ESC clocks from MIPI-DSI need to specify their
parrents in DTS files.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
7 years agoMLK-16347-10: arm64: defconfig: Change ADV7511 driver from module to built-in
Robert Chiras [Mon, 16 Oct 2017 12:35:15 +0000 (15:35 +0300)]
MLK-16347-10: arm64: defconfig: Change ADV7511 driver from module to built-in

Make the ADV7511 drm bridge driver as built-in, so the path MIPI-DSI to
ADV7535 will be available by default.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-9: arm64: defconfig: Build in NWL IMX DSI driver
Robert Chiras [Mon, 16 Oct 2017 12:33:46 +0000 (15:33 +0300)]
MLK-16347-9: arm64: defconfig: Build in NWL IMX DSI driver

Enable the MIPI-DSI drm driver as built-in in defconfig.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-8: arm64: dts: fsl-imx8qm-lpddr4-arm2: Enable mipi-dsi with adv7535
Robert Chiras [Mon, 16 Oct 2017 12:21:07 +0000 (15:21 +0300)]
MLK-16347-8: arm64: dts: fsl-imx8qm-lpddr4-arm2: Enable mipi-dsi with adv7535

Enable the MIPI-DSI to ADV7535 DSI2HDMI converter path on the MX8QM LPDDR4
development board.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-7: arm64: dtsi: fsl-imx8qm: Add mipi-dsi specific nodes
Robert Chiras [Mon, 16 Oct 2017 12:18:53 +0000 (15:18 +0300)]
MLK-16347-7: arm64: dtsi: fsl-imx8qm: Add mipi-dsi specific nodes

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

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-6: gpu: drm: bridge: adv7511: Add new compatible string
Robert Chiras [Thu, 19 Oct 2017 12:07:51 +0000 (15:07 +0300)]
MLK-16347-6: gpu: drm: bridge: adv7511: Add new compatible string

Added "adi,adv7535" to the adv7511 drm bridge and adi,adv7511.txt doc,
since the driver can also support the ADV7535 chipset (upgrade of ADV7533).

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-5: gpu: imx: dpu: TCON adjustment
Oliver Brown [Sat, 9 Sep 2017 00:58:22 +0000 (19:58 -0500)]
MLK-16347-5: gpu: imx: dpu: TCON adjustment

The DPU TCON register regarding hsync/vsync are incorrectly
initialized. So, adjust vsync start to align with hsync start.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-4: drm/imx: Add mipi-dsi driver for mx8
Robert Chiras [Fri, 14 Jul 2017 12:31:09 +0000 (15:31 +0300)]
MLK-16347-4: drm/imx: Add mipi-dsi driver for mx8

Add support for the NorthWest Logic MIPI-DSI controller found
in the following i.MX8 platforms: i.MX8qm, i.MX8qxp and i.MX8mq.
This is the MIPI-DSI encoder containing the platform specific changes
and it uses the NWL MIPI-DSI bridge.
Currently only qm and qxp are tested with this driver. The mq support
will be added later.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-3: drm/bridge: Add Northwest Logic DSI transmitter support
Robert Chiras [Wed, 27 Sep 2017 10:45:07 +0000 (13:45 +0300)]
MLK-16347-3: drm/bridge: Add Northwest Logic DSI transmitter support

Add support for the NorthWest Logit MIPI-DSI controller found in mx8
platforms: i.MX8qm, i.MX8qxp and i.MX8mq.
The NWL MIPI-DSI driver is implemented as a DRM bridge.
The MIPI-DSI encoder will contain the platform specific changes and will
use this bridge.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-2: Documentation: devicetree: Added nwl to vendor-prefixes
Robert Chiras [Mon, 16 Oct 2017 11:07:24 +0000 (14:07 +0300)]
MLK-16347-2: Documentation: devicetree: Added nwl to vendor-prefixes

Added nwl to Documentation in vendor-prefixes.txt, since a new driver
from Nortwest Logic was added to devicetree.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16347-1: phy: add phy driver for mipi-dsi on mx8
Robert Chiras [Fri, 14 Jul 2017 12:31:56 +0000 (15:31 +0300)]
MLK-16347-1: phy: add phy driver for mipi-dsi on mx8

Implement the DPHY from MIPI-DSI found on i.MX8 platforms (QM, QXP and MQ)
as a phy driver.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-16789 tty: serial: lpuart: keep ipg clock enable during .uart_resume_port()
Fugang Duan [Thu, 9 Nov 2017 06:38:32 +0000 (14:38 +0800)]
MLK-16789 tty: serial: lpuart: keep ipg clock enable during .uart_resume_port()

Ensure ipg clock enable during .uart_resume_port() that call set
ops->set_mctrl() before ops->startup().

BuildInfo:
 - SCFW daf9431c, IMX-MKIMAGE 1c6fc7d8, ATF f2547fb
 - U-Boot 2017.03-00097-gd7599cf

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-16776 staging: typec: tcpci: use vbus from partner for EXTCON_USB
Li Jun [Tue, 7 Nov 2017 13:32:51 +0000 (21:32 +0800)]
MLK-16776 staging: typec: tcpci: use vbus from partner for EXTCON_USB

Change to use the vbus from partner to notify EXTCON_USB.
This is to work around the case of source only typec port
connecting to Host PC via a Rp fixed cable.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMLK-16774 usb: gadget: utp: fix coverity CID 414727 issue
Li Jun [Tue, 7 Nov 2017 10:40:19 +0000 (18:40 +0800)]
MLK-16774 usb: gadget: utp: fix coverity CID 414727 issue

CID 414727: Explicit null dereferenced (FORWARD_NULL)
var_deref_op: Dereferencing null pointer uud.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMLK-16786: dma: mxs-dma: fix the unbalanced runtime pm counter
Han Xu [Wed, 8 Nov 2017 21:55:27 +0000 (15:55 -0600)]
MLK-16786: dma: mxs-dma: fix the unbalanced runtime pm counter

mxs-dma init function will call runtime pm init, the redundant
pm_runtime_force_resume will mess up the counter. Also remove some
unnecessary code.

 BuildInfo:
  - SCFW 66189d08, IMX-MKIMAGE ea027c4b, ATF
  - U-Boot 2017.03-imx_4.9.51_8qm_beta1_8qxp_alpha+g325ac1e

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>