summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-19LF-6878: LF-6654: media: imx-jpeg: Implement g_selection and s_selectionMing Qian
The codec can support any image size WxH, with arbitrary W (image width) and H (image height) dimensions. But it requires buffer alignment, so driver can report the aligned resolution through the g_fmt, and report the actual resolution through the g_selection. For encoder, it even support to encode a smaller jpeg than the original picture through s_selection api. Signed-off-by: Ming Qian <ming.qian@nxp.com> Reviewed-by: TaoJiang <tao.jiang_2@nxp.com> Tested-by: Elliot Chen <elliot.chen@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2022-08-12LF-6814-2 Revert "LF-6797 arm64: dts: imx8mp: correct usb clock"Li Jun
Revert "LF-6797 arm64: dts: imx8mp: correct usb clock" This reverts commit 08b2965711c11f1c056cf98a065cff7dc87ae2fd. Since we change back to only gate the usb wakeup clock, so update dts to use usb_ctrl_root for 32k wakeup clock. Reviewed-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
2022-08-12LF-6814-1 Revert "clk: imx8mp: fix usb_root_clk parent"Li Jun
This reverts commit c5559147766c6de7ded2db62b8aeaa579c66750b. with original way, we can keep the gate on for usb wakeup, and AXI hsio clock off in low power mode. Reviewed-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
2022-08-11dpaa2-switch: fix bridge port and context passed to ↵Ioana Ciornei
switchdev_bridge_port_unoffload The switchdev_bridge_port_offload() call was changed to pass the bridge port and the context (a port_priv) but the associated switchdev_bridge_port_unoffload() call was not changed. Fix this issue with this patch. Fixes: 4726cdce0741 ("dpaa2-switch: say that the bond device is offloaded as a bridge port") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
2022-08-11dpaa2-eth: fixup the error path in dpaa2_xsk_enable_pool()Ioana Ciornei
The error code path in the dpaa2_xsk_enable_pool was not properly setup, thus the error code that should have been returned by the function was overwritten before the end of the call. Fix this and also some ordering of the goto labels. Fixes: e77a60fab247 ("net: dpaa2: AF_XDP RX zero copy support") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
2022-08-11dpaa2-eth: move the percpu_stats setup to avoid a uninitialized accessIoana Ciornei
The XDP and AF_XDP current support on DPAA2 does not include S/G frames. This is why, in case the a S/G frame is received in the dpaa2-eth AF_XDP rx path, the frame needs to be discarded and the number of error frames needs to be incremented. In case this happens, the percpu_stats variable is not initialized. Fix this by moving the percpu_stats setup before the first 'goto' statement. Fixes: e77a60fab247 ("net: dpaa2: AF_XDP RX zero copy support") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
2022-08-10mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase timesSascha Hauer
06781a5026350 Fixes the calculation of the DEVICE_BUSY_TIMEOUT register value from busy_timeout_cycles. busy_timeout_cycles is calculated wrong though: It is calculated based on the maximum page read time, but the timeout is also used for page write and block erase operations which require orders of magnitude bigger timeouts. Fix this by calculating busy_timeout_cycles from the maximum of tBERS_max and tPROG_max. This is for now the easiest and most obvious way to fix the driver. There's room for improvements though: The NAND_OP_WAITRDY_INSTR tells us the desired timeout for the current operation, so we could program the timeout dynamically for each operation instead of setting a fixed timeout. Also we could wire up the interrupt handler to actually detect and forward timeouts occurred when waiting for the chip being ready. As a sidenote I verified that the change in 06781a5026350 is really correct. I wired up the interrupt handler in my tree and measured the time between starting the operation and the timeout interrupt handler coming in. The time increases 41us with each step in the timeout register which corresponds to 4096 clock cycles with the 99MHz clock that I have. Fixes: 06781a5026350 ("mtd: rawnand: gpmi: Fix setting busy timeout setting") Fixes: b1206122069aa ("mtd: rawniand: gpmi: use core timings instead of an empirical derivation")
2022-08-10LF-6808: arm64: dts: imx8mp-evk: switch MCLK from SoC to external 24M ↵Alice Yuan
oscillator for OS08A20 According to FCC certification test results, we may need to disable MCLK output from IMX8MPlus EVK board and switch MCLK from SoC external 24M oscillator on the camera modules for OS08A20. And there are two options for sensor’s MCLK on the camera module, default option is using MCLK from i.MX8MPlus, and in this case hardware can’t pass FCC certification. Another is use 24M oscillator on the camera module, this can pass the FCC certification. Please refer to HW ticket number: MXEMPLUS-24 Signed-off-by: Alice Yuan <alice.yuan@nxp.com> Reviewed-by: Robby Cai <robby.cai@nxp.com>
2022-08-10LF-6806: dma: pxp: workaround for PXP when do RGB to gray color conversionGuoniu.zhou
CSC2 engine in PXP has IC bug(TKT272216) and fixed after 7D PXP version. Driver update new CSC coefficient provided by PXP IP owner(MLK-25625-02). But when run e-ink case, it can't do clear operation after applying the patch. We don't know reason until now, so add a temporary patch to fix it and will remove after finding the root cause. Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Robby Cai <robby.cai@nxp.com>
2022-08-10LF-6741: dma: pxp: fix coverity issue: Uninitialized scalar variableGuoniu.zhou
Fix coverity issue: 22322873 Uninitialized scalar variable Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Robby Cai <robby.cai@nxp.com>
2022-08-10LF-6805 arm64: dts: imx93: add a55 pmuPeng Fan
Add A55 PMU node for perf usage Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-08-10LF-2780: dma: fsl-qdma: fix coverity issue: Dereference after null checkYi Zhao
Coverity Issue: 11394158 Dereference after null check Signed-off-by: Yi Zhao <yi.zhao@nxp.com>
2022-08-10LF-6742 soc: imx: Fix Coverity Issue: 22703614 Uninitialized scalar variableJacky Bai
Field msg.reserved is uninitialized when calling rpmsg_send, so initialize msg before using it. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-08-10LF-6799: arm64: dts: imx8mm-evk: modify the pmic_rohm interrupts trigger typeJoy Zou
The customer finds the interrupts property of pmic_rohm node uses incorrect trigger type macro definition. It didn't cause other issue. This patch changes the GPIO_ACTIVE_LOW to IRQ_TYPE_LEVEL_LOW. Reviewed-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Joy Zou <joy.zou@nxp.com>
2022-08-10LF-6247-4: arm64: configs: imx_v8_defconfig: build module for PCA995XHaibo Chen
Default build module for PCA955X LED driver. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Isai Gaspar <isaiezequiel.gaspar@nxp.com> Reviewed-by: Jun Li <jun.li@nxp.com>
2022-08-10LF-6797 arm64: dts: imx8mp: correct usb clockLi Jun
Since commit c5559147766c ("clk: imx8mp: fix usb_root_clk parent") correct the usb root clk, so accordingly update usb clocks for dwc3. Reviewed-by: Xu Yang <xu.yang_2@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
2022-08-10LF-6247-3: driver: leds: pca995x: Add support for PCA995X chipsIsai Gaspar
The PCA995x chips are I2C controlled LED drivers that can be found in the 8MIC and voice HAT boards. Each chip has up to 16 outputs, each one with an individual 8-bit resolution PWM for brightness control. All existing leds in the device tree will be registered and can be used with the led framework api. Supported devices include: PCA9952TW PCA9955TW PCA9955BTW Signed-off-by: Isai Gaspar <isaiezequiel.gaspar@nxp.com>
2022-08-10LF-6247-2: dt-bindings: leds: PCA995X Add support for PCA995X chipsIsai Gaspar
NXP's I2C controlled 16-channel LED driver Signed-off-by: Isai Gaspar <isaiezequiel.gaspar@nxp.com>
2022-08-10LF-6247-1: dts: arm64: freescale: Add support for RGB ledsIsai Gaspar
Boards have 4 RGB leds that can be controlled with a PCA9955 chip. Signed-off-by: Isai Gaspar <isaiezequiel.gaspar@nxp.com>
2022-08-09LF-6752-3 usb: chipidea: core: add wakeup support for usb role switchXu Yang
If wakeup event occurred by usb role switch, it needs to call ci_irq again since the first ci_irq calling at ci_usb_role_switch_set() only wakes up controller, but do nothing for event handling. It causes the usb role switch use case can't work well from low power mode. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Reviewed-by: Jun Li <jun.li@nxp.com>
2022-08-09LF-6752-2 usb: chipidea: ci_hdrc_imx: add wakeup clock and keep it always onXu Yang
Some platform using chipidea chip may keep 32KHz wakeup clock always on without usb driver intervention. And some may need driver to handle this clock. This patch will get wakeup clock to make controller work correctlly. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Reviewed-by: Jun Li <jun.li@nxp.com>
2022-08-09LF-6752-1 arm64: dts: imx93: add wakeup clk for usb controller nodesXu Yang
The imx93 has one wakeup clk for each usb controller. Add them to usb nodes. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Reviewed-by: Jun Li <jun.li@nxp.com>
2022-08-09arm64: dts: imx8m: Disable job ring 0 nodesFabio Estevam
Now that the JR0 reservation is done in both upstream (v2.7) and downstream (NXP lf_v2.4) TF-A versions, the kernel fails to initialize the job ring 0: # dmesg | grep jr caam_jr 30901000.jr: failed to flush job ring 0 caam_jr: probe of 30901000.jr failed with error -5 Disable the sec_jr0 nodes by default to avoid the caam_jr probe error. Suggested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-08-09LF-6743: dma: pxp: fix coverity issue: dereference before null checkGuoniu.zhou
Fix coverity issue 22322872: dereference before null check Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Robby Cai <robby.cai@nxp.com>
2022-08-09LF-5163 video: epdc_v2: Fix Coverity Issue: 18996754 Unsigned compared against 0Robby Cai
correct type for rounded_pix_clk, rounded_parent_rate, which should be 'long' as return value of clk_rounded_rate(). Signed-off-by: Robby Cai <robby.cai@nxp.com> Reviewed-by: Alice Yuan <alice.yuan@nxp.com>
2022-08-09LF-5082 media: epdc: Fix Coverity Issue: 3298979 Negative loop boundRobby Cai
Check the return value for clk_round_rate each time. Correct type for rounded_pix_clk, rounded_parent_rate; Signed-off-by: Robby Cai <robby.cai@nxp.com> Reviewed-by: Alice Yuan <alice.yuan@nxp.com>
2022-08-09LF-2861 media: mipi csi: Fix Coverity Issue: 17695 Dereference before null checkRobby Cai
Fix issue for dereference before NULL check Signed-off-by: Robby Cai <robby.cai@nxp.com> Reviewed-by: Alice Yuan <alice.yuan@nxp.com>
2022-08-09LF-2859 media: mxc_capture: Fix Coverity Issue: 17678 Dereference before ↵Robby Cai
null check Fix issue for dereference before NULL check Signed-off-by: Robby Cai <robby.cai@nxp.com> Reviewed-by: Alice Yuan <alice.yuan@nxp.com>
2022-08-09LF-6711-6:imx8q:vpu: media: amphion: set bytesperline of compressed formats to 0Ming Qian
In spec, it documents that for compressed formats the bytesperline value makes no sense. Applications and drivers must set this to 0 in that case. Signed-off-by: Ming Qian <ming.qian@nxp.com> Reviewed-by: TaoJiang <tao.jiang_2@nxp.com> Tested-by: Ming Zhou <ming.zhou@nxp.com>
2022-08-09LF-6794 remoteproc: imx_rproc: initialize workqueue earlierPeng Fan
Initialize workqueue before requesting mailbox channel, otherwise if mailbox interrupt comes before workqueue ready, the imx_rproc_rx_callback will trigger kernel dump. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-08-09Revert "LF-6630-1 mailbox: imx: clear pending interrupts"Peng Fan
With MCU SDK supports multiple vring instance, after Linux clear GIP & RSR for the 1st vring instance, MCU SDK will continue issue GIP & VQID for the next vring instance, we could not handle multiple vring instance in mailbox driver. This reverts commit a53f2179ef57d5f6bd9a4e0d9be2f602df3e1f89. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-08-09AIR-7443 ethosu: Fix kernel call trace before rpmsg dev probeGuo Feng
M33 firmware will be loaded when ethosu device opens, and driver shouldn't send msg to M33 before M33 boot up. Signed-off-by: Feng Guo <feng.guo@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-08-08LF-6775 soc: imx: Change the rpmsg lifecycle suspend to noirq stageJacky Bai
In order to make sure all other rpmsg have been handled before sending the rpmsg lifecycle msg to RTD side, so let the rpmsg lifecycle to send the suspend/resume handshake msg in noirq stage. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2022-08-05LF-6751:imx8q: media: imx-jpeg: Disable useless interrupt to avoid kernel panicMing Qian
There is a hardware bug that the interrupt STMBUF_HALF may be triggered after or when disable interrupt. It may led to unexpected kernel panic. And interrupt STMBUF_HALF and STMBUF_RTND have no other effect. So disable them and the unused interrupts. meanwhile clear the interrupt status when disable interrupt. Signed-off-by: Ming Qian <ming.qian@nxp.com> Reviewed-by: TaoJiang <tao.jiang_2@nxp.com> Tested-by: Elliot Chen <elliot.chen@nxp.com>
2022-08-04nvmem: auto load kernel-mod imx_fsb_s400_fuse_matchPankaj Gupta
nvmem: auto load kernel-mod imx_fsb_s400_fuse_match Signed-off-by: Alice Guo <alice.guo@nxp.com> Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
2022-08-04LF-6750-2 arm64: dts: enable dynamic buffer size for i2c-rpmsg of 8ulpClark Wang
i.MX8ULP's M core image supports dynamic i2c buffer size. So let it use v2 compatiable string. i.MX8MP should support dynamic i2c buffer size, but this function is not included in the 2.12.0 SDK release, so let it use origin compatiable string for now. Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
2022-08-04LF-6750-1 i2c: rpmsg-imx: Add dynamic i2c buffer size supportClark Wang
Since the Mcore images of 8qxp/8qm/8dxl platforms are not maintained and cannot support a maximum buffer size of 478bytes of i2c buffer, these platforms are using origin compatible string. The v1 version only supports I2C buffer with a fixed length of 16 bytes. For the two platforms of 8mp/8ulp, the mcore image supports a maximum i2c buffer size of 478bytes. Therefore, use v2 compatible string to add support for dynamic i2c buffer sizes. Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
2022-08-04LF-4057 remoteproc: imx_rproc: correct parameter for devm_kcallocPeng Fan
sizeof(struct device) and sizeof(struct device_link) should not be used, because priv->pm_devices is type struct device **, priv->pm_devices_link is type struct device_link **. There is no issue now, because sizeof(struct device) and sizeof(struct device_link) are larger than sizeof(*priv->pm_devices) and sizeof(*priv->pm_devices_link). Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-08-03net: dpaa2: AF_XDP TX zero copy supportRobert-Ionut Alexa
Add support for packet processing on the Tx path using AF_XDP zero copy mode. Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03samples/bpf: add new options to configure frame headroom for AF_XDP socketsRobert-Ionut Alexa
Add new options that allow reconfiguring the default frame headroom within the buffers of AF_XDP sockets. They are each used separately on the Rx path and the Tx path, respectively. Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03libbpf: add Tx headroom support for AF_XDP buffersRobert-Ionut Alexa
Reserve frame headroom within the buffers used on the Tx side. Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03add cpu_relax() as a workaround for phy issueRobert-Ionut Alexa
Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03net: dpaa2: AF_XDP RX zero copy supportRobert-Ionut Alexa
Add support for custom RX packet processing using AF_XDP in zero copy mode. For now, only the newest WRIOP version is supported due to hardware limitations on older boards. Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03net: dpaa2: add support for multiple buffer pools per DPNIRobert-Ionut Alexa
This patch allows the configuration of multiple buffer pools associated with a single DPNI object, each distinct DPBP object not necessarily shared among all queues. The user can interogate both the number of buffer pools and the buffer count in each buffer pool by using the .get_ethtool_stats() callback. Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03net: dpaa2: add support to query channels using ethtoolRobert-Ionut Alexa
The .get_channels() net_device callback is implemented and exports the number of queues per channel: Rx, Tx, Tx conf and Rx err. The .set._channels() callback is not supported, since DPAA2 hardware does not allow the dynamic reconfiguration of channels. An error is returned if the user attempts to do so. Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
2022-08-03xsk: Batched buffer allocation for the poolMagnus Karlsson
Add a new driver interface xsk_buff_alloc_batch() offering batched buffer allocations to improve performance. The new interface takes three arguments: the buffer pool to allocated from, a pointer to an array of struct xdp_buff pointers which will contain pointers to the allocated xdp_buffs, and an unsigned integer specifying the max number of buffers to allocate. The return value is the actual number of buffers that the allocator managed to allocate and it will be in the range 0 <= N <= max, where max is the third parameter to the function. u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max); A second driver interface is also introduced that need to be used in conjunction with xsk_buff_alloc_batch(). It is a helper that sets the size of struct xdp_buff and is used by the NIC Rx irq routine when receiving a packet. This helper sets the three struct members data, data_meta, and data_end. The two first ones is in the xsk_buff_alloc() case set in the allocation routine and data_end is set when a packet is received in the receive irq function. This unfortunately leads to worse performance since the xdp_buff is touched twice with a long time period in between leading to an extra cache miss. Instead, we fill out the xdp_buff with all 3 fields at one single point in time in the driver, when the size of the packet is known. Hence this helper. Note that the driver has to use this helper (or set all three fields itself) when using xsk_buff_alloc_batch(). xsk_buff_alloc() works as before and does not require this. void xsk_buff_set_size(struct xdp_buff *xdp, u32 size); Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210922075613.12186-3-magnus.karlsson@gmail.com (cherry picked from commit 47e4075df300050a920b99299c4db3dad9adaba9) Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
2022-08-03selftests: xsk: Move num_frames and frame_headroom to xsk_umem_infoMagnus Karlsson
Move the global variables num_frames and frame_headroom to struct xsk_umem_info. They describe properties of the umem so no reason for them to be global. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/bpf/20210907071928.9750-5-magnus.karlsson@gmail.com (cherry picked from commit 83f4ae2f26bd67c58d528c3967c5ad3e58098be3) Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
2022-08-03ASoC: SOF: compress: Add support for timestamp displayLaurentiu Mihalcea
The purpose of this change is to make the display of the timestamp during a compressed stream possible. This is done by simply computing the number of decompressed frames by dividing the number of decompressed bytes (the dai posn) by the product of the channel count and sample bytes. Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-08-03ASoC: SOF: compress: sof-priv: Save channel count and sample bytesLaurentiu Mihalcea
The purpose of this change is to enable the saving of the channel count and sample container bytes parameters for later use. This is done when setting the compression stream parameters (in sof_compr_set_params). Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-08-03LF-6745 tty: serial: fsl_lpuart: error status check and async_tx_ack() ↵Sherry Sun
required on all platforms Since now we disabled the EOP feature for imx8qxp and imx8ulp platforms, lpuart rx error status check and async_tx_ack() should be done on all platforms that use the dma timer, remove if condition on imx8qxp and imx8ulp platforms, also remove the lpuart_rx_error_stat() to better align with upstream lpuart driver code. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Reviewed-by: Shenwei Wang<Shenwei.wang@nxp.com>