Leonard Crestez [Thu, 11 Apr 2019 09:09:34 +0000 (12:09 +0300)]
MLK-21388-1 arm64: dts: imx8qxp-mek: Mark pca9646 compatible with nxp,pca9546
Looking at the datasheet for both parts no special handling is required
in software so upstream support for nxp,pca9546 is acceptable.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Fugang Duan [Wed, 10 Apr 2019 10:05:48 +0000 (18:05 +0800)]
MLK-21432 clk: imx: only enable clocks for earlycon/earlyprintk port
Only enable clocks for earlycon or earlyprintk uart port.
For communication uart port, clock enable will break clock
paraent and rate switch by commit
9461f7b33d11 (clk: fix
CLK_SET_RATE_GATE with clock rate protection)
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Wed, 10 Apr 2019 10:14:47 +0000 (18:14 +0800)]
MLK-21431 arm: dts: imx6sx: remove the dumplicated ocram_s node
Remove the dumplicated ocram_s node.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Wed, 10 Apr 2019 10:11:15 +0000 (18:11 +0800)]
MLK-21430 ARM: clk: imx6sx: remove the duplicated code to set uart clock source
Remove the duplicated code to set UART clock source that is
introduced by commit
4880bfc5fded (MLK-11414-1 ARM: imx: add
clk return check for imx6sx).
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Haibo Chen [Wed, 10 Apr 2019 08:53:58 +0000 (16:53 +0800)]
MLK-21434 ARM64: dts: change the imx8 usdhc compatible properity
Change all the iMX8MM/iMX8QXP/iMX8QM usdhc compatible properity
to "fsl,imx8qxp-usdhc", so that it can support eMMC V5.1
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
BOUGH CHEN [Mon, 7 Jan 2019 10:11:32 +0000 (10:11 +0000)]
mmc: sdhci-esdhc-imx: add HS400_ES support for i.MX8QXP
Add an new esdhc_soc_data for i.MX8QXP, and add HS400_ES mode
support.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
[Ulf: Rebased on top of latest changes]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit
029e2476f9e6755ca6cc91922d1d75e856c0820a)
Haibo Chen [Wed, 10 Apr 2019 08:05:09 +0000 (16:05 +0800)]
MLK-21435 mmc: sdhci: fix the cherry-pick conflicts issue.
commit
4a26e955522a ("MLK-14539 mmc: sdhci: make no-1-8-v also work
for DDR52 mode") cherry picked by mentor has some conflicts, and they
wrongly handle the conflicts, this patch fix it.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
BOUGH CHEN [Wed, 27 Feb 2019 08:24:48 +0000 (08:24 +0000)]
mmc: sdhci-esdhc-imx: clear the HALT bit when enable CQE
After system suspend, CQE is in cqhci_off state, which set the HALT bit, make
CQE in HALT state. If the SoC do not power down the USDHC module, then when
system resume back, this bit keep the same, still set. Though there is a
sdhci reset during sdhci_resume_host(), but this reset do not impact the
CQE part, so need to clear this bit when enable CQE, otherwise CQE will
stuck in the first CMDQ request after system resume back.
Find this issue on NXP i.MX845s-mek board
[ 105.919862] mmc2: cqhci: timeout for tag 6
[ 105.923965] mmc2: cqhci: ============ CQHCI REGISTER DUMP ===========
[ 105.930407] mmc2: cqhci: Caps: 0x0000310a | Version: 0x00000510
[ 105.936847] mmc2: cqhci: Config: 0x00001001 | Control: 0x00000001
[ 105.943286] mmc2: cqhci: Int stat: 0x00000000 | Int enab: 0x00000006
[ 105.949725] mmc2: cqhci: Int sig: 0x00000006 | Int Coal: 0x00000000
[ 105.956164] mmc2: cqhci: TDL base: 0x7809b000 | TDL up32: 0x00000000
[ 105.962604] mmc2: cqhci: Doorbell: 0x00000040 | TCN: 0x00000000
[ 105.969043] mmc2: cqhci: Dev queue: 0x00000000 | Dev Pend: 0x00000000
[ 105.975483] mmc2: cqhci: Task clr: 0x00000000 | SSC1: 0x00011000
[ 105.981922] mmc2: cqhci: SSC2: 0x00000001 | DCMD rsp: 0x00000000
[ 105.988362] mmc2: cqhci: RED mask: 0xfdf9a080 | TERRI: 0x00000000
[ 105.994801] mmc2: cqhci: Resp idx: 0x00000000 | Resp arg: 0x00000000
[ 106.001240] mmc2: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 106.007680] mmc2: sdhci: Sys addr: 0xb2b37800 | Version: 0x00000002
[ 106.014120] mmc2: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001
[ 106.020560] mmc2: sdhci: Argument: 0x00010000 | Trn mode: 0x00000013
[ 106.026999] mmc2: sdhci: Present: 0x01f88008 | Host ctl: 0x00000030
[ 106.033439] mmc2: sdhci: Power: 0x00000002 | Blk gap: 0x00000080
[ 106.039878] mmc2: sdhci: Wake-up: 0x00000008 | Clock: 0x0000000f
[ 106.046318] mmc2: sdhci: Timeout: 0x0000008f | Int stat: 0x00000000
[ 106.052757] mmc2: sdhci: Int enab: 0x107f4000 | Sig enab: 0x107f4000
[ 106.059196] mmc2: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000502
[ 106.065635] mmc2: sdhci: Caps: 0x07eb0000 | Caps_1: 0x8000b407
[ 106.072075] mmc2: sdhci: Cmd: 0x00000d1a | Max curr: 0x00ffffff
[ 106.078514] mmc2: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x31360181
[ 106.084954] mmc2: sdhci: Resp[2]: 0x44473430 | Resp[3]: 0x00450100
[ 106.091392] mmc2: sdhci: Host ctl2: 0x00000008
[ 106.095836] mmc2: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x7804b208
[ 106.102274] mmc2: sdhci: ============================================
[ 106.108785] mmc2: running CQE recovery
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit
85236d2be844ade0bd8b34e3626fc3e36498cd85)
BOUGH CHEN [Thu, 20 Dec 2018 11:57:41 +0000 (11:57 +0000)]
mmc: sdhci-esdhc-imx: clear ESDHC_STD_TUNING_EN for manual tuning method
The bit ESDHC_STD_TUNING_EN may be configed by bootloader code if it
choose to use standard tuning method. So on linux side, if choose to
use manual tuning method, need to clear the bit ESDHC_STD_TUNING_EN,
remove the impact of bootloader code.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit
a98c557e2af3e12e38dee6019a5cf210156d629e)
Fabio Estevam [Thu, 18 Jul 2013 18:07:48 +0000 (15:07 -0300)]
ASoC: fsl: imx-wm8962: Fix error path
If the 'failed to find codec platform device' error path is executed, it should
jump to 'fail' label instead of returning an error immediately.
'fail' label will then free the ssi_np and codec_np previously acquired nodes.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
d8a14e302ffeecc312186b8b9b0efc8963cec83b)
Shengjiu Wang [Thu, 7 Mar 2019 03:09:17 +0000 (11:09 +0800)]
MLK-21107-1: ASoC: Fix timer wake up system after suspend
Fixes commit
4028bd0f76fd ("MLK-21002-2: ASoC: imx-pcm-rpmsg: don't
remove timer at suspend")
if the timer isn't removed at suspend, there will be interrupt
from M4 side when the period size is small to wake up system quickly
So we need to revert the previous fix and add timer in resume state
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
a23d1df081f1ed33bc8dc7fffc42d1dfa3db2366)
Shengjiu Wang [Thu, 27 Dec 2018 06:48:06 +0000 (14:48 +0800)]
MLK-20661: ASoC: imx-pcm-rpmsg: remove the nonblock constraint
we can call the snd_pcm_period_elapsed in timer's callback
to achieve pseudo period wake up, so the nonblock constraint
can be removed
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
545031216a5a7b91f1a50e2f8e39f9672e76c8f8)
Shengjiu Wang [Wed, 27 Feb 2019 05:58:26 +0000 (13:58 +0800)]
MLK-21002-1: ASoC: imx-pcm-rpmsg: fix data consumed faster with pause
In LPA, we use the timer to simulate the interrupt, if the period time
is 1s, the timer is 500ms, which means the interrupt is more frequent
than actual.
With pause ALSA will update the hw_ptr_jiffies, because the interrupt
is more frequent, so sometimes in snd_pcm_update_hw_ptr0, the condition
delta > new_hw_ptr will be true, then the new_hw_ptr will be added whole
buffer_size, which cause the whole buffer be flushed.
if (in_interrupt) {
/* we know that one period was processed */
/* delta = "expected next hw_ptr" for in_interrupt != 0 */
delta = runtime->hw_ptr_interrupt + runtime->period_size;
if (delta > new_hw_ptr) {
/* check for double acknowledged interrupts */
hdelta = curr_jiffies - runtime->hw_ptr_jiffies;
if (hdelta > runtime->hw_ptr_buffer_jiffies/2 + 1) {
hw_base += runtime->buffer_size;
if (hw_base >= runtime->boundary) {
hw_base = 0;
crossed_boundary++;
}
new_hw_ptr = hw_base + pos;
goto __delta;
}
}
}
So even we use the timer to simulate the interrupt, the timer should
be same as the period time, otherwise will cause issue.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
9a9af932118774083119dba72c5c6133852ba926)
Shengjiu Wang [Fri, 2 Nov 2018 09:47:51 +0000 (17:47 +0800)]
MLK-20183-2: ASoC: imx-cdnhdmi: reconfigure the mclk for HDMI on imx8mq
In order to support 44kHz and 48kHz sample rate together, we need to
reconfigure the parent clock of mclk.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
3bc7e6bcca6613e43b7dab98b5a16d2c8097d29e)
Shengjiu Wang [Thu, 13 Sep 2018 05:07:47 +0000 (13:07 +0800)]
MLK-19565-1: ASoC: fsl_rpmsg_i2s: support rpmsg on imx8qm
On imx8qm mek, the cs42888 is connected with i2c in cm41 domain,
but wm8960 is connected with i2c1, which is not in m4 domain.
So we only need to eable rpmsg for cs42888.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
9d2368aef40e4d107e4deee1a2c7e191c1afe644)
(cherry picked from commit
dd108f1dd88feb55cd9a31f135ae6481b8e6774b)
Shengjiu Wang [Thu, 7 Mar 2019 03:01:06 +0000 (11:01 +0800)]
MLK-21107-2: ASoC: Drop msg if msg queue is full
We designed length of msg queue to be 0x18, which is too
small if the period size = 512bytes, sometimes the queue
will be full, which cause the msg is replaced by new one.
which is not acceptable.
So we need to enlarge the length of msg queue and add
protection when msg queue is full, if the msg queue is full
with the cmd (START, STOP, PAUSE...), driver will return
error, with the cmd (I2S_TX_POINTER, I2S_TX_PERIOD_DONE)
driver will drop the cmd.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
31def064871336af7780d01a6ed8c5ed075b7e48)
Shengjiu Wang [Mon, 17 Dec 2018 08:19:32 +0000 (16:19 +0800)]
MLK-18182: ASoC: fsl_asrc: increase the retry times
When 3 asrc pair are working in parallel, there will be
error log randomly
output DMA task timeout
fsl-asrc
2034000.asrc: Pair B: failed to process buffer: -62
The reason is that the initialization is not finished for
some pair, the prefill data is failed to be input in FIFO.
The patch is to increase the retry times to make sure that
initialization is success.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
85e0a5be4c11c9efeccc893e4c0e1f6b4e90fa01)
Shengjiu Wang [Mon, 12 Jun 2017 07:19:42 +0000 (15:19 +0800)]
MLK-15061-2: ASoC: fsl_asrc_m2m: fix asrc m2m can't work in imx8
Power domain need to be enabled when asrc m2m start to work, and
disabled when it stop.
Switch back to use the pm_runtime_get_sync and pm_runtime_put_sync
for which is removed in commit
1a3d82e08fa2 ("ASoC: fsl: refine
the asrc driver for imx8qm").
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit
602f4f47e454e371f80f55e4e79a3bdfd09ce7d5)
Shengjiu Wang [Wed, 12 Dec 2018 11:14:21 +0000 (19:14 +0800)]
MLK-20096: ASoC: fsl_asrc_m2m: fix noise issue for 8k5c to 176k5c conversion
Compare with imx6, the conversion of 8kHz 5channel to 176kHz is ok.
And compare the output we found that about every 48K bytes, there will be
additional data be added, which cause noise.
In this case, there will be two sg_nodes, for the maxmum output size exceed
the ASRC_MAX_BUFFER_SIZE, each size is ASRC_MAX_BUFFER_SIZE, it is 49152.
the value can't be exact divided by channel * word_with * watermark = 40.
So the EDMA can't finish the copy with correct size.
There is limitation of EMDA described in commit
3519b67ac01c
("MLK-19151: ASoC: fsl_asrc: fix dma timeout issue for imx8qxp")
EDMA just copy 49120 bytes, there will 32 bytes wrong data.
According to this limitation, this commit is to change the maxburst to 1
for EDMA case, then EDMA can do what we expect correctly.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
3ed46932710cd8c15d7fa79555935be04d768e40)
Shengjiu Wang [Tue, 7 Aug 2018 07:02:34 +0000 (15:02 +0800)]
MLK-19151: ASoC: fsl_asrc: fix dma timeout issue for imx8qxp
In the imx8qxp, the DMA is EDMA, which require the buffer size
should be divided by burst size with no remainder, otherwise
the remainder is not transferred by EDMA, so the input buffer
is not consumed by ASRC, then there will be dma output timeout
issue. This behavior is different with SDMA.
This patch is to change the input burst size to be 1 to avoid
the issue, and refine the last_period_size for output buffer.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
46008056908bc2f7f9305381112f058d1ae52437)
Shengjiu Wang [Tue, 18 Dec 2018 08:08:14 +0000 (16:08 +0800)]
MLK-20613: ASoC: fsl_asrc: add limitation for non ideal ratio mode
for non ideal ratio mode, the clock rate should divide the sample rate
with no remainder, and the quotient should be less than 1024.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
f1459e0be38a89230f9c4831d6d7c0021b1ffc48)
Shengjiu Wang [Wed, 5 Jul 2017 07:29:40 +0000 (15:29 +0800)]
MLK-13945-3: ASoC: fsl_asrc: support two asrc devices
In imx8qm, there is two asrc devices, so using global structure
"miscdevice" will cause error. Each instance should have their
own structure.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
f70f67b04b5351fe6d0d288f62f8050932cf5085)
(cherry picked from commit
8c533278e6f62185b976d6d49f039d87620a4c0e)
Shengjiu Wang [Wed, 6 Dec 2017 03:40:31 +0000 (11:40 +0800)]
MLK-17089-2: ASoC: fsl_esai: 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
f78c1564e501eaca142cd606df991abe92ff8461)
Shengjiu Wang [Wed, 6 Dec 2017 03:40:20 +0000 (11:40 +0800)]
MLK-17089-1: ASoC: fsl_sai: 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
6398e9efcae3a2aa102689797c9b63e260a06cdd)
Viorel Suman [Tue, 9 Apr 2019 15:23:02 +0000 (18:23 +0300)]
arm64: dts: adjust AUDMIX configuration with upstream
Adjust AUDMIX configuration with upstream version.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Tue, 9 Apr 2019 10:43:05 +0000 (13:43 +0300)]
ASoC: imx-audmix: fix object reference leaks in probe
Release the reference to the underlying device taken
by of_find_device_by_node() call.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reported-by: Julia Lawall <Julia.Lawall@lip6.fr>
Viorel Suman [Tue, 9 Apr 2019 09:43:55 +0000 (12:43 +0300)]
dt-bindings: fsl,audmix: remove "model" attribute
Remove "model" attribute.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Tue, 9 Apr 2019 10:38:23 +0000 (13:38 +0300)]
ASoC: fsl_audmix: remove "model" attribute
Use "of_device_id.data" to specify the machine driver
instead of "model" DTS attribute.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Tue, 9 Apr 2019 14:53:21 +0000 (17:53 +0300)]
ARM64: defconfig: replace AMIX with AUDMIX
Sync the config option with upsream version
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Colin Ian King [Thu, 28 Mar 2019 09:28:16 +0000 (09:28 +0000)]
ASoC: fsl: fix spelling mistake: "missign" -> "missing"
There is a spelling mistake in a dev_err message. Fix this.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Acked-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
de70b2a581125a8a627db6fdc1d7f9c05536fe84)
Viorel Suman [Wed, 27 Mar 2019 09:29:38 +0000 (09:29 +0000)]
ASoC: fsl_audmix: Fix kbuild failure
The format in dev_dbg function must be a constant.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
5fb94d46c3179cb7afd805a5a9252111316a926f)
Viorel Suman [Tue, 22 Jan 2019 11:14:30 +0000 (11:14 +0000)]
ASoC: fsl: Add Audio Mixer machine driver
This patch implements Audio Mixer machine driver for NXP iMX8 SOCs.
It connects together Audio Mixer and related SAI instances.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
b86ef5367761603df5f66ce08fb014b991f6b51d)
Viorel Suman [Tue, 22 Jan 2019 11:14:27 +0000 (11:14 +0000)]
ASoC: add fsl_audmix DT binding documentation
Add the DT binding documentation for NXP Audio Mixer
CPU DAI driver.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
d0d9071b724123ebde89bdf6b52b86c3289abe85)
Viorel Suman [Tue, 22 Jan 2019 11:14:26 +0000 (11:14 +0000)]
ASoC: fsl: Add Audio Mixer CPU DAI driver
This patch implements Audio Mixer CPU DAI driver for NXP iMX8 SOCs.
The Audio Mixer is a on-chip functional module that allows mixing of
two audio streams into a single audio stream.
Audio Mixer datasheet is available here:
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
be1df61cf06efb355c90702e46b8d46f055acb4e)
Viorel Suman [Tue, 9 Apr 2019 14:26:57 +0000 (17:26 +0300)]
Revert "MLK-13975: ASoC: fsl: add AMIX device driver"
This reverts commit
1a6856077fd7dfdbbd226b84d02d3edbc5fc6948.
Viorel Suman [Tue, 9 Apr 2019 14:26:52 +0000 (17:26 +0300)]
Revert "MLK-13975: ASoC: fsl: add AMIX machine driver"
This reverts commit
7e13522706d3fe3bee0f653752cc71b345a00124.
Robin Gong [Tue, 9 Apr 2019 08:14:12 +0000 (16:14 +0800)]
MLK-21416: ARM: dts: imx6q: correct SDMA script for ecspi5
Revert below upstreaming patch which broke SPI5 dma since ram
script used for ecspi to workaroud ERR009165 and spi driver
changed to XCH mode instead of SMC.
Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core"
This reverts commit
df07101e1c4a29e820df02f9989a066988b160e6.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Anson Huang [Mon, 8 Apr 2019 07:17:05 +0000 (15:17 +0800)]
MLK-21403 ARM: dts: imx6dl: update opp table for auto part
Update i.MX6DL opp table according to i.MX6DL automotive
datasheet Rev.9, 11/2018, it adds 996MHz set-point as below:
LDO enabled(min value):
996MHz: VDDARM: 1.275V, VDDSOC: 1.175V;
792MHz: VDDARM: 1.150V, VDDSOC: 1.150V;
396MHz: VDDARM: 1.125V, VDDSOC: 1.150V;
Adding 25mV to cover board IR drop, for LDO enabled
mode of 996MHz, as the max value of LDO output can NOT
exceed 1.3V, so 25mV is NOT added for VDDARM.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit
e79b4005aa709932bc070d641701b929e7072683)
Liu Ying [Mon, 8 Apr 2019 09:08:16 +0000 (17:08 +0800)]
MLK-21407 gpu: imx: dpu: tcon: Assign tcon id
We should assign dedicated id for every tcon instance.
This makes us be able to figure out bewteen master and
slave tcon. Only side-by-side display mode is likely
impacted. Based on tests, no functional change is
observed before or after this patch is applied.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit
e181d9e56b096bbdc919f65b223d1bde413df1bb)
Clark Wang [Mon, 8 Apr 2019 05:52:22 +0000 (13:52 +0800)]
MLK-21398 i2c: lpi2c: add compatible string for imx8qm
Add compatible string for i.MX8QM's LPI2C module. Some i2c device nodes
in dts file only use "fsl,imx8qm-lpi2c" now.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Gao Pan [Thu, 10 Aug 2017 09:32:39 +0000 (17:32 +0800)]
MLK-16220 lpi2c: imx8: improve i2c driver probe priority
use subsys_initcall for i2c driver to improve i2c driver probe priority
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
(cherry picked from commit
3661eef81a308dab2bfae3790c045ae2d2fd3f49)
Liu Ying [Mon, 8 Apr 2019 07:14:37 +0000 (15:14 +0800)]
MLK-21402 drm/imx: dpu: kms: Trivial typo fix to remove a superfluous ";"
This patch fixes a trivial typo to remove a superfluous ";".
Fixes:
5bed4df1a154 ("MLK-21397 drm/imx: dpu: kms: Put possible pipe states properly")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Mon, 8 Apr 2019 05:44:24 +0000 (13:44 +0800)]
MLK-21397 drm/imx: dpu: kms: Put possible pipe states properly
We should put possible pipe states after we've finished assigning
resources for all pipes. This makes sure the pipe states which
should be put are all eventually put. Without this patch, disabled
crtc(s) or enabled crtc(s) without any plane upon will be accidentally
left in the atomic state when commit operations only happen for other
pipe(s), because we skip the put operations when we see the relevant
active plane number is zero. It's good to put pipe states for those
crtcs, otherwise, we'll depend on atomic helper core behavior to
handle the crtcs.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Anson Huang [Mon, 8 Apr 2019 04:39:31 +0000 (12:39 +0800)]
MLK-21393 soc: imx: update SCFW API
This patch updates SCFW API to v1.7, based on below commit:
252281d48647 ("SCF-105: Update wiki.")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit
d62625563213b516c6238e970f31d07d20bbe19e)
Anson Huang [Wed, 27 Mar 2019 09:23:32 +0000 (17:23 +0800)]
MLK-21287 soc: imx: keep resource power ON if subdomain is wakeup source
The power mode operation ONLY checks whether the resource being
powered OFF is a wakeup source, and skip power OFF operation if
it is a wakeup source, but it does NOT consider the power tree
status, if any of its children is a wakeup source, it needs to
be kept powered ON for its children's wakeup capability.
For example, on i.MX8QXP, CAN1 shares CAN0's power, if CAN1 is
enabled as wakeup source, CAN0's power needs to be ON even it
is NOT a wakeup source, this patch adds support for such scenario.
As it uses recursion, to avoid overhead during runtime power
management, introduce a variable to make sure this logic is ONLY
enabled during suspend/resume.
The generic power domain framework for handling device power
according to wakeup status does NOT consider the virtual devices,
e.g., if debug uart is enabled as wakeup source, the device wakeup
capability check for uart device returns false, ONLY the ttydev has
wakeup capability, that will cause resume_needed() return false
and uart device power will be OFF even its child device "ttydev" is
enabeld as wakeup source.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Tested-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit
459db9c5f53735f33753a7a60232784b3d09d261)
Clark Wang [Tue, 2 Apr 2019 11:51:49 +0000 (19:51 +0800)]
MLK-21313 spi: lpspi: add missing complete in abort func at dma mode
Add the missing complete operations for dma_completion to fix the
problem of blocking at the wait_for_completion_interruptible()
function in some situations.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
a19a00c51df5c3ead4d64ea3136f5bce60b2e6af)
kbuild test robot [Tue, 19 Mar 2019 01:46:33 +0000 (09:46 +0800)]
spi: lpspi: fsl_lpspi_runtime_resume() can be static
Fixes:
944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
04f7ee7c9e9b9e0aad42001c0bae54af3997297c)
Clark Wang [Tue, 19 Mar 2019 06:50:14 +0000 (14:50 +0800)]
MLK-21173 ARM64: dts: fix imx8qxp-pinctrl iomuxc error
Because we add the partition reboot function, and assign all flexcan
pins to M4, A core cannot access flexcan pins for now.
LPUART3 uses flexcan pins before, so disable it to avoid this error:
imx8qxp-pinctrl iomuxc: pin_config_set op failed for pin 110
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
be821a84c44f6d8cf6e9a2573d214de91739dfdf)
Clark Wang [Fri, 15 Mar 2019 06:07:39 +0000 (14:07 +0800)]
MLK-21153-2 ARM64: dts: add lpspi dma support for 8qxp
Add dma support for lpspi0 and lpspi2 modules on i.MX8QXP board.
Ensure the lpspi does not use cs-gpio in slave mode.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
7f69223a715301c69f02fbac8cc6096215e500de)
Clark Wang [Fri, 15 Mar 2019 05:05:22 +0000 (13:05 +0800)]
MLK-21153-1 spi: lpspi: fix the dataloss when slave is in PIO mode
Related issues have been fixed by (
e0e542aeb46a MLK-20060-1 spi: lpspi:
fix wrong transmission when don't use CONT). However, the delay between
sending and receiving in slave mode. This causes the value of
FSR_RXCOUNT cannot reflect whether there is still data not sent timely.
So do this judgement by FSR_TXCOUNT.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
1a260d13aa3724b9919a2d8e2f53b4ad26ccf372)
Clark Wang [Fri, 1 Mar 2019 07:00:53 +0000 (15:00 +0800)]
MLK-21017 ARM64: dts: disable CAN related regulators to fix CAN issue in M4
These CAN related regulators will be handled when kernel boots. However,
these regulators which aren't used by any devices will be disabled by the
regulator framework. So, the pins in these regulators will be non-active
status. This causes the CAN module cannot be used in M4 side.
So, disable these regualtors for 8QM/QXP, and let M4 handles these.
Suggested-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
5c40db9cb2074c0c148d677acda55b0637c0c764)
Clark Wang [Mon, 18 Feb 2019 09:20:40 +0000 (17:20 +0800)]
MLK-20940-4 ARM64: defconfig: Add RPBUS and RPMSG config
Enable RPBUS(i2c-rpmsg-imx.c) and RPMSG functions.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
f47caf1254b93ffe7caca003f5d8f60f5b9070a0)
Clark Wang [Mon, 18 Feb 2019 09:14:19 +0000 (17:14 +0800)]
MLK-20940-3 codecs: cs42xx8: use single read/write to send i2c msg
cs42xx8 will call regcache_sync to refresh its register cache. However,
it will send a long msg which length is greater than the max buffer size
of virtual i2c driver. It will cause the regcache_sync operation failed.
So, use the single read/write to send i2c msg in regcache functions.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
0153e60c26a0fdcf463fb16b090511da7e52df0c)
Clark Wang [Wed, 16 Jan 2019 06:27:17 +0000 (14:27 +0800)]
MLK-20212 lpspi: Coverity: Add the missing NULL check
The spi_transfer *t will be used in one transfer whatever. If t is NULL,
there has no need to try sending data, so add an error return here.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
(cherry picked from commit
68b253138f23754706d3ec16007f2327e1910654)
Clark Wang [Thu, 3 Jan 2019 09:36:45 +0000 (17:36 +0800)]
MLK-20060-5 dts: lpspi: add dma mode support
Add dma configurations in dts files, for imx7ulp and imx8qm.
There is no "edma0" node in fsl-imx8qm-mek(or lpddr4-arm2)-domu.dts.
lpspi0 node has been deleted in these dts files, so delete lpspi3 node.
Add edma0a and edma0d for lpspi0 and lpspi3, and enable lpspi0/3 for xen.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
(cherry picked from commit
d256a5005243efb4557c9acee0c8a42f07b99ff2)
Clark Wang [Tue, 15 Jan 2019 08:45:02 +0000 (16:45 +0800)]
MLK-20060-4 spi: lpspi: add dma mode support
Add dma mode support for LPSPI. Any frame longer than half txfifosize will
be sent by dma mode.
For now, there are some limits:
1. The maximum transfer speed in master mode depends on the slave device,
at least 40MHz(tested by spi-nor on 8qm-lpddr4-arm2 base board);
2. The maximum transfer speed in slave mode is 15MHz(imx7ulp),
22MHz(8qm/qxp).
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
(cherry picked from commit
1693fd1628108e47fa7700218fc2b3aa1e9b83ee)
Clark Wang [Tue, 15 Jan 2019 08:08:30 +0000 (16:08 +0800)]
MLK-20060-3 spi: lpspi: use the core way to implement cs-gpio function
Use the default implementation of transfer_one_msg/chipselect/setup
functions in spi core to implement cs-gpio control.
Use fsl_lpspi_prepare_message to init the cs_gpio pin.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
(cherry picked from commit
8f0f0df824fc113eade82f929e3e78b8f4d2ac55)
Clark Wang [Thu, 3 Jan 2019 07:26:46 +0000 (15:26 +0800)]
MLK-20060-2 spi: lpspi: add the error info of transfer speed setting
Add a error info when set a speed which greater than half of per-clk of
spi module.
The minimum SCK period is 2 cycles(CCR[SCKDIV]). So the maximum transfer
speed is half of spi per-clk.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
(cherry picked from commit
d13f9515c1378d778e82a72c24a99892389710c4)
Clark Wang [Thu, 3 Jan 2019 06:26:28 +0000 (14:26 +0800)]
MLK-20060-1 spi: lpspi: fix wrong transmission when don't use CONT
Add judgment on SR_MBF and FSR_RXCOUNT.
In PIO mode, if don't use CONT to keep cs selected in one transfer, the
transfer will go wrong. FCIE will be set after one frame transfer
finish. If use CONT, the frame refer to the whole data in one transfer.
If don't use CONT, the frame refer to one byte of whole data. This will
cause the transfer ending early.
This patch add a register reading in isr function, it might lead to a
slight decrease in the max transmission speed in PIO mode.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
(cherry picked from commit
0e31af06088acb5751e0ecfef4ae2acc38f6c749)
Clark Wang [Fri, 18 Jan 2019 04:00:16 +0000 (12:00 +0800)]
MLK-20773 i2c-imx: add a limit of maximum transfer speed for imx7d
According the e7805 in Errata, the SCK low level period should be less
than 1.3us.
The other series platform use this same IP can match the errata, and
ensure the low level period longer than 1.3us when the speed set to
400KHz. However, only at imx7d platform, the low level period is less
than 1.3us in the same situation.
Therefore, limit the maximum transfer speed to 384KHz when probe at
imx7d platform.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
19f553846e872b5c379b37ed029132b79566cab0)
Clark Wang [Fri, 11 Jan 2019 08:43:34 +0000 (16:43 +0800)]
MLK-20234 isl29023: fix Coverity warning
Fix the Coverity warning "divide_by_zero".
If "rext" is incorrectly set as zero in dts file, "divide_by_zero" will
happen at line 960. So add a judgment condition here, and let "rext" uses
default value when it is equal to zero.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
999f94e0d7524640381eb4b3f6590f213533679e)
Clark Wang [Wed, 28 Nov 2018 09:14:42 +0000 (17:14 +0800)]
MLK-20441-1 spi: lpspi: Add cs-gpio feature to support spi-nor
Add cs-gpio feature. Use fsl_lpspi_prepare_message() and
fsl_lpspi_unprepare_message() to enable and control cs line.
These two functions will be only called at the beginning and the ending
of a message transfer.
Still can use the mode without cs-gpio. The two ways can refer to
fsl-imx8qm-lpddr4-arm2-lpspi.dts for setting the lpspi configration in
dts file.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
245d353cdf0a461ddcd2dcc36793571aae1069b0)
Mirela Rabulea [Thu, 10 Jan 2019 11:51:30 +0000 (13:51 +0200)]
MLK-20753: mxc-jpeg: Switch from single to multi-planar v4l2 buffers
Adjust the driver to use the "mplane" flavor of v4l2 structures:
"mplane" flavor ioctls for format negotiation in mxc_jpeg_ioctl_ops,
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE instead of V4L2_BUF_TYPE_VIDEO_CAPTURE,
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE instead of V4L2_BUF_TYPE_VIDEO_OUTPUT,
V4L2_CAP_VIDEO_M2M_MPLANE instead of V4L2_CAP_VIDEO_M2M,
pix_mp member of struct v4l2_format, instead of pix (previously, the
pix_mp was sometimes used wrongly for single-plane).
Adjust the sizeimage & bytesperline members of mxc_jpeg_q_data
as MXC_JPEG_MAX_PLANES elements arrays, to accommodate maximum 2 planes.
In case of YUV420, which is the only multi-planar format supported,
use the first plane address as buf_base0 and the second plane address
as buf_base1, to configure the CAST IP. Previously, the buf_base1 was
calculated as an offset to buf_base0, in mxc_jpeg_addrs.
After decoding, set the payload for both planes via vb2_set_plane_payload.
Multi-planar support current status:
-gst-launch with filesink & fbdevsink always pass
-gst-launch with waylandsink & kmssink sometimes fail for resolutions
where height is multiple of 256 (1024 x 256, 1024 x 512).
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
Mirela Rabulea [Wed, 13 Feb 2019 15:29:56 +0000 (17:29 +0200)]
MLK-20889: mxc-jpeg: Jpeg decoder gets stuck with gplay & short yuv422 mjpeg video
Unlock hw_lock before calling v4l2_m2m_job_finish to avoid deadlock:
v4l2_m2m_job_finish -> v4l2_m2m_try_schedule -> job_ready locks hw_lock
v4l2_m2m_job_finish -> v4l2_m2m_try_run -> device_run locks hw_lock
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Mirela Rabulea [Mon, 14 Jan 2019 16:03:43 +0000 (18:03 +0200)]
MLK-20755: mxc-jpeg: gst-launch only shows the first frame of an yu422 video
Make sure V4L2_EVENT_SOURCE_CHANGE is only sent at init phase.
It was wrongly sent for every frame, causing gst-launch to DQBUF
only for the first frame.
Removed a dev_dbg from mxc_jpeg_try_fmt, too many prints with gst.
Fix for "Driver bug detected, stride (%d) is too small for the width (%d)"
warning in gst-launch. Fixed by providing the stride in bytesperline, in
mxc_jpeg_g_fmt_vid_cap function.
Clean-up in mxc_jpeg_qbuf.
Tested with gst-launch and v4l2video0jpegdec plugin:
gst-launch-1.0 filesrc location=mjpeg_64x64_4frames.avi ! jpegparse
! v4l2video0jpegdec ! waylandsink
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Mon, 14 Jan 2019 14:39:07 +0000 (16:39 +0200)]
MLK-20756: mxc-jpeg: gst-launch does not exit after displaying jpeg image with jpeg-dec
Add notify_eos function to enqueue V4L2_EVENT_EOS for the application.
Call notify_eos after V4L2_DEC_CMD_STOP was received,
or, if there still are source buffers to process, later in dqbuf.
Add mxc_jpeg_dqbuf and send V4L2_EVENT_EOS if needed.
Fix for "Driver should never set v4l2_buffer.field to ANY" warning in
gst-launch, by setting V4L2_FIELD_NONE in mxc_jpeg_dqbuf.
Tested with gst-launch and v4l2video0jpegdec plugin:
gst-launch-1.0 filesrc location=<image.jpg> ! jpegparse ! v4l2video5jpegdec
! waylandsink
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Thu, 20 Dec 2018 14:44:23 +0000 (16:44 +0200)]
MLK-20466: mxc-jpeg: Fix coverity issues
Return int from get_sof (-1 for error), the result is later on
compared with -1 literal.
Fix memory leak from print_nbuf_to_eoi, when !mxc_jpeg_tracing.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
Mirela Rabulea [Thu, 22 Nov 2018 14:22:28 +0000 (16:22 +0200)]
MLK-19942: mxc-jpeg: Workaround for "Instance released before end of transaction"
The context is released after FRM_DONE interrupt is received,
but for some small images, after FRM_DONE, a HALF_BUF interrupt
keeps coming, and cannot be cleared.
A soft reset helps (resets only the decoder internal state, not registers).
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Thu, 22 Nov 2018 11:34:31 +0000 (13:34 +0200)]
MLK-20289: mxc-jpeg: Add module parameter for debug purpose
Add debug function print_nbuf_to_eoi, to print the decoder input frame.
Add module parameter mxc_jpeg_tracing.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com, Robert Chiras <robert.chiras@nxp.com>
Mirela Rabulea [Thu, 22 Nov 2018 11:19:53 +0000 (13:19 +0200)]
MLK-20289: mxc-jpeg: Fix jpeg-dec for use with gst-launch-1.0 & v4l2video5jpegdec
Set allow_zero_bytesused, to let gst-launch work, this lead to the need
to implement V4L2_DEC_CMD_STOP, dummy for now.
Implement g_fmt_vid_cap, called by gst-launch before queuing any capture
buffers, this also required some fixes in jpeg_parse and buf_queue,
which wrongly assumed capture buffers are enqueued before output buffers.
So, import the resolution and pixel-format from the output queue,
if the capture queue is not set-up yet.
Add release_active_buffers and use it in stop_streaming to properly
clean-up active buffers, this fixes warning at gst-launch stop with Ctrl+C
Check for decoding/encoding error in interrupt handler and print CAST IP
error status, found some yuv422 images with errors in SOS marker.
Partially implemented subscribe_event, V4L2_EVENT_EOS is not working yet,
will be addressed in a subsequent fix.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com, Robert Chiras <robert.chiras@nxp.com>
Mirela Rabulea [Fri, 12 Oct 2018 10:23:44 +0000 (13:23 +0300)]
MLK-19605: mxc-jpeg: RGB format in jpeg can't be decoded by mxc-jpeg driver
Validate the component ID's when parsing the jpeg headers,
print error and don't continue the decoding, avoid getting stuck.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Tue, 25 Sep 2018 12:49:38 +0000 (15:49 +0300)]
MLK-19247: mxc-jpeg: Remove jpeg-encoder hardcoding to 64x64 yuv422
Remove hardcodings for encoder (configuration stream especially).
This fix also requires a fixed version of the test applications,
encoder_test.out/decoder_test.out (linux-test repo).
Also fixed MLK-19453: Add support for YUV420 format in jpeg decoder
YUV420 is generally working on encoder/decoder,
but for some particular small files the decoder enters infinite error:
"Instance released before the end of transaction".
RGB24 is working, but the colors are strange in jpeg.
Since YUV444 and RGB24 have the same subsampling,
a RGB24 raw file can be encoded/decoded as YUV444 with the same results.
Fixes for invalid pixel formats.
Full battery of tests run.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Wed, 8 Aug 2018 14:45:02 +0000 (17:45 +0300)]
MLK-18451: mxc-jpeg: Fix jpeg encoder output
Use two chained descriptors for encoder (config desc & encode desc),
they are set-up in new function mxc_jpeg_config_enc_desc.
Refactor function mxc_jpeg_enc_config, in order for the encoder to
function correctly, the CAST_MODE register needs to be written after
the descriptor(s) are ready.
Set-up decoder descriptor in new function mxc_jpeg_config_dec_desc,
this was previously done in mxc_jpeg_device_run, which is
leaner & cleaner now.
Function mxc_jpeg_go cannot be used both for encoder and decoder, because
the CAST IP control registers are different, the decoder has CTRL
(offset 0x34) while the encoder has MODE register (offset 0x0).
So, have two functions instead: mxc_jpeg_go_enc and mxc_jpeg_go_dec.
Function mxc_jpeg_reset had no purpose anymore, instead use
mxc_jpeg_sw_reset, for soft reset.
Add function mxc_jpeg_set_l_endian.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Sat, 21 Jul 2018 10:26:42 +0000 (13:26 +0300)]
MLK-18451: mxc-jpeg: Fix encoder stuck on second run
Do a soft reset before job run.
Encoder now runs succesivelly without crash or stuck, but outputs 0.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Wed, 27 Jun 2018 16:43:33 +0000 (19:43 +0300)]
MLK-18450: mxc-jpeg: Fix JPEG decoder crash
Fixed decoder crasher by creating a structure to encompass the descriptors
and associated it to the jpeg device, one for each slot.
Removed mxc_jpeg_buf, as writing to its fields was causing
memory corruption sometimes (depending on how src_buf & dst_buf
got allocated, writing to one was overwriting the other).
For now, only slot 0 is used (no regression here, just a TODO).
Note that the decoded image looks ok only on QXP B0, not A0.
The decoder_test application will be patched in linux-test,
the old one should work too, but needed cleanup.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Mirela Rabulea [Fri, 20 Jul 2018 17:21:02 +0000 (20:21 +0300)]
MLK-18998: mxc-jpeg: Fix jpeg format for gstreamer
Fix proposed by Bing Song.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Mirela Rabulea [Mon, 11 Jun 2018 16:48:20 +0000 (19:48 +0300)]
MLK-18493: mxc-jpeg: Use image settings from jpeg markers inside jpeg decoder
Image information can be extracted from the JPEG SOH marker:
image format (YUV444/YUV420/YUV422/Gray), width & height, precision.
Use that information and apply it to the JPEG-DEC_WRP control registers.
Also fixed the decoder for non-square images.
Replace pr_*() and printk() calls with dev_*().
Currently working image formats: YUV444, YUV422, Gray
Not working formats: YUV420
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>, Sandor Yu <sandor.yu@nxp.com>
Frank Li [Thu, 26 Oct 2017 15:58:53 +0000 (10:58 -0500)]
MLK-16701 JPEG: add rum time pm support
Support run time pm
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Sandor Yu <sandor.yu@nxp.com>
Jason Liu [Tue, 24 Oct 2017 22:29:19 +0000 (06:29 +0800)]
MLK-16688 driver: media: mxc_jpeg: Remove the unused function to kill the build warnnings
The patch fixes the following build warnnings by removing unused function:
drivers/media/platform/imx8/mxc-jpeg.c:228:13: warning: ‘print_output’ defined
but not used [-Wunused-function]
static void print_output(void *addr)
^~~~~~~~~~~~
This patch also does the minor clean up by removing some commented-out code
Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Frank Li [Fri, 20 Oct 2017 21:47:30 +0000 (16:47 -0500)]
MLK-16645-4 JPEG: Encode: fix wrong use dma descriptor address
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Sandor Yu <sandor.yu@nxp.com>
Frank Li [Fri, 20 Oct 2017 21:34:37 +0000 (16:34 -0500)]
MLK-16645-3 JPEG: fixed crash caused by call dma_free_coherence in irq
move dma_free_coherence function to buf_cleanup
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Sandor Yu <sandor.yu@nxp.com>
Zhengyu Shen [Mon, 18 Sep 2017 19:34:52 +0000 (14:34 -0500)]
MLK-16359-3: Added i.MX8 CAST IP JPEG Encoder/Decoder Linux V4L2 driver v2
mxc-jpeg driver creates two v4l2 file handles in /dev/ which allows them to be used
by v4l2 programs. Supports encode and decode of various formats.
Note: Output data is not correct but matches validation result because IP Bug
TKT340836
v2: Split patches, added copyright
Signed-off-by: Zhengyu Shen <zhengyu.shen_1@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Iuliana Prodan [Thu, 4 Apr 2019 09:11:51 +0000 (12:11 +0300)]
MLK21112: arm64: defconfig: enable CAAM driver
Because MLK21112 was resolved, now CAAM can be enabled
in defconfig.
Also enable CAAM SECVIO driver.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Iuliana Prodan [Mon, 1 Apr 2019 14:12:14 +0000 (17:12 +0300)]
crypto: caam - weak key checking for cbc des, 3des
Modify setkey callback for cbc des and 3des to check for weak keys.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit
cf64e495fe221479866c1ea7c6f5cd9698d8a3af)
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Iuliana Prodan [Mon, 1 Apr 2019 14:01:47 +0000 (17:01 +0300)]
crypto: caam - add ecb(*) support
Add ecb mode support for aes, des, 3des and arc4 ciphers.
ecb(*) reuses existing skcipher implementation, updating it with support
for no IV.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit
eaed71a44ad9369a2b2205cedcb9d5d894c733fa)
Kept the BSP compatibility by using the ablkcipher API instead of
the upstream skcipher API.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Iuliana Prodan [Mon, 1 Apr 2019 12:45:48 +0000 (15:45 +0300)]
crypto: export arc4 defines
Some arc4 cipher algorithm defines show up in two places:
crypto/arc4.c and drivers/crypto/bcm/cipher.h.
Let's export them in a common header and update their users.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit
bd30cf533b77420b7c504c09cef5ba26b0c9dcb4)
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Iuliana Prodan [Mon, 1 Apr 2019 12:36:12 +0000 (15:36 +0300)]
crypto: caam - use mapped_{src,dst}_nents for job descriptor
The mapped_{src,dst}_nents _returned_ from the dma_map_sg call (which
could be less than src/dst_nents) have to be used to generate the aead,
skcipher job descriptors.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit
ba4cf71b6f1b0165f34888b17fe44f4235dd0132)
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Iuliana Prodan [Mon, 1 Apr 2019 12:00:22 +0000 (15:00 +0300)]
crypto: caaam - Revert ecb(*) support from BSP
This reverts commits:
825831cf1292 ("MLK-19365: drivers: crypto: caamalg: ecb(aes) does not use
IV")
84f5e22194c6 ("MA-9807: Fix ecb(aes) use without an IV")
fbaedad36527 ("MLK-14611 Add DES key complexity validation")
618df7f4726f ("MLK-9769-19 Add ARC4-ECB support for CAAM in i.MX6
family")
70b88340e5c1 ("MLK-9769-18 Add 3DES-ECB-EDE support for CAAM in i.MX6
family")
10c402ef6918 ("MLK-9769-17 Add AES-ECB support for CAAM in i.MX6
family")
10736b155c05 ("MLK-9769-16 Add DES-ECB support for CAAM in i.MX6
family")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Franck LENORMAND [Mon, 21 Jan 2019 12:51:43 +0000 (13:51 +0100)]
MLK-20639: drivers: crypto: caam: pkc: RSA test fails as struct uses wrong type
When creating the job descriptor, it uses the size of the structure which
is composed of dma_addr_t. On IMX8, this structrue is 64bit like the DMA
however the CAAM only receives 32 bit addresses. It result in a job
descriptor and more precisely the start index to point to invalid
location when it should point to the "command operation".
This patch changes the dma_addr_t to caam_dma_addr_t which is the correct
one for the rsa_priv_f2_pdb and rsa_priv_f3_pdb types as rsa_pub_pdb and
rsa_priv_f1_pdb already had this change.
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Horia Geantă [Fri, 22 Mar 2019 16:26:35 +0000 (18:26 +0200)]
crypto: caam - make 4.14 commit
335ae6c845da4 complete again :)
Commit
335ae6c845da ("MLK-18082: crypto: caam: Minimal fix for QX panic")
has not been ported completely, add missing bits.
Fixes:
ebc02cc3be42 ("MLK-18082: crypto: caam: Minimal fix for QX panic")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Viorel Suman [Thu, 4 Apr 2019 12:51:31 +0000 (15:51 +0300)]
ASoC: ak5558: remove redundand includes
Remove redundant includes keeping the code as close as possible
to upstream version.
Fixes commit
6d8b9d13605c ("MLK-19118-3: ASoC: AK5558: add regulators for
ak5558")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Thu, 4 Apr 2019 11:51:25 +0000 (14:51 +0300)]
ASoC: ak4458: fix various issues
Fix various issues keeping the code as close
as possible to upstream version.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Thu, 4 Apr 2019 11:02:17 +0000 (14:02 +0300)]
ASoC: ak4458: fix commit
1996407879b8
Fixes commit
1996407879b8 ("MLK-15033: ASoC: codecs: Add TDM support for AK4458")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Thu, 4 Apr 2019 10:41:25 +0000 (13:41 +0300)]
ASoC: ak4458: fix commit
21e81dfed90c
Fixes commit
21e81dfed90c ("MLK-19573-2: ASoC: ak4458: enable DSD playback")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Shengjiu Wang [Wed, 13 Mar 2019 08:29:45 +0000 (16:29 +0800)]
MLK-21106: ASoC: imx-ak4458: Fix channel not supported in tdm & daisy chain
The channel num (9 - 15) should not be supported in tdm & daisy chain
mode for there is two dataline, this channel number can't be
symmetrically distributed on two dataline (the first one is fixed to
be 8 channel)
Fixes commit
8d29874365c3 ("MLK-17817-2: ASoC: imx-ak4458: enable 16
channels in TDM mode")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
0bc47b31660efd3dbbeee7e51fca6f75e7ecb69f)
Fancy Fang [Thu, 4 Apr 2019 09:19:23 +0000 (17:19 +0800)]
MLK-21383 drm/bridge: sec-dsim: fix maybe-uninitialized build warnings
If enable CONFIG_DYNAMIC_DEBUG, below maybe-uninitialized build
warnings happen:
"
In file included from ./include/linux/printk.h:336:0,
from ./include/linux/kernel.h:14,
from ./include/linux/unaligned/access_ok.h:5,
from ./include/asm-generic/unaligned.h:13,
from ./arch/arm64/include/generated/asm/unaligned.h:1,
from drivers/gpu/drm/bridge/sec-dsim.c:17:
drivers/gpu/drm/bridge/sec-dsim.c: In function ‘sec_mipi_dsim_calc_pmsk’:
./include/linux/dynamic_debug.h:135:3: warning: ‘best_s’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/gpu/drm/bridge/sec-dsim.c:1149:27: note: ‘best_s’ was declared here
uint32_t best_p, best_m, best_s;
^
In file included from ./include/linux/printk.h:336:0,
from ./include/linux/kernel.h:14,
from ./include/linux/unaligned/access_ok.h:5,
from ./include/asm-generic/unaligned.h:13,
from ./arch/arm64/include/generated/asm/unaligned.h:1,
from drivers/gpu/drm/bridge/sec-dsim.c:17:
./include/linux/dynamic_debug.h:135:3: warning: ‘best_m’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/gpu/drm/bridge/sec-dsim.c:1149:19: note: ‘best_m’ was declared here
uint32_t best_p, best_m, best_s;
^
In file included from ./include/linux/printk.h:336:0,
from ./include/linux/kernel.h:14,
from ./include/linux/unaligned/access_ok.h:5,
from ./include/asm-generic/unaligned.h:13,
from ./arch/arm64/include/generated/asm/unaligned.h:1,
from drivers/gpu/drm/bridge/sec-dsim.c:17:
./include/linux/dynamic_debug.h:135:3: warning: ‘best_p’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/gpu/drm/bridge/sec-dsim.c:1149:11: note: ‘best_p’ was declared here
uint32_t best_p, best_m, best_s;
^
"
Although this is a spurious warning according to the code logic, it
is better to give 'best_p', 'best_m' and 'best_s' initial values to
suppress the warnings.
Reported-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Liu Ying [Thu, 4 Apr 2019 07:45:48 +0000 (15:45 +0800)]
MLK-21381 arm64: defconfig: Build in drivers to support i.MX8qm/qxp DPU KMS via IT6263
This patch builds in some drivers to support i.MX8qm/qxp DPU KMS via IT6263
LVDS to HDMI transmitter.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Thu, 4 Apr 2019 07:04:06 +0000 (15:04 +0800)]
MLK-21377 arm64: fsl-imx8qm-device.dtsi: Change i2c1_lvds0/1 compatible strings
Add "fsl,imx7ulp-lpi2c" to the compatible strings, as the i2c driver
has only got the compatible string for imx7ulp.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Thu, 4 Apr 2019 05:40:59 +0000 (13:40 +0800)]
MLK-21376 arm64: fsl-imx8dx.dtsi: Change i2c0_mipi_lvds0/1 compatible strings
Replace "fsl,imx8qm-lpi2c" with "fsl,imx7ulp-lpi2c", as the i2c driver
has only got the compatible string for imx7ulp.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Clark Wang [Thu, 14 Mar 2019 07:28:59 +0000 (15:28 +0800)]
MLK-21140 i2c: rpmsg: ensure received bus_id and addr is same as sent
For some chips may need long time to get the response from M4 sometimes,
enlarge timeout to 500ms.
Add a judgement to check if the received data is the current transfer
wanted.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit
222e201b520cbd01b611fc45ae2f6b2f0b9d73a1)