1
0
Fork 0
Commit Graph

881527 Commits (8e298b9ca4eef2e5b29f4e0dbdd51ef2446ed596)

Author SHA1 Message Date
Peng Fan 8e298b9ca4 MLK-23754-27 arm64: dts: imx8mm: add i.MX8MM cm4 node
Add i.MX8MM cm4 node for remoteproc usage.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:42 +08:00
Peng Fan 8bd8bf4ea9 MLK-23754-26 arm64: dts: imx8x-mek: add cm4 node
Add cm4 node for remoteproc usage. Currently added ipc-only
for partitioned M4 usage, late this property will be dropped
and check partitioned M4 in driver.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:42 +08:00
Peng Fan 00f33502b6 MLK-23754-25 remoteproc: imx: use devm_ioremap
We might need to map an region multiple times, becaue the region might
be shared between remote processors, such i.MX8QM with dual M4 cores.
So use devm_ioremap, not devm_ioremap_resource.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:41 +08:00
Peng Fan e966403850 MLK-23754-24 remoteproc: imx: add i.MX8MN/P support
i.MX8MN/P M4 start/stop is controlled by TF-A, so use SIP call
to control.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:41 +08:00
Peng Fan ea81b0c50b MLK-23754-23 soc: imx: sip: import M4 SRC call
Import M4 SRC call from TF-A

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:41 +08:00
Peng Fan f960ed8a9f MLK-23754-22 remoteproc: imx_rproc: add i.MX8QXP CM4 start/stop with power domain support
When CM4 image needs to be loaded from Linux userspace, we need
power on CM4 CORE, MU_1A and etc. Then start CM4 CORE.

Because we need to add multilple power domains, default power
domain attach probe only support one power domain,
we get the power domain in probe and mark on.

We are lucky that the TCML space could be accessed even without
power on the resources, so it is ok power on in probe. If not,
elf load will not be able to load segments to TCML.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:41 +08:00
Peng Fan 9a3b975180 MLK-23754-21 remoteproc: imx_rproc: add imx memcpy functions
Add i.MX memcpy functions for remoteproc, because linux memcpy
would trigger abort when copying elf data to TCML space using
64bit copy, but start with not 64bit aligned TCML address.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:41 +08:00
Peng Fan 0c83261a17 MLK-23754-20 firmware: imx: scu-pd: add cm4 power domains
Add CM4 core and MU_1A power domains entry.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:41 +08:00
Peng Fan ad144fec7a MLK-23754-19 remoteproc: add rproc_memcpy
Some platforms has limitation using memcpy to/from memory
that will be used by remote processor.

To i.MX8 Chips, TCM memory not support 64bit access, and non 64bit
aligned access will cause issue.

So introduce rproc_memory to let driver could have their own memcpy
variants.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan 357a08460c MLK-23754-18 remoteproc: imx_rproc: add rx doorbell
Add RX doorbell support, but currently M4 side not support
this feature, so just follow what imx_rpmsg did, add this
function.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan 2dea08e8ce MLK-23754-17 remoteproc: imx_rproc: add i.MX8QXP
i.MX8QXP support hardware partition feature, the M4
could be controlled by System Control Unit(SCU). The M4 is out
of control of Linux with hardware partition used which is the normal
case for production in automotive space.

When M4 reboot, SCU will issue interrupt to Linux side, and Linux side
will recovery the connection. To use related functions, guard code
with CONFIG_IMX_SCU which is enabled for all i.MX SoCs with SCU inside.

Currently we only support IPC only case for i.MX8QXP.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan c2c679f3bd MLK-23754-16 remoteproc: imx_rproc: support get firmware name from dts
Add fsl,rproc-fw-name property to support get firmware name
from device tree.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan 1f76a0696d MLK-23754-15 remoteproc: imx_rproc: support i.MX8MQ/M
Support i.MX8MQ/M

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan 00815a39af MLK-23754-14 remoteproc: elf_loader: drop unneedded memset
The memset is actually not needed and it could cause kernel dump
on i.MX8M platform, because TCM is device memory in i.MX8M,
memset on ARM64 has dc zva instruction. This instruction
will trigger alignment abort to device memory per ARMv8 Doc.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan 865a9688c1 MLK-23754-13 remoteproc: imx_proc: enable virtio/mailbox
Use virtio/mailbox to build connection between Remote Proccessors
and Linux. Add delayed work to handle incoming messages.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:40 +08:00
Peng Fan c99efe4d56 MLK-23754-12 remoteproc: imx_proc: add ipc-only support
ipc-only is different from early-booted. You could still stop/start
the early-booted remote processors, but you could not stop/start
the remote processor that only support IPC.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:39 +08:00
Peng Fan a2fac0fbd3 MLK-23754-11 remoteproc: imx_rproc: support early booted remote processor
When remote processor is booted by bootloader, Linux need to
ignore firmware loading, but need to parse firmware resource table.

With early booted processor, also support stop/start it again.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:39 +08:00
Peng Fan a6b3104e89 MLK-23754-10 ARM64: configs: imx_v8_defconfig: enable imx remoteproc
Enable i.MX remoteproc driver

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:39 +08:00
Peng Fan b96f149d2f MLK-23754-9 reset: imx7: add the M4 core reset for i.MX8MQ
Add the M4 core reset for i.MX8MQ, then we could use reset API
to start/stop M4.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:39 +08:00
Peng Fan 189e62437d MLK-23754-8 remoteproc: imx: using reset api
Support using reset API to start/stop remote processors.
Currently to i.MX7/8MQ, there are four bits in SRC M4RCR relating
to M4.

 SW_M4C_NON_SCLR_RST BIT(0)
 SW_M4C_RST          BIT(1)
 SW_M4P_RST          BIT(2)
 ENABLE_M4           BIT(3)

We are using BIT(0) and BIT(3) to start/stop M4 in driver.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:39 +08:00
Peng Fan d91238cf8c MLK-23754-7 remoteproc: imx_rproc: make clk optional
To i.MX7ULP, M4 is the master to control everything, so it not need
clk from A7.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:39 +08:00
Peng Fan 6d3a01497f MLK-23754-6 remoteproc: imx_rproc: make syscon optional
Make syscon optional, since i.MX8QM/QXP/7ULP not have SRC to control M4.
But currently i.MX8QM/QXP/7ULP not added, so still check regmap
when start/stop to avoid unhappy things.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:38 +08:00
Peng Fan eb225e1d92 MLK-23754-5 remoteproc: add support to skip firmware load when recovery
Remote processor such as M4 inside i.MX8QXP is not handled by Linux
when it is configured to run inside its own hardware partition by
system control unit(SCU). So even remote processor crash reset, it is
handled by SCU, not linux. To such case, firmware load should be
ignored, So need skip_fw_load when m4 reboot itself.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:38 +08:00
Peng Fan 44ff0e88bf MLK-23754-4 dt-bindings: remoteproc: imx-rproc: support i.MX[8, 8M, 7ULP]
Support i.MX8/8M/7ULP:
 - Introduce early-booted property for M4 booted before Linux
 - Introduce mboxes for rpmsg/virtio to communicate with M4
 - Introduce mub-partition for hardware partition supported by i.MX8
 - Introduce rsrc-table which hold the resource table
 - Introduce rsrc-da

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:38 +08:00
Peng Fan 937d2872e2 MLK-23754-3 dt-bindings: remoteproc: Convert imx-rproc to json-schema
Convert the i.MX remoteproc binding to DT schema format
using json-schema

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:38 +08:00
Peng Fan 9f11c0b019 MLK-23754-2 remoteproc: virtio: support sharing vdev buffer
Support sharing vdev buffer between multiple vdevs.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-04-09 10:35:38 +08:00
Loic Pallardy 9dd2c00461 MLK-23754-1 remoteproc: add support for co-processor loaded and booted before kernel
Remote processor could boot independently or be loaded/started before
Linux kernel by bootloader or any firmware.
This patch introduces a new property in rproc core, named skip_fw_load,
to be able to allocate resources and sub-devices like vdev and to
synchronize with current state without loading firmware from file system.
It is platform driver responsibility to implement the right firmware
load ops according to HW specificities.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2020-04-09 10:35:38 +08:00
Mirela Rabulea 636de0a39e MLK-23728: Add ov2775 dtb for imx8mp
Make sure all the needed clocks are enabled for mipi_csi,
do not rely on mipi_dsi or lcdif to enable them.
Needed: media_cam1_pix, media_axi_root, media_apb_root

Tested with VSI ISP demo.
Not tested with camera on CSI2.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Tested-by: Oliver Brown <oliver.brown@nxp.com>
2020-04-08 10:32:22 -05:00
Minjie Zhuang 0ed47dbc11 MGS-5581 [#imx-1868] integrate vsi patch base on 6.4.0.p2 from 20200306 to 20200320
integrate vsi patch base on 6.4.0.p2 from 20200306 to 20200320

Signed-off-by: Minjie Zhuang <minjie.zhuang@nxp.com>
2020-04-08 17:23:51 +08:00
Richard Zhu fb8a27da45 MLK-23757 PCI: imx: remove the pd link automatically
Replace DL_FLAG_STATELESS by DL_FLAG_AUTOREMOVE_CONSUMER.
Thus, the link can be removed automatically on PCIe driver unbind,
and the PDs of PCIe can be turned off accordingly.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-08 16:16:02 +08:00
Fancy Fang 639f4b020f MLK-23758 arm64: dts: imx8mp: add power domains for dsi, lcdif1 and lcdif2
Add the corresponding power domains for MIPI DSI, LCDIF1 and
LCDIF2 device nodes.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: G.n. Zhou <guoniu.zhou@nxp.com>
2020-04-08 15:53:24 +08:00
Guoniu.zhou b4b240ce1d MLK-23756: arm64: dts: bind power domain to ISI and CSI of iMX8MP
Bind power doamin to ISI and CSI of iMX8MP

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
2020-04-08 12:17:46 +08:00
Richard Zhu ea318acd0d MLK-23755 arm64: dts: imx8dxl: enable pcie ep rc verification
Enable the PCIe EP/RC verification on iMX8DXL EVK board.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-08 10:53:24 +08:00
Guoniu.zhou ee6fae8a1e MLK-23750-3: media: pi: fix ISI_0, PI_0 can't enter lp when suspend
For multi power domain, if DL_FLAG_RPM_ACTIVE flag is set when device link
binding, power domain will keep active after probe, but driver need to let
device into lp status when there is no camera streaming. So remove the flag
in driver.

Signed-off-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
2020-04-08 10:34:15 +08:00
Guoniu.zhou fbce55ad26 MLK-23750-2: media: csi: fix ISI_0, CSI_0 can't enter lp when suspend
For multi power domain, if DL_FLAG_RPM_ACTIVE flag is set when device link
binding, power domain will keep active after probe, but driver need to let
device into lp status when there is no camera streaming. So remove the flag
in driver.

Signed-off-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
2020-04-08 10:34:11 +08:00
Guoniu.zhou 65da06452e MLK-23750-1: irqchip: imx: fix ISI_0, CSI_0 can't enter lp when suspend
For multi power domain, if DL_FLAG_RPM_ACTIVE flag is set when device link
binding, power domain will keep active after probe, but driver need to let
device into lp status when there is no camera streaming. So remove the flag
in driver.

Signed-off-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
2020-04-08 10:34:02 +08:00
Fugang Duan 1b98a50887 MLK-17290-01 irqchip: imx-irqsteer: add runtime pm support
Add runtime pm to manage irqsteer clock and its power domain in system
idle and suspend status to save power.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
(cherry picked and merged from commit 6c861656225d3b2407b5e7630106a7fd7fab119d)
2020-04-08 10:32:44 +08:00
Iuliana Prodan d66c6d6af8 crypto: tls - fix logical-not-parentheses compile warning
Fix the following warning:

crypto/testmgr.c: In function ‘__test_tls’:
crypto/testmgr.c:2648:12: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
   if (!ret == template[i].fail) {
            ^~

Fixes: 8abdaaeda43 ("crypto: add support for TLS 1.0 record encryption")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Valentin Ciocoi R?dulescu <valentin.ciocoi@nxp.com>
2020-04-07 11:13:12 +03:00
Zhang Peng 92d77a4619 MLK-23701-3 ASoc: fsl: Fill pcm_io_frames and sampling_rate
Get samplerate and consumed data from dsp when call
snd_compr_ops.pointer.

Signed-off-by: Zhang Peng <peng_zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Zhang Peng d235be4b28 MLK-23701-2 ASoc:fsl: Add support cplay in mp board
1. Add clk necessary in dsp driver
2. Add renderer type for select sai or esai

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Zhang Peng 5e9570b387 MLK-23701-1 Asoc:fsl: Add to choose codec depend on dtb
Before fixed codec name cs42888, now also support wm8960 codec,
thus add to choose set codec name depend on enabled codec.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Zhang Peng 262a3a287c MLK-23701-0 dts: Add imx8mp-evk-dsp.dts and property audio-interface
Add property audio-interface for set sai or esai.
Add imx8mp-evk-dsp.dts for supporting cplay in mp board.

Signed-off-by: Zhang Peng <peng_zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Horia Geantă cb5d1adf91 clk: imx8mn: fix compile warning
Fix the following warning:

drivers/clk/imx/clk-imx8mn.c: In function 'imx8mn_clocks_probe':
drivers/clk/imx/clk-imx8mn.c:609:29: warning: assignment from incompatible pointer type
  clks[IMX8MN_CLK_SNVS_ROOT] = imx_clk_hw_gate4("snvs_root_clk", "ipg_root", base + 0x4470, 0);
                             ^

Fixes: d6f385583c ("clk: imx8mn: add SNVS clock to clock tree")
Reported-by: Anthony Toubeau <anthony.toubeau@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
2020-04-03 14:41:52 +03:00
Horia Geantă efdd9963ce arm64: dts: imx8mn: add clock for snvs rtc node
Initial commit adding imx8mn support:
6c3debcbae ("arm64: dts: freescale: Add i.MX8MN dtsi support")
added the "clock-names" property for the snvs rtc node,
however it missed adding the clock.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 42ef961b24)
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2020-04-03 13:01:27 +03:00
Horia Geantă d6f385583c clk: imx8mn: add SNVS clock to clock tree
i.mx8mn has support for clock gating the snvs module.
Add it into clock tree so that rtc-snvs driver could use it.

Note this will also be required in the snvs_pwrkey driver,
once support for clock management will be added.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit 16e71d4da7)
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2020-04-03 13:01:09 +03:00
Horia Geantă 1b26812ef8 dt-bindings: clock: imx8mn: add SNVS clock
Add macro for the SNVS clock of the i.MX8MN.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
(cherry picked from commit d2d46dfaa7)
[changed clock id]
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2020-04-03 12:59:47 +03:00
Li Jun 830b9a9021 MLK-23735 usb: dwc3: imx8mp: request high bus for runtime PM
We need request high bus for USB data transfer, add it in runtime
PM.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2020-04-03 12:39:24 +08:00
Viorel Suman 2513444554 MLK-23732: fsl_xcvr: implement eARC RX fallback mode
There are 2 configurable options for eARC RX fallback
to ARC mode: "ARC single ended" or "ARC common".
Add amixer control in order to allow setting it
from userspace.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-02 11:57:02 +03:00
Viorel Suman ca5fccb261 MLK-23734: ASoC: fsl_xcvr: remove sample bits constraint
Sample bits constraint is meaningless given that the only
supported format is SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-02 11:35:18 +03:00
Robert Chiras 5162671ac9 MLK-23703: arm64/dts: imx8qxp: Add rpmsg support for rm67191
Add new dts file to support the rpmsg dts for the dsi-rm67191 use-case.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2020-04-02 10:29:35 +03:00