1
0
Fork 0
Commit Graph

721109 Commits (1c21a146dc8d0fd03068f503c9ec5ca575c882b1)

Author SHA1 Message Date
Ranjani Vaidyanathan 1c21a146dc MLK-20222-1 soc: 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>
2018-11-02 17:21:17 -05:00
Cosmin-Gabriel Samoila 9f8cf447d1 MLK-20100 sound: asoc: make hwvad work after system suspend/resume
Implemented system suspend resume functions to call hwvad enable/disable
then do runtime_force_suspend/resume.
Since hwvad can run independently, when user calls enable/disable, we
will have to increment/decrement usage counter by calling
runtime_*_sync but to avoid doing this when disable/enable is called
from system_suspend/resume since we called pm_runtime functions - this
is why we have added the sync parameter in enable/disable_hwvad.
However, we ignore the busy flag because the module wasn't designed to
work with arecord and hwvad in parralel and we only print a warning.
Since hwvad and recording share the same clock and initialization
procedures require module to be disabled, the busy flag will be set
when having both features enabled.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-02 18:21:19 +02:00
Daniel Baluta 8964b2b0e5 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>
2018-11-02 18:09:16 +02:00
Franck LENORMAND 49f5f3d185 MLK-20109: drivers: crypto: Do not register ARC4 for imx8qxp and imx8qm
The alogrithm ecb(arc4) was registered by the CAAM for all
the platforms however the hardware capability for this algo
is no more present (No CHA).
So we skip its registration.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
2018-11-02 14:50:53 +01:00
Cedric Neveux 0a569abd8b MLK-20023 Move Busfreq support to OPTEE OS
- When OPTEE OS is present and if it support the busfreq
    for the running the i.MX, the busfreq is executed in
    the OPTEE OS by calling a specific SMC function
  - Only a WFE function is copied into the OCRAM to
    synchronize all Cores in multi-core devices
  - OPTEE OS add a DT property 'busfreq=1' in the 'firmware/optee'
    node to indicate the busfreq support

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
2018-11-02 14:40:12 +01:00
Haibo Chen 991da5db50 MLK-20185 ARM64: dts: fsl-imx8qxp-mek: chagne the usdhc io drive strength to low
According to Hardware test result, when config the usdhc pad io drive
strength to high, there are some overshoot on the clock/data signal
when sd/emmc work at SDR104/HS400/HS200 mode. When change the usdhc
data/cmd/clk pad io strength to low, can't see any overshoot, and
data transfer can also work well and pass the stress test.

So change all the usdhc pad io drive strength to low.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2018-11-02 19:27:50 +08:00
Shengjiu Wang c27861d9bc MLK-20183-3: ARM64: dts: support more sample rate for hdmi on imx8mq
support more sample rate for hdmi on imx8mq

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-02 19:16:53 +08:00
Shengjiu Wang e8401a450c MLK-20183-2: ASoC: imx-cdnhdmi: reconfigure the mclk for HDMI on imx8mq
In order to support 44kHz and 48kHz sample rate together, we need to
reconfigure the parent clock of mclk.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-02 19:16:53 +08:00
Shengjiu Wang 8e510f8f4c MLK-20183-1: ARM64: dts:remove the workaround for HDMI on imx8qm A0
Revert "MLK-17344-2: ARM64: dts: add constraint-rate for hdmi of imx8qm"

This reverts commit 86dbbb61cf.
On imx8qm B0 fix the DPLL jitter issue for HDMI module, so the constraint
for sample rate should be removed

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-02 19:16:53 +08:00
Guoniu.Zhou e3ee6d17c7 MLK-20123-3: camera: add automatic selection mode for ov10635
There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for ov10635 camera sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 21680ebeebbd2deb0430e0e2df82e3b5ec95c08d)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou 5eee4c34f6 MLK-20123-2: camera: add automatic selection mode for parallel ov5640
There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for parallel interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 8eb46dab84dd589ba0e6f997e28fa9ff3bbbcd63)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou 1690e493d3 MLK-20123-1: camera: add automatic selection mode for mipi ov5640
There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for mipi interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4c560890906f7df33e68a65372f60778cb1406b7)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou e32c1ce189 MLK-20046-2: ISI: add YUV444M format support
add YUV444M format support

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e424d16926d0320b31850bdd293e77c164a80661)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou 9121d3816c MLK-20046-1: ISI: correct RGB24 and BGR24 format configuration
According to V4L2 doc, RGB24 and BGR24 should have three bytes
for each pixel rather than four, so correct it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 3694f7ffe2443d86ae740f12393edc007c997a98)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou 6343424bab MLK-20014: ISI: initialize SCL_IMG_CFG to source image width and height
Initialize SCL_IMG_CFG to source image width and height when
scale disabled

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 506b32bb9ad6a3f596510e401b0e8fa16ca8b659)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou d299073c05 MMFMWK-8296: ISI: return error code when user try to do upscale
Return error code when user try to do upscale since isi don't support.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 59949e29dcd996c50cae43bc5ff3f89907761c1b)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou e85213feec MMFMWK-8297: ISI: return error when ISI chan0 is busy
When ISI channel0 is used to recevice camera data, it can
not be used to mem2mem. So return -EBUSY error code when
user try to use them at the same time.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit c6d5bf866819deaaf4900ae47d575c5a36d30a66)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou cf1c9d340e MLK-19957-2: ISI: remove hardware reset for isi
Power off some resource of ISI can't really hardware reset
ISI, because all eight ISI channels share one hardware reset.
For example, if we enable ISI channel 0 and 1 in dts and only
power off and on channel0 domain, it will not really reset and
the value of channel0 register will not change.

Hardware reset was introduced for fixing ISI can't receive data
from CI_PI after system boot in QXP A0 and this is fixed in new
version QXP B0, so remove HW reset in driver.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit df9da83f82c94ca578303b45c60fb17da2d9d1aa)
2018-11-02 19:02:18 +08:00
Guoniu.Zhou d1cec5b38c MLK-19957-1: ISI: clean isi status before enable interrupt
Because ISI can't restore to default state after software
reset, the status value of exit will be maintained. If not
cleared, ISI will triggle fake interrupt after enableing irq,
but there is not ready for data.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 932af3df1745f5afb0b9433d3355b2e24b177f4e)
2018-11-02 19:02:18 +08:00
Li Jun 3b41f3a86a MLK-20177-3 usb: chipidea: imx: disable stream mode for imx8mm
Add CI_HDRC_DISABLE_DEVICE_STREAMING flag for iMX8mm usb device mode.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2018-11-02 18:33:25 +08:00
Li Jun b7a928d8b1 MLK-20177-2 arm64: dts: imx8mm: use dedicate compatible string for usb
Use "fsl, imx8mm-usb" for imx8mm usb controller driver.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2018-11-02 18:33:25 +08:00
Li Jun acd9ccfa34 MLK-20177-1 doc: dts: ci-hdrc-usb2: add imx8mm compatible string
Add "fsl,imx8mm-usb" compatible string.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2018-11-02 18:33:25 +08:00
Haibo Chen ee475245cd MLK-20184 input: focaltech_touch: use disable_irq_nosync() in spin lock context
according to the function disable_irq() description, use disable_irq() in
spin lock context may cause deadlock. So change to use disable_irq_nosync().

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2018-11-02 18:44:36 +08:00
Bai Ping 37f9a3fdb4 MLK-20175 ARM64: dts: freescale: Correct the pmu interrupt parent of i.mx8mq/mm
The PMU's interrupt is PPI. Correct the pmu interrupt parent of i.MX8MQ/MM.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-11-02 18:27:28 +08:00
Bai Ping e8eee552c9 MLK-20136-03 driver: soc: imx: add 100mts support for imx8mq low bus mode
The 100MTS low bus mode can be only supported by i.MX8MQ Rev2.1 and
future TO. So necessary check is added to identify the chip revision
when doing busfreq mode switch.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-11-02 18:27:24 +08:00
Bai Ping e59e354f65 MLK-20136-02 driver: clk: imx: keep DRAM PLL always on for i.MX8MQ
Keep the DRAM PLL always on by default on i.MX8MQ.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-11-02 18:27:19 +08:00
Bai Ping 7c7aef4d88 MLK-20136-01 ARM64: dts: freescale: Update the dram pll clock index of imx8mq busfreq
Update the dram pll clock index for i.MX8MQ busfreq node.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-11-02 18:27:12 +08:00
ming_qian f7c2021d47 MLK-20179:VPU Encoder:driver may crash when frame size bigger than buffer size
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:42:53 +08:00
ming_qian 83696fa3b7 MLK-20176:VPU Encoder:adjust the maximum frame rate limit to 120
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:42:37 +08:00
ming_qian 08fa9e557d MLK-20178:VPU Encoder:record the latency time
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:42:29 +08:00
ming_qian 6d3064fe3d MLK-20156:VPU Encoder:try to remove redundant eos tag data
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:42:17 +08:00
ming_qian aa2c5c979d MLK-20153:VPU Encoder:add debug info for firmware exception event
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:42:10 +08:00
ming_qian 09fd50776c MLK-20143:VPU Encoder:support suspend of devices mode
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:42:04 +08:00
ming_qian 054b6a6ee5 MLK-20138:VPU Encoder:implement reset to restore firmware from exceptional state
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 17:35:01 +08:00
Peter Chen f294866e53 MLK-20158-3 usb: phy: mxs: add wakeup enable for imx7ulp
This wakeup setting can enable USB wakeup function even the
controller's power is lost, and both A7 and M4 are in VLLS mode.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-11-02 16:42:09 +08:00
Peter Chen bdd5bc98ae MLK-20158-2 ARM: dts: imx7ulp-evk: add pinctrl for "sleep" state
After commit 2911e974c8 ("MLK-19098 ARM: dts: imx7ulp-evk: use OTG
ID function instead of GPIO") , the ID pinctrl is set by chipidea
driver, so we need to restore its setting after system resume
due to pinctrl setting is lost at VLLS state.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-11-02 16:42:09 +08:00
Peter Chen a52fedcf87 MLK-20158-1 usb: chipidea: ci_hdrc_imx: restore pinctrl
The pinctrl setting may lost during the system suspend
(eg, imx7ulp), we need to restore it after system resume.
Meanwhile, some platforms may need to set special pinctrl
for power comsumption.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-11-02 16:42:08 +08:00
Li Jun 75fc02b7d6 MLK-20105 staging: typec: tcpm: keep non-PD session for no GoodCRC
In case of vbus_never_low, if source setup a typye-c only session, sink
time out on waiting for source capability message and send soft reset,
the source does not response by goodcrc for the soft reset message, we
don't do hard reset, but keep a non-PD typec session, because the source
maybe PD capable, this hard reset will make the source terminate the
session by turn off vbus, if this type-c port is the system power supply,
the whole system will reboot.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2018-11-02 15:07:21 +08:00
Richard Zhu eafdf0d85b MLK-20125 ata: imx: add one ext_osc parameter for imx8qm ahci
Add one parameter to distinguish the different ref_clk
source, internal pll or the external osc.
NOTE: The value of the ext_osc should be aligned to the one
of the pcie's, since both of them share one ref_clk source.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-11-02 14:46:47 +08:00
Clark Wang 55404c622a MLK-20113 spi: ecspi: add pio spi slave mode for imx6ul
Add pio spi slave mode support for imx6ul which is based on the patch
cherry-pick from community(71abd29057).

Because the original imx6ul is bound to mx51 in the dts file.
However, in the slave mode, the patch in the community only adds two
functions mx53_ecspi_rx_slave/mx53_ecspi_tx_slave. Therefore, configure
mx51/6ul to use these two functions for data transmission and reception
in slave mode.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
2018-11-02 10:56:34 +08:00
jiada wang 4773435e95 spi: imx: Add support for SPI Slave mode
Previously i.MX SPI controller only works in Master mode.
This patch adds support to i.MX51, i.MX53 and i.MX6 ECSPI
controller to work also in Slave mode.

Currently SPI Slave mode support patch has the following limitations:
1. The stale data in RXFIFO will be dropped when the Slave does any new
   transfer.
2. One transfer can be finished only after all transfer->len data been
   transferred to master device
3. Slave device only accepts transfer->len data. Any data longer than this
   from master device will be dropped. Any data shorter than this from
   master will cause SPI to stuck due to mentioned HW limitation 2.
4. Only PIO transfer is supported in Slave mode.
5. Dynamic burst size adjust isn't supported in Slave mode.

Following HW limitation applies:
1.  ECSPI has a HW issue when works in Slave mode, after 64
    words written to TXFIFO, even TXFIFO becomes empty,
    ECSPI_TXDATA keeps shift out the last word data,
    so we have to disable ECSPI when in slave mode after the
    transfer completes
2.  Due to Freescale errata ERR003775 "eCSPI: Burst completion by Chip
    Select (SS) signal in Slave mode is not functional" burst size must
    be set exactly to the size of the transfer. This limit SPI transaction
    with maximum 2^12 bits. This errata affects i.MX53 and i.MX6 ECSPI
    controllers.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-02 10:46:14 +08:00
Clark Wang 4d64686567 MLK-20165-3 dtsi: imx8mm: Add dmas and dma-names for ecspi1~3
Add the missing attribute dmas and dma-names for ecspi1~3 to fix the
following error log.
LOG: spi_imx 30820000.ecspi: dma setup error -19, use pio

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2018-11-02 09:24:56 +08:00
Clark Wang fd873fdab9 MLK-20165-2 imx8mm_ddr3l_val: Add SPI NOR support
iMX8MM DDR3L validation board uses FPGA to link with SPI NOR flash with
ECSPI1. Add pin configurations and ecspi1 node to enable ECSPI1 to access
SPI NOR.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2018-11-02 09:24:55 +08:00
Clark Wang da2f02e304 MLK-20165-1 mtd: spi-nor: Add flash id for GD25LQ16
iMX8MM DDR3L validation board uses GD25LQ16 as spi-nor chip, but its
id is incorrect in ids table, so add a new id and parameters with the
same name into the ids table. For the same name of the chip info, the
log following we can ignore.

LOG: m25p80 spi0.0: found gd25q16, expected gd25q16

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
2018-11-02 09:24:55 +08:00
ming_qian 28f77a2772 MLK-20128:VPU Encoder:fix rpc memory may overlay for qm
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-02 09:18:50 +08:00
Han Xu a94e8154cd MLK-20171: mtd: flexspi: reset flexspi FLASHxCR2 registers during probe
Flexspi registers cannot be reset to default value, reset all FLASHxCR2
registers to 0 to avoid read data with invalid LUT commands.

Signed-off-by: Han Xu <han.xu@nxp.com>
2018-11-01 15:18:49 -05:00
Han Xu 26fbb4b05d MLK-20170: mtd: flexspi: change the flexspi dummy pad settings
The dummy pad settings should be align with data access mode, such as
set to PAD4 for all Quad read.

Signed-off-by: Han Xu <han.xu@nxp.com>
2018-11-01 15:18:49 -05:00
Huang Chaofan 361b93146c MLK-20047: [i.MX8QXP/VPU]: Add more formats support in unit test
Add a new custom ctrl to support more formats in unit test

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
2018-11-01 18:29:35 +08:00
Huang Chaofan 2495007f9e MLK-20149 VPU: Adjust suspend and resume strategy for vpu decoder
Adjust suspend and resume strategy for vpu decoder to handle different
cases

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
2018-11-01 18:29:35 +08:00
Fancy Fang bd59eba710 MLK-20137-2 ARM64: dts: imx8mm-ddr4-evk: add support for panel RM67191
Create a new dts 'fsl-imx8mm-ddr4-evk-rm67191.dts' to support
panel 'RM67191' display which is attached to DSIM controller
directly on IMX8MM DDR4 board to avoid conflict with ADV7535
display.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-11-01 11:09:05 +08:00