linux.git
6 years agoMGS-4716 [#imx-1412] redirect cma limit request with dma32
Xianzhong [Thu, 18 Apr 2019 15:38:43 +0000 (23:38 +0800)]
MGS-4716 [#imx-1412] redirect cma limit request with dma32

L4.19 kernel support CONFIG_ZONE_DMA32 feature, which is
better to allocate 4G memory than CMA limit feature.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
6 years agoMLK-21489 drm/imx: dpu: kms: Return properly in case we fail to get plane state to...
Liu Ying [Thu, 18 Apr 2019 08:34:05 +0000 (16:34 +0800)]
MLK-21489 drm/imx: dpu: kms: Return properly in case we fail to get plane state to check

We should return properly in case we fail to get plane state to check.
For example, a race condition on the plane state would happen when one
thread does page flip and another thread updates CRTC properties on
that CRTC simultaneously.  '-EDEADLK' should be returned when the
condition occurs.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 2ab36051b74c49f66bb12d8d8086e6e6b3dc069b)

6 years agoMLK-21380 video: fbdev: mxsfb: fix resume timing for overlay fb
Fancy Fang [Fri, 12 Apr 2019 07:42:50 +0000 (15:42 +0800)]
MLK-21380 video: fbdev: mxsfb: fix resume timing for overlay fb

The overlay fb can only be enabled when the LCDIF is not in
running, otherwise overlay display may look like image shift.
So during the system resume procedure, the overlay fb should
be resumed before mxsfb unblank.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit f39662a3a38a2da082d55a006e634766cc85e347)

6 years agoMLK-21500 rpmsg: imx: CONFIG_ARCH_MXC_ARM64 should be replaced
Richard Zhu [Fri, 19 Apr 2019 06:12:55 +0000 (14:12 +0800)]
MLK-21500 rpmsg: imx: CONFIG_ARCH_MXC_ARM64 should be replaced

Since CONFIG_ARCH_MXC_ARM64 does not exist on imx_4.19.y, this should
be replaced by CONFIG_HAVE_IMX_SC.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-18355-2: hdp: Resolve hdp sink/source HDMI CAR headfile conflict
Sandor Yu [Fri, 18 May 2018 07:15:27 +0000 (15:15 +0800)]
MLK-18355-2: hdp: Resolve hdp sink/source HDMI CAR headfile conflict

Add head file sink_car.h.
Rename HDMI CAR bit definition.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20209 hdmi rx: fixed unsigned compare against less than zero
Oliver Brown [Fri, 22 Mar 2019 18:44:37 +0000 (13:44 -0500)]
MLK-20209 hdmi rx: fixed unsigned compare against less than zero

Fixed CID 3411368, Unsigned compared against 0. Removed comparison with
no effect.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
6 years agoMLK-20451-3: hdmi rx: Add hdmi rx cec running status
Sandor Yu [Fri, 23 Nov 2018 07:01:08 +0000 (15:01 +0800)]
MLK-20451-3: hdmi rx: Add hdmi rx cec running status

Add hdmi rx cec running status.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20451-2: hdmi rx: Fix incorrect type of function return variable
Sandor Yu [Fri, 23 Nov 2018 06:40:16 +0000 (14:40 +0800)]
MLK-20451-2: hdmi rx: Fix incorrect type of function return variable

Fix incorrect function return variable type.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20451-1: hdmt rx: use dev_xxx instead of pr_xxx
Sandor Yu [Fri, 2 Nov 2018 08:03:55 +0000 (16:03 +0800)]
MLK-20451-1: hdmt rx: use dev_xxx instead of pr_xxx

Print hdmi rx video mode info.
use dev_xxx instead of pr_xxx in mxc-hdmi-hw.c.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20391: v4l2: hdmi rx: Add hdmi cable plugin status check
Sandor Yu [Fri, 16 Nov 2018 08:26:44 +0000 (16:26 +0800)]
MLK-20391: v4l2: hdmi rx: Add hdmi cable plugin status check

Added hdmi cable plugin status check in v4l2 api function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19990-3: hdmi rx: Fix hdmi rx reset bit error
Sandor Yu [Fri, 19 Oct 2018 09:07:14 +0000 (17:07 +0800)]
MLK-19990-3: hdmi rx: Fix hdmi rx reset bit error

Fix hdmi rx reset bit error.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19990-2: hdmi rx: Remove ddc clock setting function
Sandor Yu [Fri, 19 Oct 2018 07:42:03 +0000 (15:42 +0800)]
MLK-19990-2: hdmi rx: Remove ddc clock setting function

HDMI RX DDC clock is configurated in HDMI RX FW(V1.0.52).
Remove code in driver.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19990-1: hdmi rx: enable low power mode for cable plugout
Sandor Yu [Fri, 19 Oct 2018 07:22:31 +0000 (15:22 +0800)]
MLK-19990-1: hdmi rx: enable low power mode for cable plugout

-HDMI RX controller enter low power mode when cable plug out.
-Replace CDN_API_HDMIRX_ReadEvent with
CDN_API_General_GetHpdState_blocking, hdmi rx could enter low power
mode.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19610: hdmi rx: Enable hdmi rx edid function
Sandor Yu [Tue, 18 Sep 2018 07:00:52 +0000 (15:00 +0800)]
MLK-19610: hdmi rx: Enable hdmi rx edid function

Update edid block0&1 for imx8qm hdmi rx.
Remove unsupported video modes.
Added edid clock setting.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19583-1: hdmi rx: Add HPD support
Sandor Yu [Fri, 14 Sep 2018 05:26:15 +0000 (13:26 +0800)]
MLK-19583-1: hdmi rx: Add HPD support

Add HPD support.
Add s_param function that may needed by user application.
Add mutex protect for hdp register access.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18578: hdmi_rx: wait longer time for audio info frame
Shengjiu Wang [Fri, 8 Jun 2018 10:36:03 +0000 (18:36 +0800)]
MLK-18578: hdmi_rx: wait longer time for audio info frame

The wait time is short that cause recording failed sometimes

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18578: hdmi_rx: fix issue that ARC can't work in 4k.
Shengjiu Wang [Fri, 8 Jun 2018 09:59:53 +0000 (17:59 +0800)]
MLK-18578: hdmi_rx: fix issue that ARC can't work in 4k.

After changing the deemphasis to 0dB in TX_DIG_CTRL_REG_1
the issue that ARC can't work with 4k resolution is fixed

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18397-1: hdmi_rx: turn on aux_ana for rx arc
Shengjiu Wang [Fri, 25 May 2018 02:37:51 +0000 (10:37 +0800)]
MLK-18397-1: hdmi_rx: turn on aux_ana for rx arc

turn on aux_ana for rx arc

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18368-6: hdmi_rx: avoid blocking in audio config
Shengjiu Wang [Tue, 22 May 2018 07:43:41 +0000 (15:43 +0800)]
MLK-18368-6: hdmi_rx: avoid blocking in audio config

add delay count in audio auto config to avoid blocking
change the justify to right

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18368-5: hdmi_rx: add hdmi rx audio clock
Shengjiu Wang [Tue, 22 May 2018 07:31:49 +0000 (15:31 +0800)]
MLK-18368-5: hdmi_rx: add hdmi rx audio clock

add clock for hdmi audio rx

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18368-4: hdmi_rx: add generic hdmi audio rx driver
Shengjiu Wang [Tue, 22 May 2018 07:32:51 +0000 (15:32 +0800)]
MLK-18368-4: hdmi_rx: add generic hdmi audio rx driver

Register generic hdmi audio rx driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18366: hdmi_rx: return error when HDMI PHY failed initialized
Sandor Yu [Tue, 22 May 2018 03:28:38 +0000 (11:28 +0800)]
MLK-18366: hdmi_rx: return error when HDMI PHY failed initialized

return error state when HDMI PHY failed initialized.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18355-8: hdmi rx: Add HDMI RX CEC function
Sandor Yu [Mon, 21 May 2018 02:58:46 +0000 (10:58 +0800)]
MLK-18355-8: hdmi rx: Add HDMI RX CEC function

Add HDMI RX CEC function in hdmi rx driver.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18355-7: hdmi_rx: Enable HDMI RX CEC clock
Sandor Yu [Mon, 21 May 2018 02:48:03 +0000 (10:48 +0800)]
MLK-18355-7: hdmi_rx: Enable HDMI RX CEC clock

Enable HDMI RX CEC clock when hdmi rx driver initialized.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18355-6: hdmi_rx: move startup function to probe function
Sandor Yu [Mon, 21 May 2018 02:45:00 +0000 (10:45 +0800)]
MLK-18355-6: hdmi_rx: move startup function to probe function

Move startup function from s_power to probe function,
HDMI RX controller keep in running state after driver probe.
The startup function should move to cable plugin handle.
When iMX8QM B0 silicon HDMI RX hot plug function is ready.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18355-5: hdmi_rx: Add timeout for check HDMI 5V
Sandor Yu [Mon, 21 May 2018 02:41:08 +0000 (10:41 +0800)]
MLK-18355-5: hdmi_rx: Add timeout for check HDMI 5V

Add timeout for HDMI 5V check.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18267-4: hdmi rx: hdmi rx driver for imx8qm
Sandor Yu [Thu, 10 May 2018 03:25:40 +0000 (11:25 +0800)]
MLK-18267-4: hdmi rx: hdmi rx driver for imx8qm

Enable hdmi rx driver for imx8qm.
Driver implement with V4L2 architecture.
RGB32 and YUV444 are verified.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18267-3: hdp api: Add HDMI RX API function
Sandor Yu [Thu, 12 Apr 2018 02:59:21 +0000 (10:59 +0800)]
MLK-18267-3: hdp api: Add HDMI RX API function

Add HDMI RX video and audio API function and head files.
This API base on CDN_API_1_0_36.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-21478-25 Revert "MLK-16013-9 usb: typec: add interface to get port type and role"
Li Jun [Thu, 18 Apr 2019 09:21:41 +0000 (17:21 +0800)]
MLK-21478-25 Revert "MLK-16013-9 usb: typec: add interface to get port type and role"

This reverts commit ccbf06406704c52d5146c9f28cbc8907429b92ce.

As we will use fwnode API to get typec properties, those APIs to be
reverted are not required, this will also fix below build warnings:

drivers/usb/typec/class.c: In function ‘typec_register_port’:
drivers/usb/typec/class.c:1591:2: warning: enumeration value
‘TYPEC_PORT_TYPE_UNKNOWN’ not handled
in switch [-Wswitch]
  switch (cap->type) {
  ^~~~~~

Reported-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-24 usb: typec: support source only port with dual data
Li Jun [Wed, 17 Apr 2019 09:44:32 +0000 (17:44 +0800)]
MLK-21478-24 usb: typec: support source only port with dual data

In case source only for power, but dual data role on USB, we
enable drp toggling for detect source(host), this is mainly for
get orientation, then keep it at SNK_ATTACHED state.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agonvmem: imx-ocotp: add i.MX7ULP support
Anson Huang [Mon, 28 Jan 2019 15:54:57 +0000 (15:54 +0000)]
nvmem: imx-ocotp: add i.MX7ULP support

i.MX7ULP is a new SoC of i.MX family which has 8 kbit eFuse OTP,
enable ocotp driver support for this SoC.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c8b63ddc91190d4022d456bf6abbc2085b4f56b5)

6 years agoMLK-20718-4: arm64: dts: imx8qm: Use DSI PHY_REF clk
Robert Chiras [Fri, 1 Mar 2019 08:39:19 +0000 (10:39 +0200)]
MLK-20718-4: arm64: dts: imx8qm: Use DSI PHY_REF clk

Until now, the DSI PHY_REF clock was by default ON in SCFW, which made
this clock unusable in kernel, therefore, this clock was set as
CLK_DUMMY in DSI device nodes.
Sinnce this clock was set to OFF in SCFW, now it can be used from
kernel, so add it to device nodes so that the driver can use it
properly.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
6 years agoMLK-20718-3: arm64: dts: imx8dx: Use DSI PHY_REF clk
Robert Chiras [Fri, 1 Mar 2019 08:35:32 +0000 (10:35 +0200)]
MLK-20718-3: arm64: dts: imx8dx: Use DSI PHY_REF clk

Until now, the DSI PHY_REF clock was by default ON in SCFW, which made
this clock unusable in kernel, therefore, this clock was set as
CLK_DUMMY in DSI device nodes.
Sinnce this clock was set to OFF in SCFW, now it can be used from
kernel, so add it to device nodes so that the driver can use it
properly.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
6 years agoMLK-20718-2: clk: imx8qxp: Add DSI phy_ref clk for second instance
Robert Chiras [Fri, 1 Mar 2019 08:30:02 +0000 (10:30 +0200)]
MLK-20718-2: clk: imx8qxp: Add DSI phy_ref clk for second instance

The DSI PHY_REF clock for the second DSI instance was missing from the
clock driver, so add it now.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
6 years agoMLK-20718-1: clk: imx8qm: Add DSI phy_ref clock
Robert Chiras [Fri, 1 Mar 2019 08:27:25 +0000 (10:27 +0200)]
MLK-20718-1: clk: imx8qm: Add DSI phy_ref clock

Add the missing clocks for the DSI PHY_REF:
IMX8QM_MIPI0_DSI_PHY_CLK and IMX8QM_MIPI1_DSI_PHY_CLK.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
6 years agoMLK-20558 media: camera: add QVGA 30fps support for ov5640
Robby Cai [Thu, 6 Dec 2018 10:17:35 +0000 (18:17 +0800)]
MLK-20558 media: camera: add QVGA 30fps support for ov5640

Add QVGA @30fps support for ov5640

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit c2dd4525e766355076e8fb8f0ae40fe98c27130a)

6 years agoMLK-19362: media: csi: Fix "Hresponse" and "Rx fifo overflow" camera errors
Mirela Rabulea [Wed, 12 Sep 2018 08:50:54 +0000 (11:50 +0300)]
MLK-19362: media: csi: Fix "Hresponse" and "Rx fifo overflow" camera errors

When the register setting for fifo_send_level is set to high, some residual
data of a frame which cannot fill up to the send_level, will be sent with
the next frame data. In this case, for CSI receive dma, sometimes,
the vertical blanking is too short to finish the storage of the previous
frame before the next frame start, depending on the system bandwidth.

Tested on imx8mq-evk rev B4 and B3, with OV5640 camera.

This patch was proposed by Tom Zheng <haidong.zheng@nxp.com>

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 12f811f934b53008a445c3af67f1f22baea98a86)

6 years agoMLK-19537-2 media: mipi_csi: use PHY slave reset for MIPI CSI
Robby Cai [Tue, 11 Sep 2018 07:01:10 +0000 (15:01 +0800)]
MLK-19537-2 media: mipi_csi: use PHY slave reset for MIPI CSI

Remove PHY master reset and only need to use PHY slave reset for MIPI CSI.
Use regmap framework for cleanup.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 6968f84ad8ee1613ff90d90e19e7434d5dd95126)
(cherry picked from commit 8a93a78c9bee1b456961a6d611f31d7708089798)

6 years agoMLK-18552-2 media: mipi_csi: enable disp_axi and disp_apb before the access
Robby Cai [Mon, 11 Jun 2018 02:38:43 +0000 (10:38 +0800)]
MLK-18552-2 media: mipi_csi: enable disp_axi and disp_apb before the access

On i.MX8MM, IC design uses registers from CSI to do MIPI PHY reset. Need enable
disp_axi and disp_apb before the access, otherwise meet hang issue.

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

6 years agoMLK-18362-2 midea: mipi_csi: add mipi phy reset on imx8mm
Robby Cai [Wed, 23 May 2018 13:03:27 +0000 (21:03 +0800)]
MLK-18362-2 midea: mipi_csi: add mipi phy reset on imx8mm

on imx8mm, use different way rather than via SRC. so use different
device id to distinguish different MIPI-PHY reset method.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 59e5fa6d4e8ad5c3d4fcd54aa8fa0a0d98e148b6)

6 years agoMLK-18485 emvsim: enable CWT for ATR
Gao Pan [Mon, 4 Jun 2018 07:47:21 +0000 (15:47 +0800)]
MLK-18485 emvsim: enable CWT for ATR

Enable CWT for ATR, and switch to RX_DATA_IM to detect receiving data
in fifo.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry pick from: d6807ed26c531ef50c23fb8575ff07dd778de2df)
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-17416 imx8: sim: add usleep_range() before reading SPDP Bit
Gao Pan [Fri, 19 Jan 2018 03:12:15 +0000 (11:12 +0800)]
MLK-17416 imx8: sim: add usleep_range() before reading SPDP Bit

Card Presence Detect Status Bit SPDP in EMV_SIM_PCSR is
synchronized by two posedge of low_ref_clk which is 32KHz.

So there should be 1.5 low_ref_clk cycles(about 90us) before
reading SPDP Bit.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry pick from: 42a733a62525725d145ce6b55dfc94f1f5ff0a9d)
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-17319-3 defconfig: enable EMVSIM in defconfig
Gao Pan [Thu, 18 Apr 2019 05:38:57 +0000 (13:38 +0800)]
MLK-17319-3 defconfig: enable EMVSIM in defconfig

enable EMVSIM in defconfig

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

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

This patch adds driver to support EMVSIM module for imx8.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry pick from: 2cac9c1e36676af7e3964d93b2aaea4991bc3c53)
(Fixed conflicts and added "#include <linux/pinctrl/consumer.h>")
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21415 can: flexcan: add Tx support for variable payload size
Joakim Zhang [Thu, 18 Apr 2019 08:54:34 +0000 (16:54 +0800)]
MLK-21415 can: flexcan: add Tx support for variable payload size

Now the FlexCAN driver always use last mailbox for TX, it will work well when
MB payload size is 8/16 bytes. TX mailbox would change to 13 when MB payload
size is 64 bytes to support CANFD. So we may need to set iflag register to add
support for variable payload size.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21414 can: flexcan: use callback for mailbox read/write function
Joakim Zhang [Mon, 8 Apr 2019 06:55:19 +0000 (14:55 +0800)]
MLK-21414 can: flexcan: use callback for mailbox read/write function

Add callback for mailbox read/write function and clean up the code.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21413 can: flexcan: use CBT register to set bitrate for normal mode on i.MX8
Joakim Zhang [Mon, 8 Apr 2019 05:04:32 +0000 (13:04 +0800)]
MLK-21413 can: flexcan: use CBT register to set bitrate for normal mode on i.MX8

We need to add property in DTS node before when we want to use normal
mode on i.MX8 platform. Check in RM, we also can use CBT register not
must CTRL1 register to set bitrate for normal mode.

This patch intends to use CBT register to set bitrate for normal mode on
i.MX8. After this, we don't need to modify the DTS node to support
normal mode.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21412 can: flexcan: add ISO CAN FD feature support
Joakim Zhang [Mon, 8 Apr 2019 04:56:35 +0000 (12:56 +0800)]
MLK-21412 can: flexcan: add ISO CAN FD feature support

ISO CAN FD is introduced to increase the failture detection capability
than non-ISO CAN FD. The non-ISO CAN FD is still supported by FlexCAN so
that it can be used mainly during an intermediate phase, for evaluation
and development purposes.

Therefore, it is strongly recommended to configure FlexCAN to the ISO
CAN FD protocol by setting the ISOCANFDEN field in the CTRL2 register.

Test Command:
ISO FD MODE:
ip link set can0 type can bitrate 1000000 dbitrate 4000000 fd on
fd-non-iso off

non-ISO FD MODE:
ip link set can0 type can bitrate 1000000 dbitrate 4000000 fd on
fd-non-iso on

NOTE: if you only set fd on, driver will use ISO FD MODE by default.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21411 can: flexcan: fix CAN can't suspend/resume when CAN is only capable of...
Joakim Zhang [Mon, 8 Apr 2019 05:32:28 +0000 (13:32 +0800)]
MLK-21411 can: flexcan: fix CAN can't suspend/resume when CAN is only capable of wakeup

When dev->power.can_wakeup set to true, device_prepare() may runtime resume the device:
    dpm_suspend_start()
            dpm_prepare(state);
                    dev->driver->pm->prepare()
                            pm_genpd_prepare()
                                    if (resume_needed(dev, genpd))
                                        pm_runtime_resume(dev);

And imx8qm/qxp power domain driver don't implement the active_wakeup() callback, then
resume_needed() always return "true" when dev->power.can_wakeup is true.

Once CAN device is runtime active status, then CAN's clock's count is 1 during system
suspend. And CAN0/CAN1/CAN2 share the same module clock, so we can say all CAN's module
clock is enabled during system suspended.

    flexcan_runtime_resume()
            flexcan_clks_enable(priv);

i.MX8QM/QXP SCU code clock logic requires linux kernel clocks should be disabled during
suspend, otherwise SCU don't enable them after system resume back.

There are two ways to fix the issue:
1. CAN driver should check the runtime status to ensure all clocks are disabled  during
system suspend.
2. Don't set CAN wakeup capability during probe, move it into flexcan_open().

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21410 can: flexcan: add CAN wakeup function for MX8
Joakim Zhang [Mon, 8 Apr 2019 04:50:28 +0000 (12:50 +0800)]
MLK-21410 can: flexcan: add CAN wakeup function for MX8

This patch is to add CAN wakeup function on MX8 platforms and update the
binding file fsl-flexcan.txt.

For MX8, the function "flexcan_irq()" should not call "flexcan_exit_stop_mode()"
due to firmware(SCU) cannot make SC IPC calls from an interrupt context.
If not exit stop mode in ISR, it will continuously enter wakeup ISR for the reason
that system will respond IRQ before call CAN system resume.
To fix the issue, we can exit stop mode during noirq resume stage.

For wakeup case, it should not set pinctrl to sleep state by
pinctrl_pm_select_sleep_state.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21409 can: flexcan: enable flexcan driver for i.MX8
Joakim Zhang [Mon, 8 Apr 2019 04:31:53 +0000 (12:31 +0800)]
MLK-21409 can: flexcan: enable flexcan driver for i.MX8

Add support flexcan on imx8 platforms, mailbox as default

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21408-2 can: flexcan: enable flexcan defconfig
Joakim Zhang [Mon, 8 Apr 2019 05:55:12 +0000 (13:55 +0800)]
MLK-21408-2 can: flexcan: enable flexcan defconfig

Add support in defconfig file to enable flexcan module on imx8qm/qxp boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21408-1 can: flexcan: enable flexcan support for arm64
Joakim Zhang [Mon, 8 Apr 2019 05:53:48 +0000 (13:53 +0800)]
MLK-21408-1 can: flexcan: enable flexcan support for arm64

Modify Kconfig file to enable flexcan support for arm64

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21493 brcmfmac: move .brcmf_bus_preinit() after changing bus state
Fugang Duan [Thu, 18 Apr 2019 08:21:20 +0000 (16:21 +0800)]
MLK-21493 brcmfmac: move .brcmf_bus_preinit() after changing bus state

Moving the brcmf_bus_preinit() call allows the bus code to do some
required initialization before handling firmware control messages.

.brcmf_bus_preinit() already is called in .brcmf_bus_started() when
bus is ready. So remove it from .brcmf_c_preinit_dcmds().

Fixes: 383c26d2ea2f(MLK-18675-20 brcmfmac: Support wake on ping packet)
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21492 brcmfmac: remove func0 that is not provied by mmc stack
Fugang Duan [Thu, 18 Apr 2019 06:50:34 +0000 (14:50 +0800)]
MLK-21492 brcmfmac: remove func0 that is not provied by mmc stack

func0 is not provided by the mmc stack as a function when probing.
commit 99d7b6fdfc8c(brcmfmac: Remove func0 from function array)
already remove the func0.

But commit c37fa19e0128(brcmfmac: Remove array of functions) add
fun0 again. That cause NULL pointer issue.

Fixes: c37fa19e0128(brcmfmac: Remove array of functions)
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21491 serial: imx: add pm_qos to interact with cpu idle
Fugang Duan [Wed, 17 Apr 2019 12:44:44 +0000 (20:44 +0800)]
MLK-21491 serial: imx: add pm_qos to interact with cpu idle

Add pm_qos to prevent cpuidle from entering low level idles
for uart DMA mode when the uart port is active.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21490 arm64: dts: imx8qxp: use power-on-gpio to power on EP device
Fugang Duan [Wed, 17 Apr 2019 07:12:20 +0000 (15:12 +0800)]
MLK-21490 arm64: dts: imx8qxp: use power-on-gpio to power on EP device

Pcie driver power-on-gpio pin to control EP device's power,
firstly power down, then power up when it registers pcie port.
So using the pin for PCIe wlan EP device is better.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21357 arm64: dts: imx8qm/imx8qxp: remove the 32KHz pin config
Fugang Duan [Tue, 16 Apr 2019 06:58:32 +0000 (14:58 +0800)]
MLK-21357 arm64: dts: imx8qm/imx8qxp: remove the 32KHz pin config

No need to set the 32KHz PIN except pcie brcmfmac driver
is loaded that requires to reserve these pin groups for
pin->init_state and pin->idle_state to support multiple
differents wlan cards.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21460: ASoC: imx-audmix: fix dummy device DMA ops
Viorel Suman [Tue, 16 Apr 2019 11:25:55 +0000 (14:25 +0300)]
MLK-21460: ASoC: imx-audmix: fix dummy device DMA ops

The device is not created from a device tree node, so arch_setup_dma_ops
is not called, thus leaving the device with dummy DMA ops. Fix this by
calling of_dma_configure() with a NULL node to set default DMA ops.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
6 years agoMLK-21473-3 Documentation: fsl-imx-esdhc: Add new compatible string for imx8mm
Haibo Chen [Tue, 16 Apr 2019 11:03:09 +0000 (19:03 +0800)]
MLK-21473-3 Documentation: fsl-imx-esdhc: Add new compatible string for imx8mm

Add "fsl, imx8mm-usdhc" for imx8mm

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
6 years agoMLK-21473-2 ARM64: dts: fsl-imx8mm: change to use new compatible for usdhc
Haibo Chen [Tue, 16 Apr 2019 10:54:43 +0000 (18:54 +0800)]
MLK-21473-2 ARM64: dts: fsl-imx8mm: change to use new compatible for usdhc

Use the new compatible "fsl, imx8mm-usdhc" for imx8mm SoC.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
6 years agoMLK-21473-1 mmc: sdhci-esdhc-imx: add esdhc_soc_data for i.MX8MM
Haibo Chen [Tue, 16 Apr 2019 10:48:50 +0000 (18:48 +0800)]
MLK-21473-1 mmc: sdhci-esdhc-imx: add esdhc_soc_data for i.MX8MM

i.MX8MM contains USDHC which support eMMC V5.1 (including CMDQ and
HS400ES), besides i.MX8MM also support bus frequency, so add a new
esdhc_soc_data for i.MX8MM.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
6 years agoMLK-21461: ASoC: fsl_rpmsg_i2s: clear buffer pointer in i2s_send_message
Shengjiu Wang [Tue, 16 Apr 2019 07:17:06 +0000 (15:17 +0800)]
MLK-21461: ASoC: fsl_rpmsg_i2s: clear buffer pointer in i2s_send_message

Reset the buffer pointer to be zero in i2s_send_message, actully we have
set the buffer pointer to be zero in imx_rpmsg_terminate_all.
But if there is timer task (I2S_TX_POINTER) queued in queue, after it is
executed the buffer pointer will be changed, this is timing issue that
the task in the queue is delayed. so need to reset it with TERMINATE
command.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 0a07dd454cbf85744677812e53fc5e86a48706bf)

6 years agoMLK-21459: mxc-jpeg: Jpeg encoder/decoder multi-instance crash
Mirela Rabulea [Tue, 16 Apr 2019 14:36:28 +0000 (17:36 +0300)]
MLK-21459: mxc-jpeg: Jpeg encoder/decoder multi-instance crash

Reserve a slot for each context and allocate the slot data at open,
deallocate slot data at release and free that slot.
The device was already holding the array of slots.
The maximum number of slots allowed per device is currently limited to 1
for encoder and 1 for decoder, but the hardware supports 4+4.
Use GFP_ATOMIC for dma_zalloc_coherent, as we are holding a lock.

Also fix potential decoder bug when stm_ctrl is not properly cleared before
setting a new image format. This could be observed when decoding an
yuv420 image (img_fmt=0000b) after an yuv444 image (0011b), but only if
the descriptor is being reused.

Removed some debug logs and updated a comment.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
6 years agoMLK-20684 PCI: Disable MSI on CYW4356 and CYW4359 chips
Andy Duan [Wed, 2 Jan 2019 09:55:44 +0000 (17:55 +0800)]
MLK-20684 PCI: Disable MSI on CYW4356 and CYW4359 chips

MSI is broken on CYW4356/4359 chips. This causes CYW4356 1CX not
work on i.MX8x platforms with bandwidth test. It is known issue
that i.MX8x PCIe host driver MSI interrupt lost.

Disable MSI completely for this chipset to let wifi can stable work
until PCIe RC driver fix the issue.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit d99766187fb99d4a6655a1e0fdf5dc9451a8e4a0)

6 years agobrcmfmac: Fix access point mode
Stefan Wahren [Wed, 12 Dec 2018 19:20:06 +0000 (20:20 +0100)]
brcmfmac: Fix access point mode

commit 861cb5eb467f ("brcmfmac: Fix access point mode") upstream.

Since commit 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag")
the Raspberry Pi 3 A+ (BCM43455) isn't able to operate in AP mode with
hostapd (device_ap_sme=1 use_monitor=0):

brcmfmac: brcmf_cfg80211_stop_ap: setting AP mode failed -52

So add the missing mgmt_stypes for AP mode to fix this.

Fixes: 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag")
Suggested-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoMLK-21161-04 brcmfmac: fix 43455 CRC error under SDIO 3.0 SDR104 mode
Wright Feng [Mon, 18 Mar 2019 05:09:44 +0000 (13:09 +0800)]
MLK-21161-04 brcmfmac: fix 43455 CRC error under SDIO 3.0 SDR104 mode

This patch fixes 43455 CRC error while running throughput test with
suspend/resume stress test.

The continuous failure messages before system crash:
brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
brcmfmac: brcmf_sdio_rxglom: glom read of 25600 bytes failed: -5
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
brcmfmac: brcmf_sdio_rxglom: glom read of 24576 bytes failed: -5
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit d6e37c2eb0f6fc2b50172321a464337073038228)

6 years agoMLK-21161-03 brcmfmac: add sleep in bus suspend and cfg80211 resume functions
Wright Feng [Thu, 7 Mar 2019 07:37:27 +0000 (01:37 -0600)]
MLK-21161-03 brcmfmac: add sleep in bus suspend and cfg80211 resume functions

With asynchronous suspend/resume feature, suspend and resume callbacks to
be executed in parallel with each other. It makes bus changes the state to
BRCMF_BUS_DOWN before all brcmf_cfg80211_suspend IOVAR executions.
The same situation also happens in resume procedure and causes PM mode
keeps in PM_MAX after resume. In order to fix the race condition, We add
one second sleep in bus suspend and cfg80211 resume function.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit fdb676ce002039d7359b200b6c2cc728f41c05fa)

6 years agoMLK-21161-02 brcmfmac: validate ifp pointer in brcmf_txfinalize
Wright Feng [Wed, 21 Nov 2018 09:16:55 +0000 (03:16 -0600)]
MLK-21161-02 brcmfmac: validate ifp pointer in brcmf_txfinalize

We got ifp null pointer kernel panic in brcmf_txfinalize after removing
Wi-Fi USB dongle when data was transmitting, The root cause is that
interface was removed before calling brcmf_txfinalize in
brcmf_fws_dequeue_worker and finally caused kernel panic.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 3f94bfe6febc9762e340a69b6520242f27d20c85)

6 years agoMLK-21161-01 brcmfmac: To fix kernel crash on out of boundary access
Raveendran Somu [Tue, 13 Nov 2018 02:32:11 +0000 (20:32 -0600)]
MLK-21161-01 brcmfmac: To fix kernel crash on out of boundary access

To trunkcate the addtional bytes, if extra bytes are received.
Current code only have a warning and proceed without handling it.
But in one crash dump reported by DVT, these causes the
crash intermittently. So the processing is limit to the skb->len.

Signed-off-by: Raveendran Somu <raveendran.somu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit f7112c027e0c7447b05474b72934589bbbb8e298)

6 years agoMLK-20681 brcmfmac: add brcmfmac platform device pinctrl state support
Andy Duan [Fri, 4 Jan 2019 06:48:59 +0000 (14:48 +0800)]
MLK-20681 brcmfmac: add brcmfmac platform device pinctrl state support

Add brcmfmac platform device pinctrl state support. That is useful
for dynamically configurate pin group for different wlan chips.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 88f2834cd5b8cb8864af68d265b5bdee3000c4bf)

6 years agoMLK-20680 brcmfmac: add time delay for pcie device exit D3 mode
Andy Duan [Wed, 2 Jan 2019 10:05:00 +0000 (18:05 +0800)]
MLK-20680 brcmfmac: add time delay for pcie device exit D3 mode

- The current timeout value is not enough for MB transaction read
when modem enter D3 mode, so increase the timeout value to match
the D3 mode timing requirement.
- Add 10 ms delay for pcie device to exit D3 state and enter D0 state.
- Remove the duplicated code for SBMBX register access.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 05601af462145e27142e3d140e10a66d4a493d40)

6 years agoMLK-20679 brcmfmac: reset two D11 cores if chip has two D11 cores
Wright Feng [Mon, 3 Dec 2018 09:39:33 +0000 (17:39 +0800)]
MLK-20679 brcmfmac: reset two D11 cores if chip has two D11 cores

There are two D11 cores in RSDB chips like 4359. We have to reset two
D11 cores simutaneously before firmware download, or the firmware may
not be initialized correctly and cause "fw initialized failed" error.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked commit from 8f50bea9357af3088dba0103f0017d56763b0ae9)

6 years agoMLK-20678 brcmfmac: avoid the error log print when get the wowl_wakeind failed
Andy Duan [Mon, 24 Dec 2018 04:50:14 +0000 (12:50 +0800)]
MLK-20678 brcmfmac: avoid the error log print when get the wowl_wakeind failed

Not all chips support wowlan, then get wowlan wakeup event failed.
Change the log into debug level.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 47b205952ca6be6216e19a121f1fb400c5fcf7e7)

6 years agoMLK-21478-23 arm64: defconfig: add imx8mq usb phy and typec driver
Li Jun [Wed, 17 Apr 2019 01:51:45 +0000 (09:51 +0800)]
MLK-21478-23 arm64: defconfig: add imx8mq usb phy and typec driver

This patch enable imx8mq usb phy driver and typec related drivers.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-22 arm64: dts: imx8qxp-mek-rpmsg: use typec connector sub-node
Li Jun [Wed, 17 Apr 2019 05:51:09 +0000 (13:51 +0800)]
MLK-21478-22 arm64: dts: imx8qxp-mek-rpmsg: use typec connector sub-node

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-21 arm64: dts: imx8qxp-mek: use connector sub-node for typec
Li Jun [Wed, 17 Apr 2019 05:50:24 +0000 (13:50 +0800)]
MLK-21478-21 arm64: dts: imx8qxp-mek: use connector sub-node for typec

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-20 arm64: dts: imx8qm-mek: use connector sub-node for typec
Li Jun [Wed, 17 Apr 2019 05:49:19 +0000 (13:49 +0800)]
MLK-21478-20 arm64: dts: imx8qm-mek: use connector sub-node for typec

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-19 arm64: dts: imx8qm-mek-domu: use typec connector sub-node
Li Jun [Wed, 17 Apr 2019 05:48:26 +0000 (13:48 +0800)]
MLK-21478-19 arm64: dts: imx8qm-mek-domu: use typec connector sub-node

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-18 arm64: dts: imx8qm-mek-domu-dpu1: use connector sub-node
Li Jun [Wed, 17 Apr 2019 05:47:14 +0000 (13:47 +0800)]
MLK-21478-18 arm64: dts: imx8qm-mek-domu-dpu1: use connector sub-node

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-17 arm64: imx8mm-ddr4-val: use connector sub-node for typec
Li Jun [Wed, 17 Apr 2019 05:46:09 +0000 (13:46 +0800)]
MLK-21478-17 arm64: imx8mm-ddr4-val: use connector sub-node for typec

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-16 arm64: dts: imx8mq-evk: use connector sub-node for typec
Li Jun [Mon, 15 Apr 2019 12:03:42 +0000 (20:03 +0800)]
MLK-21478-16 arm64: dts: imx8mq-evk: use connector sub-node for typec

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-15 arm64: dts: imx8mm-evk: use connector sub-node for typec
Li Jun [Wed, 10 Apr 2019 05:18:02 +0000 (13:18 +0800)]
MLK-21478-15 arm64: dts: imx8mm-evk: use connector sub-node for typec

As the new kernel introduces the standard usb connector properties,
so use connector sub-node for typec.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-14 arm64: dts: fsl-imx8mq-ddr4-arm2: remove deprecated usb node
Li Jun [Mon, 15 Apr 2019 12:10:40 +0000 (20:10 +0800)]
MLK-21478-14 arm64: dts: fsl-imx8mq-ddr4-arm2: remove deprecated usb node

As we don't need 2 nodes for usb controller, so remove the nodes not
required.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-13 arm64: dts: imx8mq-evk: remove deprecated node for usb
Li Jun [Mon, 15 Apr 2019 12:02:39 +0000 (20:02 +0800)]
MLK-21478-13 arm64: dts: imx8mq-evk: remove deprecated node for usb

As we don't need 2 nodes for usb controller, so remove the nodes not
required.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-12 arm64: dtsi: imx8mq: use one node for usb dwc3 controller
Li Jun [Mon, 15 Apr 2019 11:59:30 +0000 (19:59 +0800)]
MLK-21478-12 arm64: dtsi: imx8mq: use one node for usb dwc3 controller

New dwc3 driver force to use one node for controller node, so switch
to use one node for dwc3 controller.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-11 usb: dwc3: use suspend clock from dt to set power down scale
Li Jun [Tue, 16 Apr 2019 06:02:38 +0000 (14:02 +0800)]
MLK-21478-11 usb: dwc3: use suspend clock from dt to set power down scale

Since the new dwc3 use bulk clks including the suspend clk, so we can
use it to calculate the power down scale value.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-2 usb: typec: tcpci: disable typec irq before register port
Li Jun [Wed, 17 Apr 2019 04:03:50 +0000 (12:03 +0800)]
MLK-21478-2 usb: typec: tcpci: disable typec irq before register port

Disable tcpci irq before tcpci_register_port() to make sure resource
ready before irq hanlding.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21478-1 usb: typec: tcpci: use correct driver data
Li Jun [Wed, 17 Apr 2019 04:31:06 +0000 (12:31 +0800)]
MLK-21478-1 usb: typec: tcpci: use correct driver data

As the driver data is tcpci_chip in new kernel, so correct this.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agophy: add driver for Freescale i.MX8MQ USB3 PHY
Li Jun [Thu, 15 Nov 2018 14:12:47 +0000 (15:12 +0100)]
phy: add driver for Freescale i.MX8MQ USB3 PHY

This is a cleaned up port of the downstream i.MX8MQ USB3 PHY driver.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit efe81bea891586680a928ea5dde40eb1fff34be2)

6 years agodt-bindings: phy: add binding for Freescale i.MX8MQ USB3 PHY
Lucas Stach [Thu, 15 Nov 2018 14:12:46 +0000 (15:12 +0100)]
dt-bindings: phy: add binding for Freescale i.MX8MQ USB3 PHY

This adds the binding for the USB3 PHY found on the i.MX8M SoC.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 3c2ce40b2fbb52b5e861f8664f5422d39f11b39e)

6 years agoMLK-21118 arm64: defconfig: Enable CONFIG_VIDEO_MXC_CSI_CAMERA
Leonard Crestez [Tue, 16 Apr 2019 13:25:51 +0000 (16:25 +0300)]
MLK-21118 arm64: defconfig: Enable CONFIG_VIDEO_MXC_CSI_CAMERA

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-21479 PCI: imx: refine the power on gpio manipulation
Richard Zhu [Wed, 17 Apr 2019 07:02:53 +0000 (15:02 +0800)]
MLK-21479 PCI: imx: refine the power on gpio manipulation

Turn on the power on gpio once is enough and this pin shouldn't be
re-configured in resume procedure again and again.
Thus, move the turn on operation of the power_on_gpio to the proper
place.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21474-2 arm64: defconfig: Enable MXC_MLB150
Leonard Crestez [Tue, 16 Apr 2019 14:47:14 +0000 (17:47 +0300)]
MLK-21474-2 arm64: defconfig: Enable MXC_MLB150

Missed during initial porting due to Kconfig logic

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21474-1 mxc mlb: Allow compilation on imx8
Leonard Crestez [Tue, 16 Apr 2019 14:45:47 +0000 (17:45 +0300)]
MLK-21474-1 mxc mlb: Allow compilation on imx8

Upstream rejected ARCH_FSL_IMX8QM so just depend on ARCH_MXC or
COMPILE_TEST.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21063 ARM64: dts: imx8qm-domu-car: fix lvds-pwm usage
Peng Fan [Wed, 6 Mar 2019 05:56:13 +0000 (13:56 +0800)]
MLK-21063 ARM64: dts: imx8qm-domu-car: fix lvds-pwm usage

Fix lvds-pwm usage, it needs to be under vehicle_rpmsg_m4 node for
android auto.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 31db2776c4cf4b27417c57f3c7c013085cee1528)
(cherry picked from commit 24f984a95e5043a50aea24f35b02d3737355b4e2)

6 years agoMLK-20990 ARM64: dts: imx8qm: domu: switch to use rpmsg i2c
Peng Fan [Tue, 26 Feb 2019 11:42:57 +0000 (19:42 +0800)]
MLK-20990 ARM64: dts: imx8qm: domu: switch to use rpmsg i2c

Switch to use rpmsg i2c to support android auto, because
android auto change to use rpmsg i2c.
Also add the alias node to let m4 could use it successfully, because
M4 side use the alias id as the BUSID.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit d67968b6d6a583590a9e737f4a3d732dca5b078f)

6 years agoMLK-20977-3 ARM64: dts: imx8qm: update domu car
Peng Fan [Mon, 25 Feb 2019 13:25:37 +0000 (21:25 +0800)]
MLK-20977-3 ARM64: dts: imx8qm: update domu car

Update domu car dts according to android auto changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit 8c3bc5b19ddc3fbac9fe04c504a7f0282b82beeb)

6 years agoMLK-21013 ARM64: dts: imx8qm: passthrough lvds pwm
Peng Fan [Thu, 28 Feb 2019 10:36:51 +0000 (18:36 +0800)]
MLK-21013 ARM64: dts: imx8qm: passthrough lvds pwm

Passthrough lvds pwm, otherwise dom0 will panic when reboot if
domu started and shutdown, because LVDS_1_PWM_0 is assigned
to domu and when domu shutdown, the resource will be powered
off, however dom0 still think it is powered on.

since lvds1_pwm is expected for domu, so let's passthrough it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit abb243aba12a6649fad8114e298ff075b0a8399d)
(cherry picked from commit 9644178aeb4fc2a5b04824e7f6fb9cd9b5f7477f)

6 years agoMLK-20977-5 ARM64: dts: remove MIPI for m4
Peng Fan [Tue, 26 Feb 2019 08:07:39 +0000 (16:07 +0800)]
MLK-20977-5 ARM64: dts: remove MIPI for m4

The resources are wrongly added.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit af14fdef3b810f436582f3ff70822ebf05b8d361)