summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2019-06-20SSI-73: crypto: caam - support for imx8mnIuliana Prodan
CAAM support for imx8mn is based on the existing imx8 support Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2019-06-20MLK-22043 VPU Decoder: add input frame speed limit for tsm_buffer_sizeShijie Qin
Add input frame speed limit for tsm_bufer_size, avoid to the number of timestamp exceed tsm_buffer_size then lead to TSM cache be emptied Signed-off-by: Shijie Qin <shijie.qin@nxp.com> Reviewed-by: ming_qian <ming.qian@nxp.com>
2019-06-20MLK-21399 irqchip: gic-v3: Rework the ERR11171 workaroundAbel Vesa
Instead of just raising irq0 for all the cores, we mask the irq0 for all the non-target cores, this way waking up only the core we want. All of this is done now in TF-A. Also, since this new workaround doesn't need the IOMUX_GPR1 register here in kernel, the IOMUX_GPR reg entry inside the gic dts node can be removed. In order for this to work, the following commit is needed in TF-A: 0e91ff59720d0756 ("MLK-21399 plat: imx8mq: gpc: Workaround for ERR11171") Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2019-06-20MLK-22037: VPU Decoder: the resolution of g_fmt may be incorrectming_qian
sometime firmware may report wrong sequence info, invalid resolution. getting and setting seqinfo may in the same time, it's a risk Signed-off-by: ming_qian <ming.qian@nxp.com> Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2019-06-19MLK-22049 imx8mm: fix audio pll settingPeng Fan
The AUDIO PLL max support 650M, so the original clk settings violate spec. In order not to impact audio functionality, let's div the clk by 2. Signed-off-by: Peng Fan <peng.fan@nxp.com> Tested-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit a4b0c7c3fadc7903cb14ba1e9376967adead93b1)
2019-06-18MLK-22031 VPU Decoder: sync firmware with cleaned up the RPC APIShijie Qin
sync firmware with cleaned up the RPC API Note: just changed name, not changed struct size Signed-off-by: Shijie Qin <shijie.qin@nxp.com> Reviewed-by: ming_qian <ming.qian@nxp.com>
2019-06-18MLK-22029:VPU Decoder: synchronize certain commands and eventsming_qian
Firmware requires that certain commands and events not be interrupted, but firmware didn't implement it, so it needs driver to ensure that they are sequenced correctly for the FW. Signed-off-by: ming_qian <ming.qian@nxp.com> Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2019-06-18MLK-21886-4: media: ov5640: add sensor driver support for imx815Guoniu.Zhou
Add sensor driver support for imx815 Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
2019-06-18MLK-21886-2: media: imx: Add imx815 platform supportGuoniu.Zhou
Add imx815 platform support in camera media device framework of imx8qxp/qm. Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
2019-06-18MLK-21886-1: media: imx: add driver for mipi csi2 controller of SAMSUNGGuoniu.Zhou
Add driver for mipi csi2 controller of SAMSUNG Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
2019-06-14MLK-22006: VPU Decoder: support to find certain pattern from input dataming_qian
Sometimes for debug, we want to check the input data whether include certain pattern, for example, the sequence header. Driver implement this feature for debug Fix some typo. Signed-off-by: ming_qian <ming.qian@nxp.com> Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2019-06-12MLK-21978: mxc-jpeg: Jpeg encoder produces RGB images with distorted coloursMirela Rabulea
Use APP14 marker instead of APP0 marker, for RGB encoding, jpeg viewers manage to display the colours this way. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> (cherry picked from commit e4f4f5d22a6c5fe830ea80ec44c306bf126fa240)
2019-06-12MLK-21977: mxc-jpeg: Add sw workaround for jpeg decoder compID limitationMirela Rabulea
The hardware only supports component IDs between 0-3 or 1-4. Patch the unsupported component IDs in the input jpeg stream, before giving it to the CAST-IP jpeg decoder. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com> (cherry picked from commit 54ee9e094b9766030115ed00b9c3c1c664be4f59)
2019-06-12MA-14966 VPU Decoder: check remaining buffer size before copyShijie Qin
check remaining buffer size before copy input buffer to ring buffer, avoid to copy length longer than remaining buffer size then lead to memory crossover Signed-off-by: Shijie Qin <shijie.qin@nxp.com> Reviewed-by: ming_qian <ming.qian@nxp.com>
2019-06-12MLK-21895 VPU Decoder: add buffer threshold for NON_FRAME_LVL modeShijie Qin
use 'stream_buffer_threshold' for NON_FRAME_LVL mode--raw data stream_buffer_threshold default size is 64K Signed-off-by: Shijie Qin <shijie.qin@nxp.com> Reviewed-by: ming_qian <ming.qian@nxp.com>
2019-06-12MLK-22002-2 VPU Decoder: cancel return POLLERR at the beginningShijie Qin
The check about if src/dst streaming and empty is superfluous, henece remove it Signed-off-by: Shijie Qin <shijie.qin@nxp.com> Reviewed-by: ming_qian <ming.qian@nxp.com>
2019-06-12MLK-21989: VPU Decoder: avoid crash after vpu decoder hangming_qian
If vpu is hang, driver won't really release the instance when v4l2_release, but driver will release queue and buffer, the sysfs device instance*_buffer isn't removed. when we try to access the instance*_buffer in such case, kernel crash will occur. Driver release queue and buffer when we really release the instance, and the crash can be avoided Signed-off-by: ming_qian <ming.qian@nxp.com>
2019-06-12MLK-22002 VPU Decoder: cancel return POLLERR at the beginningShijie Qin
Cancel return POLLERR before recevice 'VID_API_EVENT_SEQ_HDR_FOUND' at the beginning Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
2019-06-11MLK-21987-1 soc: imx: Add speed grading fuse check for i.MX8MNAnson Huang
Add speed grading fuse check to constrain CPU OPP according to market segment and speed grading fuse map, Market_Segment[1:0]: '00' - Consumer 0C to 95C '01' - Ext. Consumer -20C to 105C '10' - Industrial -40C to 105C '11' - Automotive -40C to 125C SPEED_GRADING[5:0]: SPEED_GRADE[5:4] SPEED_GRADE[3:0] MHz xx 0000 2300 xx 0001 2200 xx 0010 2100 xx 0011 2000 xx 0100 1900 xx 0101 1800 xx 0110 1700 xx 0111 1600 xx 1000 1500 xx 1001 1400 xx 1010 1300 xx 1011 1200 xx 1100 1100 xx 1101 1000 xx 1110 900 xx 1111 800 Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Bai Ping <ping.bai@nxp.com>
2019-06-10MLK-21954 clk: imx: keep qspi clock always on if m core is enabledJacky Bai
On i.MX8MN, in some user case, M7 will XIP running in QSPI, so need to make sure QSPI clock is always on if M7 is enabled. Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2019-06-10MLK-21953-01 soc: imx: Add power domain driver support imx8mnJacky Bai
Add compatible string for i.MX8MN for power domain driver support. Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2019-06-07MLK-21912: mxc-jpeg: Fix for gst decoder broken, after 1080p fix.Mirela Rabulea
Fix broken gst-launch & decoder plugin testcase, because adjusted width & height were 0, because capture queue settings were improperly set. Fixes: 776f969c9fe4 ("MLK-21912: mxc-jpeg: Fix for 1080p NV12 broken") Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2019-06-05MLK-21929: mxc-jpeg: Set colorspace in jpeg try_fmt ioctlMirela Rabulea
Respond with colorspace REC709 for gst negotiations, to be in sync with the camera, otherwise, the default would be REC601. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Suggested-by: Bing Song <bing.song@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2019-06-05MLK-21912: mxc-jpeg: Fix for 1080p NV12 broken, after GRAY fix.Mirela Rabulea
Up/down alignment of w x h needs to happen before the configuration phase for encoder, so do it once in s_fmt. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2019-06-05MLK-21912: mxc-jpeg: Add encoder support for GRAY formatMirela Rabulea
Break the encoder configuration stream (hactbl) into marker segments, because the SOF & SOS segments need to have variable length, depending on the number of colour components. This will allow ARGB (4 components) and GRAY (1 component) to work. So far, the configuration stream was hardcoded for 3 components. Add new functions mxc_jpeg_fixup_sof & mxc_jpeg_fixup_sos, both will start form a maximal SOF/SOS segment and fix it to match the current format. Add new function mxc_jpeg_setup_cfg_stream, to copy all the default marker segments into the configuration stream, and patch it to match the current format. Move the setup/fixup of encoder configuration stream from configuration phase(mxc_jpeg_config_enc_desc) to mxc_jpeg_s_fmt (when format changes). Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2019-06-05MLK-21951: VPU Decoder: fix stop cmd may be missedming_qian
If user open and close in a short time, call close before driver receive the start done event, driver won't send stop cmd to firmware, and then release the context. next time user open device, the state of firmware is mismatch with driver, it will cause some unexpected error Signed-off-by: ming_qian <ming.qian@nxp.com> Reviewed-by: Zhou Peng <eagle.zhou@nxp.com> Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2019-06-04MLK-21700-3 imx8mm: Switch to imx8m_clk_compositeLeonard Crestez
This is a large change but realigns us with upstream is useful and make git diff useful. This was already done on imx8mq after that SOC was upstreamed. Mixing dts and driver changes is intentional because changes only compile together. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> (cherry picked from commit 29845d2ebf6708ef87213328a4ce0f29cef7722a)
2019-06-04MLK-21700-2 clk: imx8mm: Move imx8mm_clko1_sels higher like upstreamLeonard Crestez
No functional changes Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> (cherry picked from commit 2e4f9164bd2aae9d507236cd7423deff540b5974)
2019-06-04MLK-21700-1 clk: imx8mm imx8mn: Rename int_pll to pll14xx for upstream alignmentLeonard Crestez
Only cosmetic changes in this patch Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> (cherry picked from commit 1c951d1122b5691fe322bb642f770eabd60b238b)
2019-06-04MLK-21928 usb: chipidea: add spin lock for all hard irqLi Jun
Currently ci->lock is only used for udc irq, to cover all hard irqs, add spin lock for ci_irq, meanwhile, add spin lock for low power mode and wakeup irq flag. Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
2019-06-04MLK-15984 usb: chipidea: wait controller resume finished for wakeup irqLi Jun
After the chipidea driver introduce extcon for id and vbus, it's able to wakeup from another irq source, in case the system with extcon ID cable, wakeup from usb ID cable and device removal, the usb device disconnect irq may come firstly before the extcon notifier while system resume, so we will get 2 "wakeup" irq, one for usb device disconnect; and one for extcon ID cable change(real wakeup event), current driver treat them as 2 successive wakeup irq so can't handle it correctly, then finially the usb irq can't be enabled. This patch adds a check to bypass further usb events before controller resume finished to fix it. Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com> (cherry picked from commit 3d5245b0a71b1bec488d349bdaa098ae59a6ab90)
2019-06-04MLK-21911 drm/bridge: sec-dsim: free 'pll_pms' to avoid memory leakFancy Fang
The 'pll_pms' data is allocated dynamically and it should be freed after its usage is done explicitly, otherwise there is a serious memory leak problem, since this data allocation frequency is really high during video playback and graphic cases running. Signed-off-by: Fancy Fang <chen.fang@nxp.com> Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
2019-06-04MLK-21931: VPU Decoder: avoid abort during source changeming_qian
when vpu parse the first seq header, driver will send source change event to user. when vpu send res_change event, driver will send source change event to user. So when driver send source change event to user, user may execute streamoff, and then streamon, or only streamon if the streamon isn't executed before. driver should avoid abort cmd in streamoff in this case. In normal case, user shouldn't streamon capture stream before it receive the first source change event. Signed-off-by: ming_qian <ming.qian@nxp.com>
2019-05-31MMFMWK-8542: VPU Decoder: correct the consumed length if rptr cross overming_qian
after abort, if there is no IDR frame, the decoder can't decode any frame. If the gop is large, and the stream buffer is full, it will cause hang. Decoder can skip the undecoded P/B frames and update the rptr. If the rptr cross over the pre end address, the consumed length should add stream buffer length. clear req_frame_count before update uActiveSeqTag Signed-off-by: ming_qian <ming.qian@nxp.com> Reviewed-by: Zhou Peng <eagle.zhou@nxp.com> Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2019-05-31MLK-21901: VPU Decoder: add eos padding data for AVS formatShijie Qin
the AVS eos padding data is same as ASP last = 0xb1010000 Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
2019-05-30MLK-21888: VPU Decoder: release frame when resolution changeming_qian
driver may alloc frame after firmware send res_change event, but before driver receive the event. the frame buffer status maybe incorrect in this case. So release all the frames when driver receive the res_change event. remove some unused code show more debug info Signed-off-by: ming_qian <ming.qian@nxp.com> Reviewed-by: Shijie Qin <shijie.qin@nxp.com> Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
2019-05-30MLK-21868-1 mmc: sdhci-esdhc-imx: add esdhc_soc_data for i.MX8MMHaibo Chen
i.MX8MM contains USDHC which support eMMC V5.1 (including CMDQ and HS400ES), besides i.MX8MM also support bus frequency, so add a new esdhc_soc_data for i.MX8MM. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-05-29MLK-21866 VPU Decoder: add __GFP_NOWARN flag for allor dma bufferShijie Qin
Add __GFP_NOWARN flag for allor dma buffer, avoid kernel panic when alloc failed as no available space. MLK-21248-3 VPU Decoder: support adaptive playback in driver Shall cleanup seqinfo after reset setting. Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
2019-05-29MGS-4881 [#imx-1497] Disable TX CLOCK GATING in GPU driver for 815SElla Feng
Disable TX CLOCK GATING in GPU driver for 815S in driver when init HW. Also fix the same problem for ls1028a. Date: 29 May, 2019 Signed-off-by: Ella Feng <ella.feng@nxp.com>
2019-05-29Revert "MGS-4881 [#ccc] Disable TX CLOCK GATING in GPU driver for"Ella Feng
Should disable TX CLOCK GATING only for GC7000UL chip. This reverts commit bddcb2c61297f5100208ff927976653f43eaaeb9.
2019-05-28MLK-21882: mxc-jpeg: Allow DMABUF for mxc-jpeg encoder/decoderMirela Rabulea
Proposed & requested by Bing Song, for performance measurement. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2019-05-28MLK-21880-3 drm/imx: lcdif-dsim: change DISPMIX reset for IMX8MNFancy Fang
According to the design spec for IMX8MN platform, the GPR reset module for DISPMIX has some changes. So the reset code should be adjusted accordingly. This is a temporary solution and will be improved later. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2019-05-28MLK-21880-2 drm/imx: add IMX8MN compatible for LCDIF and DSIMFancy Fang
Add a compatible string which includes 'imx8mn' for both LCDIF and DSIM drivers. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2019-05-28MLK-21880-1 drm/bridge: sec-dsim: correct DSIM version register accessFancy Fang
During the DSIM binding stage, only enable cfg clock is not enough to access the version register, since at this time, if the DSIM is still in the reset state, the register read will always return 0. So before the version register read, the runtime pm should be in resume state. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2019-05-28MLK-21243 usb: dwc3: gadget: check if dep->frame_number is still validLi Jun
This is a porting patch from upstream commit d53701067f04 ("usb: dwc3: gadget: check if dep->frame_number is still valid") Gadget driver may take an unbounded amount of time to queue requests after XferNotReady. This is important for isochronous endpoints which need to be started for a specific (micro-)frame. If we fail to start a transfer for isochronous endpoint, let's try queueing to a future interval and see if that helps. We will stop trying if we fail a start transfer for 5 intervals in the future. Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Li Jun <jun.li@nxp.com>
2019-05-28MGS-4881 [#ccc] Disable TX CLOCK GATING in GPU driver forElla Feng
Disable TX CLOCK GATING in GPU driver to fix random GPU hang problem. This workaround will be dropped after get formal fix from VSI. Signed-off-by: Ella Feng <ella.feng@nxp.com>
2019-05-28MLK-21692 usb: chipidea: udc: protect usb interrupt enableLi Jun
We hit the problem with below sequence: - ci_udc_vbus_session() update vbus_active flag and ci->driver is valid, - before calling the ci_hdrc_gadget_connect(), usb_gadget_udc_stop() is called by application remove gadget driver, - ci_udc_vbus_session() will contine do ci_hdrc_gadget_connect() as gadget_ready is 1, so udc interrupt is enabled, but ci->driver is NULL. - USB connection irq generated but ci->driver is NULL. As udc irq only should be enabled when gadget driver is binded, so add spinlock to protect the usb irq enable&disable for vbus session handling. Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
2019-05-27MLK-21438: mxc-jpeg: Fix mxc-jpeg enc/dec for NV12 1080pMirela Rabulea
The CAST IP requires for NV12 that the resolution is aligned to 16, and 1080 is not a multiple of 16. On the other hand, gstreamer does not allow to adjust the buffer size down, only up. For decoding, just fool the CAST-IP the resolution is a bit bigger, but keep the buffer size the same. Increasing the buffer size would result in a few extra garbage lines, decreasing is not allowed by gst. For encoding, just fool the CAST-IP to encode a little bit less, if we would encode some extra lines, it would not be possible to discard them from the resulting jpeg. Add alignment restrictions to the format descriptions in mxc_formats[]. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2019-05-27MLK-21871 net: fec: get mac address from fuse for imx8mn platformFugang Duan
Enable imx8mn platform to get mac address from efuse. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2019-05-27MLK-21859-2 VPU Decoder: modify sequence header forShijie Qin
SPK format Inser frame header for first frame Signed-off-by: Shijie Qin <shijie.qin@nxp.com>