Enable DM_CRYPT, as module, to have an out-of-the-box
solution for dm-crypt with black keys and blobs.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
(cherry picked from commit aee8fd47091449dc2ab0e659aff522a59d835903)
Build xen netback as module, then we could have paravirtualized network
support.
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
DCSS may face starvation issues if the CRTC surface size is larger than
3840x2160. Make sure we don't allow modes larger than 3840x2160.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Tested-by: Sandor Yu <sandor.yu@nxp.com>
uart0 is used by XEN, we should not allow linux to touch
the clk to avoid uart being broken.
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
After the chipidea driver introduce extcon for id and vbus, it's able
to wakeup from another irq source, in case the system with extcon ID
cable, wakeup from usb ID cable and device removal, the usb device
disconnect irq may come firstly before the extcon notifier while system
resume, so we will get 2 "wakeup" irq, one for usb device disconnect;
and one for extcon ID cable change(real wakeup event), current driver
treat them as 2 successive wakeup irq so can't handle it correctly, then
finially the usb irq can't be enabled. This patch adds a check to bypass
further usb events before controller resume finished to fix it.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Added suspend/resume operations for PM support in the DCP driver.
After a suspend/resume cycle DCP would still be in a low-power mode
and have its clocks gated, thus requiring state to be saved beforehand:
- Control register value(DCP_CTRL)
- Channel control register value(DCP_CHANNELCTRL)
Signed-off-by: Dragos Rosioru <dragos.rosioru@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
This change affects all i.MX 6 with PL310 L2 Cache controller.
When Linux runs in Non-secure World the PL310 has already
been initialized by the ARM secure World running OP-TEE os.
However, in order to have a proper Linux Initialization all the
L2 cache ways have been locked by the secure world.
This patch unlock all the ways during pl310 initialization.
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
(cherry picked from commit 5133fbe9aaafd24add7d92b1aa2d3474b7a13723)
Return directly for independent entity because it hasn't any links
with other entity, so needn't to do clean operation.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fix pyeiq can't detect camera device when build imx8-media-dev.c as
modules. Video device will be registered before entities link setup
and it will send an event to userspace once video device created.
Userspace will try to open the video device but entities links are
still not established due to driver need to wait all subdev register,
so driver will return -ENODEV, it leads to pyeiq fail. The patch add
checking for entities link when userspace try to open video device and
will return directly when links are not ready.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
It turns out the usb suspend clk IMX8MP_CLK_USB_ROOT should be on to
support usb wakeup, so add the suspend clk to glue layer node for
handling.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Add i2c4 port used by hdmi daughter cards on Audio Board
2.0 targets
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 67a6a0ff58dc2494f43ed526f877c6b8788c7784)
Add i2c4 port used by hdmi daughter cards on Audio Board
2.0 targets
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 5938e9fb2b5f3a0a9d75520f5fd9efeee34bbbdd)
Add i2c4 port used by hdmi daughter cards on Audio Board
2.0 targets
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit c38112c9ed09545b901b9cd4c921d195379f1f0b)
Follow the same regulator power tree as imx8mm ab2
target platforms
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 7597adf8d2042dc437be21fd02988dc884f5db3c)
Aling to use the same regulator power tree as imx8mm ab2
target boards
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 6c65808df8bc46ec6383e28aa9dba0f89f9bec5f)
Add SAI1 RX pads to support hdmi daughter cards with
I2S audio extraction.
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 6b5ae3257da041a62e0ca71e543dc18991eab4de)
we introduce 3rd role for dwc3, but miss to handle power management
for it, this will cause re-init missing if power lost, and dwc3 is
not in an expected low power state, so add none role PM handling.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
With all bits of IER are set to 0, still can observe the lpspi irq events
when using DMA mode to transfer data.
So disable irq to avoid the too much irq events.
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 2cea8c79ba4cb301480d434fbc2ae0604882851b)
If SPI is probed before the GPIO driver, it may miss the cs-gpio
configuration in dtb.
Add defer probe handler to wait GPIO driver probe.
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit c2b2a4d1006b48ab311d2f948e83490d8ea453f5)
Add dmas and dma-names for ecspi1~4 to fix boot error:
"spi_imx 30840000.ecspi: dma setup error -19, use pio".
Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 893d4b71f451909c3092849f0a4fcb62cdea918b)
(cherry picked from commit f34abcf94b14f5948a59209a3fcaceb4e5fa9477)
As linux_m4 flash is default boot flash for iMX8QXP/iMX8QM/iMX8DXL,
enabble PCIe EP based on default boot RPMSG DTS file.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 4f60600cb9740066e53e7065cecabff9a5d72850)
Loop play a video AVC_1080p_24fps_90Mbps_bird90.m2ts met UI
freeze and "rcu stall". Enable CONFIG_DEBUG_SPINLOCK kernel
debug get below call stack, the reason is due to spin_lock
be used in IRQ interrupt and caused deadlock.
8mq board enabled Video overlay feature, there are two fences
enabled: out fence (represent frame on screen) and android out
fence (new added, represent frame off screen). When there are
two fences sync_file_set_fence() will call dma_fence_array_create()
to register irq_dma_fence_array_work(), then gckOS_DestroySignal()
will be called in IRQ which use spin_lock cause deadlock.
Fix solution is use spin_lock_irqsave() instead of spin_lock()
for Database->lock if it is not called in IRQ interrupt.
Call stack:
[ 608.902810] dump_backtrace.cfi_jt+0x0/0x4
[ 608.906914] show_stack+0x18/0x24
[ 608.910237] dump_stack+0xb8/0x114
[ 608.913644] spin_bug+0xb0/0xb4
[ 608.916788] do_raw_spin_lock+0xac/0x124
[ 608.920714] _raw_spin_lock+0x20/0x2c
[ 608.924384] gckOS_DestroySignal+0x6c/0x170
[ 608.928572] viv_fence_release+0x28/0x40
[ 608.932502] dma_fence_release+0x13c/0x280
[ 608.936603] dma_fence_array_release+0x74/0x98
[ 608.941049] dma_fence_release+0x13c/0x280
[ 608.945150] irq_dma_fence_array_work+0x6c/0x9c
[ 608.949690] irq_work_run_list+0xb4/0x148
[ 608.953702] irq_work_run+0x20/0x40
[ 608.957193] handle_IPI+0x10c/0x180
[ 608.960686] efi_header_end+0x13c/0x15c
[ 608.964526] el1_irq+0x104/0x200
[ 608.967761] radix_tree_lookup+0x38/0x84
[ 608.971686] gckOS_WaitSignal+0x54/0x258
[ 608.975615] gckKERNEL_Dispatch+0x1460/0x1754
[ 608.979977] gckDEVICE_Dispatch+0x1a0/0x1a4
[ 608.984165] drv_ioctl+0xb8/0x184
[ 608.987487] do_vfs_ioctl+0x3a0/0x6f0
[ 608.991154] __arm64_sys_ioctl+0x78/0xa4
[ 608.995082] el0_svc_common+0xb4/0x18c
[ 608.998834] el0_svc_handler+0x74/0x98
[ 609.002589] el0_svc+0x8/0xc
Change-Id: Idf16a5707add70246c74d2f1446f7dbb7037f5f0
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
(cherry picked from commit b6106c5de2529b01ce5bb3380fd93328b55d5528)
There is kernel panic when stop android or kill surfaceflinger
after enable framebuffer tile compression on 8mq board.
The root cause of the issue is dcss driver not api to receive
ts fd, gpu driver will set the ts_dma_buf in _SetVidMemMetadata(),
dcss driver get the ts buffer physical address from ts_dma_buf,
when stop android framebuffer and matched ts buffer will free,
previous ts_dma_buf get from ts_fd will be invalid, when dcss
driver use this ts_dma_buf will cause problem. It is a common
issue, if Linux Weston do the similar stop should also meet
the same panic issue.
Keep a reference for ts_dma_buf in _SetVidMemMetadata(),
decrease the reference in _dmabuf_release() can avoid the
panic issue.
Kernel panic log:
[ 41.007431] kernel BUG at drivers/gpu/drm/drm_gem.c:154!
[ 41.139375] Call trace:
[ 41.141824] drm_gem_object_init+0xb8/0xbc
[ 41.145920] drm_gem_cma_prime_import_sg_table+0x84/0xdc
[ 41.151233] drm_gem_prime_import_dev+0xe8/0x194
[ 41.160036] dcss_plane_atomic_set_base+0x31c/0x3d0
[ 41.164915] dcss_plane_atomic_update+0x450/0x46c
[ 41.164923] drm_atomic_helper_commit_planes+0x130/0x31c
[ 41.182255] dcss_drm_atomic_commit_tail+0xcc/0x150
[ 41.187139] dcss_commit_work+0x10/0x1c
[ 41.197322] process_one_work+0x2d8/0x580
[ 41.201333] worker_thread+0x28c/0x518
[ 41.205085] kthread+0x14c/0x15c
[ 41.208316] ret_from_fork+0x10/0x18
Change-Id: I385851b436d1fead1131ce25f496bdd5d3d14264
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
(cherry picked from commit 9ef46bda523088bfba51b7432acd2c1e21e547d5)
Android pass ts_address to dcss to fix kernel panic issue
reported in ticket MA-12928, this fix solution is not formal.
Remove ts_address code to keep align with Linux, if android
still meet panic issue for corner case we need check root
cause and do formal fix.
Change-Id: I04a6294f237e0c1ed5544dce1dc13e5a6ac232ab
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
(cherry picked from commit 54baa89690f61101c8182cd4fed2177941476587)
The MxM wifi driver upgrade to:
ssh://git@bitbucket.sw.nxp.com/wcswrel/
rel-nxp-wifi-fp92-bt-fp92-linux-android-mxm4x17186.p4-mgpl.git
Driver changes mxm4x17186.p2 -> mxm4x17186.p4:
- Fixed issue of P2P Client not able to connect with P2P Group Owner in 5GHz.
- Fixed kernel warning "Unable to handle kernel paging request"
which was seen due to redundant disconnect indication from AP.
- Fixed kernel warning which was seen due to return type as int.
instead of expected "netdev_tx_t".
- Fixed firmware initialization failure when using uAP only mode.
- Added fix to avoid downloading commands to firmware after getting
command timeout.
Reviewed-by: yang.tian <yang.tian@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: c2d7d9f654c56ca52aea85eebecd6a37540d680b)
Validate sizes for each argument received from user-space
to avoid untrusted values.
Therefor check if Encrypted Key Type, Key Mode and Key Value
are given - their sizes must be at least 1 since they have
the null terminator.
Reported-by: Coverity 10893160
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit d7c41169bc8e50f3513ca6c694f3130bbe57aeed)
Add null terminator to temporary buffer used to copy from
user-space data needed for key generation.
This buffer is later used in operations (i.e. strlen()) that
expects properly null-terminated strings.
Therefore add the null terminator character.
Reported-by: Coverity 10893158
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit b8c49eddfd687e049923ab1e5aca09e2b4160f54)
The address of an array is never NULL, so the comparison of
black key array always evaluate the same way.
Remove unnecessary check.
Reported-by: Coverity 10893157
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 8888926c54e819dd7f5d00bad8abdcb8175e8bf6)
The address of an array is never NULL, so the comparison of
black key array always evaluate the same way.
Remove unnecessary check.
Reported-by: Coverity 10893156
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit cd078fac33b60e753886ded2e821ef765a137110)
Only ak5558 can be supported on imx8mn + audio board.
others should be disabled.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
Disable the pull control for pad, otherwise the pull up or
pull down will cause the signal abnormal on TX line, then
there is noise.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
(cherry picked from commit 6d1676342d65cd7950375994783928dca9ffa57e)
According to IC suggestion, everytime before sending the tuning command,
need to reset the usdhc, so to reset the tuning circuit, to let every
tuning command work well for the manual tuning method. For standard tuning
method, IC already add the reset operation in the hardware logic.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/1597135057-22272-1-git-send-email-haibo.chen@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 6dafa24d41ebcacf18a5eed4b12690b8aaaee107)
(cherry picked from commit b1fb5fc8321b307fa0dff839fe0dd79ef8e20ae2)
Variable streaming is used to track ov5640 working state and control to turn
on/off ov5640. For normal case, streaming will be set to false when user call
STREAMOFF ioctl, but for some special cases, process will be killed at any time
and STREAMOFF ioctl will be ignored in this case. It leads to sensor software
state is out of sync with its real state, so driver force to set streaming to
false when call ov5640_set_power_off(). It will keep software state sync with
sensor real state.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
When use USERPTR mode to queue v4l2 buffer, field and timestamp info
needs to be stored.
Signed-off-by: Haihua Hu <jared.hu@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 4e4c19ea2a0d686ebeab204198a37a2c09b104d4)
(cherry picked from commit 7cf35411b106ab4881b0674697b5b2baedd68743)
The "enable-active-high" property should be added when always on is
required by the fixed regulator.
Otherwise, the clk_ext_sel would be changed to low after the
initialization of the regulator is complete. And PCIe wouldn't
works well.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 4dd0357e1cf01ea54d7959de299ed6a5cd0416f5)
Add dma chans for uart ports, otherwise uart is in pio mode.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: 0f10fa52f0a638809fda3ee1afa503f1e6eb9538)
The problem of incorrect clock cycle calculation has been fixed, so
the clock-frequency is restored to the default 100KHz.
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 0ae9421b4508ae4f4d8bed431a4a38e410105bdb)
Claim clkhi and clklo as integer type to avoid possible calculation
errors caused by data overflow.
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 5912ae411d8c7706bbed9a7139c0afe47da898b7)
Commit 89d64ed05d ("MLK-24263-8 ASoC: SOF: Add support for system /
runtime PM on i.MX8") introduced runtime PM handlers for i.MX8QM but
forgot to add the same handlers for i.MX8QXP.
Do it now!
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit c1513d6b7bc54e9de2a0a99987e4c6e98a05deb6)
Update job descriptors for black key generation and blob encapsulation/
decapsulation with inline commands.
For LOAD commands use immediate values instead of pointers because
this is the fastest and the most efficient of the transfer mechanisms.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>