Vipul Kumar [Mon, 1 Apr 2019 06:58:46 +0000 (12:28 +0530)]
nvmem: imx-ocotp: add support for imx6ull
Enable ocotp driver support for imx6ull SoC.
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit
762d03271d6eed397ab76a3bb6f14bdb26cb7957)
Vipul Kumar [Mon, 1 Apr 2019 07:02:51 +0000 (12:32 +0530)]
dt-bindings: nvmem: imx-ocotp: add compatible string for imx6ull
Add new compatible string for i.MX6ULL SOC.
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit
33b8d7a98f51b2084aaf419d6407f2a7d33cb18f)
Vipul Kumar [Mon, 1 Apr 2019 06:51:13 +0000 (12:21 +0530)]
ARM: imx_v7_defconfig: Disable CONFIG_FSL_OTP
This patch disable OTP driver. Now, we are using CONFIG_NVMEM_IMX_OCOTP
driver. Due to CONFIG_FSL_OTP config, thermal_zone0 sub directory was not
created under /sys/devices/virtual/thermal/.
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit
8f79efc11275c187b7caf553ef78291c33ed34e4)
Vipul Kumar [Mon, 1 Apr 2019 05:31:53 +0000 (11:01 +0530)]
ARM: imx_v7_defconfig: Select CONFIG_NVMEM_IMX_OCOTP
Select the i.mx ocotp driver.
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit
c0dcdbc28f22d9a8427edef4858b64fa0deccbbe)
Arulpandiyan Vadivel [Thu, 28 Mar 2019 09:13:02 +0000 (14:43 +0530)]
can: flexcan: remove duplicate entry of mailbox
Remove duplicate mailbox register entry from hardware register structure.
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
(cherry picked from commit
0fb8da2c4060fa5c43cb9fd2fef6aee58a0d9235)
Vipul Kumar [Fri, 22 Mar 2019 10:27:29 +0000 (15:57 +0530)]
arm: dts: imx6ul: removing dependency from imx6ul-14x14-evk.dtsi
This patch remove dependency from imx6ul-14x14-evk.dtsi. By including this
file, getting duplicate enteries for multiple nodes.
To fix the compilation error, added some nodes in imx6ul-14x14-evk.dts.
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit
35bdde32c22154caba585d295b4a6c327045981c)
Vipul Kumar [Fri, 22 Mar 2019 05:52:14 +0000 (11:22 +0530)]
clk: imx6ul: Remove the duplicate code
This patch remve the duplicate code. Due to this code, getting following
logs at boot time:
failed to set rate of clk ahb to
99000000: -16
failed to set parent of clk periph to periph_clk2: -16
failed to set parent of clk periph_pre to pll2_bus: -16
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit
a0e0c60b7ba99bcd2e308c51326bf92b21a894b8)
Haibo Chen [Tue, 16 Apr 2019 08:50:00 +0000 (16:50 +0800)]
MLK-21472 drm: downgrade the drm/imx probe
Some driver under drm/imx depends on panel and bridge, but all these
driver use the same module_init() to register the driver, so the
default probe sequence will depends on the list in Makefile. Here
downgrade the drm/imx under the panel and bridge, otherwise will
meet the following during system boot:
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
imx-drm display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
imx_sec_dsim_drv
32e10000.mipi_dsi: version number is 0x1060200
imx_sec_dsim_drv
32e10000.mipi_dsi: Failed to attach bridge:
32e10000.mipi_dsi
imx_sec_dsim_drv
32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
imx-drm display-subsystem: failed to bind
32e10000.mipi_dsi (ops imx_sec_dsim_ops): -517
imx-drm display-subsystem: master bind failed: -517
This patch can make MIPI DSI panel probe successfully at the first
time, rather than depends on the PROBE_DEFER.
Besides, for the MIPI DSI panel used on imx8mm/imx8mq, the panel and
touch share one RST pin, touch need the panel do the RST first to wake
up the touch chip, so also need to make sure the MIPI DSI panel probe
successfully before touch.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Fancy Fang <chen.fang@nxp.com>
Haibo Chen [Tue, 16 Apr 2019 02:53:41 +0000 (10:53 +0800)]
MLK-21457 mmc: block: delete the duplicate calling of mmc_cleanup_queue()
Fix Mentor back porting issue. According to community log, need to
first backport the commit
57678e5a3d51 ("mmc: block: Delete gendisk
before cleaning up the request queue"), then can back porting the
commit
be2ad281466f ("mmc: block: Prevent new req entering queue
after its cleanup"). But Mentor wrongly handle the sequence, and
wrongly handle the conflict, causing the mmc_cleanup_queue() is
called twice. When do sd hot plug test, will meet the following dump:
:~# mmc0: card aaaa removed
------------[ cut here ]------------
WARNING: CPU: 0 PID: 152 at block/blk-core.c:813 blk_cleanup_queue+0x140/0x144
Modules linked in:
CPU: 0 PID: 152 Comm: kworker/0:4 Not tainted
4.19.30-04275-gd0b5d3f8b43d #43
Hardware name: Freescale i.MX7ULP (Device Tree)
Workqueue: events_freezable mmc_rescan
[<
8010f998>] (unwind_backtrace) from [<
8010bbd8>] (show_stack+0x10/0x14)
[<
8010bbd8>] (show_stack) from [<
80a473d4>] (dump_stack+0x78/0x8c)
[<
80a473d4>] (dump_stack) from [<
8012f29c>] (__warn+0xdc/0xf4)
[<
8012f29c>] (__warn) from [<
8012f3cc>] (warn_slowpath_null+0x40/0x48)
[<
8012f3cc>] (warn_slowpath_null) from [<
803e3ec8>] (blk_cleanup_queue+0x140/0x144)
[<
803e3ec8>] (blk_cleanup_queue) from [<
8073f1b0>] (mmc_cleanup_queue+0x28/0x3c)
[<
8073f1b0>] (mmc_cleanup_queue) from [<
8073cec4>] (mmc_blk_remove_req.part.5+0x2c/0x90)
[<
8073cec4>] (mmc_blk_remove_req.part.5) from [<
8073d9fc>] (mmc_blk_remove+0xe8/0x1b0)
[<
8073d9fc>] (mmc_blk_remove) from [<
8072e57c>] (mmc_bus_remove+0x18/0x20)
[<
8072e57c>] (mmc_bus_remove) from [<
80534930>] (device_release_driver_internal+0x178/0x220)
[<
80534930>] (device_release_driver_internal) from [<
8053357c>] (bus_remove_device+0xcc/0xf8)
[<
8053357c>] (bus_remove_device) from [<
80530bc4>] (device_del+0x120/0x358)
[<
80530bc4>] (device_del) from [<
8072ebf0>] (mmc_remove_card+0x78/0x9c)
[<
8072ebf0>] (mmc_remove_card) from [<
80734044>] (mmc_sd_detect+0x3c/0x6c)
[<
80734044>] (mmc_sd_detect) from [<
8072dfa8>] (mmc_rescan+0xcc/0x3f4)
[<
8072dfa8>] (mmc_rescan) from [<
80146454>] (process_one_work+0x1f0/0x400)
[<
80146454>] (process_one_work) from [<
801471d8>] (worker_thread+0x44/0x580)
[<
801471d8>] (worker_thread) from [<
8014c014>] (kthread+0x148/0x150)
[<
8014c014>] (kthread) from [<
801010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xb095bfb0 to 0xb095bff8)
bfa0:
00000000 00000000 00000000 00000000
bfc0:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0:
00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace
5bcff5fbec8eea08 ]---
Unable to handle kernel paging request at virtual address
3e700004
pgd =
5bbecc7f
[
3e700004] *pgd=
00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 152 Comm: kworker/0:4 Tainted: G W
4.19.30-04275-gd0b5d3f8b43d #43
Hardware name: Freescale i.MX7ULP (Device Tree)
Workqueue: events_freezable mmc_rescan
PC is at __srcu_read_lock+0x1c/0x38
LR is at hctx_lock+0x1c/0x2c
pc : [<
8017d91c>] lr : [<
803eedd4>] psr:
20010093
sp :
b095bdf8 ip :
20010013 fp :
bf682d80
r10:
b083d008 r9 :
b083e810 r8 :
00000034
r7 :
00000001 r6 :
00000001 r5 :
b09b8400 r4 :
b095be00
r3 :
00000004 r2 :
00000001 r1 :
b095be00 r0 :
3e700000
Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control:
10c53c7d Table:
90c9006a DAC:
00000051
Process kworker/0:4 (pid: 152, stack limit = 0x37b997f7)
Stack: (0xb095bdf8 to 0xb095c000)
bde0:
81004d08 803ef16c
be00:
bf682d80 bd071de2 0000001c 00000000 b0415820 00000001 00000000 803ef278
be20:
b08b1c0c b0415820 b083e800 8073f1a8 b08b1c00 b08b1c0c b083e800 8073cedc
be40:
b083e800 b08b1c00 b083e808 8073d9fc 60010013 00000034 bf682d80 b083e808
be60:
b083e83c 8104db84 00000000 00000034 b083e810 8072e57c b083e808 80534930
be80:
b0141a30 b083e808 8104d598 81004d08 810fbf40 8053357c b083e800 b083e808
bea0:
b083e860 80530bc4 bf686200 00000000 b083d268 00000000 bf682d80 80172038
bec0:
80db2040 bd071de2 bf686200 b083e800 b083e808 b083d000 bf686200 00000000
bee0:
b083d268 00000000 bf682d80 8072ebf0 b083d000 ffffff85 b083d000 80734044
bf00:
b083d264 b083d200 b083d000 8072dfa8 b083d264 b096b080 bf682d80 bf686200
bf20:
00000000 80146454 81003d00 bf682d98 b096b080 bf682d80 b096b094 81003d00
bf40:
bf682d98 ffffe000 00000008 801471d8 b08e3a70 8109d940 80d256d0 b095a000
bf60:
b0968b1c b0968b00 b0968ac0 00000000 b095a000 b096b080 80147194 b0081ea4
bf80:
b0968b1c 8014c014 00000000 b0968ac0 8014becc 00000000 00000000 00000000
bfa0:
00000000 00000000 00000000 801010e8 00000000 00000000 00000000 00000000
bfc0:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0:
00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<
8017d91c>] (__srcu_read_lock) from [<
803eedd4>] (hctx_lock+0x1c/0x2c)
[<
803eedd4>] (hctx_lock) from [<
803ef16c>] (blk_mq_run_hw_queue+0x28/0xfc)
[<
803ef16c>] (blk_mq_run_hw_queue) from [<
803ef278>] (blk_mq_run_hw_queues+0x38/0x4c)
[<
803ef278>] (blk_mq_run_hw_queues) from [<
8073f1a8>] (mmc_cleanup_queue+0x20/0x3c)
[<
8073f1a8>] (mmc_cleanup_queue) from [<
8073cedc>] (mmc_blk_remove_req.part.5+0x44/0x90)
[<
8073cedc>] (mmc_blk_remove_req.part.5) from [<
8073d9fc>] (mmc_blk_remove+0xe8/0x1b0)
[<
8073d9fc>] (mmc_blk_remove) from [<
8072e57c>] (mmc_bus_remove+0x18/0x20)
[<
8072e57c>] (mmc_bus_remove) from [<
80534930>] (device_release_driver_internal+0x178/0x220)
[<
80534930>] (device_release_driver_internal) from [<
8053357c>] (bus_remove_device+0xcc/0xf8)
[<
8053357c>] (bus_remove_device) from [<
80530bc4>] (device_del+0x120/0x358)
[<
80530bc4>] (device_del) from [<
8072ebf0>] (mmc_remove_card+0x78/0x9c)
[<
8072ebf0>] (mmc_remove_card) from [<
80734044>] (mmc_sd_detect+0x3c/0x6c)
[<
80734044>] (mmc_sd_detect) from [<
8072dfa8>] (mmc_rescan+0xcc/0x3f4)
[<
8072dfa8>] (mmc_rescan) from [<
80146454>] (process_one_work+0x1f0/0x400)
[<
80146454>] (process_one_work) from [<
801471d8>] (worker_thread+0x44/0x580)
[<
801471d8>] (worker_thread) from [<
8014c014>] (kthread+0x148/0x150)
[<
8014c014>] (kthread) from [<
801010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xb095bfb0 to 0xb095bff8)
bfa0:
00000000 00000000 00000000 00000000
bfc0:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0:
00000000 00000000 00000000 00000000 00000013 00000000
Code:
f10c0080 e590307c ee1d0f90 e0833102 (
e7931000)
---[ end trace
5bcff5fbec8eea09 ]---
FAT-fs (mmcblk0p1): FAT read failed (blocknr 8)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Daniel Baluta [Mon, 15 Apr 2019 19:39:01 +0000 (22:39 +0300)]
arm64: defconfig: Enable DSP config
This pulls in code for talking with DSP.
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Daniel Baluta [Mon, 15 Apr 2019 19:35:47 +0000 (22:35 +0300)]
MLK-20940: arm64: defconfig: Remove direct selection of CONFIG_RPMSG
This is already selected by others symbols e.g HAVE_IMX_RPMSG.
Fixes:
ad284b230391bae ("MLK-20940-4 ARM64: defconfig: Add RPBUS and RPMSG config")
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Shengjiu Wang [Mon, 15 Apr 2019 10:38:42 +0000 (18:38 +0800)]
MLK-21450-2: ARM64: defconfig: enable HDMI audio
enable CONFIG_SND_SOC_IMX_CDNHDMI=y
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Mon, 15 Apr 2019 10:30:20 +0000 (18:30 +0800)]
MLK-21450-1: ASoC: imx-cdnhdmi: replace codec with component
Fix the compile issue for snd_pcm_codec is removed
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Viorel Suman [Mon, 15 Apr 2019 12:46:47 +0000 (15:46 +0300)]
MLK-21441: ASoC: imx-audmix: register the card on a proper dev
Register the card on a proper dev pointer.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Xianzhong [Tue, 16 Apr 2019 14:44:44 +0000 (22:44 +0800)]
MGS-4683: integrate GPU 6.4.0 beta early version
support new features for i.MX8 AI/ML:
1. Android NN with VXC acceleration
2. VXC NN adapter for Tensorflow Lite
3. Unified OpenVX for QM/QXP/mScale
4. OpenVX 1.2 with NN extension
5. Bridged GPU compute on 8QM
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Viorel Suman [Wed, 10 Apr 2019 11:06:39 +0000 (11:06 +0000)]
ASoC: fsl_audmix: cache pdev->dev pointer
There should be no trouble to understand dev = pdev->dev.
This can save some space to have more print info or save
some wrapped lines.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Suggested-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
ecf6715042cf0f738763fe34d1636b707961a58a)
Daniel Baluta [Mon, 15 Apr 2019 13:48:18 +0000 (16:48 +0300)]
MLK-21115-2 ASoC: fsl: replace platform to component
ASoC removed platform and replace it with component
in an effort to unify *all* ASoC components.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Daniel Baluta [Mon, 15 Apr 2019 13:48:06 +0000 (16:48 +0300)]
MLK-20189-10: ASoC: fsl: dsp: Avoid unnecessary check
strtab is always non-null so remove unnecessary check.
This is a follow up of patch
167a6d79f ("ASoC: fsl: Skip checking for string section type")
and finally fixes CID3901026
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Daniel Baluta [Wed, 27 Mar 2019 08:25:22 +0000 (10:25 +0200)]
MLK-21144 ASoC: fsl: Fix crash with multiple open/close
Because we are re-initializing the proxy at close it might
happen that work is still pending which causes the following crash:
[ 94.699835] Unable to handle kernel NULL pointer dereference at virtual address
00000008
[ 94.707923] Mem abort info:
[ 94.710722] Exception class = DABT (current EL), IL = 32 bits
[ 94.716637] SET = 0, FnV = 0
[ 94.719686] EA = 0, S1PTW = 0
[ 94.722822] Data abort info:
[ 94.725698] ISV = 0, ISS = 0x00000005
[ 94.729530] CM = 0, WnR = 0
[ 94.732504] user pgtable: 4k pages, 48-bit VAs, pgd =
ffff8008d9ba3000
[ 94.739035] [
0000000000000008] *pgd=
0000000938419003, *pud=
0000000000000000
[ 94.746015] Internal error: Oops:
96000005 [#1] PREEMPT SMP
[ 94.751589] Modules linked in:
[ 94.754652] CPU: 0 PID: 2068 Comm: kworker/0:2 Not tainted 4.14.98-dirty #75
[ 94.761700] Hardware name: Freescale i.MX8QM MEK (DT)
[ 94.766768] task:
ffff8008f23ae200 task.stack:
ffff000014378000
[ 94.772705] PC is at process_one_work+0x34/0x414
[ 94.777325] LR is at process_one_work+0x1e0/0x414
In order to fix this, we make sure that no work is pending before starting
the re-initialization.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
2c00c24be5f8b63636e3f9005e15a3de42058438)
Shengjiu Wang [Thu, 24 Jan 2019 07:20:52 +0000 (15:20 +0800)]
MLK-20793: ASoC: fsl_dsp: remove error message
With non fsl-imx8qxp-mek-dsp.dts, the clock is not assigned
to dsp node, which cause error message when kernel boot up.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
cac03181a5cddfa594a2afc31e36121855e3d507)
Shengjiu Wang [Wed, 9 Jan 2019 02:21:18 +0000 (10:21 +0800)]
MLK-20693-3: ASoC: fsl_dsp: Add clocks for peripheral devices
Add clocks for peripheral devices
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
64b05a709b6ec2fbbc7e9fcb0735bc13eb146631)
Shengjiu Wang [Wed, 9 Jan 2019 02:12:16 +0000 (10:12 +0800)]
MLK-20693-2: ASoC: fsl_dsp_cpu: remove the clock operation
Remove the clock operation in cpu dai, all clock will be
moved to platform driver.
The reason is that the suspend and resume of dsp is handled in
platform driver, if the clock is disabled before the suspend,
the dsp framework can't access the registers of device in suspend.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
f3a0ba0f062777ef04350c82025ece62e19b128c)
Daniel Baluta [Mon, 15 Apr 2019 13:36:47 +0000 (16:36 +0300)]
MLK-20095-3: ASoC: fsl: dsp: Add ASRC clocks
We enable the ASRC clocks from CPU side. We only need
the following clocks: "mem", "ipg" and "asrc0..3".
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 27 Dec 2018 08:23:59 +0000 (16:23 +0800)]
MLK-20693-1: ASoC: fsl_dsp: remove this workaround of skip sections
Revert "MLK-18497-13: ASoC: fsl: dsp: Skip SDRAM section update if
fw is already loaded"
This reverts commit
a0cffd9a9299362f2b3a4d24b78a8574b736fdfa.
This is just to avoid reconfigure the edma isr handler in dsp
framework, which should be handled by dsp framework.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
5ba41fae00145d1420f857dfc67da5a872467365)
Daniel Baluta [Fri, 14 Dec 2018 17:19:15 +0000 (19:19 +0200)]
MLK-20095-4: ASoC: fsl: Use hardwired system address offset source select for QM
We set system address offset select to 0 on QM because of the following reasons:
* SC_C_OFS_PERIPH, it is not available for QM
* SC_C_OFS_AUDIO, it is not used
* SC_C_OFS_IRQ, needs to get outside of the VPU.
A simplified version of the code is:
if (dsp_priv->dsp_board_type == DSP_IMX8QXP_TYPE) {
sc_misc_set_control(ipcHndl, SC_R_DSP, SC_C_OFS_SEL, 1);
sc_misc_set_control(ipcHndl, SC_R_DSP, SC_C_OFS_PERIPH, 0x5A);
sc_misc_set_control(ipcHndl, SC_R_DSP, SC_C_OFS_IRQ, 0x51);
sc_misc_set_control(ipcHndl, SC_R_DSP, SC_C_OFS_AUDIO, 0x80);
}
} else {
sc_misc_set_control(ipcHndl, SC_R_DSP, SC_C_OFS_SEL, 0);
}
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
1607309080dca31c75f1cb7a2577afcb184fc291)
Daniel Baluta [Fri, 14 Dec 2018 17:15:07 +0000 (19:15 +0200)]
MLK-20095-3: ASoC: fsl: Differentiate between QXP and QM
On QM the DSP is inside the VPU subsystem while in QXP
it is inside the Audio DMA subsystem. For this reason
there are "subtle" differences.
Introduce new compatible string for QM to help us correctly
configure the DSP depending on the board they run.
dsp_mem_msg structure is shared with the DSP, so by introducing
new member dsp_board_type we can let DSP know on which target it runs.
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
1e63c7b0935f09c7f3cccb3bea04071be4bc5b67)
Daniel Baluta [Wed, 23 May 2018 06:40:55 +0000 (09:40 +0300)]
MLK-17481-3: ASoC: fsl: Fix DSP memory mappings
We load DSP firmware from the ARM side at 0x556e8000 but because the
compiler generated memory layout starts at 0x596e8000 we need to do
some fixups.
Thus, each address (in DSP local memory) generated by the compiler
needs to be substracted an offset = 0x596e8000 - 0x556e8000 = 0x4000000.
Because this only happens on QM we will use dts to specify the offset.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
8d4518d2a5d956549e829470af15003d7adff841)
(cherry picked from commit
513befc82cd9b622ec145b3886f49f8551301c08)
Daniel Baluta [Fri, 9 Nov 2018 09:35:46 +0000 (11:35 +0200)]
MLK-20189-6: ASoC: fsl: Skip checking for string section type
e_shstrndx already contains the section header index, so
shdr->sh_type will always be SHT_STRTAB.
Remove this redundant check and make Coverity happy.
Fixes: CID3901026
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
93a9e535f4d59c5e02cdfacca5ff59fd18193aec)
Daniel Baluta [Thu, 8 Nov 2018 14:13:12 +0000 (16:13 +0200)]
MLK-20189-5: ASoC: fsl: dsp_proxy: Unlock proxy->lock on error path
xf_cmd_send_recv returns with lock taken if waiting was
interrupted by a signal.
This fixes Coverity issues: CID5233120 / CID5233060
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
1e34cf3fb346b04ad47238141848f2e0f94566cd)
Daniel Baluta [Thu, 8 Nov 2018 14:02:40 +0000 (16:02 +0200)]
MLK-20189-4: ASoC: fsl: library_load: Check return value for kernel_read
Bail out if kernel_read returns an error.
Fixes: CID1477415
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
3ba426cd2d6c6f38cf2fcbd4bb1c8a4577566892)
Daniel Baluta [Thu, 8 Nov 2018 13:52:08 +0000 (15:52 +0200)]
MLK-20189-3: ASoC: fsl: library_load: Remove dead code
At this point err is always 0. So, just remove the check.
Fixes: CID1477380
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
f029b9ebfe20f9198308ad77b4b1f2707b4ff258)
Daniel Baluta [Thu, 8 Nov 2018 13:07:56 +0000 (15:07 +0200)]
MLK-20189-2: ASoC: dsp: Replace atomic_dec_return with atomic_dec
Return value is not used so better use atomic_dec.
This also silences coverity warning CID3344689.
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
b44da5368dde3c9d6b5b5817900dea9ae79a1035)
Daniel Baluta [Thu, 8 Nov 2018 12:40:50 +0000 (14:40 +0200)]
MLK-20189-1: ASoC: fsl: dsp: Unlock proxy->lock on error path
xf_cmd_recv will return with lock taken in two cases:
* msg was received
* waiting for msg was interrupted by a signal
Make sure we unlock proxy->lock in both cases.
This fixes Coverity issue: CID3335482.
Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
3f0ef6a5683ddc1776b290dbcea8411357d08a46)
Ranjani Vaidyanathan [Fri, 2 Nov 2018 21:05:51 +0000 (16:05 -0500)]
MLK-20222-4 sound: Update SCFW API
Update SCFW API to the following commit:
"
("
430d1e3646fbe75e339e18abf2330565eac906e0")
Author: Chuck Cannon <chuck.cannon@nxp.com>
Date: Fri Nov 2 15:25:45 2018 -0500
SCF-105: RN updates.
"
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
(cherry picked from commit
a84fd02f0b4377e7c53cb2184bd5acd0a2896157)
Daniel Baluta [Fri, 2 Nov 2018 15:20:53 +0000 (17:20 +0200)]
MLK-20094: ASoC: fsl: dsp: Fix crash in compress cleanup path
We must find a way to no longer touch resources after they are
cleand up.
Now, after a stress test we get the following crash:
[ 2156.863772] fsl-dsp
596e8000.dsp: xf_pool_alloc failed
[ 2156.869337] Unable to handle kernel NULL pointer dereference at
virtual address
00000060
[ 2157.148594] [<
ffff000008d8839c>] _raw_spin_lock+0x14/0x48
[ 2157.153995] [<
ffff000008b3e0b8>] xf_cmd_send_recv_complete+0x40/0xf0
[ 2157.160354] [<
ffff000008b3e470>] xf_close+0x40/0x88
[ 2157.165239] [<
ffff000008b3f7a4>] xaf_comp_delete+0x5c/0x70
[ 2157.170730] [<
ffff000008b40530>] dsp_platform_compr_free+0xa0/0xe8
[ 2157.176917] [<
ffff000008b287fc>] soc_compr_free_fe+0x144/0x1a0
[ 2157.182754] [<
ffff000008b11b24>] snd_compr_free+0x64/0x98
This happens because:
1) dsp_platform_process work handler waits in a loop for
messages to arrive.
2) when cplay process finishes it cleans up most of the
resources.
3) when another cplay process starts it reinitializes the
resources including queues for example.
4) a message will be generated and kernel will crash because
dsp_platform_process uses the older queues.
A solution for this is to make sure dsp_platform_process work loop
is stopped at cleanup time.
We use is_active state and signal dsp_platform_process handler to
finish because we are on the cleanup path.
While at it replace cancel_work with cancel_work sync to be sure
that work handler ends before going on with the rest of the cleanup.
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
c0f7ef8eaf096523e9ebe3acd818e5f67fdb639f)
Daniel Baluta [Mon, 15 Apr 2019 14:03:33 +0000 (17:03 +0300)]
MLK-18279: ASoC: fsl_dsp: get the information of reserved memory from
dts
The reserved memory for dsp is defined in dts file, however, the dsp
driver has also defined the address and size of this reserved memory,
which is repeated and inflexible.
So by cancelling the definition in dsp driver and use system API to
get the information of reserved memory from dts dynamically to fix
this problem.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Horia Geantă [Mon, 15 Apr 2019 13:28:21 +0000 (16:28 +0300)]
MLK-21453: crypto: caam - fix Mentor's port, merge conflict resolutions
1. imx_4.14.y commit ("
6c68d27892c4 MLK-18082: boot: dtsi: Align DTSI")
changes in Documentation/devicetree/bindings/crypto/fsl-sec4.txt were
omitted, add them now.
2. Some commits (see Fixes tags) are incomplete / merge conflict
resolutions are incorrect.
Fixes:
0cab3173f44a ("MLK-18082: ARM: dts: imx: Change size of caam-sm to correct size")
Fixes:
9c5e81b8410b ("MLK-9710-18 snvs - make SECVIO module device tree correct")
Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Franck LENORMAND [Tue, 19 Mar 2019 15:05:30 +0000 (16:05 +0100)]
MLK-19449: crypto: caam - Add Power Management
Add support for suspend and resume operation for PM in CAAM driver.
When the CAAM goes in suspend, the hardware is considered to do nothing.
On some platforms, the power of the CAAM is not turned off so it keeps
its configuration.
On other platforms, it doesn't so it is necessary to save the state of
the CAAM:
- JRs MID
- Address of input and output rings
Limitation:
When the CAAM is powered OFF, it is resetted so the JDKEK and TDKEK
changes. This impacts crypto transforms using MDHA split-keys
which are kept over suspend as they are encrypted with the JDKEK:
- hmac(*) from caamhash.c
- authenc(hmac(*),*) from caamalg.c
- echainiv(authenc(hmac(*),*)) from caamalg.c
The issue was already present in current code so this patch does not
add a regression in this regard.
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Franck LENORMAND [Tue, 5 Mar 2019 13:20:34 +0000 (14:20 +0100)]
MLK-19449: crypto: caam - Change structure type representing DECO MID
The structure partid is not suitable to represent the DECO MID register.
This patch replace partid by masterid which is more appropriate.
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Franck LENORMAND [Fri, 15 Feb 2019 15:24:35 +0000 (16:24 +0100)]
SSI-35: crypto: caam - Do not rely on common index of jr
With current code, the index are stored in an array at their common index,
ie jr0 store at index 0, jr1 at 1, ...
It force to use buggy mechanic to compute it and is not scalable.
This patch removes the mechanic of computation of hardware register
addresses and the notion of first_jr_index.
Instead the first JR available is set to index 0 of the table and so on.
Legacy code was retrieving the index of the first jr to access registers.
With this new way, we simply always access the first jr.
This is working because after the configuration of the JR in ctl
(enable_jobrings), the driver checks that there is at least 1 JR.
Without this, we could create segfaults.
Fixes:
de9807e6e0de ("MLK-15473-1: crypto: caam: Add CAAM driver support for iMX8 soc family")
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Horia Geantă [Thu, 7 Feb 2019 18:07:04 +0000 (20:07 +0200)]
crypto: caam - lower SM test verbosity
Let's use dev_dbg() instead of dev_info() to minimize verbosity in case
we're not interested in low-level details.
While here, replace dev_info() with dev_err() in places where errors are
reported.
Reported-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Franck LENORMAND [Fri, 23 Nov 2018 15:06:45 +0000 (16:06 +0100)]
MLK-20204: drivers: crypto: caam: Remove deadcode on 32bit platform
When building on a platform with a 32bit DMA address, taking the
upper 32 bits makes no sense.
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Franck LENORMAND [Fri, 23 Nov 2018 10:47:18 +0000 (11:47 +0100)]
MLK-20204: drivers: crypto: caam: sm: test: Dealloc keyslot properly
Some keyslot values were used during deallocation
but were not initiliazed nor set properly.
drivers/crypto/caam/sm_test.c:446: CID
3901091 (#1 of 1):
Type: Uninitialized scalar variable (UNINIT)
Classification: Unclassified
Severity: Unspecified
Action: Modeling Required
Owner: nxa21133
Defect only exists locally.
drivers/crypto/caam/sm_test.c:98:
1. var_decl: Declaring variable "keyslot24" without initializer.
drivers/crypto/caam/sm_test.c:113:
2. path: Condition "!ctrlpriv", taking false branch.
drivers/crypto/caam/sm_test.c:118:
3. path: Condition "kspriv == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:123:
4. path: Condition "!units", taking false branch.
drivers/crypto/caam/sm_test.c:130:
5. path: Condition "units < 2", taking false branch.
drivers/crypto/caam/sm_test.c:150:
6. path: Condition "blob8 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:150:
7. path: Condition "blob16 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:150:
8. path: Condition "blob24 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:150:
9. path: Condition "blob32 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:178:
10. path: Condition "sm_keystore_slot_alloc(ksdev, unit,
(16U /* (8 % 16) ? (8 >> 4) + 1 << 4 : 8 */), &keyslot8)", taking true
branch.
drivers/crypto/caam/sm_test.c:179:
11. path: Jumping to label "dealloc".
drivers/crypto/caam/sm_test.c:446:
12. uninit_use_in_call: Using uninitialized value "keyslot24" when
calling "sm_keystore_slot_dealloc".
drivers/crypto/caam/sm_store.c:771:
12.1. path: Condition "smpriv->slot_alloc == NULL", taking false branch.
drivers/crypto/caam/sm_store.c:771:
12.2. path: Condition "smpriv->pagedesc[unit].ksdata == NULL", taking
false branch.
drivers/crypto/caam/sm_store.c:775:
12.3. read_parm: Reading a parameter value.
drivers/crypto/caam/sm_test.c:445: CID
3901093 (#1 of 1):
Type: Uninitialized scalar variable (UNINIT)
Classification: Unclassified
Severity: Unspecified
Action: Modeling Required
Owner: nxa21133
Defect only exists locally.
drivers/crypto/caam/sm_test.c:98:
1. var_decl: Declaring variable "keyslot16" without initializer.
drivers/crypto/caam/sm_test.c:113:
2. path: Condition "!ctrlpriv", taking false branch.
drivers/crypto/caam/sm_test.c:118:
3. path: Condition "kspriv == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:123:
4. path: Condition "!units", taking false branch.
drivers/crypto/caam/sm_test.c:130:
5. path: Condition "units < 2", taking false branch.
drivers/crypto/caam/sm_test.c:150:
6. path: Condition "blob8 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:150:
7. path: Condition "blob16 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:150:
8. path: Condition "blob24 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:150:
9. path: Condition "blob32 == NULL", taking false branch.
drivers/crypto/caam/sm_test.c:178:
10. path: Condition "sm_keystore_slot_alloc(ksdev, unit,
(16U /* (8 % 16) ? (8 >> 4) + 1 << 4 : 8 */), &keyslot8)", taking true
branch.
drivers/crypto/caam/sm_test.c:179:
11. path: Jumping to label "dealloc".
drivers/crypto/caam/sm_test.c:445:
12. uninit_use_in_call: Using uninitialized value "keyslot16" when
calling "sm_keystore_slot_dealloc".
drivers/crypto/caam/sm_store.c:771:
12.1. path: Condition "smpriv->slot_alloc == NULL", taking false branch.
drivers/crypto/caam/sm_store.c:771:
12.2. path: Condition "smpriv->pagedesc[unit].ksdata == NULL", taking
false branch.
drivers/crypto/caam/sm_store.c:775:
12.3. read_parm: Reading a parameter value.
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Franck LENORMAND [Fri, 23 Nov 2018 10:37:28 +0000 (11:37 +0100)]
MLK-20204: drivers: crypto: caam: sm: Remove deadcode
There was some code to free the keystore but the current
state of the function make this code unreachable so
remove it.
Coverity explanation:
drivers/crypto/caam/sm_store.c:654: CID 17839 (#1 of 1):
Type: Logically dead code (DEADCODE)
Classification: Bug
Severity: Major
Action: Fix Required
Owner: nxa21133
Defect only exists locally.
drivers/crypto/caam/sm_store.c:625:
cond_null: Condition "keystore_data == NULL", taking true branch. Now
the value of "keystore_data" is "NULL".
drivers/crypto/caam/sm_store.c:653:
null: At condition "keystore_data != NULL", the value of "keystore_data"
must be "NULL".
drivers/crypto/caam/sm_store.c:653:
dead_error_condition: The condition "keystore_data != NULL" cannot be
true.
drivers/crypto/caam/sm_store.c:654:
dead_error_line: Execution cannot reach this statement:
"kfree(keystore_data);".
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Silvano di Ninno [Thu, 17 May 2018 16:44:03 +0000 (18:44 +0200)]
MLK-18345: drivers: caam: add support for i.mx8mm
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Reviewed-by: Franck Lenormand <franck.lenormand@nxp.com>
Leonard Crestez [Mon, 15 Apr 2019 12:53:27 +0000 (15:53 +0300)]
MLK-21452 drivers/mxc/Kconfig: Only build imx8 vpu on arm64
There is no ARCH_MXC_ARM64 in 4.19 because upstream rejected it. We must
still check for ARM64 though because vpu compilation fails on 32-bit
platforms in multiple ways.
This fixes build for imx6/7
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Haibo Chen [Fri, 22 Jun 2018 07:50:28 +0000 (15:50 +0800)]
MLK-18662 iio: adc: imx8qxp_adc: add runtime suspend/resume support
Add runtime suspend/resume support for imx8QXP ADC
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit
85a5f4ad37d764ba6b17f5a49edfe469e2a80b34)
Haibo Chen [Thu, 14 Jun 2018 09:06:06 +0000 (17:06 +0800)]
MLK-18612-3 iio: adc: imx8qxp_adc: fix register setting
For the register CFG/TCTRLx/CMDLx/CMDHx, all the defined bits of
these register are setting, so no need to read the register
first, and use "|=", and will cause issue, the bit setting will be
impact by the last time setting. So write these register directlly.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit
7e5abc21dda7a82900b6337360361ae0226b1876)
Haibo Chen [Thu, 14 Jun 2018 08:08:40 +0000 (16:08 +0800)]
MLK-18612-1 iio: adc: imx8qxp_adc: add 4 more input channel
The ADC on imx8qxp/imx8qm totally has 8 differential external
analog inputs per instance.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit
483083f734fedd5156f9c53d56355c9ad0a2d2da)
Haibo Chen [Wed, 16 May 2018 08:36:17 +0000 (16:36 +0800)]
MLK-18323-4: ARM64: defconfig: enable imx8qxp adc
Enable imx8qxp adc in default
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit
73813a858c54a6f80c59cc095f5adb4b94c59e47)
Haibo Chen [Tue, 15 May 2018 07:27:05 +0000 (15:27 +0800)]
MLK-18323-1 iio: adc: Add imx8qxp adc driver support
i.MX8QXP B0 and i.MX8QM has the same ADC IP, so add the
adc driver to support it.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit
018a6f552e560eaf640c6d537d1962db6d2236fb)
Robert Chiras [Tue, 9 Apr 2019 10:19:15 +0000 (13:19 +0300)]
MLK-21312: drm/panel: rm67191: Add support for suspend/resume
The 'reset' pin used by this panel driver is shared with the touchscreen
driver, which is causing issues during suspend/resume process. In order
to better handle this gpio pin, release its resource during suspend and
acquire it again in resume.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Robert Chiras [Thu, 11 Apr 2019 07:39:55 +0000 (10:39 +0300)]
MLK-21239: arm64: dts: fsl-imx8qxp: Fix DTS warning
This patch fixes a warning introduced in current version of dtc script:
graph endpont node name should be 'endpoint'
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Robert Chiras [Wed, 10 Apr 2019 08:12:00 +0000 (11:12 +0300)]
MLK-21388: imx: nwl_dsi-imx: Fix pm_runtime_enable
Apparently, the pm_runtime_enable call is made too early, causing the PM
API printing this warning: 'Unbalanced pm_runtime_enable!'.
So move the call to pm_runtime_enable into the bind stage, which is more
appropriate than probe, since the disable is also made in unbind.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 07:24:59 +0000 (15:24 +0800)]
MLK-21449-6: [VPU]: 4.19 integration on 8MM/8MD
Enable 8MD decoder in config and makefile
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 07:22:15 +0000 (15:22 +0800)]
MLK-21449-5: [VPU]: 4.19 integration on 8MM/8MD
Add 8MD decoder driver: drivers/mxc/hantro
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 07:16:45 +0000 (15:16 +0800)]
MLK-21449-4: [VPU]: 4.19 integration on 8MM/8MD
Enable 8MM encoder in config and makefile
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 07:13:15 +0000 (15:13 +0800)]
MLK-21449-3: [VPU]: 4.19 integration on 8MM/8MD
Add 8MM encoder driver: drivers/mxc/hantro_845_h1
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 07:10:49 +0000 (15:10 +0800)]
MLK-21449-2: [VPU]: 4.19 integration on 8MM/8MD
Enable 8MM decoder in config and makefile
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 06:25:21 +0000 (14:25 +0800)]
MLK-21449-1: [VPU]: 4.19 integration on 8MM/8MD
Add 8MM decoder driver: drivers/mxc/hantro_845
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Shengjiu Wang [Mon, 15 Apr 2019 06:08:27 +0000 (14:08 +0800)]
MLK-21450: ASoC: fsl_rpmsg: fix timer issue for updating to 4.19
The timer_setup function's interface is changed in 4.19, the
struct timer_list pointer is used for callback function, and
from_timer is used to get its parent struct, so driver need to
be updated for this new change.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Shengjiu Wang [Sun, 14 Apr 2019 02:55:34 +0000 (10:55 +0800)]
MLK-21447: ASoC: fsl_rpmsg_i2s: underrun in m4 for msg delayed
With small buffer size, the resume will be triggered after suspend
immediately, if we reserve the period done message to be sent with
the next command, one period time later, it will cause underrun in
m4 side, for ALSA thought the appl_ptr is updated, but the command
won't be sent to M4 immediately, M4 don't have enough data to play.
In this patch, we check that if the left size in the buffer is less
that one period, the work queue will be triggered to send the period
done message immediately.
Fixes:
348d47695622 ("MLK-21307: ASoC: fsl_rpmsg_i2s: optimize
the message sent to m4")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
3dfecae40765329c0b7de1157f97ade24ecfce6d)
Shengjiu Wang [Mon, 1 Apr 2019 08:40:57 +0000 (16:40 +0800)]
MLK-21307: ASoC: fsl_rpmsg_i2s: optimize the message sent to m4
M4 complain that there are two much period done message sent to m4, that
M4 don't have enough time to handle these messages.
The solution for this issue is to reduce the number of period done message.
We allocate a specific memory for period done message, every time there is
period done coming, it will be writed to this memory, not write it directly
to the work queue, that queue will not be overflow, and the old period done
message will be overwrited.
In the rpmsg_i2s_work, we first check if there is period done message, then
send it first, after that, send the command in queue.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit
caabdfa176453cc7c8d6521f7865a670a7265a18)
Shengjiu Wang [Thu, 11 Apr 2019 11:43:19 +0000 (19:43 +0800)]
MLK-21440-4: ASoC: imx-cs42888: remove snd_soc_find_dai
Previously we add snd_soc_find_dai to check if the codec is probed or
not, but this bring kernel dump issue when CONFIG_LOCKDEP=y.
[ 2.823379] WARNING: CPU: 2 PID: 1 at sound/soc/soc-core.c:1016 snd_soc_find_dai+0x144/0x150
[ 2.831827] Modules linked in:
[ 2.834907] CPU: 2 PID: 1 Comm: swapper/0 Not tainted
4.14.78-00007-g524e1b1f0b3f #18
[ 2.842748] Hardware name: FSL i.MX8MM EVK board (DT)
[ 2.847811] task:
ffff8000624f0000 task.stack:
ffff000008078000
[ 2.853745] PC is at snd_soc_find_dai+0x144/0x150
[ 2.858462] LR is at snd_soc_find_dai+0x140/0x150
...
[ 3.469675] Call trace:
[ 3.472135] Exception stack(0xffff00000807ba40 to 0xffff00000807bb80)
[ 3.478590] ba40:
0000000000000000 00000000ffffffff 0000000000000000 0000000000000002
[ 3.
4864333.596564] [<
ffff00000883f2a8>] bus_add_driver+0x110/0x230
[ 3.602149] [<
ffff0000088412e8>] driver_register+0x68/0x100
[ 3.607735] [<
ffff0000088426dc>] __platform_driver_register+0x54/0x60
[ 3.614191] [<
ffff0000097e4cc8>] imx_rpmsg_driver_init+0x20/0x28
[ 3.620213] [<
ffff0000080844c4>] do_one_initcall+0x44/0x130
[ 3.625801] [<
ffff000009760ef8>] kernel_init_freeable+0x1e0/0x280
[ 3.631909] [<
ffff00000908c3f8>] kernel_init+0x18/0x110
[ 3.637148] [<
ffff000008085a4c>] ret_from_fork+0x10/0x1c
So we could't resolve the warning "snd_soc_register_card failed (-517)".
Fixes:
2bf5f9704785 ("MLK-19854-1: ASoC: imx-cs42888: fix error when m4
image is not loaded")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
58ffdf239288cfa6904640fc8432c182cf56589b)
(cherry picked from commit
d1222a0e5f93d2a5d3b3b69699f79f2c62ce1d7c)
Shengjiu Wang [Thu, 11 Apr 2019 11:43:07 +0000 (19:43 +0800)]
MLK-21440-3: ASoC: imx-wm8960: remove snd_soc_find_dai
Previously we add snd_soc_find_dai to check if the codec is probed or
not, but this bring kernel dump issue when CONFIG_LOCKDEP=y.
[ 2.823379] WARNING: CPU: 2 PID: 1 at sound/soc/soc-core.c:1016 snd_soc_find_dai+0x144/0x150
[ 2.831827] Modules linked in:
[ 2.834907] CPU: 2 PID: 1 Comm: swapper/0 Not tainted
4.14.78-00007-g524e1b1f0b3f #18
[ 2.842748] Hardware name: FSL i.MX8MM EVK board (DT)
[ 2.847811] task:
ffff8000624f0000 task.stack:
ffff000008078000
[ 2.853745] PC is at snd_soc_find_dai+0x144/0x150
[ 2.858462] LR is at snd_soc_find_dai+0x140/0x150
...
[ 3.469675] Call trace:
[ 3.472135] Exception stack(0xffff00000807ba40 to 0xffff00000807bb80)
[ 3.478590] ba40:
0000000000000000 00000000ffffffff 0000000000000000 0000000000000002
[ 3.
4864333.596564] [<
ffff00000883f2a8>] bus_add_driver+0x110/0x230
[ 3.602149] [<
ffff0000088412e8>] driver_register+0x68/0x100
[ 3.607735] [<
ffff0000088426dc>] __platform_driver_register+0x54/0x60
[ 3.614191] [<
ffff0000097e4cc8>] imx_rpmsg_driver_init+0x20/0x28
[ 3.620213] [<
ffff0000080844c4>] do_one_initcall+0x44/0x130
[ 3.625801] [<
ffff000009760ef8>] kernel_init_freeable+0x1e0/0x280
[ 3.631909] [<
ffff00000908c3f8>] kernel_init+0x18/0x110
[ 3.637148] [<
ffff000008085a4c>] ret_from_fork+0x10/0x1c
So we could't resolve the warning "snd_soc_register_card failed (-517)".
Fixes:
a52c88bc3932 ("MLK-19854-1: ASoC: imx-wm8960: fix error when m4
image is not loaded")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
f5d9013702e172a243da74a42941a62283bbe4a8)
(cherry picked from commit
c54e5cd3817fde4133c8c994ff7bec59075fc5ec)
Shengjiu Wang [Thu, 11 Apr 2019 11:42:50 +0000 (19:42 +0800)]
MLK-21440-2: ASoC: imx-rpmsg: Remove snd_soc_find_dai
Previously we add snd_soc_find_dai to check if the codec is probed or
not, but this bring kernel dump issue when CONFIG_LOCKDEP=y.
[ 2.823379] WARNING: CPU: 2 PID: 1 at sound/soc/soc-core.c:1016 snd_soc_find_dai+0x144/0x150
[ 2.831827] Modules linked in:
[ 2.834907] CPU: 2 PID: 1 Comm: swapper/0 Not tainted
4.14.78-00007-g524e1b1f0b3f #18
[ 2.842748] Hardware name: FSL i.MX8MM EVK board (DT)
[ 2.847811] task:
ffff8000624f0000 task.stack:
ffff000008078000
[ 2.853745] PC is at snd_soc_find_dai+0x144/0x150
[ 2.858462] LR is at snd_soc_find_dai+0x140/0x150
...
[ 3.469675] Call trace:
[ 3.472135] Exception stack(0xffff00000807ba40 to 0xffff00000807bb80)
[ 3.478590] ba40:
0000000000000000 00000000ffffffff 0000000000000000 0000000000000002
[ 3.
4864333.596564] [<
ffff00000883f2a8>] bus_add_driver+0x110/0x230
[ 3.602149] [<
ffff0000088412e8>] driver_register+0x68/0x100
[ 3.607735] [<
ffff0000088426dc>] __platform_driver_register+0x54/0x60
[ 3.614191] [<
ffff0000097e4cc8>] imx_rpmsg_driver_init+0x20/0x28
[ 3.620213] [<
ffff0000080844c4>] do_one_initcall+0x44/0x130
[ 3.625801] [<
ffff000009760ef8>] kernel_init_freeable+0x1e0/0x280
[ 3.631909] [<
ffff00000908c3f8>] kernel_init+0x18/0x110
[ 3.637148] [<
ffff000008085a4c>] ret_from_fork+0x10/0x1c
So we could't resolve the warning "snd_soc_register_card failed (-517)".
Fixes:
75632b22a332 ("MLK-20247: ASoC: imx-rpmsg: fix error when
m4 image is not loaded")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
bbc1868d1c3ec448301d76606e7199f74aa35581)
(cherry picked from commit
ebf3fc59b84503a8da40a8e54a92e6de60e01dce)
Shengjiu Wang [Thu, 11 Apr 2019 11:39:47 +0000 (19:39 +0800)]
MLK-21440-1: ASoC: fsl_rpmsg_i2s: init spin lock
With CONFIG_LOCKDEP=y, there will kernel dump
[ 55.305563] INFO: trying to register non-static key.
[ 55.310540] the code is fine but needs lockdep annotation.
[ 55.316027] turning off the locking correctness validator.
[ 55.321520] CPU: 0 PID: 32 Comm: kworker/0:1 Tainted: G W
4.14.78-00007-g524e1b1f0b3f #18
[ 55.330827] Hardware name: FSL i.MX8MM EVK board (DT)
[ 55.335892] Workqueue: events rpmsg_work_handler
[ 55.340515] Call trace:
[ 55.342971] [<
ffff00000808c438>] dump_backtrace+0x0/0x270
[ 55.348375] [<
ffff00000808c6cc>] show_stack+0x24/0x30
[ 55.353433] [<
ffff000009078f38>] dump_stack+0xb8/0xf0
[ 55.358490] [<
ffff000008150404>] register_lock_class+0x364/0x548
[ 55.364501] [<
ffff000008153544>] __lock_acquire+0x7c/0x18a8
[ 55.370077] [<
ffff0000081555e8>] lock_acquire+0xc8/0x290
[ 55.375394] [<
ffff00000909422c>] _raw_spin_lock_irqsave+0x54/0x70
[ 55.381493] [<
ffff000008d80888>] i2s_rpmsg_cb+0xe8/0x1b0
[ 55.386810] [<
ffff000008d01dc4>] rpmsg_recv_done+0x144/0x210
[ 55.392476] [<
ffff000008713f44>] vring_interrupt+0x44/0x78
[ 55.397966] [<
ffff000008d025d4>] imx_mu_rpmsg_callback+0x6c/0x80
[ 55.403977] [<
ffff000008111f44>] notifier_call_chain+0x5c/0x98
[ 55.409813] [<
ffff0000081124f8>] __blocking_notifier_call_chain+0x58/0xa0
[ 55.416605] [<
ffff00000811257c>] blocking_notifier_call_chain+0x3c/0x50
[ 55.423223] [<
ffff000008d029a0>] rpmsg_work_handler+0x88/0xe8
[ 55.428974] [<
ffff000008108380>] process_one_work+0x290/0x738
[ 55.434723] [<
ffff000008108880>] worker_thread+0x58/0x460
[ 55.440127] [<
ffff000008110084>] kthread+0x104/0x130
[ 55.445096] [<
ffff000008085a4c>] ret_from_fork+0x10/0x1c
The reason is that the spin lock is not initilized.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit
0e98ac55f17f6505f92c515c3c04581039e21865)
(cherry picked from commit
314ef30b1bc75971c3e59f5ab9919586495ca556)
Zhou Peng [Mon, 15 Apr 2019 04:33:30 +0000 (12:33 +0800)]
MLK-21448-4: [VPU]: 4.19 integration on 8QXP/QM
Enable windsor encoder in config and makefile
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 04:12:35 +0000 (12:12 +0800)]
MLK-21448-3: [VPU]: 4.19 integration on 8QXP/QM
Add encoder driver: drivers/mxc/vpu_windsor
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 04:07:58 +0000 (12:07 +0800)]
MLK-21448-2: [VPU]: 4.19 integration on 8QXP/QM
Enable malone decoder in config and makefile
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Zhou Peng [Mon, 15 Apr 2019 03:38:20 +0000 (11:38 +0800)]
MLK-21448-1: [VPU]: 4.19 integration on 8QXP/QM
Add decoder driver: drivers/mxc/vpu_malone
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Haibo Chen [Fri, 12 Apr 2019 09:21:21 +0000 (17:21 +0800)]
MLK-21444-3 input: touch: focaltech: remove the redundancy file
All the file in the directory drivers/input/touchscreen/focaltech_touch/include/
are useless, so remove them.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Haibo Chen [Fri, 12 Apr 2019 08:55:29 +0000 (16:55 +0800)]
MLK-21444-2 ARM: dts: imx_v7_defconfig: default build in GOODIX touch driver
use the following command to replace the imx_v7_defconfig
make savedefconfig
cp defconfig /arch/arm/configs/imx_v7_defconfig
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Haibo Chen [Fri, 12 Apr 2019 08:42:49 +0000 (16:42 +0800)]
MLK-21444-1 ARM: dts: imx7ulp-evkb-mipi: change to use GOODIX touch
The new MIPI panel used for 7ulp evkb board change to use the new
GOODIX touch chip rather than the FOCALTECH touch chip.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Clark Wang [Fri, 12 Apr 2019 12:26:31 +0000 (20:26 +0800)]
MLK-21446 arm64: defconfig: remove duplicate config setting
Because CONFIG_I2C_RPBUS has been add by (
f70afa74e62d MLK-21381
arm64: defconfig: Build in drivers to support i.MX8qm/qxp DPU KMS
via IT6263), remove the duplicate one from commit (
ad284b230391
MLK-20940-4 ARM64: defconfig: Add RPBUS and RPMSG config) to avoid build
warning.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Xianzhong [Wed, 19 Sep 2018 18:47:16 +0000 (02:47 +0800)]
MGS-4265 gpu: imx: dpu-blit: fix video hang with g2d compositor
video playback cause system hang with Wayland g2d compositor,
this also can be reproduced with Android G2D HWComposer.
the problem is second prg not handled between GPU and video.
need re-enable dprc & prg pipes when modifier changed.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit
8ca7df522719ac94d126d34618cc9d25a2798660)
Xianzhong [Fri, 6 Jul 2018 12:04:00 +0000 (20:04 +0800)]
MGS-3940 gpu: imx: dpu-blit: fix dpr hang for smaller size
auto-trigger cause dpr hang in inital blitter implementation,
the problem is dpr repeat mode has conflict with command sequencer.
as proposed by design, blitter need do manual trigger for each process:
dpr register -> dpr run -> seeris register -> seeris trigger -> sync
frstly this patch removed dprc first frame handler from dpu blitter,
then removed dpr repeat, and enable dpr run for each blit processing.
also add sync flag to avoid the duplicated calling to dpu_be_wait.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit
04eb0533d5008ab20aae1e0acb9e4d8b910d82e5)
Xianzhong [Thu, 5 Jul 2018 19:35:07 +0000 (03:35 +0800)]
MGS-4051 gpu: imx: dpu-blit: fix suspend resume issue
suspend & resume will destory and recreate blitter,
reset dprc start flags in blitter initialization.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit
01514db13899b1d7639190c17ec0a5e423292829)
Xianzhong [Fri, 12 Apr 2019 15:41:29 +0000 (23:41 +0800)]
MGS-3940 gpu: imx: dpu-blit: fix first frame handler
chrome browser hang is reproduced with mouse connected,
the first frame handler trigger the problem in below scenario:
tile (dprc-enable) --> linear (dprc->disable) --> tile (handle first frame wrongly).
need_handle_start is set following dprc_enable, need reset it with dprc_disable.
fix event trigger as previous implementation does not flush command sequence,
that will cause the obvious flicker when run glmark2 in full-screen.
also reduce bitter delay to 30us to improve blitter performance.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Xianzhong [Tue, 10 Jul 2018 13:44:44 +0000 (21:44 +0800)]
MGS-4061 gpu: imx: dpu-blit: fix kernel panic in pm test
resume will increase unlock counter, max allowed value is 15.
suspend need decrease unlock counter to avoid overflow panic.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit
0582cd50ed70f932158fe20d6caf2f4ad68eabf0)
Meng Mingming [Wed, 27 Dec 2017 02:17:52 +0000 (10:17 +0800)]
MLK-17311 gpu: imx: dpu-blit: enable prefetch feature
Add struct drm_imx_dpu_frame_info.
Configure dprc to enable prefetch for dpu blit.
Configure prefetch with source frame info for dpu blit.
Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
Meng Mingming [Thu, 31 Aug 2017 09:17:41 +0000 (17:17 +0800)]
MLK-15321-4 drm/imx: core: Add bliteng as component of imx-drm
Implement Blt engine as DRM renderer.
Add dpu bliteng as component of imx-drm.
Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
Meng Mingming [Thu, 31 Aug 2017 09:14:06 +0000 (17:14 +0800)]
MLK-15321-3 drm/imx: dpu: Add render feature support
Implement Blt engine as DRM renderer.
Add dpu ioctl to support imx-drm render feature.
Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
Meng Mingming [Wed, 30 Aug 2017 06:46:55 +0000 (14:46 +0800)]
MLK-15321-2 gpu: imx: dpu: Add dpu blit engine driver
Implement Blt engine as DRM renderer.
Add dpu blit engine driver.
Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
Liu Ying [Tue, 29 Aug 2017 08:58:58 +0000 (16:58 +0800)]
MLK-16290 drm: Add drm_of_component_probe_with_match() helper
A component master may have both OF based and non-OF based components to be
bound with. This patch adds a helper drm_of_component_probe_with_match()
similar to drm_of_component_probe() so that the new helper may get an
additional provided match pointer(contains match entries for non-OF based
components) to support this case.
Tested-by: Meng Mingming <mingming.meng@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit
c3cad7223488638ab56c20b2c29345487857bc5f)
Leonard Crestez [Tue, 26 Mar 2019 22:41:36 +0000 (00:41 +0200)]
MLK-21117-2 arm64: dts: imx8mm: Use upstream bd718x7 pmic driver
The upstream bd718x7 is usable but has slightly different DT bindings:
- Update compatible to
bd71847 (chip found on newer boards)
- Use standard interrupt bindings instead of gpio_into
- Use uppercase names for regulator-compatible
- Use rohm,reset-snvs-powered and rohm,dvs-*
- Rename BUCK5/6/7/8 relative to datasheet just like upstream driver
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Robin Gong <yibin.gong@nxp.com>
Leonard Crestez [Thu, 28 Mar 2019 22:18:58 +0000 (00:18 +0200)]
MLK-21117-1 arm64: defconfig: Enable ROHM_BD718XX
Enable mfd and regulator for PMIC found on imx8mm boards
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Robin Gong <yibin.gong@nxp.com>
Matti Vaittinen [Thu, 14 Feb 2019 09:39:36 +0000 (11:39 +0200)]
regulator: bd718x7: Support SNVS low power state
read ROHM
BD71837 /
BD71847 specific device tree bindings for
controlling the PMIC shutdown/reset states and voltages for
different HW states. The PMIC was designed to be used with NXP
i.MX8 SoC and it supports SNVS low power state which seems to
be typical for NXP i.MX SoCs. However, when SNVS is used we must
not allow SW to control enabling/disabling those regulators which
are crucial for system to boot as there is a HW limitation which
causes SW controlled regulators to be kept shut down after SNVS
reset.
Allow setting the SNVS to be used as reset target state and allow
marking those regulators which are critical for boot.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Tested-by: Angus Ainslie <angus@akkea.ca>
Reviewed-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
049369d464289bb57bcfb6faa20990a06fe1e7ae)
Matti Vaittinen [Thu, 14 Feb 2019 09:38:05 +0000 (11:38 +0200)]
regulator: add regulator_desc_list_voltage_linear_range
Add regulator_desc_list_voltage_linear_range which can be used
by drivers for getting the voltages before regulator is registered.
This may be useful for drivers which need to fetch the voltage
selectors at device-tree parsing callback.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Angus Ainslie <angus@akkea.ca>
Reviewed-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
6a47b4da551a762217215aeeda22e46469c5868a)
Matti Vaittinen [Thu, 14 Feb 2019 09:34:50 +0000 (11:34 +0200)]
devicetree: bindings: bd718x7: document HW state related ROHM specific properties
Add ROHM
BD71837 /
BD71847 specific device tree bindings for
controlling the PMIC shutdown/reset states and voltages for
different HW states. The PMIC was designed to be used with NXP
i.MX8 SoC and it supports SNVS low power state which seems to
be typical for NXP i.MX SoCs. However, when SNVS is used we must
not allow SW to control enabling/disabling those regulators which
are crucial for system to boot as there is a HW limitation which
causes SW controlled regulators to be kept shut down after SNVS
reset.
Allow setting the SNVS to be used as reset target state and allow
marking those regulators which are critical for boot.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Tested-by: Angus Ainslie <angus@akkea.ca>
Reviewed-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
f43d1b388f9be4aa47ed42c33659243a675c5c76)
Axel Lin [Thu, 24 Jan 2019 10:02:08 +0000 (18:02 +0800)]
regulator: bd718x7: Constify regulator_ops
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
704c5c01ce6e0d322e2c9555490b39c41e729383)
Matti Vaittinen [Wed, 7 Nov 2018 13:41:26 +0000 (15:41 +0200)]
regulator: bd718x7: Change next state after poweroff to ready
BD71837 and
BD71847 have a HW functionality which leave power
rails OFF after powerof state:
- if they have been controlled by SW.
- if state transition from poweroff is done to SNVS
BD71837 can after reset transition from power-off to SNVS or
READY state depending on reset reason. By default only wathcdog
reset changes state from poweroff to ready. Change PMIC
configuration to always transition to READY in order to avoid
crucial power rails being OFF after reset.
If SNVS is required the crucial power rails should not be
controlled by SW - eg corresponding regulator control register
should have SEL bit kept zero. Currently the driver assumes all
regulators to be controlled by SW so it sets all SEL bits to 1.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
e770b18bbbaecebfb37389b45bf82974a17488d7)
Axel Lin [Sat, 10 Nov 2018 03:50:03 +0000 (11:50 +0800)]
regulator: bd718x7: Use regulator_map_voltage_ascend for buck5 and buck7
The voltages in bd718xx_3rd_nodvs_buck_volts are in ascendant order, so use
regulator_map_voltage_ascend.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
2e61286dc6ce10ebce17825cd61031c5fd0289db)
Matti Vaittinen [Mon, 29 Oct 2018 12:16:30 +0000 (14:16 +0200)]
regulator: bd718x7: add missing linux/of.h inclusion (deja-vu)
0-Day tests found compilation error on x86.
Driver won't compile on x86_64 as "of_match_ptr" is
not found. Add missing include <linux/of.h>
At some point this fix was lost. So re-apply it.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
9cce72448364675ed5d4c793cf546023c003fdd6)
Geert Uytterhoeven [Sun, 28 Oct 2018 16:09:22 +0000 (17:09 +0100)]
regulator: bd718x7: Remove double indirection for bd718xx_pmic_inits.rdatas
With gcc 4.1:
drivers/regulator/bd718x7-regulator.c: In function ‘bd718xx_probe’:
drivers/regulator/bd718x7-regulator.c:1020: warning: initialization from incompatible pointer type
drivers/regulator/bd718x7-regulator.c:1024: warning: initialization from incompatible pointer type
Apparently this old compiler can't handle the obscure double
indirection.
However, there is no need for a double indirection. Just store a
pointer to the array instead, like other drivers tend to do.
Fixes:
494edd266b945f36 ("regulator/mfd: Support ROHM
BD71847 power management IC")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
de226ebda96cafa981b9c0fef56888931668b671)
Axel Lin [Thu, 4 Oct 2018 07:25:58 +0000 (15:25 +0800)]
regulator: bd718x7: Remove struct bd718xx_pmic
All the fields in struct bd718xx_pmic are not really necessary.
Remove struct bd718xx_pmic to simplify the code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
bcb047ebf28453da56f0265aeeb9edc52b797ea7)
Matti Vaittinen [Tue, 2 Oct 2018 07:16:50 +0000 (10:16 +0300)]
regulator: bd718xx: fix build warning on x86_64
Casting address to unsigned int causes a warning on some 64 bit
architectures. Fix the cast.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
eb108c3611dd21d5d058cee25fec1c29baf5b0c9)
Matti Vaittinen [Fri, 14 Sep 2018 08:34:02 +0000 (11:34 +0300)]
regulator: bd718xx: rename
bd71837 to 718xx
rename
bd71837-regulator.c to bd718x7-regulator.c to reflect the
fact that also
BD71847 is now supported by the driver.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
2ece646c90c5b45dd76c76ea207a3f3459f2c472)
Matti Vaittinen [Fri, 14 Sep 2018 08:33:11 +0000 (11:33 +0300)]
regulator: bd718XX use pickable ranges
Few regulators in
BD71837 and
BD71847 can output voltages from
different voltage ranges. Register interface is arranged so that
used range is selected by toggling bits which are not next to actual
voltage selection bits. Then the voltage inside selected range is
determined by voltage selection bits (as usual). Support
BD71837
and
BD71847 selectible range voltages using new pickable ranges
helpers.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
a4bfc2c28a21f4d5274d813b20fd015a9dc9bcfa)
Matti Vaittinen [Fri, 14 Sep 2018 08:32:26 +0000 (11:32 +0300)]
regulator/mfd: bd718xx: rename
bd71837/
bd71847 common instances
Rename parts of code that support both
BD71837 and
BD71847 to BD718XX.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit
dd2be639f4a918b335818bf22a937956e552b957)