linux.git
5 years agoMGS-5061 GPU: Integrate 6.4.0.RC2 kernel driver
Xianzhong [Fri, 2 Aug 2019 13:47:59 +0000 (21:47 +0800)]
MGS-5061 GPU: Integrate 6.4.0.RC2 kernel driver

Include more bug-fixings for Vulkan and NN driver

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
5 years agoMLK-22347 VPU Decoder: add Xvid format supprot
Shijie Qin [Tue, 30 Jul 2019 09:28:03 +0000 (17:28 +0800)]
MLK-22347 VPU Decoder: add Xvid format supprot

add Xvid format support, and vpu treat it as MPEG4.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
5 years agoMLK-22346 clk: imx: Fix the initialization of flag variable
Jacky Bai [Tue, 30 Jul 2019 09:13:12 +0000 (17:13 +0800)]
MLK-22346 clk: imx: Fix the initialization of flag variable

The flag variable must be initialized before used.
the 'OR' operation will cause unpredictable behavior.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
5 years agoMLK-22344 arm64: dts: mark ocotp as read-only
Peng Fan [Tue, 30 Jul 2019 07:02:58 +0000 (15:02 +0800)]
MLK-22344 arm64: dts: mark ocotp as read-only

It is easy to exploit system by allowing fuse program,
so let's mark as read-only. If pepole wanna fuse program,
just delete this property.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
5 years agoMLK-22303 gpu: imx: dpu: common: Fix build warning when CONFIG_PM_SLEEP=n
Liu Ying [Tue, 23 Jul 2019 07:36:49 +0000 (15:36 +0800)]
MLK-22303 gpu: imx: dpu: common: Fix build warning when CONFIG_PM_SLEEP=n

This patch fixes the below build warning when CONFIG_PM_SLEEP=n.

  CC      drivers/gpu/imx/dpu/dpu-common.o
drivers/gpu/imx/dpu/dpu-common.c:831:1: warning: ‘_dpu_submodules_init’ defined but not used [-Wunused-function]
 _dpu_submodules_init(struct dpu_soc *dpu, struct platform_device *pdev)
 ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Liu Ying <victor.liu@nxp.com>
5 years agoMLK-22333: ASoC: fsl_easrc: Support FLOAT_LE
Shengjiu Wang [Fri, 26 Jul 2019 08:08:17 +0000 (16:08 +0800)]
MLK-22333: ASoC: fsl_easrc: Support FLOAT_LE

The audio float point data range is (-1, 1), the asrc would output
all zero for float point input and integer output case, that is to
drop the fractional part of the data directly.

In order to support float to int conversion or int to float conversion
we need to do special operation on the coefficient to enlarge/reduce
the data to the expected range.

For float to int case:
Up sampling:
1. Create a 1 tap filter with center tap (only tap) of 2^31
   in 64 bits floating point.
   double value = (double)(((uint64_t)1) << 31);
2. Program 1 tap prefilter with center tap above.

Down sampling,
1. If the filter is single stage filter, add "shift" to the exponent of
   stage 1 coefficients.
2. If the filter is two stage filter , add "shift" to the exponent of
   stage 2 coefficients.

The "shift" is 31, same for int16, int24, int32 case.

For int to float case:
Up sampling:
1. Create a 1 tap filter with center tap (only tap) of 2^-31
   in 64 bits floating point.
2. Program 1 tap prefilter with center tap above.

Down sampling,
1. If the filter is single stage filter, subtract "shift" to the
   exponent of stage 1 coefficients.
2. If the filter is two stage filter , subtract "shift" to the
   exponent of stage 2 coefficients.

The "shift" is 15,23,31, different for int16, int24, int32 case.

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

5 years agoMLK-22315 VPU Decoder: add driver param to dump input frame data
Shijie Qin [Mon, 29 Jul 2019 01:42:19 +0000 (09:42 +0800)]
MLK-22315 VPU Decoder: add driver param to dump input frame data

module_param(vpu_datadump_ena, int, 0644);
MODULE_PARM_DESC(vpu_datadump_ena, "enable dump input frame data (0-1)");

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
5 years agoMLK-21976 nvmem: imx-scu-octop: implement program support
Peng Fan [Thu, 25 Jul 2019 10:41:51 +0000 (18:41 +0800)]
MLK-21976 nvmem: imx-scu-octop: implement program support

Implement program support.
Restruct code to check hole/ecc region.
Use ATF SIP to program fuse
Add mutex lock to protect access

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
5 years agoMLK-22314 VPU Decoder: add driver param to show decode performance
Shijie Qin [Thu, 25 Jul 2019 07:32:51 +0000 (15:32 +0800)]
MLK-22314 VPU Decoder: add driver param to show decode performance

module_param(vpu_show_perf_ena, int, 0644);
MODULE_PARM_DESC(vpu_show_perf_ena, "enable show vpu decode
performance(0-1)");
module_param(vpu_show_perf_idx, int, 0644);
MODULE_PARM_DESC(vpu_show_perf_idx, "show performance of which
instance(bit N to mask instance N)");
module_param(vpu_show_perf_ent, int, 0644);
MODULE_PARM_DESC(vpu_show_perf_ent, "show performance of which
event(1: decoded, 2: ready)");

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
5 years agoMLK-22312 VPU Decoder: correct insert seq header process for VP6 format
Shijie Qin [Fri, 26 Jul 2019 11:43:49 +0000 (19:43 +0800)]
MLK-22312 VPU Decoder: correct insert seq header process for VP6 format

For VP6 format, the first input data shall including frame data,
hence should not drop it.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
5 years agoMMFMWK-8572-2 VPU Decoder: not add frm_total_num if input data not including frame...
Shijie Qin [Fri, 19 Jul 2019 11:22:52 +0000 (19:22 +0800)]
MMFMWK-8572-2 VPU Decoder: not add frm_total_num if input data not including frame data

+MPEG4/MPEG2, the first input data also not including frame data

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
5 years agoMLK-13470 mfd: max17135: export symbols to fix build error as a module
Julien Olivain [Tue, 15 Nov 2016 16:38:10 +0000 (17:38 +0100)]
MLK-13470 mfd: max17135: export symbols to fix build error as a module

export symbols to fix build error as a module:

ERROR: "max17135_reg_read" [drivers/hwmon/max17135-hwmon.ko] undefined!

Signed-off-by: Julien Olivain <julien.olivain@nxp.com>
Acked-by: Robby Cai <robby.cai@nxp.com>
5 years agoMLK-22313: VPU Decoder: support rv and divx according firmware version
ming_qian [Thu, 25 Jul 2019 02:54:00 +0000 (10:54 +0800)]
MLK-22313: VPU Decoder: support rv and divx according firmware version

1.firmware decide whether it support rv and divx.
if firmware don't support, driver will disable these formats.

2. update copyright description

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
5 years agoMLK-22309-2 media: mxc-mipi-csi2: mark PM functions as __maybe_unused
Robby Cai [Wed, 24 Jul 2019 07:51:18 +0000 (15:51 +0800)]
MLK-22309-2 media: mxc-mipi-csi2: mark PM functions as __maybe_unused

fix build warnings if CONFIG_PM_SLEEP is disabled.

drivers/media/platform/imx8/mxc-mipi-csi2_yav.c:703:12: warning: 'mipi_csi2_pm_resume' defined but not used [-Wunused-function]
 static int mipi_csi2_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/imx8/mxc-mipi-csi2_yav.c:685:12: warning: 'mipi_csi2_pm_suspend' defined but not used [-Wunused-function]
 static int mipi_csi2_pm_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
5 years agoMLK-22309-1 media: mxc-parallel-csi: mark PM functions as __maybe_unused
Robby Cai [Wed, 24 Jul 2019 07:46:16 +0000 (15:46 +0800)]
MLK-22309-1 media: mxc-parallel-csi: mark PM functions as __maybe_unused

fix build warnings if CONFIG_PM_SLEEP is disabled.

drivers/media/platform/imx8/mxc-parallel-csi.c:618:12: warning: 'parallel_csi_pm_resume' defined but not used [-Wunused-function]
 static int parallel_csi_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/imx8/mxc-parallel-csi.c:613:12: warning: 'parallel_csi_pm_suspend' defined but not used [-Wunused-function]
 static int parallel_csi_pm_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
5 years agoMLK-22186 clk: imx8qm: Remove non-exist clocks
Anson Huang [Wed, 24 Jul 2019 01:15:40 +0000 (09:15 +0800)]
MLK-22186 clk: imx8qm: Remove non-exist clocks

There is no SC_R_LVDS_1_I2C_0/SC_R_LVDS_1_I2C_1 in SCFW, remove
those clocks which are associated with these non-exist resources.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit c242b208b0f7911c3dc0c40533d80847731c077e)

5 years agoMMFMWK-8570: VPU Decoder: fix error in skip frames
ming_qian [Wed, 24 Jul 2019 03:16:18 +0000 (11:16 +0800)]
MMFMWK-8570: VPU Decoder: fix error in skip frames

the amount of REL_FRAME_BUFF event may be much bigger  the BUFF_RDY
event.
it means that some frame buffer are not used for decoding,
and firmware just release it directly.

The frame who is need to skip is decoded but not ready.

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
5 years agoinclude/linux/compiler_types.h: don't pollute userspace with macro definitions
Xiaozhou Liu [Fri, 14 Dec 2018 14:14:31 +0000 (22:14 +0800)]
include/linux/compiler_types.h: don't pollute userspace with macro definitions

Macros 'inline' and '__gnu_inline' used to be defined in compiler-gcc.h,
which was (and is) included entirely in (__KERNEL__ && !__ASSEMBLY__).
Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually
exclusive") had those macros exposed to userspace, unintentionally.

Then commit a3f8a30f3f00 ("Compiler Attributes: use feature checks
instead of version checks") moved '__gnu_inline' back into
(__KERNEL__ && !__ASSEMBLY__) and 'inline' was left behind. Since 'inline'
depends on '__gnu_inline', compiling error showing "unknown type name
‘__gnu_inline’" will pop up, if userspace somehow includes
<linux/compiler.h>.

Other macros like __must_check, notrace, etc. are in a similar situation.
So just move all these macros back into (__KERNEL__ && !__ASSEMBLY__).

Note:
  1. This patch only affects what userspace sees.
  2. __must_check (when !CONFIG_ENABLE_MUST_CHECK) and noinline_for_stack
     were once defined in __KERNEL__ only, but we believe that they can
     be put into !__ASSEMBLY__ too.

Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Xiaozhou Liu <liuxiaozhou@bytedance.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
5 years agoMLK-22306-2 dts: clks: imx8qxp: Fix clocks in the imaging subsystem.
Ranjani Vaidyanathan [Tue, 23 Jul 2019 20:51:02 +0000 (15:51 -0500)]
MLK-22306-2 dts: clks: imx8qxp: Fix clocks in the imaging subsystem.

Remove clocks that dont exist in imx8qxp.
Change clock names to match HW.

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
5 years agoMLK-22306-1 clks: imx8qxp: Fix clocks in the imaging subsystem.
Ranjani Vaidyanathan [Tue, 23 Jul 2019 20:50:06 +0000 (15:50 -0500)]
MLK-22306-1 clks: imx8qxp: Fix clocks in the imaging subsystem.

Remove clocks that dont exist in imx8qxp.
Change clock names to match HW.

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
5 years agoMLK-22307 usb: chipidea: usbmisc: usb charger detection improvement
Li Jun [Thu, 18 Jul 2019 10:40:46 +0000 (18:40 +0800)]
MLK-22307 usb: chipidea: usbmisc: usb charger detection improvement

Improve the usb charger detection for imx7D/S and imx845s, which use
the same USB PHY, the main improvements:
1. Keep OPMODE override to be non-driving during the whole charger
   detection process according the USB PHY data sheet(Table 6-7
   Battery Charging Operations)
2. Disable DCDENB after data contact finished.
3. Use the BC 1.2 defined process for primary and secondary detection:
   - VDP_SRC is connected to USB_OTG*_DP and IDM_SINK is connected to
     USB_OTG*_DN, for primary detection;
   - VDM_SRC is connected to USB_OTG*_DN and IDP_SINK is connected to
     USB_OTG*_DP, for seconday detection.
   Check Battery Charger Detection Output bit(CHRGDET) to determine
   SDP/CDP/DCP.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit 7ca78ff4a324bb495e7d888640a0956c985ed04d)

5 years agoarm64: dts: freescale: Disable the csi_bridge node in m4 dts on imx8mm
Jacky Bai [Wed, 24 Jul 2019 07:06:43 +0000 (15:06 +0800)]
arm64: dts: freescale: Disable the csi_bridge node in m4 dts on imx8mm

In M4 dts, the I2C3 is disabled by default, so the CSI camera sensor
is disabled too. it is not necessary to keep csi_bridge node enabled
anymore, just disable it.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Acked-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 93a7f9734d266920d5d1b6f09536021b1777c223)

5 years agoMLK-22308 usb: typec: tcpci: mark PM functions as __maybe_unused
Li Jun [Wed, 24 Jul 2019 05:24:25 +0000 (13:24 +0800)]
MLK-22308 usb: typec: tcpci: mark PM functions as __maybe_unused

Fix build warning if CONFIG_PM_SLEEP is disabled:

  CC      drivers/usb/typec/tcpci.o
drivers/usb/typec/tcpci.c:849:12: warning: ‘tcpci_resume’ defined but
not used [-Wunused-function]
 static int tcpci_resume(struct device *dev)
            ^~~~~~~~~~~~
drivers/usb/typec/tcpci.c:837:12: warning: ‘tcpci_suspend’ defined but
not used [-Wunused-function]
 static int tcpci_suspend(struct device *dev)
            ^~~~~~~~~~~~~

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
5 years agoMLK-22280-2 usb: chipidea: usbmisc: remove mutex
Li Jun [Wed, 17 Jul 2019 08:51:20 +0000 (16:51 +0800)]
MLK-22280-2 usb: chipidea: usbmisc: remove mutex

Now charger detection is only for iMX7 which has separated
register area for each instance, register access is protected
by spinlock among APIs, so we can remove the mutex.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
5 years agoMLK-22280-1 usb: chipidea: usbmisc: add missing spin lock
Li Jun [Wed, 17 Jul 2019 08:47:01 +0000 (16:47 +0800)]
MLK-22280-1 usb: chipidea: usbmisc: add missing spin lock

Add missing spinlock for imx7d_charger_secondary_detection().

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
5 years agoMLK-22304-2 fbdev: mxsfb: fix build warnings if CONFIG_PM_SLEEP off
Fancy Fang [Tue, 23 Jul 2019 09:03:57 +0000 (17:03 +0800)]
MLK-22304-2 fbdev: mxsfb: fix build warnings if CONFIG_PM_SLEEP off

The system suspend and resume hooks is related with CONFIG_PM_SLEEP
instead of CONFIG_PM, so use CONFIG_PM_SLEEP to control the definitions
for them. And after this, the related overlay suspend and resume should
be defined under CONFIG_PM_SLEEP control. Below are the build warnings
before this patch.

drivers/video/fbdev/mxsfb.c:2463:12: warning: ‘mxsfb_resume’ defined but not used [-Wunused-function]
 static int mxsfb_resume(struct device *pdev)
            ^~~~~~~~~~~~
drivers/video/fbdev/mxsfb.c:2444:12: warning: ‘mxsfb_suspend’ defined but not used [-Wunused-function]
 static int mxsfb_suspend(struct device *pdev)
            ^~~~~~~~~~~~~

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
5 years agoMLK-22304-1 drm/imx: lcdif-dsim: fix build warnings if CONFIG_PM_SLEEP off
Fancy Fang [Tue, 23 Jul 2019 08:02:18 +0000 (16:02 +0800)]
MLK-22304-1 drm/imx: lcdif-dsim: fix build warnings if CONFIG_PM_SLEEP off

When CONFIG_PM_SLEEP is disabled, the suspend and resume hooks
are implemented as dummy functions, but GCC will report below
build warnings:

drivers/gpu/imx/lcdif/lcdif-common.c:731:12: warning: ‘imx_lcdif_suspend’ defined but not used [-Wunused-function]
 static int imx_lcdif_suspend(struct device *dev)
            ^
drivers/gpu/imx/lcdif/lcdif-common.c:735:12: warning: ‘imx_lcdif_resume’ defined but not used [-Wunused-function]
 static int imx_lcdif_resume(struct device *dev)
            ^
drivers/gpu/drm/imx/sec_mipi_dsim-imx.c:324:12: warning: ‘imx_sec_dsim_suspend’ defined but not used [-Wunused-function]
 static int imx_sec_dsim_suspend(struct device *dev)
            ^
drivers/gpu/drm/imx/sec_mipi_dsim-imx.c:329:12: warning: ‘imx_sec_dsim_resume’ defined but not used [-Wunused-function]
 static int imx_sec_dsim_resume(struct device *dev)
            ^

So remove these dummy functions to avoid these build warnings.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
5 years agoMLK-22302-5: regulator: pfuze100: fix build warning with CONFIG_PM_SLEEP=n
Robin Gong [Tue, 23 Jul 2019 15:56:14 +0000 (23:56 +0800)]
MLK-22302-5: regulator: pfuze100: fix build warning with CONFIG_PM_SLEEP=n

Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit 9967e06ba509ba84fec4b3848341c58d1c4d740a)

5 years agoMLK-22302-4: input: keyboard: pf1550_onkey: fix build warning with CONFIG_PM_SLEEP=n
Robin Gong [Tue, 23 Jul 2019 15:55:43 +0000 (23:55 +0800)]
MLK-22302-4: input: keyboard: pf1550_onkey: fix build warning with CONFIG_PM_SLEEP=n

Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit fc6b26798579676f259aede42fb4aaecef9599ea)

5 years agoMLK-22302-3: dmaengine: mxs-dma: fix build warning with CONFIG_PM_SLEEP=n
Robin Gong [Tue, 23 Jul 2019 15:43:41 +0000 (23:43 +0800)]
MLK-22302-3: dmaengine: mxs-dma: fix build warning with CONFIG_PM_SLEEP=n

Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit 3d4bb7eb025b18c8699e80a1a76226887120b198)

5 years agoMLK-22302-2: dmaengine: fsl-edma-v3: fix build warning with CONFIG_PM_SLEEP=n
Robin Gong [Tue, 23 Jul 2019 15:42:53 +0000 (23:42 +0800)]
MLK-22302-2: dmaengine: fsl-edma-v3: fix build warning with CONFIG_PM_SLEEP=n

Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit dfe2a755209615f9592ed937957b2efdc3b6d6c0)

5 years agoMLK-22302-1: dmaengine: imx-sdma: fix build warning with CONFIG_PM_SLEEP=n
Robin Gong [Tue, 23 Jul 2019 15:42:29 +0000 (23:42 +0800)]
MLK-22302-1: dmaengine: imx-sdma: fix build warning with CONFIG_PM_SLEEP=n

Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit 14ba28430da19e26445e05ae77195d88f1a0e7cf)

5 years agoMLK-22284-3 ARM64: dts: freescale: imx8dx/qm: split dma channel power domain
Robin Gong [Wed, 17 Apr 2019 09:10:53 +0000 (17:10 +0800)]
MLK-22284-3 ARM64: dts: freescale: imx8dx/qm: split dma channel power domain

Split dma channel power domain from sub-domain of dma customer driver
such as Audio, LPSPI, LPUART.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
(cherry picked from commit b76f339fdf91fe44066c2c820e4def07f47d159c)

5 years agoMLK-22284-2 dmaengine: fsl-edma-v3: check dma description before register touch
Robin Gong [Tue, 7 May 2019 16:13:40 +0000 (00:13 +0800)]
MLK-22284-2 dmaengine: fsl-edma-v3: check dma description before register touch

Check dma desscription firstly to ignore any unexpected interrupt
after channel terminate, otherwise, still have chance to touch channel
register whose power has been already off.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
(cherry picked from commit fd073e017e317006a4c254ca5ae3ea17b6f32502)

5 years agoMLK-22284-1 dmaengine: fsl-edma-v3: add power domains for each channel
Robin Gong [Wed, 17 Apr 2019 09:05:42 +0000 (17:05 +0800)]
MLK-22284-1 dmaengine: fsl-edma-v3: add power domains for each channel

Add power domains for each dma channel so that edma channel could
know the power state of every dma channel anytime and clear easily
unexpected interrupt which triggered before the last partition reset.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 0b6da46b7bdb2284e24757d48466268b9feb5b7c)

5 years agoMLK-22301 VPU: Fix build warning when CONFIG_PM_SLEEP=n
Shijie Qin [Tue, 23 Jul 2019 07:41:29 +0000 (15:41 +0800)]
MLK-22301 VPU: Fix build warning when CONFIG_PM_SLEEP=n

Fixing unused compiler warning for
decode: vpu_suspend() and vpu_resume()
encode: vpu_enc_suspend() and vpu_enc_resume()

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
5 years agoMLK-22300: [i.MX8M/VPU]: Fixing compiler warning when pm sleep is disabled
Zhou Peng [Tue, 23 Jul 2019 07:31:51 +0000 (15:31 +0800)]
MLK-22300: [i.MX8M/VPU]: Fixing compiler warning when pm sleep is disabled

Fixing unused compiler warning for xxx_suspend()/xxx_resume(), include
850Dg1g2(hantrodec.c)/845g1g2(hantrodec_845s.c)/845h1(hx280enc.c)

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
5 years agoMLK-21076-8 rtc: imx-sc: Fix build error when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 06:22:02 +0000 (14:22 +0800)]
MLK-21076-8 rtc: imx-sc: Fix build error when CONFIG_PM_SLEEP=n

Fix below build error when CONFIG_PM_SLEEP=n:

drivers/rtc/rtc-imx-sc.c:210:9: error: ‘IMX_SC_RTC_PM_OPS’ undeclared here (not in a function)
   .pm = IMX_SC_RTC_PM_OPS,
         ^
scripts/Makefile.build:326: recipe for target 'drivers/rtc/rtc-imx-sc.o' failed
make[2]: *** [drivers/rtc/rtc-imx-sc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 0550943f8c145072580bd103ff3fdd74eb5cb807)

5 years agoMLK-21076-7 pinctrl: imx8mn: Fix build warning when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 06:20:47 +0000 (14:20 +0800)]
MLK-21076-7 pinctrl: imx8mn: Fix build warning when CONFIG_PM_SLEEP=n

Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/pinctrl/freescale/pinctrl-imx8mn.c:355:12: warning:
 ‘imx8mn_pinctrl_suspend’ defined but not used [-Wunused-function]
 static int imx8mn_pinctrl_suspend(struct device *dev)
            ^
drivers/pinctrl/freescale/pinctrl-imx8mn.c:360:12: warning:
 ‘imx8mn_pinctrl_resume’ defined but not used [-Wunused-function]
 static int imx8mn_pinctrl_resume(struct device *dev)
            ^

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 6f84c2d2d1e30d8f3cf68245fa1f12dfac8b6a8e)

5 years agoMLK-21076-6 pinctrl: imx8mm: Fix build warning when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 06:19:20 +0000 (14:19 +0800)]
MLK-21076-6 pinctrl: imx8mm: Fix build warning when CONFIG_PM_SLEEP=n

Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/pinctrl/freescale/pinctrl-imx8mm.c:355:12: warning:
 ‘imx8mm_pinctrl_suspend’ defined but not used [-Wunused-function]
 static int imx8mm_pinctrl_suspend(struct device *dev)
            ^
drivers/pinctrl/freescale/pinctrl-imx8mm.c:361:12: warning:
 ‘imx8mm_pinctrl_resume’ defined but not used [-Wunused-function]
 static int imx8mm_pinctrl_resume(struct device *dev)
            ^

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit a4745f292da5bcaae3d75e3ac8b293c71fe7dcb1)

5 years agoMLK-21076-4 regulator: pfuze100: Fix build warning when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 01:43:25 +0000 (09:43 +0800)]
MLK-21076-4 regulator: pfuze100: Fix build warning when CONFIG_PM_SLEEP=n

Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/regulator/pfuze100-regulator.c:743:12: warning:
 'pfuze_resume' defined but not used [-Wunused-function]
 static int pfuze_resume(struct device *dev)
            ^~~~~~~~~~~~
drivers/regulator/pfuze100-regulator.c:717:12: warning:
 'pfuze_suspend' defined but not used [-Wunused-functio ]
 static int pfuze_suspend(struct device *dev)
            ^~~~~~~~~~~~~

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 36fb6ba8ad9f3a5eb6d883e53c5bb42cd5aec3ce)

5 years agoMLK-21076-3 pinctrl: imx7d: Fix build warning when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 01:41:38 +0000 (09:41 +0800)]
MLK-21076-3 pinctrl: imx7d: Fix build warning when CONFIG_PM_SLEEP=n

Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/pinctrl/freescale/pinctrl-imx7d.c:400:12: warning:
'imx7d_pinctrl_resume' defined but not used [-Wunused-function]
 static int imx7d_pinctrl_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/freescale/pinctrl-imx7d.c:394:12: warning:
 'imx7d_pinctrl_suspend' defined but not used [-Wunused-function]

 static int imx7d_pinctrl_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 219d360b02f74e210c8382de5c8061d660b14241)

5 years agoMLK-21076-2 thermal: imx: Fix build warning when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 01:39:35 +0000 (09:39 +0800)]
MLK-21076-2 thermal: imx: Fix build warning when CONFIG_PM_SLEEP=n

Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/thermal/imx_thermal.c:243:12: warning: 'imx7_lpsr_save'
defined but not used [-Wunused-variable]

 static u32 imx7_lpsr_save[2];
            ^~~~~~~~~~~~~~
  AR      drivers/spi/built-in.o

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit e4a858fb57a2460af3c615647828f9f32e532097)

5 years agoMLK-21076-1 rtc: imx-rpmsg: Fix build error when CONFIG_PM_SLEEP=n
Anson Huang [Tue, 23 Jul 2019 01:37:14 +0000 (09:37 +0800)]
MLK-21076-1 rtc: imx-rpmsg: Fix build error when CONFIG_PM_SLEEP=n

drivers/rtc/rtc-imx-rpmsg.c:374:9:
error: 'IMX_RPMSG_RTC_PM_OPS' undeclared here (not in a function);
did you mean 'IMX8_RPMSG_RTC_PM_OPS'?

   .pm = IMX_RPMSG_RTC_PM_OPS,
         ^~~~~~~~~~~~~~~~~~~~
         IMX8_RPMSG_RTC_PM_OPS

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 86aba1097ae69ff75999bddc3c3b0ad6c0bc7e2e)

5 years agoMLK-22295-2: ASoC: fsl_easrc: Fix build warning with CONFIG_PM_SLEEP=n
Shengjiu Wang [Tue, 23 Jul 2019 05:22:28 +0000 (13:22 +0800)]
MLK-22295-2: ASoC: fsl_easrc: Fix build warning with CONFIG_PM_SLEEP=n

Fix build warning with CONFIG_PM_SLEEP=n, the message is

In file included from sound/soc/fsl/fsl_easrc.c:2204:0:
sound/soc/fsl/fsl_easrc_m2m.c:960:13: warning: ‘fsl_easrc_m2m_resume’ defined but not used [-Wunused-function]
 static void fsl_easrc_m2m_resume(struct fsl_easrc *easrc)
             ^~~~~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_easrc_m2m.c:927:13: warning: ‘fsl_easrc_m2m_suspend’ defined but not used [-Wunused-function]
 static void fsl_easrc_m2m_suspend(struct fsl_easrc *easrc)
             ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 0b6e34f8aaac3a6e5a5e1459a9fc6a42d8a8c127)

5 years agoMLK-22295-1: ASoC: fsl_asrc: fix build warning with CONFIG_PM_SLEEP=n
Shengjiu Wang [Tue, 23 Jul 2019 05:18:01 +0000 (13:18 +0800)]
MLK-22295-1: ASoC: fsl_asrc: fix build warning with CONFIG_PM_SLEEP=n

fix build warning with CONFIG_PM_SLEEP=n, the warning message is

In file included from sound/soc/fsl/fsl_asrc.c:968:0:
sound/soc/fsl/fsl_asrc_m2m.c:1021:13: warning: ‘fsl_asrc_m2m_resume’ defined but not used [-Wunused-function]
 static void fsl_asrc_m2m_resume(struct fsl_asrc *asrc_priv)
             ^~~~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_asrc_m2m.c:990:13: warning: ‘fsl_asrc_m2m_suspend’ defined but not used [-Wunused-function]
 static void fsl_asrc_m2m_suspend(struct fsl_asrc *asrc_priv)
             ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit a3ec5433cfd6fd2b90113a78d5045e04f6a8328c)

5 years agoMLK-22296-5 irqchip: irqsteer: Fix build warning when CONFIG_PM_SLEEP=n
Clark Wang [Tue, 23 Jul 2019 07:00:53 +0000 (15:00 +0800)]
MLK-22296-5 irqchip: irqsteer: Fix build warning when CONFIG_PM_SLEEP=n

Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
drivers/irqchip/irq-imx-irqsteer.c:104:13: warning: ‘imx_irqsteer_init’ defined but not used [-Wunused-function]
 static void imx_irqsteer_init(struct irqsteer_irqchip_data *irqsteer_data)
             ^~~~~~~~~~~~~~~~~

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
5 years agoMLK-22296-4 misc: mpl3115: Fix build warning when CONFIG_PM_SLEEP=n
Clark Wang [Tue, 23 Jul 2019 06:42:49 +0000 (14:42 +0800)]
MLK-22296-4 misc: mpl3115: Fix build warning when CONFIG_PM_SLEEP=n

Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
drivers/input/misc/mpl3115.c:290:12: warning: ‘mpl3115_start_chip’ defined but not used [-Wunused-function]
 static int mpl3115_start_chip(struct i2c_client *client)
            ^~~~~~~~~~~~~~~~~~

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
5 years agoMLK-22296-3 misc: fxls8471_i2c: Fix build warning when CONFIG_PM_SLEEP=n
Clark Wang [Tue, 23 Jul 2019 06:40:30 +0000 (14:40 +0800)]
MLK-22296-3 misc: fxls8471_i2c: Fix build warning when CONFIG_PM_SLEEP=n

Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
drivers/input/misc/fxls8471_i2c.c:77:12: warning: ‘fxls8471_i2c_resume’ defined but not used [-Wunused-function]
 static int fxls8471_i2c_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/input/misc/fxls8471_i2c.c:71:12: warning: ‘fxls8471_i2c_suspend’ defined but not used [-Wunused-function]
 static int fxls8471_i2c_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
5 years agoMLK-22296-2 i2c: lpi2c: Fix build warning when CONFIG_PM_SLEEP=n
Clark Wang [Tue, 23 Jul 2019 06:21:14 +0000 (14:21 +0800)]
MLK-22296-2 i2c: lpi2c: Fix build warning when CONFIG_PM_SLEEP=n

Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
drivers/i2c/busses/i2c-imx-lpi2c.c:515:20: warning: ‘lpi2c_imx_isr’ defined but not used [-Wunused-function]
 static irqreturn_t lpi2c_imx_isr(int irq, void *dev_id)
                    ^~~~~~~~~~~~~

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
5 years agoMLK-22296-1 i2c: i2c-imx: Fix build warning when CONFIG_PM_SLEEP=n
Clark Wang [Tue, 23 Jul 2019 06:08:50 +0000 (14:08 +0800)]
MLK-22296-1 i2c: i2c-imx: Fix build warning when CONFIG_PM_SLEEP=n

Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
drivers/i2c/busses/i2c-imx.c:1299:12: warning: ‘i2c_imx_resume’ defined but not used [-Wunused-function]
 static int i2c_imx_resume(struct device *dev)
            ^~~~~~~~~~~~~~
drivers/i2c/busses/i2c-imx.c:1293:12: warning: ‘i2c_imx_suspend’ defined but not used [-Wunused-function]
 static int i2c_imx_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
5 years agoMLK-22299 pci: imx: fix build error when CONFIG_PM_SLEEP=n
Richard Zhu [Tue, 23 Jul 2019 05:56:07 +0000 (13:56 +0800)]
MLK-22299 pci: imx: fix build error when CONFIG_PM_SLEEP=n

drivers/pci/controller/dwc/pci-imx6.c:2826:2: error: implicit
declaration of function ‘pci_imx_set_msi_en’
[-Werror=implicit-function-declaration]
pci_imx_set_msi_en(&pci->pp);
^
drivers/pci/controller/dwc/pci-imx6.c: At top level:
drivers/pci/controller/dwc/pci-imx6.c:2857:10: error:
‘pci_imx_pm_ops’ undeclared here (not in a function)
.pm = &pci_imx_pm_ops,
    ^
cc1: some warnings being treated as errors

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
5 years agoMLK-22297: [i.MX6/VPU]: Fixing compiler warning when pm sleep is disabled
Zhou Peng [Tue, 23 Jul 2019 06:23:21 +0000 (14:23 +0800)]
MLK-22297: [i.MX6/VPU]: Fixing compiler warning when pm sleep is disabled

Fixing unused compiler warning for vpu_suspend() and vpu_resume()

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
5 years agoMGS-5051 Modify the GPU CLK from 500M to 600M for IMX8MN(815) board
Minjie Zhuang [Tue, 23 Jul 2019 04:38:46 +0000 (12:38 +0800)]
MGS-5051 Modify the GPU CLK from 500M to 600M for IMX8MN(815) board

At IMX8MN(815) we need to Increase GPU CLK frequency to match the overdrive mode.
The SOC default setting is overdrive mode,and GPU 600M is corresponding to overdrive mode.

Signed-off-by: Minjie Zhuang <minjie.zhuang@nxp.com>
5 years agoMGS-4868 [#ccc] enable userspace register read
Adrian Negreanu [Mon, 15 Jul 2019 13:01:24 +0000 (16:01 +0300)]
MGS-4868 [#ccc] enable userspace register read

In v6.2.4, userspace register access was controlled by defining
gcdREGISTER_ACCESS_FROM_USER, enabled by default.

This changed in v6.4.0 where gcdREGISTER_ACCESS_FROM_USER is replaced by
gcdREGISTER_READ_FROM_USER and gcdREGISTER_WRITE_FROM_USER,
both disabled by default.

For the moment, gputop uses userspace register access ioctl to
read the GPU performance counters.

Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
5 years agoMLK-22254: ASoC: fsl_easrc: Fix issue reported by coverity
Shengjiu Wang [Thu, 11 Jul 2019 10:25:13 +0000 (18:25 +0800)]
MLK-22254: ASoC: fsl_easrc: Fix issue reported by coverity

Fix issue reported by coverity:
a. Resource leak for ctx is not freed when m2m allocation
failed
b. Use of untrusted scalar value

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-22242: fsl_easrc: Fix definition issue of parameter width
Shengjiu Wang [Tue, 9 Jul 2019 10:27:26 +0000 (18:27 +0800)]
MLK-22242: fsl_easrc: Fix definition issue of parameter width

Some definition of parameter's width is wrong, that cause the
failure of conversion for more than 16 channels.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-22243: fsl_easrc: Add lock to protect configuration of slot
Shengjiu Wang [Wed, 10 Jul 2019 02:55:38 +0000 (10:55 +0800)]
MLK-22243: fsl_easrc: Add lock to protect configuration of slot

With multi-instance case, the fsl_easrc_config_slot will be called
in parallel, the fsl_easrc_slot is independent with context, so
we need to lock to protect the access of fsl_easrc_config_slot,
otherwise, the slot configuration will be fail for some instance
that cause "input DMA task timeout".

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-22161: fsl_easrc: Remove float point format support
Shengjiu Wang [Tue, 9 Jul 2019 08:58:47 +0000 (16:58 +0800)]
MLK-22161: fsl_easrc: Remove float point format support

The input audio float data range is normalized to (-1, 1), but
the hardware will drop to fractional part if output format
is integer format, so the output is all zero, which does not flow
the normal audio case, that to shift the output to Q15/Q31.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-22160: fsl_easrc: Remove Big endian support
Shengjiu Wang [Tue, 9 Jul 2019 07:05:05 +0000 (15:05 +0800)]
MLK-22160: fsl_easrc: Remove Big endian support

The hardware don't support big endian format. which only
support bit reverse.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-22239-3: ASoC: fsl_asrc: Support S24_3LE for m2m
Shengjiu Wang [Thu, 11 Jul 2019 03:12:51 +0000 (11:12 +0800)]
MLK-22239-3: ASoC: fsl_asrc: Support S24_3LE for m2m

Support S24_3LE for m2m with SDMA, but add constraint
for EDMA case, for EDMA don't support 3bytes copy.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-22239-2: ASoC: fsl_easrc: Support S24_3LE and S20_3LE for m2m
Shengjiu Wang [Thu, 11 Jul 2019 03:07:45 +0000 (11:07 +0800)]
MLK-22239-2: ASoC: fsl_easrc: Support S24_3LE and S20_3LE for m2m

upport S24_3LE and S20_3LE for m2m.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-22239-1: dmaengine: imx-sdma: Support 24bit/3bytes for sg mode
Shengjiu Wang [Thu, 11 Jul 2019 03:05:14 +0000 (11:05 +0800)]
MLK-22239-1: dmaengine: imx-sdma: Support 24bit/3bytes for sg mode

Support 24bit/3bytes for sg mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Robin Gong <yibin.gong@nxp.com>
5 years agoMLK-22168-2: fsl_easrc:fix timeout issue if STOP_CONV is not called
Shengjiu Wang [Fri, 5 Jul 2019 09:48:29 +0000 (17:48 +0800)]
MLK-22168-2: fsl_easrc:fix timeout issue if STOP_CONV is not called

When error happen, user may not call STOP_CONV to stop the context,
then there will be "input DMA task timeout" issue for next m2m task.

In this patch, fsl_easrc_stop_context is called in RELEASE_PAIR to
make sure context is stopped.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-22168: fsl_easrc:Add error handle for format check
Shengjiu Wang [Thu, 4 Jul 2019 07:29:57 +0000 (15:29 +0800)]
MLK-22168: fsl_easrc:Add error handle for format check

Add error handler for format check, if the format is not supported
should return error, otherwise it cause "input DMA task timeout"

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-9: ARM64: defconfig: Built in CONFIG_SND_SOC_FSL_EASRC
Shengjiu Wang [Mon, 3 Jun 2019 02:33:00 +0000 (10:33 +0800)]
MLK-21940-9: ARM64: defconfig: Built in CONFIG_SND_SOC_FSL_EASRC

Built in CONFIG_SND_SOC_FSL_EASRC

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-7: ASoC: imx-ak5558: Support EASRC in this sound card
Shengjiu Wang [Tue, 4 Jun 2019 10:18:45 +0000 (18:18 +0800)]
MLK-21940-7: ASoC: imx-ak5558: Support EASRC in this sound card

Support EASRC in this sound card with FE-BE structure

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-6: ASoC: imx-wm8524: Support EASRC in this sound card
Shengjiu Wang [Mon, 3 Jun 2019 02:32:38 +0000 (10:32 +0800)]
MLK-21940-6: ASoC: imx-wm8524: Support EASRC in this sound card

Support EASRC in this sound card with FE-BE structure

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-5: ASoC: wm8524: remove constrain for FE-BE
Shengjiu Wang [Mon, 3 Jun 2019 02:32:28 +0000 (10:32 +0800)]
MLK-21940-5: ASoC: wm8524: remove constrain for FE-BE

The constraint is not needed for back end bistream for
the sample rate is fixed by dts and the constraint
is propagate to front end bistream for they share same
snd_soc_pcm_runtime.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-4: ASoC: fsl_easrc: Support the m2m function
Shengjiu Wang [Wed, 5 Jun 2019 02:46:25 +0000 (10:46 +0800)]
MLK-21940-4: ASoC: fsl_easrc: Support the m2m function

EASRC M2M function is not able to put upstream due to its self-designed
ioctl protocol. So make a single patch for it and make it merge
into P2P driver as simply as possible.

The patch can only be maintained internally unless some one designs a
new protocol or implement the originally protocol by using some common
approach provided by Linux Kernel.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-3: ASoC: fsl_easrc: Add support new asrc module
Shengjiu Wang [Wed, 5 Jun 2019 02:39:44 +0000 (10:39 +0800)]
MLK-21940-3: ASoC: fsl_easrc: Add support new asrc module

EASRC (Enhanced ASRC) is a new IP module found on i.MX8 MN. It is
different from old ASRC module.

The primary features for the EASRC are as follows:
1. 4 Contexts - groups of channels with an independent time base
2. Fully independent and concurrent context control
3. Simultaneous processing of up to 32 audio channels
4. Programmable filter charachteristics for each context
5. 32, 24, 20, and 16-bit fixed point audio sample support
6. 32-bit floating point audio sample support
7. 8kHz to 384kHz sample rate
8. 1/16 to 8x sample rate conversion ratio
9. Software control of fine conversion ratio

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21940-2: dt-bindings: sound: Add document for fsl,easrc
Shengjiu Wang [Wed, 5 Jun 2019 02:37:31 +0000 (10:37 +0800)]
MLK-21940-2: dt-bindings: sound: Add document for fsl,easrc

EASRC (Enhanced ASRC) is a new IP module found on i.MX8 MN. It is
different from old ASRC module.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21697-2: ASoC: hdmi-codec: Support mono channel
Shengjiu Wang [Fri, 19 Jul 2019 08:01:31 +0000 (16:01 +0800)]
MLK-21697-2: ASoC: hdmi-codec: Support mono channel

Support mono channel for HDMI

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-21697-2: ASoC: imx-sii902x: Remove the operation for sii902x
Shengjiu Wang [Fri, 19 Jul 2019 07:59:36 +0000 (15:59 +0800)]
MLK-21697-2: ASoC: imx-sii902x: Remove the operation for sii902x

Move the operation for sii902x module to mxsfb_sii902x_audio.c
platform driver. change codec from dummy to hdmi-codec

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-21697-1: video: fb: sii902x: Register audio platform driver
Shengjiu Wang [Fri, 19 Jul 2019 07:51:16 +0000 (15:51 +0800)]
MLK-21697-1: video: fb: sii902x: Register audio platform driver

Register audio platform driver, that audio can utilize the existing
hdmi-codec driver, which can help to add constraint from EDID.

Other benifit is to move the i2c operation from audio machine driver
to this platform driver, original handling is not formal

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-20380: i2c: xenfront: fix i2cdetect bug
Flynn xu [Thu, 15 Nov 2018 08:30:24 +0000 (16:30 +0800)]
MLK-20380: i2c: xenfront: fix i2cdetect bug

The bug is when using i2cdetect in DomU, some i2c device will be
skiped, fixed this through add I2C_FUNC_SMBUS_QUICK functionality.

Signed-off-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit b0aa11bdc74e6cb15b18dc704d554364da1fe39a)

5 years agoMLK-20349 i2c: xen front: fix build warning
Peng Fan [Tue, 13 Nov 2018 10:19:01 +0000 (18:19 +0800)]
MLK-20349 i2c: xen front: fix build warning

Fixes build warning introduced by
90e818a0abcc("MLK-20342 i2c: xen-i2cback/front: Add i2c_smbus interface")

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

5 years agoMLK-20342 i2c: xen-i2cback/front: Add i2c_smbus interface
Flynn xu [Tue, 13 Nov 2018 09:46:50 +0000 (17:46 +0800)]
MLK-20342 i2c: xen-i2cback/front: Add i2c_smbus interface

Add smbus_xfer interface in xen-i2cback/front driver.

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

5 years agoMLK-20319 i2c:xen-i2cfront: fix uninitalized variable
Flynn xu [Mon, 12 Nov 2018 05:43:56 +0000 (13:43 +0800)]
MLK-20319 i2c:xen-i2cfront: fix uninitalized variable

Fix uninitalized variable

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

5 years agoMLK-20196-2 i2c: xen-i2cback: fix uninitalized variables
Peng Fan [Mon, 5 Nov 2018 08:29:46 +0000 (16:29 +0800)]
MLK-20196-2 i2c: xen-i2cback: fix uninitalized variables

Fix Coverity id 5186949 5187047, uninitialized variables.

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

5 years agoMLK-20196-1 i2c: xen-i2cback: fix num_msg usage
Peng Fan [Mon, 5 Nov 2018 08:57:34 +0000 (16:57 +0800)]
MLK-20196-1 i2c: xen-i2cback: fix num_msg usage

When req.num_msg is less than 2, also need initialze num_msg.
Also modify the if/else if to use num_msg

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

5 years agoMLK-21941: imx-hdp-cec: change CEC_TX_STATUS_ERROR to NACK
Shengjiu Wang [Thu, 18 Jul 2019 02:04:06 +0000 (10:04 +0800)]
MLK-21941: imx-hdp-cec: change CEC_TX_STATUS_ERROR to NACK

With commit cd7b7f509cd0 ("media: cec: check for non-OK/NACK
conditions while claiming a LA")

When set the LA, the cec stack try to transmit the message "0x55"
(5 is LA) before configure the LA, and check the return value
But our cec driver alway return ERROR, which cause the setting of
LA failure, so change the return value to be NACK.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-22252 phy: mixel-lvds-combo: Configure CO divider to meet fvco range requirement
Liu Ying [Wed, 17 Jul 2019 07:08:07 +0000 (15:08 +0800)]
MLK-22252 phy: mixel-lvds-combo: Configure CO divider to meet fvco range requirement

As the below diagram shows, to achieve a particular serial clock rate,
we should choose an appropriate CO divider value(1/2/4/8) so that PLL
VCO frequency(fvco) is in specified range(640MHz ~ 1500MHz).

 ---------  640MHz ~ 1500MHz   ------------      --------------
| PLL VCO | ----------------> | CO divider | -> | serial clock |
 ---------                     ------------      --------------
                               1/2/4/8 div      7 * phy_clk_rate

This patch configures CO divider to be appropriate value to meet the fvco
range requirement.  This may address display flicker issue seen on some
SoC samples.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
5 years agoMMFMWK-8572 VPU Decoder: not add frm_total_num if input data not including frame...
Shijie Qin [Wed, 17 Jul 2019 08:49:06 +0000 (16:49 +0800)]
MMFMWK-8572 VPU Decoder: not add frm_total_num if input data not including frame data

Firmware use the gap between input frames and parsed frames compare with
parse_threshold, if input data not including frame data shall not add
frm_total_num.
verify input and parsed frames count when finished

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
5 years agoMLK-17089-7: ASoC: fsl_mqs: support suspend & resume for imx8
Shengjiu Wang [Wed, 6 Dec 2017 03:30:02 +0000 (11:30 +0800)]
MLK-17089-7: ASoC: fsl_mqs: support suspend & resume for imx8

Base on latest power management design in MLK-17074, every driver
need to enter runtime suspend state in suspend, so the driver should
call the pm_runtime_force_suspend in suspend. with this implementation
the suspend function almost same as runtime suspend function. so remove
the suspend function, just use pm_runtime_force_suspend instead.

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

5 years agoMLK-17034-5: ASoC: fsl_mqs: Move clock operation to pm runtime function
Shengjiu Wang [Wed, 29 Nov 2017 07:32:21 +0000 (15:32 +0800)]
MLK-17034-5: ASoC: fsl_mqs: Move clock operation to pm runtime function

In imx8 when systerm enter suspend state, the power of subsystem will be
off, The clock enable state will be lost after resume, but the runtime
resume function will be called after resume by pm, so need to move clock
enablement to runtime resume and clock disablement to runtime suspend.
Then after resume the clock enable state can be recovered.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMGS-5035-3 [#imx-1597] enable dual-GPU frequency scaling
Xianzhong [Mon, 15 Jul 2019 19:04:51 +0000 (03:04 +0800)]
MGS-5035-3 [#imx-1597] enable dual-GPU frequency scaling

current solution only enable GPU frequency scaling on GPU0,
does not change GPU1, cause problem for device-cooling.

fix platform driver to enable dual-GPU frequency scaling.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
5 years agoMGS-5035-2 [#ccc] add frequency scaling in device node
Xianzhong [Mon, 15 Jul 2019 17:37:26 +0000 (01:37 +0800)]
MGS-5035-2 [#ccc] add frequency scaling in device node

cat /sys/bus/platform/drivers/galcore/gpu3DClockScale

echo 16 > /sys/bus/platform/drivers/galcore/gpu3DClockScale

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
5 years agoMGS-5035-1 [#ccc] enable shader clock frequency scaling
Xianzhong [Mon, 15 Jul 2019 15:26:14 +0000 (23:26 +0800)]
MGS-5035-1 [#ccc] enable shader clock frequency scaling

currently GPU core clock frequency scaling is enabled,
the scaled clock cannot change GPU shader frequency.

enable shader frequency scaling with below setting:

  fscaleSh_clkSh = clkSh[7 :1 ];
  fscaleShLoad_clkSh = clkSh [0 ];
  enableAutoSh_clkSh = clkSh[16 ];
  disableAuto_clkSh = clkSh[17 ];

trick: write 0x10C to set new frequency scaling,
reset 0x10C to lock-up it before next change.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
5 years agoMLK-21980: ASoC: imx-pcm-rpmsg: add debugfs_prefix for platform
Shengjiu Wang [Tue, 16 Jul 2019 10:55:17 +0000 (18:55 +0800)]
MLK-21980: ASoC: imx-pcm-rpmsg: add debugfs_prefix for platform

There is warning log after switching to component in driver:

[    2.135785] fsl-rpmsg-i2s rpmsg-i2s: ASoC: Failed to create component debugfs directory

The reason is there is two component attached with one device,
the components' name are same, then creating debugfs for second
component failed.

This patch is to add debugfs_prefix for platform component to fix
the warning issue.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
5 years agoMLK-22265 dt-bindings: pinctrl: imx8mm: Update head file
Anson Huang [Tue, 16 Jul 2019 01:56:48 +0000 (09:56 +0800)]
MLK-22265 dt-bindings: pinctrl: imx8mm: Update head file

Update i.MX8MM pinctrl head file according to reference manual
Rev.1, 03/2019.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 1deb822528206006de8e466c01ea8e782c51b0eb)

5 years agoMLK-22278:VPU Decoder: fix driver may don't alloc frames to firmware
ming_qian [Tue, 16 Jul 2019 05:38:00 +0000 (13:38 +0800)]
MLK-22278:VPU Decoder: fix driver may don't alloc frames to firmware

firmware may release frame buffer after
it has been queuen again.
so when qbuf, there may be no frames.
after release the frame, we can alloc it to frame again.

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
5 years agoMLK-22022: ASoC: imx-si476x: Fix Failure at capture
Shengjiu Wang [Tue, 16 Jul 2019 05:31:44 +0000 (13:31 +0800)]
MLK-22022: ASoC: imx-si476x: Fix Failure at capture

With command: arecord -D hw:$num,0 -f dat | aplay -D hw:0,0 -f dat &

There is error:
fsl-ssi-dai 202c000.ssi: invalid slot width: 32
fsl-ssi-dai 202c000.ssi: failed to set dai tdm slot
imx-tuner-si476x sound-fm: ASoC: machine hw_params failed: -22

The reason is that slot width 32 is not valid and and set_sysclk
api is removed by commit b0a7043d5c2c ("ASoC: fsl_ssi: Caculate bit clock
rate using slot number and width").

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5 years agoMLK-21773: media: m2m: add YUV24 support for ISI m2m driver
Guoniu.Zhou [Fri, 5 Jul 2019 07:58:16 +0000 (15:58 +0800)]
MLK-21773: media: m2m: add YUV24 support for ISI m2m driver

Add YUV24 format support for ISI memory to memory function and
remove YUV32 which is not supported by ISI.

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

5 years agoMLK-21775-4: ASoC: fsl_micfil: synchronize HWVAD enable/disable
Viorel Suman [Fri, 12 Jul 2019 09:07:42 +0000 (12:07 +0300)]
MLK-21775-4: ASoC: fsl_micfil: synchronize HWVAD enable/disable

HWVAD may be disabled from different context - from userspace
via SYSFS interface, and from VAD interrupt context on VAD event
detection. Synchronize HVWAD enable/disable in order to get a
proper HWVAD state after each operation.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
5 years agoMLK-21775-3: ASoC: fsl_micfil: prepare for atomic context
Viorel Suman [Fri, 12 Jul 2019 08:46:26 +0000 (11:46 +0300)]
MLK-21775-3: ASoC: fsl_micfil: prepare for atomic context

Replace "sleep" calls with corresponding "delay" equivalents
in order to prepare the code for running in atomic context.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
5 years agoMLK-21775-2: ASoC: fsl_micfil: fix error handling in enable_hwvad
Viorel Suman [Fri, 12 Jul 2019 08:54:03 +0000 (11:54 +0300)]
MLK-21775-2: ASoC: fsl_micfil: fix error handling in enable_hwvad

The HWVAD_OFF state must be restored and device put back
in runtime_suspend in case if fsl_set_clock_params, fsl_micfil_reset
and init_hwvad calls return an error.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
5 years agoMLK-21775-1: ASoC: fsl_micfil: improve error logging messages
Viorel Suman [Fri, 12 Jul 2019 09:04:03 +0000 (12:04 +0300)]
MLK-21775-1: ASoC: fsl_micfil: improve error logging messages

Improve hwvad enable/disable related error logging messages.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
5 years agoMLK-22257: VPU Decoder: clear pending cmd if cmd is timeout
ming_qian [Fri, 12 Jul 2019 07:24:31 +0000 (15:24 +0800)]
MLK-22257: VPU Decoder: clear pending cmd if cmd is timeout

if cmd is timeout, driver will set hang_status,
if driver doesn't clear the pending cmd who is timeout,
driver will prevent the next cmd to execute.

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
5 years agoMLK-22112-3 media: mipi_csi: replace reset flow for phy
Robby Cai [Fri, 14 Jun 2019 05:52:56 +0000 (13:52 +0800)]
MLK-22112-3 media: mipi_csi: replace reset flow for phy

After dispmix reset driver has been introduced, use reset control framework
to do the PHY reset for mipi csi.

BuildInfo:
 - ATF fecb1ef

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