1
0
Fork 0
Commit Graph

95 Commits (redonkable)

Author SHA1 Message Date
Andrey Zhizhikin ee7b6ad15b This is the 5.4.67 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl9rJlYACgkQONu9yGCS
 aT6WbRAAga6QVKrO6R4NeKk0fPqKQQoQeTK+phBOFA7jAoX/rIRKyob2Si9BwhBA
 F77vZ6HIZ7+e/o35JJQYQbffbHYs0ANuS1oHGqe0vgbh+72Viaan6g7lFOhpx8qf
 y0YS7q+hw4WLZB0gGlBM7nkPXRiis32IrEVabQW+t8hmT2lWyutY8E2yFAU60tvI
 Tvjm2c2pvHEcHz9MrjEd/jIVxMFnIl42FBTx9bGsbDUCDzBwEvPArS4bNioP7EFJ
 O+rrGCNvwtiv0DuKzX1UIZzQ88IROmU3ZjsIlgOwla7xJWv4QDgmPfyAyRI48QhH
 PAZQmSntz+y+MP6B3z3ZBrxc2Fx0kCDtugn2P9+2RVUEpheANJ293vUgYTKN9Roy
 dHdWHFWNTO9IYpIN0cZjc25db4ULdjerWQrKcCr6ZO8+Ep/0mSzx3lkWjfuUP8Hr
 L2RD6rAm259OpPq8xhAcJpJvoQLwGxaBHyr4QYUmRgmNVURoqe9Q0MTZuiyGsXhm
 rtcNky9WvmyyI1lJgXi4A+vmsIThCHEstEMycgTejfJ4itIVA9e1ctJVVomWULCn
 9oNStBJpmHw0myDCohbKNjeO1UX/erdF9NaoGto5bnfIhcSae1YQEjRB8zKmzbg1
 DpgC1f7IZ7q53vfrDGsAjInOcuEwAn/Y5JMLJOL4mdA9j3XlX2o=
 =Ot99
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.67' into 5.4-2.2.x-imx

This is the 5.4.67 stable release

This updates the kernel present in the NXP release imx_5.4.47_2.2.0 to the
latest patchset available from stable korg.

Base stable kernel version present in the NXP BSP release is v5.4.47.

Following conflicts were recorded and resolved:
- arch/arm/mach-imx/pm-imx6.c
NXP version has a different PM vectoring scheme, where the IRAM bottom
half (8k) is used to store IRAM code and pm_info. Keep this version to
be compatible with NXP PM implementation.

- arch/arm64/boot/dts/freescale/imx8mm-evk.dts
- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
NXP patches kept to provide proper LDO setup:
imx8mm-evk.dts: 975d8ab07267ded741c4c5d7500e524c85ab40d3
imx8mn-ddr4-evk.dts: e8e35fd0e759965809f3dca5979a908a09286198

- drivers/crypto/caam/caamalg.c
Keep NXP version, as it already covers the functionality for the
upstream patch [d6bbd4eea2]

- drivers/gpu/drm/imx/dw_hdmi-imx.c
- drivers/gpu/drm/imx/imx-ldb.c
- drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
Port changes from upstream commit [1a27987101], which extends
component lifetime by moving drm structures allocation/free from
bind() to probe().

- drivers/gpu/drm/imx/imx-ldb.c
Merge patch [1752ab50e8] from upstream to disable both LVDS channels
when Enoder is disabled

- drivers/mmc/host/sdhci-esdhc-imx.c
Fix merge fuzz produced by [6534c897fd].

- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
Commit d1a00c9bb1 from upstream solves the issue with improper error
reporting when qdisc type support is absent. Upstream version is merged
into NXP implementation.

- drivers/net/ethernet/freescale/enetc/enetc.c
Commit [ce06fcb6a6] from upstream merged,
base NXP version kept

- drivers/net/ethernet/freescale/enetc/enetc_pf.c
Commit [e8b86b4d87] from upstream solves
the kernel panic in case if probing fails. NXP has a clean-up logic
implemented different, where the MDIO remove would be invoked in any
failure case. Keep the NXP logic in place.

- drivers/thermal/imx_thermal.c
Upstream patch [9025a5589c] adds missing
of_node_put call, NXP version has been adapted to accommodate this patch
into the code.

- drivers/usb/cdns3/ep0.c
Manual merge of commit [be8df02707] from
upstream to protect cdns3_check_new_setup

- drivers/xen/swiotlb-xen.c
Port upstream commit cca58a1669 to NXP tree, manual hunk was
resolved during merge.

- sound/soc/fsl/fsl_esai.c
Commit [53057bd4ac] upstream addresses the problem of endless isr in
case if exception interrupt is enabled and tasklet is scheduled. Since
NXP implementation has tasklet removed with commit [2bbe95fe6c],
upstream fix does not match the main implementation, hence we keep the
NXP version here.

- sound/soc/fsl/fsl_sai.c
Apply patch [b8ae2bf5cc] from upstream, which uses FIFO watermark
mask macro.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2020-09-26 20:54:42 +00:00
Fugang Duan 26d7d2827d MLK-24486-02 imx: scu-pd: add lpuart4 power domain for imx8qm
Add lpuart4 power domain for imx8qm.

Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-08-13 16:54:51 +08:00
Wei Yongjun ad7f78b7ce firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
[ Upstream commit 89f12d6509 ]

'chan_name' is malloced in imx_scu_probe() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.

Fixes: edbee095fa ("firmware: imx: add SCU firmware driver support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:30 +02:00
Jason Liu 5691e22711 Merge tag 'v5.4.47' into imx_5.4.y
* tag 'v5.4.47': (2193 commits)
  Linux 5.4.47
  KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
  KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
  ...

 Conflicts:
	arch/arm/boot/dts/imx6qdl.dtsi
	arch/arm/mach-imx/Kconfig
	arch/arm/mach-imx/common.h
	arch/arm/mach-imx/suspend-imx6.S
	arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
	arch/powerpc/include/asm/cacheflush.h
	drivers/cpufreq/imx6q-cpufreq.c
	drivers/dma/imx-sdma.c
	drivers/edac/synopsys_edac.c
	drivers/firmware/imx/imx-scu.c
	drivers/net/ethernet/freescale/fec.h
	drivers/net/ethernet/freescale/fec_main.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
	drivers/net/phy/phy_device.c
	drivers/perf/fsl_imx8_ddr_perf.c
	drivers/usb/cdns3/gadget.c
	drivers/usb/dwc3/gadget.c
	include/uapi/linux/dma-buf.h

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
2020-06-19 17:32:49 +08:00
Franck LENORMAND 0070e73c9e firmware: imx: scu: Fix corruption of header
[ Upstream commit f5f27b79ea ]

The header of the message to send can be changed if the
response is longer than the request:
 - 1st word, the header is sent
 - the remaining words of the message are sent
 - the response is received asynchronously during the
   execution of the loop, changing the size field in
   the header
 - the for loop test the termination condition using
   the corrupted header

It is the case for the API build_info which has just a
header as request but 3 words in response.

This issue is fixed storing the header locally instead of
using a pointer on it.

Fixes: edbee095fa (firmware: imx: add SCU firmware driver support)

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Cc: stable@vger.kernel.org
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-17 16:40:31 +02:00
Peng Fan a1fd068c89 firmware: imx-scu: Support one TX and one RX
[ Upstream commit f25a066d1a ]

Current imx-scu requires four TX and four RX to communicate with
SCU. This is low efficient and causes lots of mailbox interrupts.

With imx-mailbox driver could support one TX to use all four transmit
registers and one RX to use all four receive registers, imx-scu
could use one TX and one RX.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-17 16:40:31 +02:00
Leonard Crestez da24a76bdc firmware: imx: warn on unexpected RX
[ Upstream commit cf0fd40445 ]

The imx_scu_call_rpc function returns the result inside the
same "msg" struct containing the transmitted message. This is
implemented by holding a pointer to msg (which is usually on the stack)
in sc_imx_rpc and writing to it from imx_scu_rx_callback.

This means that if the have_resp parameter is incorrect or SCU sends an
unexpected response for any reason the most likely result is kernel stack
corruption.

Fix this by only setting sc_imx_rpc.msg for the duration of the
imx_scu_call_rpc call and warning in imx_scu_rx_callback if unset.

Print the unexpected response data to help debugging.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-17 16:40:31 +02:00
Daniel Baluta 798bd66a9c MLK-24263-3 firmware: imx-dsp: Export functions to request/free channels
In order to save power, we only need to request a channel
when the communication with the DSP active.

For this we export the following functions:
	- imx_dsp_request_channel, gets a channel with a given index
	- imx_dsp_free_channel, frees a channel with a given index

Notice that we still request channels at probe to support devices
that do not have PM callbacks implemented yet.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-06-11 16:50:22 +03:00
Daniel Baluta 02e7ef1deb MLK-24263-2 firmware: imx: Save channel name for further use
We want to request / free channels on demand later in order
to save power.

For this for each channel we save the name and use it to
reference the channel later.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-06-11 16:50:22 +03:00
Daniel Baluta 475354ab84 MLK-24263-1 firmware: imx: Introduce imx_dsp_setup_channels
This will factor out the code that sets up the mailbox channels
so that we can use it later.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-06-11 16:50:22 +03:00
Hugo Dupras 80438c2b52 HSM-292 firmware: imx: seco_mu: Increase MAX_DATA_SIZE_PER_USER
For AES CMAC, the max supported message length is (2^16)-1. In order to
support this type of message the MAX_DATA_SIZE_PER_USER must be
increased to bigger value, in order to contains the message header and
the entire message data

Signed-off-by: Hugo Dupras <hugo.dupras@nxp.com>
Reviewed-by: Stéphane Dion <stephane.dion_1@nxp.com>
2020-05-30 03:43:21 +02:00
Robert Chiras 57c96ce6a7 LF-811-3: firmware: imx: add lcd-pll power domain
Add te missing IMX_SC_R_ELCDIF_PLL id to power domain ranges.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2020-05-22 11:10:40 +03:00
Alice Guo 704b9cbd87 MLK-24064-1: firmware: imx: scu-pd: add power domains for lpuart
Add power domains for lpuart in ARM Cortex-M4 (CM4) Subsystem.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-05-22 01:29:03 +08:00
Franck LENORMAND 5258913894 HSM-267-1: fw: imx: seco_mu: Handle error code in mailbox rx callback
It is possible the mailbox framework returns an error code
if there was an issue when receiving a message.

This patch adds the handling of such exception.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
2020-04-24 11:46:09 +02:00
Franck LENORMAND 87bcafe692 MLK-23635: fw: imx: seco_mu: Fix messages at boot
At boot, the driver can print error messages because it has been
deferred so they should not be printed.
The driver also prints the version of the SECO which is not useful.

This patch fixes the print of messages due to defer and remove the
print of the SECO version.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
2020-04-23 16:19:02 +02:00
Stéphane Dion 56d318d214 MLK-23674-3 fw: imx: seco_mu: get message header tags from dt
In order for a message sent to a V2X MU, the value indication the
type of the message chagne for each MU addressed.

This patch adds the read of the values from the device tree or
uses the default values which works with SECO MU.

Signed-off-by: Stéphane Dion <stephane.dion_1@nxp.com>
2020-04-22 15:56:40 +02:00
Stéphane Dion 0f8db28dee MLK-23674-1 imx: scu-pd: add V2X MU resources
Add the ID of the resources for the V2X MUs in order
for the MU to be powered up.

Signed-off-by: Stéphane Dion <stephane.dion_1@nxp.com>
2020-04-22 15:56:40 +02: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
Franck LENORMAND 16338e4fe9 SSI-87: firmware: imx: scu: Support reception of message of any size
The word of a message can arrive in any order and the current driver
cannot receive more than 4-word message.

As the message can arrive in any order, the position where they
should be stored is stored in the sc_chan struct:
 - initialized at the index of the MU slot
 - incremented each time after a new word is stored

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-03-30 15:52:49 +02:00
Franck LENORMAND 2ccb9a596a SSI-87: firmware: imx: Add APIs required for secvio
The Security Violation module requires SC API for the SECO, RM, MISC
and IRQ.

This patch does:
 - imx-scu-irq: Allow reuse of imx_scu_irq_get_status
 - seco:
    - Add imx_sc_seco_secvio_enable
    - Add imx_sc_seco_secvio_config
    - Add imx_sc_seco_secvio_dgo_config

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-03-13 17:11:58 +01:00
Franck LENORMAND ccf07c0822 SSI-87: firmware: imx: scu: Support reception of any size message
The implementation was limiting the size of a message which can be
received to 4 but soem response can be bigger. For example the
response of the 'sc_seco_secvio_config' API is 6 words.

This patch removes this limitation relying on the count of word
received instead of the index of the chan.
It does so by duplicating imx_scu_call_rpc as imx_scu_call_big_rpc
in order to cahnge the RX method using imx_scu_big_rx_callback
instead of imx_scu_rx_callback.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-03-13 17:11:58 +01:00
Leonard Crestez 30eb1ea78a firmware: imx: Align imx_sc_msg_req_cpu_start to 4
commit f5bfeff446 upstream.

The imx SC api strongly assumes that messages are composed out of
4-bytes words but some of our message structs have odd sizeofs.

This produces many oopses with CONFIG_KASAN=y.

Fix by marking with __aligned(4).

Fixes: d90bf296ae ("firmware: imx: Add support to start/stop a CPU")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:28 +01:00
Leonard Crestez a3bede27ca firmware: imx: scu-pd: Align imx sc msg structs to 4
commit 7c1a1c814c upstream.

The imx SC api strongly assumes that messages are composed out of
4-bytes words but some of our message structs have odd sizeofs.

This produces many oopses with CONFIG_KASAN=y.

Fix by marking with __aligned(4).

Fixes: c800cd7824 ("firmware: imx: add SCU power domain driver")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:28 +01:00
Leonard Crestez 1bebf41fb8 firmware: imx: misc: Align imx sc msg structs to 4
commit 1e6a4eba69 upstream.

The imx SC api strongly assumes that messages are composed out of
4-bytes words but some of our message structs have odd sizeofs.

This produces many oopses with CONFIG_KASAN=y:

    BUG: KASAN: stack-out-of-bounds in imx_mu_send_data+0x108/0x1f0

It shouldn't cause an issues in normal use because these structs are
always allocated on the stack.

Fixes: 15e1f2bc8b ("firmware: imx: add misc svc support")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:28 +01:00
Leonard Crestez 3227ecd0ef firmware: imx: scu: Ensure sequential TX
commit 26d0fba29c upstream.

SCU requires that all messages words are written sequentially but linux MU
driver implements multiple independent channels for each register so ordering
between different channels must be ensured by SCU API interface.

Wait for tx_done before every send to ensure that no queueing happens at the
mailbox channel level.

Fixes: edbee095fa ("firmware: imx: add SCU firmware driver support")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by:: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:17 +01:00
Franck LENORMAND da897c095b MLK-23421: fw: imx: seco_mu: Use fast IPC
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-03-12 09:29:51 +01:00
Bing Song cfec9f5224 MLK-23394-4: pd: Add XUVI for i.MX8QM.
Add XUVI for i.MX8QM.

Signed-off-by: Bing Song <bing.song@nxp.com>
Reviewed-by: Jian Li <jian.li@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
2020-03-05 08:16:44 +08:00
Joakim Zhang 5604fcd429 MLK-23418-5 firmware: imx: scu-pd: add Perf power domain in DB
Add Perf power domain in DB SS.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2020-03-04 09:06:05 +08:00
Leonard Crestez 42c2753d88 LF-976 firmware: imx: scu: Ensure sequential TX
SCU requires that all messages words are written sequentially but linux MU
driver implements multiple independent channels for each register so ordering
between different channels must be ensured by SCU API interface.

Wait for tx_done before every send to ensure that no queueing happens at the
mailbox channel level.

Reported-by: Franck LENORMAND <franck.lenormand@nxp.com>
Acked-by: Ye Li <ye.li@nxp.com>
[ Based on initial work from Franck LENORMAND <franck.lenormand@nxp.com> ]
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

(cherry picked from commit f7021eaa04ecb71b85ae8b653d673e44a7cbcfc4)
2020-02-26 04:17:47 +08:00
Franck LENORMAND 949e4a1475 LF-950 firmware: imx: scu: Fix corruption of header
The header of the message to send can be changed if the
response is longer than the request:
 - 1st word, the header is sent
 - the remaining words of the message are sent
 - the response is received asynchronously during the
   execution of the loop, changing the size field in
   the header
 - the for loop test the termination condition using
   the corrupted header

It is the case for the API build_info which has just a
header as request but 3 words in response.

This issue is fixed storing the header locally instead of
using a pointer on it.

Fixes: edbee095fa (firmware: imx: add SCU firmware driver support)

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
(cherry picked from commit fb0ad9322eb4477f30f41852bb8673b80a89a8d0)
2020-02-26 04:17:47 +08:00
Leonard Crestez e57cffefac LF-903 firmware: imx: Align imx SC msg structs to 4
The imx SC api strongly assumes that messages are composed out of
4-bytes words but some of our message structs have sizeof "6" and "7".

This produces many oopses with CONFIG_KASAN=y:

	BUG: KASAN: stack-out-of-bounds in imx_mu_send_data+0x108/0x1f0

It shouldn't cause an issues in normal use because these structs are
always allocated on the stack.

Also upstream: https://patchwork.kernel.org/patch/11376909/

Reported-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Jason Liu <jason.hui.liu@nxp.com>
Reviewed-by: Aisheng Dong <aisheng.dong@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
(cherry picked from commit 8ca6d9eb2725152404a5764fc8916f77ee82aa29)
2020-02-26 04:17:47 +08:00
Frank Li 87cbc83370 MLK-23346-1: DXL Add second USB PHY power domain
Add second USB PHY power domain

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
2020-02-21 13:58:06 -06:00
Daniel Baluta 9194cb7c75 firmware: imx: Remove call to devm_of_platform_populate
IMX DSP device is created by SOF layer. The current call to
devm_of_platform_populate is not needed and it doesn't produce
any effects.

Fixes: ffbf23d503 ("firmware: imx: Add DSP IPC protocol interface)
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-02-21 17:22:09 +02:00
Silvano di Ninno c334337d16 LF-824: fw: imx: seco_mu: Add driver for SECO
This patch adds the driver to interact with the different
APIs exposed by the SECO using a shared Messaging Unit.

The driver exposes some char devices in user space allowing
a user to send message to the SECO and read its response.

The driver uses the mailbox framework instead of directly
configuring the MU.

Signed-off-by: Stephane Dion <stephane.dion_1@nxp.com>
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>

(cherry picked from commit 4985109d60164c842ee5d189621455db349b5212)
(cherry picked from commit eb721810fdc309b6a32a7a64c7686eaa6052cdc7)
(cherry picked from commit 4956bbf43349ab40a6a60765752a904d11bfcd18)
2020-02-21 14:44:02 +01:00
Franck LENORMAND 7d01320dfc LF-824: fw: imx: Add power domain for MU of the SECO
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-02-21 14:44:02 +01:00
Franck LENORMAND 9edf1255f8 LF-824: fw: imx: scu: Add SECO API
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-02-21 14:44:02 +01:00
Franck LENORMAND 10237c7bcb LF-824: fw: imx: scu: Add missing APIs
APIs added:
 - IMX_SC_RM_FUNC_FIND_MEMREG
 - IMX_SC_RM_FUNC_GET_RESOURCE_OWNER
 - IMX_SC_RM_FUNC_SET_MEMREG_PERMISSIONS
 - IMX_SC_RM_FUNC_GET_DID

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2020-02-21 14:44:02 +01:00
Abel Vesa 228395b5e5 LF-794 firmware: imx: scu-pd: Remove the HDMI TX always on workaround
Now that the firmware reloading is implemented, we can let the HDMI
power off.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
2020-02-13 13:42:54 +02:00
Daniel Baluta bd9d813ca8 firmware: imx: Remove call to devm_of_platform_populate
[ Upstream commit 0e4e8cc30a ]

IMX DSP device is created by SOF layer. The current call to
devm_of_platform_populate is not needed and it doesn't produce
any effects.

Fixes: ffbf23d503 ("firmware: imx: Add DSP IPC protocol interface)
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-26 10:01:05 +01:00
Dong Aisheng 08dcfadc9a Merge branch 'pm/next' into next
* pm/next: (54 commits)
  drivers/soc/fsl: add EPU FSM configuration for deep sleep
  fsl_pmc: update device bindings
  soc: fsl: add RCPM driver
  Documentation: dt: binding: fsl: Add 'little-endian' and update Chassis define
  MLK-22992 firmware: imx: scu-pd: fix wu_num
  ...
2019-12-02 18:05:21 +08:00
Daniel Baluta 98885524c4 firmware: imx: Allow imx dsp to be selected as module
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-28 23:33:17 +02:00
Peng Fan b32c7c3b6a LF-202-4 firmware: imx: scu-pd: ignore power domain not owned
Should not register power domain that not owned by current
partition.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2019-11-28 10:25:13 +08:00
Peng Fan 5a5785a7c4 LF-202-2 firmware: imx: add resource management api
Add resource management API, when we have multiple
partition running together, resources not owned to current
partition should not be used.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2019-11-28 10:17:47 +08:00
Peng Fan 240ff35098 LF-202-1 firmware: imx: scu: use hvc for dom0
We use hvc to let xen handle the scfw api call for dom0.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2019-11-28 10:17:36 +08:00
Peng Fan c6ec2917a6 MLK-22992 firmware: imx: scu-pd: fix wu_num
wu_num needs to be int type, u32 is not correct.

When "wakeup-irq" not included, of_property_count_u32_elems
will return a negative value. So use int.

And directly return when "wakeup-irq" not exists.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-11-25 16:29:51 +08:00
Robin Gong 6b9ef3ceeb firmware: imx: scu-pd: correct edma0 channel number
32 channels are used for edma0 on i.mx8qxp/8qm. Correct it.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2019-11-25 16:29:50 +08:00
Shijie Qin a1f3b5741c imx: scu-pd: add vpu-enc1 power domains for imx8qm
Add power domains for 'IMX_SC_R_VPU_ENC_1'

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
2019-11-25 16:29:50 +08:00
Joakim Zhang 7c03849625 firmware: imx: pd: add board level power domain
Add power domain for board level on imx8qm mek.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2019-11-25 16:29:49 +08:00
Joakim Zhang 29aec5cb8b firmware: imx: pd: add power domain for emvsim
Add power domain for emvsim on imx8qm mek.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2019-11-25 16:29:49 +08:00
Mirela Rabulea aaaf06b9e9 imx: scu-pd: Add power domains for mxc-jpeg
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
2019-11-25 16:29:46 +08:00