linux.git
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>
7 years agoMLK-16785: spi: lpspi: enable runtime pm for lpspi
Han Xu [Wed, 8 Nov 2017 21:52:58 +0000 (15:52 -0600)]
MLK-16785: spi: lpspi: enable runtime pm for lpspi

enable the runtime pm for lpspi module

 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>
7 years agoMLK-16738: ASoC: fsl: amix: remove support for 64k and 96k rates
Viorel Suman [Wed, 8 Nov 2017 09:22:29 +0000 (11:22 +0200)]
MLK-16738: ASoC: fsl: amix: remove support for 64k and 96k rates

Remove support for 64k and 96k rates due to SAI MCLK freq limitations.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-16675-5: drm: imx: dcss: fix BLKCTL for B0 silicon
Laurentiu Palcu [Wed, 8 Nov 2017 08:23:28 +0000 (10:23 +0200)]
MLK-16675-5: drm: imx: dcss: fix BLKCTL for B0 silicon

B0 silicon brings some changes in the BLKCTL registers that need to be
properly used for B0 to work. This patch adds support for that.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-16675-4: arm64: defconfig: compile DRM DCSS driver
Laurentiu Palcu [Thu, 19 Oct 2017 13:23:15 +0000 (16:23 +0300)]
MLK-16675-4: arm64: defconfig: compile DRM DCSS driver

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-16675-3: drm: imx: register mscale DCSS driver with IMX DRM core
Laurentiu Palcu [Thu, 19 Oct 2017 09:30:51 +0000 (12:30 +0300)]
MLK-16675-3: drm: imx: register mscale DCSS driver with IMX DRM core

To be used, the iMX8M DCSS driver has to be "registered" with the IMX
DRM core.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-16675-2: drm: imx: add mscale DCSS drm driver
Laurentiu Palcu [Thu, 19 Oct 2017 09:29:54 +0000 (12:29 +0300)]
MLK-16675-2: drm: imx: add mscale DCSS drm driver

This patch adds DRM KMS support for i.MX8M's DCSS.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-16675-1: drm: imx: add mscale DCSS core driver
Laurentiu Palcu [Thu, 19 Oct 2017 09:27:23 +0000 (12:27 +0300)]
MLK-16675-1: drm: imx: add mscale DCSS core driver

This patch adds base suport for i.MX8M's Display Controller
subsystem(DCSS). It has built-in DPR, Scaler and HDR10 modules. Also, it
features a video Decompression and Tile to Raster Conversion (DTRC) unit,
as well as a graphics pixel decompression infrastracture (DEC400D).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoMLK-16713 i2c: imx-lpi2c: add runtime pm support
Fugang Duan [Fri, 27 Oct 2017 02:12:42 +0000 (10:12 +0800)]
MLK-16713 i2c: imx-lpi2c: add runtime pm support

- Add runtime pm support to dynamicly manage the ipg and per clocks.
- Put the suspend to suspend_noirq.
- Call .pm_runtime_force_suspend() to force runtime pm suspended
  in .suspend_noirq().

BuildInfo:
  - SCFW 88456c73, IMX-MKIMAGE 06bc2767, ATF a438801
  - U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g7953d47

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16782 net: fec: double check the mii interrupt status
Fugang Duan [Wed, 8 Nov 2017 06:11:12 +0000 (14:11 +0800)]
MLK-16782 net: fec: double check the mii interrupt status

Double check the mii interrupt status during mdio bus accessing
to avoid interrupt lost in timeout case.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16781 net: fec: add eee mode tx lpi support
Fugang Duan [Thu, 2 Nov 2017 10:20:16 +0000 (18:20 +0800)]
MLK-16781 net: fec: add eee mode tx lpi support

The i.MX8MQ ENET version support IEEE802.3az eee mode, add
eee mode tx lpi enable to support ethtool interface.

usage:
1. set sleep and wake timer to 5ms:
ethtool --set-eee eth0 eee on tx-lpi on tx-timer 5000
2. check the eee mode:
~# ethtool --show-eee eth0
EEE Settings for eth0:
        EEE status: enabled - active
        Tx LPI: 5000 (us)
        Supported EEE link modes:  100baseT/Full
                                   1000baseT/Full
        Advertised EEE link modes:  100baseT/Full
                                    1000baseT/Full
        Link partner advertised EEE link modes:  100baseT/Full

Note: For realtime case and IEEE1588 ptp case, it should disable
EEE mode.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16779 net: fec: enable busfreq for arm64 platform
Fugang Duan [Wed, 1 Nov 2017 04:34:41 +0000 (12:34 +0800)]
MLK-16779 net: fec: enable busfreq for arm64 platform

Enable busfreq for arm64 platform.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16783 arm64: imx8qm-mek: add mlb support
Gao Pan [Tue, 7 Nov 2017 08:25:03 +0000 (16:25 +0800)]
MLK-16783 arm64: imx8qm-mek: add mlb support

add mlb support for imx8qm mek board

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
7 years agoMLK-16742-4: ASoC: imx-cs42888: fix DAPM routes
Viorel Suman [Tue, 7 Nov 2017 13:39:49 +0000 (15:39 +0200)]
MLK-16742-4: ASoC: imx-cs42888: fix DAPM routes

ASRC DAPM routes not needed when ASRC node is not specified.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-16693-2: mipi_csi: fix null video name setting
Guoniu.Zhou [Thu, 2 Nov 2017 07:01:54 +0000 (15:01 +0800)]
MLK-16693-2: mipi_csi: fix null video name setting

Setting video device name before memset operation
lead to null value of vdev->name

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

7 years agoMLK-16693-1: mipi_csi: Add enum framesize ioctl
Guoniu.Zhou [Thu, 2 Nov 2017 03:18:08 +0000 (11:18 +0800)]
MLK-16693-1: mipi_csi: Add enum framesize ioctl

Enum framesize include VIDIOC_ENUM_FRAMESIZES and
VIDIOC_ENUM_FRAMEINTERVALS cmd.

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

7 years agoMLK-16692-2: mipi_csi: Add S_PARM and G_PARM ioctl
Guoniu.Zhou [Thu, 2 Nov 2017 01:33:14 +0000 (09:33 +0800)]
MLK-16692-2: mipi_csi: Add S_PARM and G_PARM ioctl

Add VIDIOC_S_PARM and VIDIOC_G_PARM ioctl to support
to get and set camera parameters

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

7 years agoMLK-16692-1: csi: Identify which camera really connect to interface
Guoniu.Zhou [Tue, 31 Oct 2017 01:57:25 +0000 (09:57 +0800)]
MLK-16692-1: csi: Identify which camera really connect to interface

There maybe 0-4 cameras can connected to interface at
the same time. Add this ioctl to identify which camera
really connect to the interface.

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

7 years agoMLK-16682 usb: cdns3: gadget: delete useless is_iso_flag
Peter Chen [Mon, 23 Oct 2017 08:53:52 +0000 (16:53 +0800)]
MLK-16682 usb: cdns3: gadget: delete useless is_iso_flag

Since the runtime endpoint type is decided by device descriptors,
we delete useless is_iso_flag which is decided during the initialization.
It also fixed a bug the max_packet_size is determined wrongly for
high/full speed connection.

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

Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16727-4 ARM64: dts: fsl-imx8qxp-mek: change PD role as source only
Peter Chen [Tue, 7 Nov 2017 07:21:42 +0000 (15:21 +0800)]
MLK-16727-4 ARM64: dts: fsl-imx8qxp-mek: change PD role as source only

At MEK hardware design, the PD is source only, so the software must
configure PTN5110 as source only, otherwise, there is an inrush higher
voltage at vbus when connects to PC due to EN_SRC is enabled at DRP
mode, and causes some PC are shut down.

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

Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16727-3 usb: cdns3: force vbus status accordingly
Peter Chen [Tue, 31 Oct 2017 02:50:14 +0000 (10:50 +0800)]
MLK-16727-3 usb: cdns3: force vbus status accordingly

Since the controller doesn't know vbus status well due to IC limitation,
it needs to force vbus status for controller when the connection and
disconnection occur.

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

Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16727-2 Revert "MLK-16285-5 extcon: extcon-ptn5110: only sends EXTCON_USB_HOST...
Peter Chen [Mon, 30 Oct 2017 06:07:16 +0000 (14:07 +0800)]
MLK-16727-2 Revert "MLK-16285-5 extcon: extcon-ptn5110: only sends EXTCON_USB_HOST event"

This reverts 'commit cca4c561e412 ("MLK-16285-5 extcon: extcon-ptn5110:
only sends EXTCON_USB_HOST event")'

Some controllers (eg, Cadence USB3) need to know vbus disconnection
status for its internal state machine, so we need Type-C chip to
send this event as well.

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

Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16727-1 usb: cdns3: needs to handle disconnection at device mode
Peter Chen [Mon, 30 Oct 2017 05:43:52 +0000 (13:43 +0800)]
MLK-16727-1 usb: cdns3: needs to handle disconnection at device mode

The IP has some issues to detect vbus status correctly, we have to
force vbus status accordingly, so we need a status to indicate
vbus disconnection, and add some code to let control know vbus
removal, in that case, the controller's state mechine can be correct.

In this commit, we increase one role 'CDNS3_ROLE_END' to for
this status.

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

Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16772 gpu: imx: dpu: cf: Add safety_stream_cf_color module parameter support
Liu Ying [Mon, 6 Nov 2017 02:35:46 +0000 (10:35 +0800)]
MLK-16772 gpu: imx: dpu: cf: Add safety_stream_cf_color module parameter support

This patch adds safety_stream_cf_color module parameter support so that
users may set the default color generated by the constframe units(4 and 5)
of safety streams.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16771 drm/imx: dpu: kms: Change to use a better KMS
Liu Ying [Mon, 23 Oct 2017 04:57:55 +0000 (12:57 +0800)]
MLK-16771 drm/imx: dpu: kms: Change to use a better KMS

This patch improves DPU KMS by the following means:
1) Wait for shadow registers being loaded in ->atomic_flush()
   to make sure there is no intermediate register values being
   loaded when doing atomic update.
2) Improve CRTC enablement/disablement sequences/configurations
   according to spec.
3) Remove the FGDM__PRIM framegen display mode from ->mode_set_nofb()
   and always use FGDM__SEC_ON_TOP mode so that we may prepare
   for introducing a safety stream solution in the future.
4) Better vblank on/off and vblank event handling, though there
   should be no essential improvements.
5) Some fixes for adding correct CRTC/plane/connector states
   in the full atomic state in dpu_drm_atomic_check().
6) Remove CRTC and plane states from the full atomic state where
   possible to improve atomic update performance.
7) Introduce a plane group mutex to protect plane source mask and
   vproc source mask.  This is a little bit superfluous due to
   the protection provided by the atomic helper, but just one of
   the DPU core itself.

The changes are in a bundle to avoid any unexpected drawbacks
of introducing them at a smaller granularity.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-16755 video: fbdev: mipi_dsi_northwest: fix a linker error when do 64bit div
Fancy Fang [Thu, 2 Nov 2017 05:43:39 +0000 (13:43 +0800)]
MLK-16755 video: fbdev: mipi_dsi_northwest: fix a linker error when do 64bit div

Compiling the 64-bit integer direct division statement by
32-bit GCC compiler may trigger below linker error:

"
drivers/built-in.o: In function `mipi_dsi_enable':
core.c:(.text+0x2ad48): undefined reference to `__aeabi_uldivmod'
core.c:(.text+0x2ad60): undefined reference to `__aeabi_uldivmod'
core.c:(.text+0x2ada4): undefined reference to `__aeabi_uldivmod'
core.c:(.text+0x2ade8): undefined reference to `__aeabi_uldivmod'
core.c:(.text+0x2aed4): undefined reference to `__aeabi_uldivmod'
drivers/built-in.o:core.c:(.text+0x2af00): more undefined references to
`__aeabi_uldivmod' follow
make: *** [vmlinux] Error 1
"

In this case, use 'do_div()' can solve this linker error.
This patch changes all the 'DIV_ROUND_CLOSEST()' to its
64-bit version 'DIV_ROUND_CLOSEST_ULL()' and also uses
'do_div()' to replace all the direct division operations
if required.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16769-5: mtd: gpmi-nand runtime pm code change
Han Xu [Tue, 7 Nov 2017 22:25:17 +0000 (16:25 -0600)]
MLK-16769-5: mtd: gpmi-nand runtime pm code change

acquire/release dma in runtime pm resume/suspend to proper get/put dma
resources.

 BuildInfo:
  - SCFW 60e110f9, IMX-MKIMAGE e131af10, ATF
  - U-Boot 2017.03-imx_4.9.51_8qm_beta1_8qxp_alpha+gfcc9bdc

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16769-4: dma: mxs-dma: enable runtime PM for mxs-dma
Han Xu [Mon, 30 Oct 2017 19:50:33 +0000 (14:50 -0500)]
MLK-16769-4: dma: mxs-dma: enable runtime PM for mxs-dma

enable runtime pm for mxs-dma

 BuildInfo:
  - SCFW 60e110f9, IMX-MKIMAGE e131af10, ATF
  - U-Boot 2017.03-imx_4.9.51_8qm_beta1_8qxp_alpha+gfcc9bdc

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16769-3: dma: mxs-dma: clean up the i.MX7D clock code
Han Xu [Fri, 27 Oct 2017 18:44:34 +0000 (13:44 -0500)]
MLK-16769-3: dma: mxs-dma: clean up the i.MX7D clock code

There is only one clock need to be handled after the clock code change
for i.MX7D. remove the redundant code.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16769-2: arm: dts: change the GPMI and APBH clock name
Stefan Agner [Fri, 27 Oct 2017 18:42:13 +0000 (13:42 -0500)]
MLK-16769-2: arm: dts: change the GPMI and APBH clock name

change the clock name in dt according to the clock code change.

7 years agoMLK-16769-1: clk: imx7d: create clocks behind rawnand clock gate
Stefan Agner [Fri, 27 Oct 2017 18:39:15 +0000 (13:39 -0500)]
MLK-16769-1: clk: imx7d: create clocks behind rawnand clock gate

Merge community clock code change for i.MX7D.

The rawnand clock gate gates two clocks, NAND_USDHC_BUS_CLK_ROOT
and NAND_CLK_ROOT. However, the gate has been in the chain of the
latter only. This does not allow to use the NAND_USDHC_BUS_CLK_ROOT
only, e.g. as required by APBH-Bridge-DMA.

Add new clocks which represent the clock after the gate, and use a
shared clock gate to correctly model the hardware.

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMGS-3389 [#ccc] fix coverity issue
Yuchou Gan [Wed, 8 Nov 2017 09:54:52 +0000 (17:54 +0800)]
MGS-3389 [#ccc] fix coverity issue

fix coverity issue

Date: Nov 7, 2017
Signed-off-by Yuchou Gan <yuchou.gan@nxp.com>

7 years agoMLK-16742-3: dts: arm64: imx8qm: Fix ESAI fsys clock.
Viorel Suman [Tue, 7 Nov 2017 09:26:56 +0000 (11:26 +0200)]
MLK-16742-3: dts: arm64: imx8qm: Fix ESAI fsys clock.

Set ESAI fsys clock to IMX8QM_AUD_ESAI_0_IPG.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-16742-2: dts: arm64: imx8qxp: Add ESAI spba clock.
Viorel Suman [Mon, 6 Nov 2017 13:05:14 +0000 (15:05 +0200)]
MLK-16742-2: dts: arm64: imx8qxp: Add ESAI spba clock.

Add missing ESAI spba clock.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-16742-1: dts: arm64: imx8qxp: Set proper compatible string
Viorel Suman [Mon, 6 Nov 2017 13:35:54 +0000 (15:35 +0200)]
MLK-16742-1: dts: arm64: imx8qxp: Set proper compatible string

Set proper compatible string in order to trigger
proper handling of constrain_period_size.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-16671-6 - [i.MX8QXP/Malone]: Add vpu malone decoder
Zhou Peng-B04994 [Fri, 3 Nov 2017 06:03:00 +0000 (14:03 +0800)]
MLK-16671-6 - [i.MX8QXP/Malone]: Add vpu malone decoder

enable vpu module in dts

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
7 years agoMGS-3214-2: gpu-viv: integrate 6.2.4 formal driver
Xianzhong [Fri, 3 Nov 2017 06:12:38 +0000 (14:12 +0800)]
MGS-3214-2: gpu-viv: integrate 6.2.4 formal driver

Support GEM DRM feature for Android DRM and X11 DRI3,
Fixed GC7000XSVX OpenVX 1.1 CTS failures for i.MX8QM,
Add more performance optimization for GPU benchmarks.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMLK-16760 soc: imx: support i.MX8MQ new revision SoC
Anson Huang [Fri, 3 Nov 2017 10:31:55 +0000 (18:31 +0800)]
MLK-16760 soc: imx: support i.MX8MQ new revision SoC

On i.MX8MQ, the new revision SoC does NOT update the
revision info in ANATOP_DIGPROG register, to support
dynamic SOC id/revision detection, only reading info
from ANATOP_DIGPROG is not working now, change to read
SOC id/revision from ATF which is in secure world.

The ATF will read the ANATOP_DIGPROG as well as ROM
version to decide the SOC revision.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16754 ARM64: dts: imx8qm: enable the smmu on sata
Richard Zhu [Thu, 2 Nov 2017 05:46:20 +0000 (13:46 +0800)]
MLK-16754 ARM64: dts: imx8qm: enable the smmu on sata

enable the smmu on sata

BuildInfo:
- SCFW 9559d5ec, IMX-MKIMAGE 06bc2767, ATF
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16697 staging: typec: tcpci: add notfication for device attach
Li Jun [Thu, 26 Oct 2017 18:28:15 +0000 (02:28 +0800)]
MLK-16697 staging: typec: tcpci: add notfication for device attach

Some usb device driver can't know the connect and disconnect to host
if the vbus is always on, if use typec we can rely on cc line status
to know that, so add a notification to let controller driver know
device attach and detach from host.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMLK-16686-2 ARM64: dts: imx8mq: enable rpmsg on imx8mq
Richard Zhu [Mon, 30 Oct 2017 07:25:11 +0000 (15:25 +0800)]
MLK-16686-2 ARM64: dts: imx8mq: enable rpmsg on imx8mq

Enable rpmsg support on imx8mq platforms.
- To avoid the potenial confliction, reduce the allocation
scope of CMA.
- Reserved the 0xb800_0000 1Mbyte for RPMSG

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16686-1 clk: imx8mq: add the mu clk
Richard Zhu [Fri, 20 Oct 2017 06:01:55 +0000 (14:01 +0800)]
MLK-16686-1 clk: imx8mq: add the mu clk

add the mu clock

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16746 imx8mq: support m4
Peng Fan [Thu, 2 Nov 2017 02:45:33 +0000 (10:45 +0800)]
MLK-16746 imx8mq: support m4

Support M4/A53 work together
1. add imx_src_is_m4_enabled
2. introduce a new dts dedicated for m4
3. add more pwm nodes
4. Since clk initialization is at very early stage, add m4 enabled check
   in the beginning of clk code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-16706-4 video: fbdev: mipi_dsi_northwest: improve phy pll config
Fancy Fang [Wed, 25 Oct 2017 03:53:46 +0000 (11:53 +0800)]
MLK-16706-4 video: fbdev: mipi_dsi_northwest: improve phy pll config

The MXL PLL uses the following function to generate
the output clock 'CLKOUT' based on the input 'CLKREF'
(which is the reference clock):

"
CLKOUT = CLKREF * CM / (CN * CO);
CM range is in [16, 255];
CN range is in [1, 16];
CO range is in {1, 2, 4, 8};
"

So the DSI driver needs to derive proper 'CM', 'CN'
and 'CO' to get the required 'CLKOUT' based on the
'CLKREF'. This commit provides a general method to
derive the best 'CM', 'CN' and 'CO' values for any
required 'CLKOUT' and input 'CLKREF' combinations.
'best' means the actual generated output clock freq
is closest to the required 'CLKOUT' by using the
derived 'CM', 'CN' and 'CO'.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16706-3 video: fbdev: mipi_dsi_northwest: add map tables for 'CM', 'CN' and 'CO'
Fancy Fang [Fri, 20 Oct 2017 15:08:08 +0000 (23:08 +0800)]
MLK-16706-3 video: fbdev: mipi_dsi_northwest: add map tables for 'CM', 'CN' and 'CO'

The 'CM', 'CN' and 'CO' possible values have no apparent
relationships with their registers config values. So add
three tables to describe mappings for them.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16706-2 video: fbdev: mipi_dsi_northwest: add 'phy_ref_clkfreq' field
Fancy Fang [Fri, 20 Oct 2017 11:01:58 +0000 (19:01 +0800)]
MLK-16706-2 video: fbdev: mipi_dsi_northwest: add 'phy_ref_clkfreq' field

Add 'phy_ref_clkfreq' field to 'struct mipi_dsi_info'
to save the reference clock frequency configed in dtb
file for mipi phy pll.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16706-1 video: fbdev: mipi_dsi_northwest: replace 'PICOS2KHZ' by 'PICOS2KHZ2'
Fancy Fang [Fri, 20 Oct 2017 10:44:23 +0000 (18:44 +0800)]
MLK-16706-1 video: fbdev: mipi_dsi_northwest: replace 'PICOS2KHZ' by 'PICOS2KHZ2'

The 'PICOS2KHZ' macro is used to get pixel clock frequency
from 'pixclock' value to derive the required mipi phy bit
clock frequency. But the result precision get from this
macro is not good enough in some cases. The patch defines
an new improved macro 'PICOS2KHZ2' to replace 'PICOS2KHZ'.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-16592: arm64: dts: fsl-imx8qm-mek: Enable cs42888 codec
Cosmin-Gabriel Samoila [Thu, 26 Oct 2017 11:31:54 +0000 (14:31 +0300)]
MLK-16592: arm64: dts: fsl-imx8qm-mek: Enable cs42888 codec

cs42888 can be found on i.mx8 QM MEK CPU board. It uses esai0 as a
digital audio interface.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-16743-1: Add iMX8QM dual LVDS device tree
Nitin Garg [Wed, 1 Nov 2017 02:30:48 +0000 (21:30 -0500)]
MLK-16743-1: Add iMX8QM dual LVDS device tree

Add iMX8QM dual it6263 lvds to hdmi device tree file

Signed-off-by: Nitin Garg <nitin.garg@nxp.com>
7 years agoMLK-16745-2: arm64: dts: dedicate dtb file for QM lpspi
Han Xu [Tue, 31 Oct 2017 20:45:20 +0000 (15:45 -0500)]
MLK-16745-2: arm64: dts: dedicate dtb file for QM lpspi

add dedicate dtb file for lpspi nor chip on base board for i.MX8QM,
remove the CS1 pin which is not used.

 BuildInfo:
  - SCFW 9e9f6ec6, IMX-MKIMAGE 49a2866a, ATF 0
  - U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16745-1: arm64: dts: dedicate dtb file for QXP lpspi
Han Xu [Tue, 31 Oct 2017 20:37:47 +0000 (15:37 -0500)]
MLK-16745-1: arm64: dts: dedicate dtb file for QXP lpspi

add a dedicate dtb file for the lpspi nor chip on base board, also
remove the unnecessary CS1 pin setting for the nor chip.

 BuildInfo:
  - SCFW 9e9f6ec6, IMX-MKIMAGE 49a2866a, ATF 0
  - U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c

Signed-off-by: Han Xu <han.xu@nxp.com>
7 years agoMLK-16743: Enable LVDS0 in iMX8QM arm2 and mek base device tree
Nitin Garg [Tue, 31 Oct 2017 17:38:30 +0000 (12:38 -0500)]
MLK-16743: Enable LVDS0 in iMX8QM arm2 and mek base device tree

Enable it6263 lvds0 in base device tree for 8QM MEK and ARM2

Signed-off-by: Nitin Garg <nitin.garg@nxp.com>
7 years agoMLK-16689-03 driver: soc: Add busfreq driver for imx8mq
Bai Ping [Mon, 30 Oct 2017 08:27:02 +0000 (16:27 +0800)]
MLK-16689-03 driver: soc: Add busfreq driver for imx8mq

Add busfreq driver support on i.MX8MQ. The busfreq driver is
mainly used for dynamic DDR frequency change for power saving
feature. When there is no peripheral or DMA device has direct
access to DDR memory, we can lower the DDR frequency to save
power. Currently, we support frequency setpoint for LPDDR4:

    (1): 3200mts, the DDRC core clock is sourced from 800MHz
         dram_pll, the DDRC apb clock is 200MHz.

    (2): 400mts, the DDRC core clock is source from sys1_pll_400m,
         the DDRC apb clock is is sourced from sys1_pll_40m.

    (3): 100mts, the DDRC core clock is sourced from sys1_pll_100m,
         the DDRC apb clock is sourced from sys1_pll_40m.

In our busfreq driver, we have three mode supported:
    * high bus mode  <-----> 3200mts;
    * audio bus mode <-----> 400mts;
    * low bus mode   <-----> 100mts;

The actual DDR frequency is done in ARM trusted firmware by calling
the SMCC SiP service call.

    BuildInfo:
     - IMX-MKIMAGE: 05d3d4a7d7, ATF: 724cc2b890
     - SPL/Uboot: f72c10d2db;

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16689-02 ARM64: dts: add busfreq node on imx8mq
Bai Ping [Mon, 30 Oct 2017 08:23:48 +0000 (16:23 +0800)]
MLK-16689-02 ARM64: dts: add busfreq node on imx8mq

Add the busfreq node used for DDR DVFS on imx8mq.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16689-01 driver: clk: add dram_core clock on imx8mq
Bai Ping [Mon, 30 Oct 2017 07:33:47 +0000 (15:33 +0800)]
MLK-16689-01 driver: clk: add dram_core clock on imx8mq

On i.MX8MQ, the dram core clock can be sourced from dram_pll or
the dram_alt clock, when sourced from the dram_alt, it has a fix
divider(1/4). When the DDRC core clock is lower than 800MHz, we
can swith the core clock to dram_alt source.

The dram apb clock's mux option 2 should be sys1_pll_40m, so fixed it.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agousb: dwc3: gadget: Fix ISO transfer performance
Roger Quadros [Fri, 21 Apr 2017 12:58:08 +0000 (15:58 +0300)]
usb: dwc3: gadget: Fix ISO transfer performance

Commit 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()")
caused a small change in the way ISO transfer is handled in the case
when XferInProgress event happens on Isoc EP with an active transfer.
This caused a performance degradation of 50%. e.g. using g_webcam on DUT
and luvcview on host the video frame rate dropped from 16fps to 8fps
@high-speed.

Make the ISO transfer handling equivalent to that prior to that commit
to get back the original ISO performance numbers.

Fixes: 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()")
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit f1d6826cae30e97e37a1f2481d7e1dc4faa09ce1)

7 years agousb: dwc3: gadget: cope with XferNotReady before usb_ep_queue()
Felipe Balbi [Fri, 21 Oct 2016 10:07:09 +0000 (13:07 +0300)]
usb: dwc3: gadget: cope with XferNotReady before usb_ep_queue()

If XferNotReady comes before usb_ep_queue() we will
set our PENDING request flag and wait for a
request. However, originally, we were assuming
usb_ep_queue() would always happen before our first
XferNotReady and that causes a corner case where we
could try to issue ENDTRANSFER command before
STARTTRANSFER.

Let's fix that by tracking endpoints which have been
started.

Reported-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit 6cb2e4e3de10893f38dbf3923a9cc50c76548a89)

7 years agousb: dwc3: gadget: properly check ep cmd
Felipe Balbi [Thu, 22 Sep 2016 09:25:28 +0000 (12:25 +0300)]
usb: dwc3: gadget: properly check ep cmd

The cmd argument we pass to
dwc3_send_gadget_ep_cmd() could contain extra
arguments embedded. When checking for StartTransfer
command, we need to make sure to match only lower 4
bits which contain the actual command and ignore the
rest.

Reported-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit 5999914f227b20addf01297b3df24be6b4161f69)

7 years agoMLK-16700: ARM64: dts: imx8qm-mek: enable audio mixer
Viorel Suman [Thu, 26 Oct 2017 11:54:54 +0000 (14:54 +0300)]
MLK-16700: ARM64: dts: imx8qm-mek: enable audio mixer

Enable audio mixer.

BuildInfo:
 - SCFW f5910b7d, IMX-MKIMAGE 2522fd70, ATF a438801
 - U-Boot 2017.03-00047-g8fe8d6d

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-16716 nvmem: imx-scu-ocotp do not read invalid address
Peng Fan [Fri, 27 Oct 2017 10:02:45 +0000 (18:02 +0800)]
MLK-16716 nvmem: imx-scu-ocotp do not read invalid address

Fix: hexdump: /sys/bus/nvmem/devices/imx-ocotp0/nvmem: Input/output error

Address space [272,543] is invalid address space on 8QXP, reading from SCU
will get SC_ERR_PARAM. So ignore these words when reading fuse.

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

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16726 ARM64: dts: fsl-imx8qm-lpddr4-arm2: remove lpuart0 cts/rts pin
Fugang Duan [Mon, 30 Oct 2017 03:13:32 +0000 (11:13 +0800)]
MLK-16726 ARM64: dts: fsl-imx8qm-lpddr4-arm2: remove lpuart0 cts/rts pin

Since lpuart0 configure as console port only, cts/rts pins are not necessary.
And lpuart2 is moved into M4 partition that will use these two pins.
So remove the two pins from dts file.

BuildInfo:
 - SCFW 88456c73, IMX-MKIMAGE 06bc2767, ATF a438801
 - U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g7953d47

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16712 tty: serial: lpuart: keep per clock disabled during suspend
Fugang Duan [Fri, 27 Oct 2017 01:45:25 +0000 (09:45 +0800)]
MLK-16712 tty: serial: lpuart: keep per clock disabled during suspend

Keep per clock disabled during system suspend.

BuildInfo:
 - SCFW 88456c73, IMX-MKIMAGE 06bc2767, ATF a438801
 - U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g7953d47

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16704-3: ARM64: configs: defconfig: add imx8_wdt
Robin Gong [Fri, 27 Oct 2017 02:04:23 +0000 (10:04 +0800)]
MLK-16704-3: ARM64: configs: defconfig: add imx8_wdt

Enable imx8_wdt driver by default.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16704-2: ARM64: dts: freescale: imx8qm/qxp: add watchdog
Robin Gong [Fri, 27 Oct 2017 02:02:44 +0000 (10:02 +0800)]
MLK-16704-2: ARM64: dts: freescale: imx8qm/qxp: add watchdog

add watchdog in dts.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16704-1: watchdog: imx8_wdt: add watchdog driver for i.mx8QM/QXP
Robin Gong [Fri, 27 Oct 2017 01:40:30 +0000 (09:40 +0800)]
MLK-16704-1: watchdog: imx8_wdt: add watchdog driver for i.mx8QM/QXP

This watchdog driver is a virtual driver in Linux and call ATF interface
where call SCFW eventually. In SCFW, it's done by SCU timer tick instead
of hardware watchdog.This is why we have to call ATF because such system
resource owned by secure patition.Currently, booard reset happen if not
ping this software watchdog in time in linux side, may change to partition
reboot once SCFW support this feature in the future.
 BuildInfo:
   - SCFW 93c142a9, IMX-MKIMAGE 2522fd70, ATF f2547fb
   - U-Boot 2017.03-00097-gd7599cf

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-16701 JPEG: add rum time pm support
Frank Li [Thu, 26 Oct 2017 15:58:53 +0000 (10:58 -0500)]
MLK-16701 JPEG: add rum time pm support

Support run time pm

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Sandor Yu <sandor.yu@nxp.com>
7 years agoMLK-16710 cpufreq: imx8mq: avoid duplicated OPP table initialization
Anson Huang [Fri, 27 Oct 2017 15:40:15 +0000 (23:40 +0800)]
MLK-16710 cpufreq: imx8mq: avoid duplicated OPP table initialization

On i.MX8MQ, since the OPP table is initialized in cpu-freq platform
device register according to chip type, so no need to redo the OPP
table initialization in cpu-freq driver, this patch adds check for
OPP table initialization to avoid below warning during boot up:

[    1.468378] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 1501
[    1.468388] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 1301
[    1.468417] cpu cpu0: _of_add_opp_table_v1: Failed to add OPP 1300000000
[    1.468425] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 1001
[    1.468434] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 8001
[    1.468443] cpu cpu0: _of_add_opp_table_v1: Failed to add OPP 800000000

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16705-3 ARM64: dts: freescale: imx8qxp: add resource wakeup support
Anson Huang [Fri, 27 Oct 2017 10:34:16 +0000 (18:34 +0800)]
MLK-16705-3 ARM64: dts: freescale: imx8qxp: add resource wakeup support

Add wakeup unit to support resource wakeup management on i.MX8QXP,
also enable wakeup function for LPUARTx and FLEXCANx.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16705-2 ARM64: dts: freescale: imx8qm: add resource wakeup support
Anson Huang [Fri, 27 Oct 2017 10:31:59 +0000 (18:31 +0800)]
MLK-16705-2 ARM64: dts: freescale: imx8qm: add resource wakeup support

Add wakeup unit to support resource wakeup management on i.MX8QM,
also enable wakeup function for LPUARTx and FLEXCANx.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16705-1 soc: imx: pm-domains: add wakeup unit irqchip to manage wakeup source
Anson Huang [Fri, 27 Oct 2017 10:24:12 +0000 (18:24 +0800)]
MLK-16705-1 soc: imx: pm-domains: add wakeup unit irqchip to manage wakeup source

For a resource enabled as wakeup source, its power needs to
be kept on during suspend, this is required by SCFW to support
wakeup ability for a resource.

This patch adds a virtual wakeup unit to support this function,
wakeup unit is registered as a irqchip being a child of GIC,
if a resource can be enabled as a wakeup source, needs to pass
its irq number in device tree power domain node using
"wakeup-irq = <x>" format, as power domain driver needs to map
the irq number to resource ID, also needs to assign its interrupt
parent to wakeup unit instead of GIC. During suspend, when power
domain driver intends to power off a resource, it will skip power
off operation if the resource is enabled as wakeup source.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16708 clk: imx: change the nand_usdhc_bus clock's source
Bai Ping [Fri, 27 Oct 2017 06:47:26 +0000 (14:47 +0800)]
MLK-16708 clk: imx: change the nand_usdhc_bus clock's source

Change NAND_USDHC_BUS clock's source to SYS PLL1 266M.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-16709 dts: imx8qm: Disable the UART2 on MEK base board
Ye Li [Fri, 27 Oct 2017 06:57:44 +0000 (01:57 -0500)]
MLK-16709 dts: imx8qm: Disable the UART2 on MEK base board

CM4_1 core will use the UART2 on QM MEK base board as its console. Since this port currently
is a backup debug port on A core side, not really used. We disable it in dts to yield the port
for CM4_1.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16702 soc:imx8qm/qxp Adding additional frequencies
Oliver Brown [Thu, 26 Oct 2017 00:15:01 +0000 (19:15 -0500)]
MLK-16702 soc:imx8qm/qxp Adding additional frequencies

Adding defines for 864 MHz and 432 MHz from the following commits:

"
commit 655ed33f3b2e158ea92ab96c3999a5bd73791d76
Author: Oliver Brown <oliver.brown@nxp.com>
Date:   Thu Oct 26 11:49:49 2017 -0500

    MIPI DSI V2: Adding define for 432 MHz.
"

"
commit 88456c73b3c1ffde496622f2e66614a46a073410
Author: Oliver Brown <oliver.brown@nxp.com>
Date:   Tue Oct 17 10:53:58 2017 -0500

MIPI DSI: change the fixed clocks to allow for a 27MHz PHY reference clock.
"

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
7 years agoMLK-16694-2: ARM64: dts: fix assigned-clocks for audio device node
Shengjiu Wang [Mon, 23 Oct 2017 03:12:33 +0000 (11:12 +0800)]
MLK-16694-2: ARM64: dts: fix assigned-clocks for audio device node

Even the clock is not used by current device, but it is used by
other devices, it also need to be included in the assigned-clocks
list. For in kernel side, clock rate is stored, but in scfw
the clock rate is cleared when power off, this mismatch cause
the parent rate is not set in next device, then children clock rate
is wrong.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-16694-1: ASoC: wm8960: add pm runtime for wm8960
Shengjiu Wang [Mon, 23 Oct 2017 03:06:12 +0000 (11:06 +0800)]
MLK-16694-1: ASoC: wm8960: add pm runtime for wm8960

As in imx8 mek board, the codec's mclk is from the audio subsystem,
the subsystem's power domain should be disabled when subsystem is idle.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-16590 ARM64: dts: fsl-imx8qxp-mek: enable USB3 and PTN5110
Peter Chen [Mon, 16 Oct 2017 01:17:11 +0000 (09:17 +0800)]
MLK-16590 ARM64: dts: fsl-imx8qxp-mek: enable USB3 and PTN5110

All imx8qxp mek board will replace NTB0104 with NTS0104, so it is ok
to enable PTN5110 and USB3 by default, see below commit for detail:
commit 5989fe321b3026 ("MLK-16522-4 ARM64: dts: fsl-imx8qxp-mek:
add USB3 support")

BuildInfo:
- SCFW 1f59442e, IMX-MKIMAGE fb52c576, ATF
- U-Boot 2017.03-imx_v2017.03+g34be5a2

Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-16678-2: ASoC: fsl_hifi4: move hifi4 firmware to SDRAM
Weiguang Kong [Mon, 23 Oct 2017 01:42:08 +0000 (09:42 +0800)]
MLK-16678-2: ASoC: fsl_hifi4: move hifi4 firmware to SDRAM

move hifi4 dsp firmware's code and data section to SDRAM space
move hifi4 dsp codec lib's code section to SDRAM space

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-16678-1: arm64: dts: distribute reserved memory for hifi4 dsp in SDRAM
Weiguang Kong [Mon, 23 Oct 2017 01:36:04 +0000 (09:36 +0800)]
MLK-16678-1: arm64: dts: distribute reserved memory for hifi4 dsp in SDRAM

Because the OCRAM memory size for hifi4 dsp is too small to keep its
code and data section, so distribute one reserved memory for hifi4 dsp
to save its code and data section in SDRAM, the address space that hifi4
can access in SDRAM is 0x81000000 - 0x9FFFFFFF, so the reserved memory
is as following:
   hifi4_reserved: hifi4@0x8e000000 {
       no-map;
       reg = <0 0x8e000000 0 0x1ffffff>;
   };

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-16691: ASoC: fsl_hifi4: unlock mutex before return error
Weiguang Kong [Wed, 25 Oct 2017 10:16:21 +0000 (18:16 +0800)]
MLK-16691: ASoC: fsl_hifi4: unlock mutex before return error

When error occurs in fsl_hifi4_open() function, before this
function exists, "hifi4_priv->hifi4_mutex" should be unlocked.
If not, when the device is opened next time, the kernel will
be hanged.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-16688 driver: media: mxc_jpeg: Remove the unused function to kill the build warnnings
Jason Liu [Tue, 24 Oct 2017 22:29:19 +0000 (06:29 +0800)]
MLK-16688 driver: media: mxc_jpeg: Remove the unused function to kill the build warnnings

The patch fixes the following build warnnings by removing unused function:

drivers/media/platform/imx8/mxc-jpeg.c:228:13: warning: ‘print_output’ defined
but not used [-Wunused-function]
 static void print_output(void *addr)
             ^~~~~~~~~~~~

This patch also does the minor clean up by removing some commented-out code

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-16684-3 ata: imx: enable imx8qm sata
Richard Zhu [Wed, 25 Oct 2017 02:48:48 +0000 (10:48 +0800)]
MLK-16684-3 ata: imx: enable imx8qm sata

enable sata on imx8qm.
sata function is relied on the usage of pcie ports.

BuildInfo:
- SCFW 9559d5ec, IMX-MKIMAGE 06bc2767, ATF
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f

Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>