1
0
Fork 0
Commit Graph

881700 Commits (a1a73e42a47a7794bf2cbed5eb0825f23d2ffeaa)

Author SHA1 Message Date
Jan Kiszka a1a73e42a4 ivshmem-net: Fix TX queue locking and plug notification races
This reworks the broken locking of the TX queue from ground up. The
locking was broken in many ways. It didn't protect the critical state
in ivshm_net_queue consistently, leaving phases from cleanup was reading
intermediate states while xmit was running. ivshm_net_tx_ok also has to
be covered by the lock because it tests both num_free and tail against
head. The new locking is reusing the TX queue lock of the device because
this is already held across ivshm_net_xmit.

Furthermore, there were many races between the sender and the receiver
around enabling and evaluating TX interrupts. One was about turning on
the TX completion interrupt only after signaling the submission of
packets. That could potentially cause the peer to miss the need for
signaling completion.

The other race that led to stalled senders was around not properly
re-checking for updates and not posting own updates while processing
freed TX descriptors in ivshm_net_tx_clean. Doing so could cause the
sender to miss that there are more free entries or cause the receiver to
stop signaling further free ones after kicking the sender for the first.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:04 +08:00
Jan Kiszka e02c6112f4 ivshmem-net: Simplify interface of ivshm_net_tx_ok
Just pass in the net_device, and the function and can retrieve the mtu
itself.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:04 +08:00
Jan Kiszka b4f51dd09c ivshmem-net: Mark vring_used_event access READ_ONCE
Analogously to vring_avail_event in ivshm_net_notify_tx.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:03 +08:00
Jan Kiszka ddf1fb2984 ivshmem-net: Fix and rework MTU configuration
Use min/max_mtu to define the limits upfront. This also fixes changing
the MTU because the default values of those two prevented it so far.

Furthermore, all limits can be calculated during probe. Thus, there is
no need to validate anything in ivshm_net_change_mtu, provided updates
of a running device are rejected so that no queue can overrun.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:03 +08:00
Jan Kiszka fa954160ab ivshmem-net: Adjust to reworked version of ivshmem in Jailhouse
This contains the changes required to work with the new revision of
ivshmem in Jailhouse, namely:

- changed PCI vendor and device ID
- vendor capability to communicate region location
- new MMIO register layout
- common interrupt control register
- state table support, removal of rstate register
- unidirectional shared memory regions
- vector value has to be written to doorbell register
- support for multiple vectors, used to split config from tx-rx

Note: Specification work for the interface is ongoing, so details may
still change.

Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-04-29 15:03:02 +08:00
Jacky Bai 696df8cdca MLK-23862 clk: imx: init the audio pll debug interface only CONFIG_DEBUG_FS enabled.
The audio PLL debug interface should be only registered when
the CONFIG_DEBUG_FS is enabled.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2020-04-29 11:09:07 +08:00
Guoniu.zhou eac0c9092e MLK-23712: media: capture: add get/set_register callback
In ov5640_mipi_v2.c, driver don't implement get_register/set_register
callback but assign ov5640_get_register/ov5640_set_register to
v4l2_subdev_core_ops->get_register/set_register if define
CONFIG_VIDEO_ADV_DEBUG, so implement them in this patch.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
2020-04-29 10:44:55 +08:00
Alan Stern 9ffa440f73
USB: hub: Fix handling of connect changes during sleep
commit 9f952e2629 upstream.

Commit 8099f58f1e ("USB: hub: Don't record a connect-change event
during reset-resume") wasn't very well conceived.  The problem it
tried to fix was that if a connect-change event occurred while the
system was asleep (such as a device disconnecting itself from the bus
when it is suspended and then reconnecting when it resumes)
requiring a reset-resume during the system wakeup transition, the hub
port's change_bit entry would remain set afterward.  This would cause
the hub driver to believe another connect-change event had occurred
after the reset-resume, which was wrong and would lead the driver to
send unnecessary requests to the device (which could interfere with a
firmware update).

The commit tried to fix this by not setting the change_bit during the
wakeup.  But this was the wrong thing to do; it means that when a
device is unplugged while the system is asleep, the hub driver doesn't
realize anything has happened: The change_bit flag which would tell it
to handle the disconnect event is clear.

The commit needs to be reverted and the problem fixed in a different
way.  Fortunately an alternative solution was noted in the commit's
Changelog: We can continue to set the change_bit entry in
hub_activate() but then clear it when a reset-resume occurs.  That way
the the hub driver will see the change_bit when a device is
disconnected but won't see it when the device is still present.

That's what this patch does.

Reported-and-tested-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Fixes: 8099f58f1e ("USB: hub: Don't record a connect-change event during reset-resume")
Tested-by: Paul Zimmerman <pauldzim@gmail.com>
CC: <stable@vger.kernel.org>
Link: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2FPine.LNX.4.44L0.2004221602480.11262-100000%40iolanthe.rowland.org&amp;data=02%7C01%7Cpeter.chen%40nxp.com%7C0c4a073d13d44cd9bb3a08d7eba40fdd%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637236962191385194&amp;sdata=gGE2I8VS%2BT2%2BrssNXoPaUKtBIk7WgnVMka7KhiGpWLA%3D&amp;reserved=0
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-29 09:53:06 +08:00
Clark Wang 6f2f0eaaa6 MLK-23865 ARM64: dts: enable dma support for lpspi
Add DMA configurations for LPSPI nodes on i.MX8QX/QM/DXL.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
2020-04-28 16:07:44 +08:00
Clark Wang a8c6bccf7d MLK-23861 ARM64: dts: imx8dxl: enable lpspi3 by default and add spi slave dts
Enable lpspi3 by default for imx8dxl-evk and imx8dxl-ddr3-evk.

Add imx8dxl-evk-lpspi-slave.dtb to support lpspi3 slave mode on
imx8dxl-evk.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
2020-04-28 16:07:44 +08:00
Zhou Peng 1f9442d519 MLK-23723: arm64: imx8mp: vpu: fix g1/g2 timeout during suspend/resume
When suspend happen between enable-HW and wait-HW-ready, user can't
fetch correct HW registers value after resume due to power off in suspend.
So drvier should explicitly restore and restore HW registers during
suspend/resume.

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2020-04-28 15:03:26 +08:00
Robin Gong 6446b3a523 MLK-23652-2: dmagengine: fsl-edma-v3: fix race condition
Add spinlock for 'tcd_pool', otherwise, in some race condition,
'tcd_pool = NULL' cause ISR never clear edma channel INT anymore which
cause interrupt storm. Besides, clear interrupt directly before poweroff
for safe.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 37149f29a631f074ac65889375cd1b077284edf8)
2020-04-28 22:23:41 +08:00
Robin Gong 2191fda25c MLK-23652-1: dmaengine: fsl-edma-v3: only clear own INT
For rx/tx channel for audio share the same interrupt, should check INT
before clearing it directly, otherwise, audio rx may clear wrongly audio tx
channe meaningful interrupt instead of meaningless on audio rx before power
up rx edma channel.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 1afea8def323ae2fadafb50264e52483b855f4bd)
2020-04-28 22:23:41 +08:00
Liu Ying 730ecd5db8 MLK-23817 gpu: imx: dpu: common: Enable power for dpu irq chip at probe stage
The dpu common driver creates a irq chip for dpu irqs.
The parent of the irq chip on the i.MX8qm/qxp SoC is the irqsteer.
Since the irqsteer driver may support runtime PM, the dpu common
driver needs to call irq_chip_pm_get/put() where necessary to make
sure power of the irq chip is enabled/disabled properly.  This
patch enables the power at the driver probe stage and disables it
at driver remove stage to achieve basic power management support
for the irq chip.

Suggested-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-28 13:04:15 +08:00
Daniel Baluta 5f2beb7ec6 MLK-23854-2 ASoC: SOF: Check correct return value
We need to check priv->pd_dev after allocating memory. Issue
detected by Coverity (CID9607920).

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-27 18:16:17 +03:00
Daniel Baluta 1cfb99c40e MLK-23854-1 ASoC: SOF: Remove unneeded header files
Unnecessary header files may slow down build performance.
Issue reported by coverity (CID9607920).

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-27 18:16:17 +03:00
Daniel Baluta d65fb1daa2 MLK-23350-12 arm64: dts: Add clocks for DSP
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-04-27 18:16:17 +03:00
Daniel Baluta cbe43f15a4 MLK-23350-11 ASoC: SOF: Add sdma3/sai3 clocks for DSP
In order to be able to access SAI3/SDMA3 registers
we need to enable SAI3_IPG and SDMA3_ROOT clocks.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-04-27 18:16:16 +03:00
Daniel Baluta 30bb12c7f7 MLK-23350-10 arm64: dts: Fix simple-card prefix
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-04-27 18:16:16 +03:00
Daniel Baluta b923181a17 MLK-23350-9: ASoC: SOF: define INFO_ flags in dsp_ops
Currently the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP are defined
in the SOF PCM core, which doesn't scale. To account for platform
variations, these flags need to be set in DSP ops.

This patch only moves the definitions and does not change any
functionality.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-04-27 18:16:16 +03:00
Dan Carpenter c9b4bd73c2 ASoC: SOF: Fix snd_sof_ipc_stream_posn()
We're passing "&posn" instead of "posn" so it ends up corrupting
memory instead of doing something useful.

Fixes: 53e0c72d98 ("ASoC: SOF: Add support for IPC IO between DSP and Host")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-27 18:16:16 +03:00
Jaska Uimonen 3a316348aa ASoC: SOF: ipc: check ipc return value before data copy
In tx_wait_done the ipc payload is copied before the DSP transaction
error code is checked. This might lead to corrupted data in kernel side
even though the error would be handled later. It is also pointless to
copy the data in case of error. So change the order of error check and
copy.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Link: https://lore.kernel.org/r/20200228231850.9226-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-27 18:16:16 +03:00
Viorel Suman 660bbebb9c MLK-23567-3 ASoC: fsl_xcvr: release M0+ core prior raising interrupt
M0+ core must be released prior raising any interrupt
to M0+ core, otherwise interrupt will be lost.

Fixes: b164260078 ("MLK-23567-2 ASoC: fsl_xcvr: enable SPDIF TX")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-27 14:43:37 +03:00
Shengjiu Wang 11fbc93c2d MLK-23849-3: clk: imx: clk-imx8dxl-acm: Fix Resource leak issue
Use devm_kzalloc instead of kzalloc to resolve resource
leak issue. (coverity ID 9664774)

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-27 16:59:54 +08:00
Shengjiu Wang 5124e261f5 MLK-23849-2: clk: imx: clk-imx8qxp-acm: Fix Resource leak issue
Use devm_kzalloc instead of kzalloc to resolve resource
leak issue. (coverity ID 9664774)

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-27 16:59:48 +08:00
Shengjiu Wang 3e160efb21 MLK-23849-1: clk: imx: clk-imx8qm-acm: Fix Resource leak issue
Use devm_kzalloc instead of kzalloc to resolve resource
leak issue. (coverity ID 9664774)

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-27 16:59:44 +08:00
Fancy Fang 864c8ad56a MLK-23694-13 arm64: dts: imx8mp-evk: integrate HDMI display in
Integrate local HDMI display into EVK DTB to support the
DSI + LVDS + HDMI triple display, and previous single
display support for DSI, LVDS or HDMI is also remained.
Put LCDIF3 port to the same display-subsystem node as
LCDIF1 and LCDIF2 to realize this kind of triple display.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang 46552dfa17 MLK-23694-12 arm64: dts: imx8mp-evk: integrate LVDS bridge display in
Integrate LVDS bridge with single channel display into EVK DTB
to support DSI + LVDS dual display, and the previous single
display support for DSI or LVDS is also remained. Put LCDIF1
and LCDIF2 ports into one display-subystem node to implement
this kind of dual display.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang fcc1582b08 MLK-23694-11 drm/imx: sec-dsim: allow bind for no display attached
The component framework follows a rule that 'one component bind
fails, all components fail'. So when no panel or bridge device
attached to DSIM, if return error to component core during bind
process, all the other added components also cannot be bound.

Normally, this logic is reasonable for usages. But sometimes, if
there exists more than one independent display pipelines, and
one device does not exist in one pipeline will cause displays
in other pipelines also fail.

So in order to support this kind of cases, even if no panel and
bridge attached, return zero to make component core believe it
is bound successfully.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang 25cc329f11 MLK-23694-10 drm/imx: sec-dsim: NULL panel ptr when host detached
The panel ptr variable should be NULL in the DSI host's
detach() hook instead of in the unbind() to fix below
warning:

[    2.322570] ------------[ cut here ]------------
[    2.327193] WARNING: CPU: 0 PID: 188 at drivers/gpu/drm/bridge/sec-dsim.c:560 sec_mipi_dsim_host_detach+0x28/0x38
[    2.337452] Modules linked in:
[    2.340510] CPU: 0 PID: 188 Comm: kworker/0:2 Not tainted 5.4.24-04741-g8372cb5b3eec-dirty #1524
[    2.349293] Hardware name: FSL i.MX8MP EVK (DT)
[    2.353828] Workqueue: events deferred_probe_work_func
[    2.358967] pstate: 00000005 (nzcv daif -PAN -UAO)
[    2.363759] pc : sec_mipi_dsim_host_detach+0x28/0x38
[    2.368728] lr : mipi_dsi_detach+0x24/0x38
[    2.372823] sp : ffff80001232b5a0
[    2.376135] x29: ffff80001232b5a0 x28: ffff8000119b6000
[    2.381446] x27: 0000000000000000 x26: 00000000fffffdfb
[    2.386758] x25: 0000000000000001 x24: ffff8000114f96b8
[    2.392071] x23: ffff0001763fd810 x22: ffff0001769eb800
[    2.397384] x21: ffff800011a256e8 x20: ffff000177909780
[    2.402696] x19: ffff00017793a000 x18: 0000000000000010
[    2.408008] x17: ffff800011ded000 x16: 0000000000000000
[    2.413320] x15: 0000000000000004 x14: 73706f5f786d695f
[    2.418632] x13: 0000000000000000 x12: ffff00017457dc28
[    2.423945] x11: ffff00017457db60 x10: 0000000000000000
[    2.429257] x9 : ffff000176020e98 x8 : ffff000176020e90
[    2.434570] x7 : 00000000400c0000 x6 : 0000000000210d00
[    2.439882] x5 : 0000000000000001 x4 : 0000000000000000
[    2.445194] x3 : ffff00017793a0dc x2 : ffff80001073b5b8
[    2.450504] x1 : ffff0001778e3080 x0 : 0000000000000000
[    2.455818] Call trace:
[    2.458266]  sec_mipi_dsim_host_detach+0x28/0x38
[    2.462885]  rad_panel_remove+0x18/0x68
[    2.466720]  mipi_dsi_drv_remove+0x1c/0x28
[    2.470818]  device_release_driver_internal+0xf4/0x1c0
[    2.475955]  device_release_driver+0x14/0x20
[    2.480226]  bus_remove_device+0x118/0x128
[    2.484323]  device_del+0x13c/0x348
[    2.487810]  device_unregister+0x14/0x30
[    2.491736]  mipi_dsi_remove_device_fn+0xc/0x18
[    2.496270]  device_for_each_child+0x58/0xa0
[    2.500539]  mipi_dsi_host_unregister+0x38/0x70
[    2.505069]  sec_mipi_dsim_unbind+0x30/0x40
[    2.509254]  imx_sec_dsim_unbind+0x24/0x48
[    2.513351]  component_unbind.isra.0+0x2c/0x50
[    2.517793]  component_bind_all+0x1e0/0x228
[    2.521976]  imx_drm_bind+0xb8/0x150
[    2.525551]  try_to_bring_up_master+0x164/0x1c0
[    2.530082]  __component_add+0xa0/0x168
[    2.533917]  component_add+0x10/0x18
[    2.537493]  lcdifv3_crtc_probe+0x4c/0x78
[    2.541504]  platform_drv_probe+0x50/0xa0
[    2.545514]  really_probe+0xd4/0x318
[    2.549088]  driver_probe_device+0x54/0xe8
[    2.553183]  __device_attach_driver+0x80/0xb8
[    2.557542]  bus_for_each_drv+0x74/0xc0
[    2.561376]  __device_attach+0xdc/0x138
[    2.565213]  device_initial_probe+0x10/0x18
[    2.569396]  bus_probe_device+0x90/0x98
[    2.573233]  device_add+0x378/0x648
[    2.576721]  platform_device_add+0xfc/0x228
[    2.580908]  imx_lcdifv3_probe+0x2b0/0x388
[    2.585003]  platform_drv_probe+0x50/0xa0
[    2.589013]  really_probe+0xd4/0x318
[    2.592592]  driver_probe_device+0x54/0xe8
[    2.596689]  __device_attach_driver+0x80/0xb8
[    2.601045]  bus_for_each_drv+0x74/0xc0
[    2.604882]  __device_attach+0xdc/0x138
[    2.608721]  device_initial_probe+0x10/0x18
[    2.612906]  bus_probe_device+0x90/0x98
[    2.616740]  deferred_probe_work_func+0x64/0x98
[    2.621274]  process_one_work+0x198/0x320
[    2.625284]  worker_thread+0x1f0/0x420
[    2.629036]  kthread+0xf0/0x120
[    2.632179]  ret_from_fork+0x10/0x18
[    2.635753] ---[ end trace f85c345edc4c5da8 ]---

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang addb8215ed MLK-23694-9 drm/imx: sec-dsim: put resets in unbind() to fix memory leak
Since the resets are get through kzalloc() in bind(), apparently
they should be freed in unbind() to avoid any possible memory
leak issue.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang ebf0b42d97 MLK-23694-8 arm64: dts: imx8mp: add power domains for ldb
As other devices in mediamix domain have already enabled
power domains, LDB is also required to enable the power
domains.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang f2e35175a1 MLK-23694-7 arm64: dts: imx8mp: add apb clock for blk-ctl@32ec0000
The mediamix block control module access requires the
'IMX8MP_CLK_MEDIA_APB_ROOT' clock to be enabled, so
add this clock to this device node.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang 36e1a6209d MLK-23694-6 drm/imx: ldb: remove PLL clock rate set for i.MX8M
The PLL clock is shared among several different devices
including LDB, and its rate has been set suitably for
all of these devices in DTB. So it is unnecessary to be
changed by LDB again.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang 2e461b3600 MLK-23694-5 arm64: dts: imx8mp: rename 'lcdif_disp0' to 'lcdif1_disp'
To align with the port names of 'lcdif2_disp' and 'lcdif3_disp',
rename 'lcdif_disp0' to 'lcdif1_disp'.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang f40c147e38 MLK-23694-4 arm64: dts: imx8mp: assign 27MHz to mipi_phy1_ref
Since the 'mipi_phy1_ref' clock rate is usually set to
be 27MHz and won't be changed after boot up. So assign
27MHz rate instead of 594MHz to this clock is much more
reasonable.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang 4e66f5a6aa MLK-23694-3 arm64: dts: imx8mp: skip rate assign for disp1_pix
The 'disp1_pix' clock is used to provide pixel clock for
LCDIF1 and its rate is closely related with the display
mode resolution which is configured. So this clock rate
is dynamically determined and unnecessary to be assigned
with a default value at boot up.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:35 +08:00
Fancy Fang daa7e13772 MLK-23694-2 arm64: dts: imx8mp: assign 2079MHz to video_pll1
The 'video_pll1' clock is shared by MIPI and LVDS displays
and each of the display has a specific requirement for the
PLL rate which can be satified by set 'video_pll1' rate to
be 2079MHz. So assign 2079MHz rate to 'video_pll1' under
CCM device.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:34 +08:00
Fancy Fang 722638573e MLK-23694-1 clk: imx8mp: add 2079MHz rate for video pll1
On i.MX8MP platform, 'media_disp1_pix', 'media_disp2_pix',
'media_mipi_phy1_ref' and 'media_ldb' clocks share same
video PLL 'video_pll1'. And since 'media_disp2_pix' needs
video PLL rate to be 1039.5MHz and 'media_mipi_phy1_ref'
rate is usually set to be 27MHz. So add 2079MHz rate for
'video_pll1' to support all of these requirements.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
2020-04-27 16:29:34 +08:00
Fugang Duan 919a85dbb1 MLK-23852 net: wireless: nxp: mxm_wifiex: add ignore "-Wpacked-bitfield-compat"
The mxm_wifiex driver define bit-fields of type "char" in
many strunctures, GCC informs you when the offset of such
a field has changed in GCC 4.4 that may lead to differences
in the structure layout. But it doesn't impact the driver,
so use -Wno-packed-bitfield-compat to disable this warning.

Reviewed-by: tian yang <yang.tian@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-27 15:24:35 +08:00
Zhang Peng dcf3272d11 MLK-23850 soc: fsl: Correct parameters getting from DSP
Before the parameters getting from dsp is not right, now correct it.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-04-27 15:03:16 +08:00
Peter Chen bf26d9822c
MLK-23809-2 usb: cdns3: gadget: delete useless parameter 'is_short'
In cdns3_transfer_completed, it uses is_short to judge if current
request is short transfer to calculate req->actual correctly, but
is_short variable may for previous transfer, it causes req->actual
calculation wrong for current transfer. Eg, the previous transfer is
non-short tranfer, and the current one is short transfer, the req->actual
will accumulate the non-transfered TRB's length.

In fact, below condition already stands for short trasnfer for scatter
list:

	if (priv_req->num_of_trb > 1 &&
		le32_to_cpu(trb->control) & TRB_SMM)

So we could (need) to delete the parameter 'is_short'

Reviewed-by: Jun Li <jun.li@nxp.com>
Reported-by: Faqiang Zhu <faqiang.zhu@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
2020-04-27 11:51:50 +08:00
Peter Chen 5435fea4a1
MLK-23809-1 usb: cdns3: gadget: calculate actual length correctly
For each request, it needs to clear transfer_end, otherwise,
the second transfer's actual transfer length will not
report to class driver if the first transfer is short and both
the two transfers are handled in the same threaded irq handler.

Reviewed-by: Jun Li <jun.li@nxp.com>
Reported-by: Faqiang Zhu <faqiang.zhu@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
2020-04-27 11:51:39 +08:00
Robin Gong fe3ef5b253 MLK-23844-2 ARM64: dts: freescale: imx8mm: correct VDDARM@1.6GHz
Correct VDDARM to 0.95V@1.6Ghz with datasheet.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2020-04-27 18:44:45 +08:00
Robin Gong c6483bd7aa MLK-23844-1: ARM64: dts: freescale: imx8mn-ddr4-evk: cleanup Rhom pmic
Inculding below cleanup for BD71847 pmic driver:

  --Remove ldo4 which's not used by board, otherwise,ldo4 will be on
    since it's always_on.
  --Remove buck5 which's not used by board too,although that may be off
    by kernel requlator common framework after kernel bootup.
  --Add dvs-run-voltage/dvs-idle-voltage setting for buck2 as i.mx8mm.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
2020-04-27 18:44:45 +08:00
Fugang Duan e63d2bd5c4 MLK-23847 net: wireless: nxp: mxm_wifiex: update files license
Update the mxm_wifiex license to GPL v2.
Sync the files' license header with below repo:
ssh://git@bitbucket.sw.nxp.com/wcswrel/
rel-NXP-WIFI-FP92-BT-FP85-LINUX-ANDROID-MXM4X17169-MGPL

Reviewed-by: tian yang <yang.tian@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-27 09:48:59 +08:00
Fugang Duan 64ad5b64c0 MLK-23777 arm64: dts: imx8dxl: add eqos pmt_int as wakeup source
Add eqos pmt_int into wakeup irq source.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-26 11:10:16 +08:00
Viorel Suman 3848dc97e9 MLK-23840-3 dts: arm64: imx8mp-evk: remove fls,xcvr-mode property
fsl,xcvr-mode property not needed anymore.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-24 13:23:16 +03:00
Viorel Suman 86c7612933 MLK-23840-2 dts: arm64: imx8mp-ab2: remove fls,xcvr-mode property
fsl,xcvr-mode property not needed anymore.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-24 13:23:15 +03:00
Viorel Suman 5e51d73901 MLK-23840-1 ASoC: fsl_xcvr: remove fsl,xcvr-mode from DTS
XCVR driver working mode is set by "fsl,xcvr-mode" DTS
property. Being static - it does not allow changing
XCVR driver mode at runtime. Rework the driver by replacing
static DTS property with amixer control.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-24 13:23:15 +03:00