1
0
Fork 0
Commit Graph

884487 Commits (a0cb9d009711eabc8d9dc3e0c626cb61659e1b2d)

Author SHA1 Message Date
Iuliana Prodan a0cb9d0097 MLK-24762 ARM64: configs: imx_v8_defconfig: enable DM_CRYPT
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)
2020-09-11 12:26:07 +03:00
Peng Fan 62af2c55a2 MLK-24275 arm64: imx_v8_defconfig: build xen netback as module
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>
2020-09-11 16:16:20 +08:00
Laurentiu Palcu deaa68fe31 MLK-24608: drm/imx/dcss: disallow certain modes
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>
2020-09-11 10:23:25 +08:00
Peng Fan 24947e556d MLK-24763 arm64: dts: imx8qm-dom0: disable uart0_lpcg
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>
2020-09-10 18:40:47 +08:00
Li Jun 4da32c0295 MLK-15984 usb: chipidea: wait controller resume finished for wakeup irq
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>
2020-09-10 10:33:42 +08:00
Dragos Rosioru 5cabbe3856 MLK-23746 crypto: dcp - add power management support
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>
2020-09-10 04:04:20 +03:00
Cedric Neveux aa4144e306 MLK-16912 PL310: unlock ways during initialization
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)
2020-09-09 17:15:13 +02:00
Guoniu.zhou 039d271797 MLK-24746: media: imx8: return directly for independent entity
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>
2020-09-09 16:43:33 +08:00
Guoniu.zhou de136a4752 MLK-24745: media: isi: fix pyeiq can't detect camera device
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>
2020-09-09 16:43:13 +08:00
Li Jun 3887132f36 MLK-24747-2 usb: dwc3: imx8mp: add suspend clk handling
Only gate this clock if system suspend with wakeup disabled.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2020-09-09 09:57:48 +08:00
Li Jun 73cece6698 MLK-24747-1 arm64: dtsi: imx8mp: add suspend clk for usb glue node
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>
2020-09-09 09:57:24 +08:00
Adrian Alonso 362718d1e1 MLK-24700-3: dts: arm64: freescale: imx8mn ddr4 ab2 add i2c4
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)
2020-09-08 10:07:39 -05:00
Adrian Alonso b0e173cac6 MLK-24700-2: dts: arm64: freescale: imx8mn ab2 add i2c4
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)
2020-09-08 10:06:17 -05:00
Adrian Alonso 4f97d1708b MLK-24700-1: dts: arm64: freescale: imx8mm ab2 add i2c4
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)
2020-09-08 10:05:38 -05:00
Adrian Alonso 36fa113277 MLK-24702-2: dts: arm64 freescale: imx8mn ab2 regulator power tree
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)
2020-09-08 10:04:55 -05:00
Adrian Alonso 639d69a651 MLK-24702-1: dts: arm64: freescale: imx8mn ddr4 ab2 regulator tree
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)
2020-09-08 10:04:19 -05:00
Adrian Alonso b946e13f9b MLK-24701: dts: arm64: freescale: imx8mm ab2: sai1 rx pads
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)
2020-09-08 10:03:37 -05:00
Joakim Zhang 62222cb460 MLK-24752-2 arch: arm64: config: imx_v8_defconfig: enable Remote Controller
Enable all RC decoder that kernel supported and GPIO RC device.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-09 02:51:32 +08:00
Joakim Zhang 5f0cbb7b9b MLK-24752-1 arch: arm64: imx8m: add IR support
Add IR support for i.MX8MM/MN/MQ.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-09 02:51:28 +08:00
Li Jun 054bf76ce6 MLK-24689 usb: dwc3: core: do dwc3 core exit and init for none role PM
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>
2020-09-04 17:57:31 +08:00
Guoniu.zhou f59b06a40c MLK-24696: media: csi: return error when no command support
Return error when no command support

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
2020-09-04 17:40:09 +08:00
Clark Wang 444a5e71e4 MLK-24713 spi: lpspi: disable lpspi module irq in DMA mode
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)
2020-09-04 16:56:40 +08:00
Clark Wang a6d5b357da MLK-24708 spi: imx: handle EPROBE_DEFER when get cs-gpios number
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)
2020-09-04 16:56:40 +08:00
Xiaoning Wang 8660d4e1be MLK-14852 ARM: dts: fix imx7d boot spi dma setup error
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)
2020-09-04 16:56:40 +08:00
Richard Zhu e61b1dabf9 MLK-24712 arm64: dts: imx8: use rpmsg dts in ep enable dts
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)
2020-09-04 15:13:15 +08:00
Richard Liu add79449db MA-17683 [#imx-2302] Fix video playback "rcu stall" issue on 8mq
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)
2020-09-04 10:39:18 +08:00
Richard Liu 8c5e7b55ac MA-17341-2 [#imx-2211] Fix kernel panic when do stop on android
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)
2020-09-04 10:39:10 +08:00
Richard Liu da8160ec36 MA-17341 [#imx-2211] Remove ts_address code to keep align with Linux
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)
2020-09-04 10:39:03 +08:00
Fugang Duan 8393c56b2d MLK-24669 net: wireless: nxp: mxm_wifiex: upgrade to mxm4x17186.p4 release
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)
2020-09-02 11:42:29 +08:00
Iuliana Prodan b6c24461eb MLK-24517-4 crypto: caam - validate arguments received from user-space
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)
2020-09-01 13:38:55 +03:00
Iuliana Prodan acee2fa973 MLK-24517-3 crypto: caam - add null terminator to temporary buffer
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)
2020-09-01 13:38:44 +03:00
Iuliana Prodan ef17a97b4b MLK-24517-2 crypto: caam - removed unnecessary validation of black key for blob encapsulation
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)
2020-09-01 13:38:32 +03:00
Iuliana Prodan 839c0bb969 MLK-24517-1 crypto: caam - removed unnecessary validation of black key for blob decapsulation
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)
2020-09-01 13:37:59 +03:00
Joakim Zhang f7f6266daf MLK-24667-3 perf vendor: add bandwidth usage metric for i.MX8QM DDR Perf
Add bandwidth usage metric for i.MX8QM DDR Perf.

Test Report:
------------------------------------------------------
root@imx8qmmek:~# ./perf list metric

List of pre-defined events (to be used in -e):

Metrics:

  imx8qm-ddr0-all-r
       [imx8qm: bytes of all masters read from ddr0]
  imx8qm-ddr0-all-w
       [imx8qm: bytes of all masters write to ddr0]
  imx8qm-ddr0-bandwidth-usage
       [imx8qm: percentage of bandwidth usage for ddr0]
  imx8qm-ddr1-all-r
       [imx8qm: bytes of all masters read from ddr1]
  imx8qm-ddr1-all-w
       [imx8qm: bytes of all masters write to ddr1]
  imx8qm-ddr1-bandwidth-usage
       [imx8qm: percentage of bandwidth usage for ddr1]
------------------------------------------------------
root@imx8qmmek:~# ./perf stat -a -I 1000 -M imx8qm-ddr0-bandwidth-usage dd if=/dev/zero of=/dev/null bs=1M count=1000000
     1.000137560            8403160      imx8_ddr0/read-cycles/    #     11.9 %  imx8qm-ddr0-bandwidth-usage
     1.000137560           86499449      imx8_ddr0/write-cycles/
     1.000137560         1000137560 ns   duration_time
     2.000542875            8818984      imx8_ddr0/read-cycles/    #     10.5 %  imx8qm-ddr0-bandwidth-usage
     2.000542875           74883499      imx8_ddr0/write-cycles/
     2.000542875         1000405315 ns   duration_time
     3.000839188            8604400      imx8_ddr0/read-cycles/    #      9.6 %  imx8qm-ddr0-bandwidth-usage
     3.000839188           68284175      imx8_ddr0/write-cycles/
     3.000839188         1000296313 ns   duration_time
--------------------------------------------------------
root@imx8qmmek:~# ./perf stat -a -I 1000 -M imx8qm-ddr1-bandwidth-usage dd if=/dev/zero of=/dev/null bs=1M count=1000000
     1.000129435           15152856      imx8_ddr1/read-cycles/    #     14.5 %  imx8qm-ddr1-bandwidth-usage
     1.000129435          100669236      imx8_ddr1/write-cycles/
     1.000129435         1000129435 ns   duration_time
     2.000521875           15463356      imx8_ddr1/read-cycles/    #     13.4 %  imx8qm-ddr1-bandwidth-usage
     2.000521875           91710077      imx8_ddr1/write-cycles/
     2.000521875         1000392440 ns   duration_time
     3.000794688           15773560      imx8_ddr1/read-cycles/    #     12.7 %  imx8qm-ddr1-bandwidth-usage
     3.000794688           85948507      imx8_ddr1/write-cycles/
     3.000794688         1000272813 ns   duration_time

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-02 02:21:42 +08:00
Joakim Zhang 93b3f99c40 MLK-24667-2 perf vendor: add bandwidth usage metric for i.MX8QXP DDR Perf
Add bandwidth usage metric for i.MX8QXP DDR Perf.

Test Report:
----------------------------------------------------
root@imx8qxpmek:~# ./perf list metric

List of pre-defined events (to be used in -e):

Metrics:

  imx8qxp-ddr0-all-r
       [imx8qxp: bytes of all masters read from ddr0]
  imx8qxp-ddr0-all-w
       [imx8qxp: bytes of all masters write to ddr0]
  imx8qxp-ddr0-bandwidth-usage
       [imx8qxp: percentage of bandwidth usage for ddr0]
--------------------------------------------------------
root@imx8qxpmek:~# ./perf stat -a -I 1000 -M imx8qxp-ddr0-bandwidth-usage dd if=/dev/zero of=/dev/null bs=1M count=1000000
     1.000170750             681608      imx8_ddr0/read-cycles/    #     13.6 %  imx8qxp-ddr0-bandwidth-usage
     1.000170750           81013320      imx8_ddr0/write-cycles/
     1.000170750         1000170750 ns   duration_time
     2.000833375             592804      imx8_ddr0/read-cycles/    #     13.7 %  imx8qxp-ddr0-bandwidth-usage
     2.000833375           81756288      imx8_ddr0/write-cycles/
     2.000833375         1000662625 ns   duration_time
     3.001393875             611804      imx8_ddr0/read-cycles/    #     13.6 %  imx8qxp-ddr0-bandwidth-usage
     3.001393875           80897346      imx8_ddr0/write-cycles/
     3.001393875         1000560500 ns   duration_time
     4.001917375             600564      imx8_ddr0/read-cycles/    #     13.5 %  imx8qxp-ddr0-bandwidth-usage
     4.001917375           80269884      imx8_ddr0/write-cycles/
     4.001917375         1000523500 ns   duration_time

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-02 02:21:42 +08:00
Joakim Zhang 90ab99bdd1 MLK-24667-1 perf vendor: add bandwidth usage metric for i.MX8MM DDR Perf
Add bandwidth usage metric for i.MX8MM DDR Perf.

Test Report:
-------------------------------------------------------
root@imx8mmevk:~# ./perf list metric

List of pre-defined events (to be used in -e):

Metrics:

  imx8mm-ddr0-2d-r
       [imx8mm: bursts of gpu 2d read from ddr0]
  imx8mm-ddr0-2d-w
       [imx8mm: bursts of gpu 2d write to ddr0]
  imx8mm-ddr0-3d-r
       [imx8mm: bursts of gpu 3d read from ddr0]
  imx8mm-ddr0-3d-w
       [imx8mm: bursts of gpu 3d write to ddr0]
  imx8mm-ddr0-a53-r
       [imx8mm: bursts of a53 core read from ddr0]
  imx8mm-ddr0-a53-w
       [imx8mm: bursts of a53 core write to ddr0]
  imx8mm-ddr0-all-r
       [imx8mm: bytes of all masters read from ddr0]
  imx8mm-ddr0-all-w
       [imx8mm: bytes of all masters write to ddr0]
---------------------------------------------------------
root@imx8mmevk:~# ./perf stat -a -I 1000 -M imx8mm-ddr0-bandwidth-usage-lpddr4 dd if=/dev/zero of=/dev/null bs=1M count=1000000
     1.000127125             324072      imx8_ddr0/read-cycles/    #     33.4 %  imx8mm-ddr0-bandwidth-usage-lpddr4
     1.000127125          250417562      imx8_ddr0/write-cycles/
     1.000127125         1000127125 ns   duration_time
     2.001282750             293964      imx8_ddr0/read-cycles/    #     33.9 %  imx8mm-ddr0-bandwidth-usage-lpddr4
     2.001282750          254176749      imx8_ddr0/write-cycles/
     2.001282750         1001155625 ns   duration_time
     3.002299500             234264      imx8_ddr0/read-cycles/    #     33.0 %  imx8mm-ddr0-bandwidth-usage-lpddr4
     3.002299500          247474957      imx8_ddr0/write-cycles/
     3.002299500         1001016750 ns   duration_time
     4.003355875             202304      imx8_ddr0/read-cycles/    #     32.8 %  imx8mm-ddr0-bandwidth-usage-lpddr4
     4.003355875          245469156      imx8_ddr0/write-cycles/
     4.003355875         1001056375 ns   duration_time

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-02 02:21:42 +08:00
Joakim Zhang d860ed8c6c MLK-24666-2 perf vendor: add JSON file for i.MX8MQ DDR Perf
Add JSON file for i.MX8MQ DDR Perf.

Test Report:
-------------------------------------------------------------
root@imx8mqevk:~# ./perf list metric

List of pre-defined events (to be used in -e):

Metrics:

  imx8mq-ddr0-all-r
       [imx8mq: bytes of all masters read from ddr0]
  imx8mq-ddr0-all-w
       [imx8mq: bytes of all masters write to ddr0]
  imx8mq-ddr0-bandwidth-usage
       [imx8mq: percentage of bandwidth usage for ddr0]
------------------------------------------------------------
root@imx8mqevk:~# ./perf stat -a -I 1000 -M imx8mq-ddr0-all-r,imx8mq-ddr0-all-w
     1.001143121              34224      imx8_ddr0/read-cycles/    # 547584.0 imx8mq-ddr0-all-r
     1.001143121              10805      imx8_ddr0/write-cycles/   # 172880.0 imx8mq-ddr0-all-w
     2.003035881              31656      imx8_ddr0/read-cycles/    # 506496.0 imx8mq-ddr0-all-r
     2.003035881               7585      imx8_ddr0/write-cycles/   # 121360.0 imx8mq-ddr0-all-w
     3.004305241              19864      imx8_ddr0/read-cycles/    # 317824.0 imx8mq-ddr0-all-r
     3.004305241               1483      imx8_ddr0/write-cycles/   #  23728.0 imx8mq-ddr0-all-w
------------------------------------------------------------
root@imx8mqevk:~# ./perf stat -a -I 1000 -M imx8mq-ddr0-bandwidth-usage dd if=/dev/zero of=/dev/null bs=1M count=1000000
     1.000643080             126560      imx8_ddr0/read-cycles/    #     11.6 %  imx8mq-ddr0-bandwidth-usage
     1.000643080           92714082      imx8_ddr0/write-cycles/
     1.000643080         1000643080 ns   duration_time
     2.002052721              82056      imx8_ddr0/read-cycles/    #      9.4 %  imx8mq-ddr0-bandwidth-usage
     2.002052721           75279735      imx8_ddr0/write-cycles/
     2.002052721         1001409641 ns   duration_time
     3.003379081              85448      imx8_ddr0/read-cycles/    #      9.3 %  imx8mq-ddr0-bandwidth-usage
     3.003379081           74199950      imx8_ddr0/write-cycles/
     3.003379081         1001326360 ns   duration_time
     4.004734241              91084      imx8_ddr0/read-cycles/    #      9.5 %  imx8mq-ddr0-bandwidth-usage
     4.004734241           75513082      imx8_ddr0/write-cycles/
     4.004734241         1001355160 ns   duration_time

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-02 02:21:42 +08:00
Joakim Zhang 5ecf40a27e MLK-24666-1 perf vendor: add JSON file for i.MX8MN DDR Perf
Add JSON file for i.MX8MN DDR Perf

Test Report:
---------------------------------------------------------------
root@imx8mnevk:~# ./perf list metric

List of pre-defined events (to be used in -e):

Metrics:

  imx8mn-ddr0-all-r
       [imx8mn: bytes of all masters read from ddr0]
  imx8mn-ddr0-all-w
       [imx8mn: bytes of all masters write to ddr0]
  imx8mn-ddr0-bandwidth-usage-ddr4
       [imx8mn: percentage of bandwidth usage for ddr0]
  imx8mn-ddr0-bandwidth-usage-lpddr4
       [imx8mn: percentage of bandwidth usage for ddr0]
------------------------------------------------------------------
root@imx8mnevk:~# ./perf stat -a -I 1000 -M imx8mn-ddr0-all-r,imx8mn-ddr0-all-w
     1.000469875             108120      imx8_ddr0/read-cycles/    # 1729920.0 imx8mn-ddr0-all-r
     1.000469875              28841      imx8_ddr0/write-cycles/   # 461456.0 imx8mn-ddr0-all-w
     2.001191750              37396      imx8_ddr0/read-cycles/    # 598336.0 imx8mn-ddr0-all-r
     2.001191750               6090      imx8_ddr0/write-cycles/   #  97440.0 imx8mn-ddr0-all-w
------------------------------------------------------------------
root@imx8mnevk:~# ./perf stat -a -I 1000 -M imx8mn-ddr0-bandwidth-usage-lpddr4 dd if=/dev/zero of=/dev/null bs=1M count=1000000
     1.000762250             840456      imx8_ddr0/read-cycles/    #     48.9 %  imx8mn-ddr0-bandwidth-usage-lpddr4
     1.000762250          390024176      imx8_ddr0/write-cycles/
     1.000762250         1000762250 ns   duration_time
     2.001982125             592944      imx8_ddr0/read-cycles/    #     48.5 %  imx8mn-ddr0-bandwidth-usage-lpddr4
     2.001982125          387366923      imx8_ddr0/write-cycles/
     2.001982125         1001219875 ns   duration_time
     3.003123250             542650      imx8_ddr0/read-cycles/    #     48.4 %  imx8mn-ddr0-bandwidth-usage-lpddr4
     3.003123250          386631603      imx8_ddr0/write-cycles/
     3.003123250         1001141125 ns   duration_time
     4.004289875             538522      imx8_ddr0/read-cycles/    #     48.4 %  imx8mn-ddr0-bandwidth-usage-lpddr4
     4.004289875          386577020      imx8_ddr0/write-cycles/
     4.004289875         1001166625 ns   duration_time
     5.005546750             515596      imx8_ddr0/read-cycles/    #     48.4 %  imx8mn-ddr0-bandwidth-usage-lpddr4
     5.005546750          386800889      imx8_ddr0/write-cycles/
     5.005546750         1001256875 ns   duration_time

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-02 02:21:42 +08:00
Joakim Zhang c8b4618e28 MLK-24613 arch: arm64: imx8mn: add ddr pmu device node
Add ddr pmu device node for i.MX8MN EVK.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-09-02 02:21:41 +08:00
Shengjiu Wang 1915b314c9 MLK-24311: arm64: dts: imx8mn-ddr4: Disable unused codec node
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>
2020-09-01 18:10:56 +08:00
Shengjiu Wang 4153be48b6 MLK-24557: arm64: imx8dxl-evk: Fix noise issue for mono channel
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)
2020-09-01 16:46:27 +08:00
Haibo Chen 81979d5dd5 mmc: sdhci-esdhc-imx: Reset before sending tuning command for manual tuning
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)
2020-09-01 16:35:18 +08:00
Guoniu.zhou 83f2055886 MLK-24585: media: ov5640: fix state out of sync with sensor real state issue
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>
2020-09-01 14:09:13 +08:00
Haihua Hu f663d68a83 MMFMWK-7549 [media] videobuf: store field and timestamp when queue USERPTR buffer
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)
2020-09-01 09:56:21 +08:00
Richard Zhu eed15ae671 MLK-24596 arm64: dts: imx8dxl-evk: add the property to fixed regulator
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)
2020-08-31 16:09:38 +08:00
Fugang Duan 0bc803bc92 MLK-24600 arm64: dts: imx8mq: add dma chans for uart ports
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)
2020-08-28 17:02:00 +08:00
Clark Wang bce7256f2a MLK-24581-2 ARM: dts: imx7ulp: set the default clock frequency as 100KHz for lpi2c
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)
2020-08-27 17:02:51 +08:00
Clark Wang 518e42bbff MLK-24581-1 lpi2c: fix type char overflow issue when calculating the clock cycle
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)
2020-08-27 17:02:51 +08:00
Daniel Baluta 70f83dcfaf MLK-24263-9 ASoC: SOF: imx: Fix PM runtime handlers
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)
2020-08-21 19:54:58 +03:00
Iuliana Prodan 7d8a0cbb75 MLK-24497 crypto: caam - update job descriptor with inline commands
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>
2020-08-21 15:08:07 +03:00