linux.git
4 years agoarm64: dts: ls1088ardb: add QSGMII PHY nodes
Ioana Ciornei [Fri, 30 Oct 2020 11:35:48 +0000 (13:35 +0200)]
arm64: dts: ls1088ardb: add QSGMII PHY nodes

Annotate the external MDIO1 node and describe the 8 QSGMII PHYs found on
the LS1088ARDB board and add phy-handles for DPMACs 3-10 to its
associated PHY.  Also, add the internal PCS MDIO nodes for the internal
MDIO buses found on the LS1088A SoC along with their internal PCS PHY
and link the corresponding DPMAC to the PCS through the pcs-handle.
Also, rename the dpmac@x nodes to ethernet@x in order to be compliant
with the naming convention used by ethernet controllers.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: ls1088a: add external MDIO device nodes
Ioana Ciornei [Fri, 30 Oct 2020 11:35:47 +0000 (13:35 +0200)]
arm64: dts: ls1088a: add external MDIO device nodes

Add the external MDIO device nodes found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: lx2160ardb: add interrupts to AQR107
Ioana Ciornei [Thu, 22 Apr 2021 09:41:33 +0000 (12:41 +0300)]
arm64: dts: lx2160ardb: add interrupts to AQR107

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
4 years agoarm64: dts: lx2160ardb: add nodes for the AQR107 PHYs
Ioana Ciornei [Fri, 30 Oct 2020 11:35:55 +0000 (13:35 +0200)]
arm64: dts: lx2160ardb: add nodes for the AQR107 PHYs

Annotate the EMDIO1 node and describe the 2 AQR107 PHYs found on the
LX2160ARDB board. Also, add the necessary phy-handles for DPMACs 3 and 4
to their associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: lx2160a: add PCS MDIO and PCS PHY nodes
Ioana Ciornei [Fri, 30 Oct 2020 11:35:54 +0000 (13:35 +0200)]
arm64: dts: lx2160a: add PCS MDIO and PCS PHY nodes

Add PCS MDIO nodes for the internal MDIO buses on the LX2160A, along
with their internal PCS PHYs, which will be used when the DPMAC is
in TYPE_PHY mode.
Also, rename the dpmac@x nodes to ethernet@x in order to be compliant
with the naming convention used by ethernet controllers.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: ls208xa: add PCS MDIO and PCS PHY nodes
Ioana Ciornei [Fri, 30 Oct 2020 11:35:53 +0000 (13:35 +0200)]
arm64: dts: ls208xa: add PCS MDIO and PCS PHY nodes

Add PCS MDIO nodes for the internal MDIO buses on the LS208x SoCs, along
with their internal PCS PHYs which will be used when the DPMAC object is
in TYPE_PHY mode.
Also, rename the dpmac@x nodes to ethernet@x in order to be compliant
with the naming convention used by ethernet controllers.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: ls2088ardb: add PHY nodes for the AQR405 PHYs
Ioana Ciornei [Fri, 30 Oct 2020 11:35:52 +0000 (13:35 +0200)]
arm64: dts: ls2088ardb: add PHY nodes for the AQR405 PHYs

Annotate the EMDIO2 node and describe the other 4 10GBASER PHYs found on
the LS2088ARDB board. Also, add phy-handles for DPMACs 5-8 to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: ls2088ardb: add PHY nodes for the CS4340 PHYs
Ioana Ciornei [Fri, 30 Oct 2020 11:35:51 +0000 (13:35 +0200)]
arm64: dts: ls2088ardb: add PHY nodes for the CS4340 PHYs

Annotate the EMDIO1 node and describe the 4 10GBASER PHYs found on the
LS2088ARDB board. Also, add phy-handles for DPMACs 1-4 to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoarm64: dts: ls208xa: add the external MDIO nodes
Ioana Ciornei [Fri, 30 Oct 2020 11:35:50 +0000 (13:35 +0200)]
arm64: dts: ls208xa: add the external MDIO nodes

Add the external MDIO device nodes found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
4 years agoRevert "drivers: base: export next_driver"
Ioana Ciornei [Fri, 23 Apr 2021 08:28:14 +0000 (11:28 +0300)]
Revert "drivers: base: export next_driver"

This reverts commit b8ef4c9afb38a20194fe5d204e835f26d1a374d2.

4 years agoRevert "dpaa2-eth: do not hold rtnl_lock on phylink_create() or _destroy()"
Ioana Ciornei [Thu, 22 Apr 2021 10:38:58 +0000 (13:38 +0300)]
Revert "dpaa2-eth: do not hold rtnl_lock on phylink_create() or _destroy()"

This reverts commit 62cae88f4a6565f72b885298354cebd79e4ad8a5.

4 years agoRevert "dpaa2-mac: probe standalone DPMAC objects"
Ioana Ciornei [Thu, 22 Apr 2021 10:28:29 +0000 (13:28 +0300)]
Revert "dpaa2-mac: probe standalone DPMAC objects"

This reverts commit 63290f0998b2e424bf86b7eac63cd92986e928e5.

4 years agoRevert "dpaa2-mac: fixup the remove path"
Ioana Ciornei [Thu, 22 Apr 2021 10:28:22 +0000 (13:28 +0300)]
Revert "dpaa2-mac: fixup the remove path"

This reverts commit 01a5e4c5d22459a294d318857271894621412c93.

4 years agoRevert "dpaa2-mac: select FSL_XGMAC_MDIO"
Ioana Ciornei [Thu, 22 Apr 2021 10:27:21 +0000 (13:27 +0300)]
Revert "dpaa2-mac: select FSL_XGMAC_MDIO"

This reverts commit 5a62982568905bfb14bfd9df63c78130c0490a15.

4 years agoarm64: dts: ls1088a: remove downstream MDIO, PHY and DPMAC nodes
Ioana Ciornei [Thu, 22 Apr 2021 10:01:07 +0000 (13:01 +0300)]
arm64: dts: ls1088a: remove downstream MDIO, PHY and DPMAC nodes

All these nodes were integrated into upstream, removing their downstream
version so that we can cleanly apply the upstream patches.
This is a partial revert of the following commit:
d74e07cfadd4 ("arm64: dts: ls1088a: accumulated change to ls1088a boards")

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
4 years agoarm64: dts: ls2088ardb: remove downstream MDIO, PHY and DPMAC nodes
Ioana Ciornei [Thu, 22 Apr 2021 09:52:17 +0000 (12:52 +0300)]
arm64: dts: ls2088ardb: remove downstream MDIO, PHY and DPMAC nodes

All these nodes were integrated into upstream, removing their downstream
version so that we can cleanly apply the upstream patches.
This is a partial revert of the following commit:
7d176f917a86 ("arm64: dts: ls208xa: accumulated change to ls208xa boards")

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
4 years agoRevert "arm64: dts: lx2160a-rdb: Add RGMII PHY nodes for dpmac 17 and 18"
Ioana Ciornei [Thu, 22 Apr 2021 09:32:39 +0000 (12:32 +0300)]
Revert "arm64: dts: lx2160a-rdb: Add RGMII PHY nodes for dpmac 17 and 18"

This reverts commit 873a3f07599f7d64561fde4a64a243b81f0edd7e.

This is already in upstream so the nodes are duplicated.

4 years agoRevert "arm64: dts: lx2160a-rdb: Add Aquantia PHY nodes"
Ioana Ciornei [Thu, 22 Apr 2021 09:47:02 +0000 (12:47 +0300)]
Revert "arm64: dts: lx2160a-rdb: Add Aquantia PHY nodes"

This reverts commit 9eb202387ce09e927a9adbb10fe832989e4ad4aa.

4 years agoRevert "arm64: dts: lx2160a: Update phy mode for Aquantia PHYs"
Ioana Ciornei [Thu, 22 Apr 2021 09:45:12 +0000 (12:45 +0300)]
Revert "arm64: dts: lx2160a: Update phy mode for Aquantia PHYs"

This reverts commit a26cca99c14f47eb97f82cc0d70ed4a3dff4717a.

4 years agogianfar: Drop GFAR_MQ_POLLING support
Claudiu Manoil [Fri, 16 Apr 2021 17:11:22 +0000 (20:11 +0300)]
gianfar: Drop GFAR_MQ_POLLING support

Gianfar used to enable all 8 Rx queues (DMA rings) per
ethernet device, even though the controller can only
support 2 interrupt lines at most.  This meant that
multiple Rx queues would have to be grouped per NAPI poll
routine, and the CPU would have to split the budget and
service them in a round robin manner.  The overhead of
this scheme proved to outweight the potential benefits.
The alternative was to introduce the "Single Queue" polling
mode, supporting one Rx queue per NAPI, which became the
default packet processing option and helped improve the
performance of the driver.
MQ_POLLING also relies on undocumeted device tree properties
to specify how to map the 8 Rx and Tx queues to a given
interrupt line (aka "interrupt group").  Using module parameters
to enable this mode wasn't an option either.  Long story short,
MQ_POLLING became obsolete, now it is just dead code, and no
one asked for it so far.
For the Tx queues, multi-queue support (more than 1 Tx queue
per CPU) could be revisited by adding tc MQPRIO support, but
again, one has to consider that there are only 2 interrupt lines.
So the NAPI poll routine would have to service multiple Tx rings.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8eda54c5e6c4eb3f3a9b70fdea278f4e0f8496b2)

4 years agoLF-3676 dmaengine: fsl-qdma: check dma_set_mask return value
Robin Gong [Thu, 22 Apr 2021 17:33:43 +0000 (01:33 +0800)]
LF-3676 dmaengine: fsl-qdma: check dma_set_mask return value

For fix below warning reported by static code analysis tool like Coverity
from Synopsys:

'CID 12285639 (#1 of 2): Unchecked return value (CHECKED_RETURN)'

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 06397bad8f525f315c8298a66bd04f41090e2217)

4 years agoLF-2108 rpmsg: imx: fix the pointer conversion loses bits issue
Richard Zhu [Fri, 23 Apr 2021 08:10:27 +0000 (16:10 +0800)]
LF-2108 rpmsg: imx: fix the pointer conversion loses bits issue

Fix the pointer conversion loses bits issue reported by Coverity below.
CID 5433934 (#2 of 4): Parse warning (PW.POINTER_CONVERSION_LOSES_BITS)
1. pointer_conversion_loses_bits: conversion from pointer to smaller integer

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
4 years agoLF-3744-3 arch: arm64: imx8mp-evk-sof-wm8960: fix SAI3 index
Viorel Suman [Fri, 23 Apr 2021 12:31:49 +0000 (15:31 +0300)]
LF-3744-3 arch: arm64: imx8mp-evk-sof-wm8960: fix SAI3 index

SAI3 instance index is 1 since commit dbe5ea55c013 ("LF-3744-1 ASoC:
SOF: imx8m: add SAI1 info").

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3744-2 ASoC: SOF: imx8m: add SAI1 clocks
Viorel Suman [Thu, 22 Apr 2021 10:13:07 +0000 (13:13 +0300)]
LF-3744-2 ASoC: SOF: imx8m: add SAI1 clocks

Add SAI1 clocks so that the clocks will be started
when SOF audio card is in use.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3744-1 ASoC: SOF: imx8m: add SAI1 info
Viorel Suman [Thu, 22 Apr 2021 10:10:47 +0000 (13:10 +0300)]
LF-3744-1 ASoC: SOF: imx8m: add SAI1 info

Add SAI1 instance to imx8m_dai array.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3747-7: ak4458: Fix issue with reset-gpios
Shengjiu Wang [Fri, 23 Apr 2021 08:38:04 +0000 (16:38 +0800)]
LF-3747-7: ak4458: Fix issue with reset-gpios

reset_control_deassert() need to be called before
reset_control_assert()

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
4 years agoLF-3747-6: ASoC: imx-ak4458: Fix gpio_set_value usage
Shengjiu Wang [Fri, 23 Apr 2021 09:33:00 +0000 (17:33 +0800)]
LF-3747-6: ASoC: imx-ak4458: Fix gpio_set_value usage

gpio_set_value don't check FLAG_ACTIVE_LOW like gpiod_set_value

Revert "LF-3747-1: ASoC: imx-ak4458: Fix the polarity of reset gpio"

This reverts commit e734ed3bbd1a63f3ec57d346764b6756f3a33274.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
4 years agoLF-3747-5: arm64: imx8mq: Fix polarity of reset GPIO
Shengjiu Wang [Fri, 23 Apr 2021 03:32:14 +0000 (11:32 +0800)]
LF-3747-5: arm64: imx8mq: Fix polarity of reset GPIO

Fix polarity of reset GPIO, it is ACTIVE_LOW

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3747-4: arm64: imx8mp: Fix polarity of reset GPIO
Shengjiu Wang [Fri, 23 Apr 2021 03:31:48 +0000 (11:31 +0800)]
LF-3747-4: arm64: imx8mp: Fix polarity of reset GPIO

Fix polarity of reset GPIO, it is ACTIVE_LOW

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3747-3: arm64: imx8mn: Fix polarity of reset GPIO
Shengjiu Wang [Fri, 23 Apr 2021 03:30:39 +0000 (11:30 +0800)]
LF-3747-3: arm64: imx8mn: Fix polarity of reset GPIO

Fix polarity of reset GPIO, it is ACTIVE_LOW

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3747-2: arm64: dts: imx8mm: Fix polarity of reset GPIO
Shengjiu Wang [Fri, 23 Apr 2021 03:28:29 +0000 (11:28 +0800)]
LF-3747-2: arm64: dts: imx8mm: Fix polarity of reset GPIO

Fix polarity of reset GPIO, it is ACTIVE_LOW

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3747-1: ASoC: imx-ak4458: Fix the polarity of reset gpio
Shengjiu Wang [Fri, 23 Apr 2021 03:27:24 +0000 (11:27 +0800)]
LF-3747-1: ASoC: imx-ak4458: Fix the polarity of reset gpio

Fix the polarity of reset gpio

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3647 arm: imx: fix coverity scan error
Frank Li [Tue, 30 Mar 2021 17:12:42 +0000 (12:12 -0500)]
LF-3647 arm: imx: fix coverity scan error

of_match_device may return null
but of_id have not been checked in imx_mmdc_perf_init

pmu_mmdc->devtype_data = (struct fsl_mmdc_devtype_data *)of_id->data;

Signed-off-by: Frank Li <Frank.Li@nxp.com>
4 years agoLF-3494-5: arch: arm64: imx8qm-mek-sof-wm8960: remove useless routes
Iuliana Prodan [Fri, 12 Mar 2021 12:22:36 +0000 (14:22 +0200)]
LF-3494-5: arch: arm64: imx8qm-mek-sof-wm8960: remove useless routes

Both SAI1.IN and SAI1.OUT related routes are added automatically
on topology load, so there is no need to specify them in DTS.

Suggested-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 52f4d14f5a6b6b6be9e241e2409f6935a43c2a75)

4 years agoLF-3494-4: arch: arm64: imx8qm-mek-sof-cs42888: remove useless route
Iuliana Prodan [Fri, 12 Mar 2021 12:20:14 +0000 (14:20 +0200)]
LF-3494-4: arch: arm64: imx8qm-mek-sof-cs42888: remove useless route

ESAI0.OUT related route is added automatically on topology load,
so there is no need to specify it in DTS.

Suggested-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 6ee61bb3ab9cfcc0dcee144376765fc046fdd862)

4 years agoLF-3494-3: arch: arm64: imx8qxp-mek-sof-cs42888: remove useless route
Iuliana Prodan [Fri, 12 Mar 2021 12:19:31 +0000 (14:19 +0200)]
LF-3494-3: arch: arm64: imx8qxp-mek-sof-cs42888: remove useless route

ESAI0.OUT related route is added automatically on topology load,
so there is no need to specify it in DTS.

Suggested-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 37a511e41355377ed788ffec72b37f8afbfadcd5)

4 years agoLF-3494-2: arch: arm64: imx8qxp-mek-sof-wm8960: remove useless routes
Daniel Baluta [Wed, 3 Feb 2021 11:31:29 +0000 (13:31 +0200)]
LF-3494-2: arch: arm64: imx8qxp-mek-sof-wm8960: remove useless routes

Both SAI1.IN and SAI1.OUT related routes are added automatically
on topology load, so there is no need to specify these routes in
DTS.

Suggested-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 87564e99d6ce30ce7719adf01fc4c7cd41b0cbf4)

4 years agoLF-3494: arch: arm64: imx8mp-evk-sof-wm8960: remove useless routes
Viorel Suman [Mon, 1 Feb 2021 09:10:51 +0000 (11:10 +0200)]
LF-3494: arch: arm64: imx8mp-evk-sof-wm8960: remove useless routes

Both SAI3.IN and SAI3.OUT related routes are added automatically
on topology load, so there is no need to specify these routes in
DTS. On the other hand not all topologies have both SAI3 IN and
OUT ports - like KWD topology for instance which has just SAI3.IN.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit 1dda13ef4d141da0ac32b38ac25729e28f7ad491)

4 years agoLF-3724-9: ASoC: imx-ak4497: set tdm slot for DSD
Shengjiu Wang [Thu, 22 Apr 2021 09:41:49 +0000 (17:41 +0800)]
LF-3724-9: ASoC: imx-ak4497: set tdm slot for DSD

set tdm slot for DSD

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-8: ASoC: fsl_sai: Set proper words_per_fifo value
Shengjiu Wang [Thu, 22 Apr 2021 09:05:15 +0000 (17:05 +0800)]
LF-3724-8: ASoC: fsl_sai: Set proper words_per_fifo value

If period_size % words_per_fifo != 0, then the multi fifo
sdma script can't work correctly. So set proper word_per_fifo
value to avoid such issue.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3503 ARM64: imx8mp-ddr4-evk: add nand support
Clark Wang [Fri, 12 Mar 2021 07:32:14 +0000 (15:32 +0800)]
LF-3503 ARM64: imx8mp-ddr4-evk: add nand support

Add nand support for i.MX8MP-DDR4-EVK board.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Han Xu <han.xu@nxp.com>
4 years agoLF-3264-2 arm: dts: imx7ulp: enable edma support for lpi2c nodes
Clark Wang [Tue, 19 Jan 2021 11:18:27 +0000 (19:18 +0800)]
LF-3264-2 arm: dts: imx7ulp: enable edma support for lpi2c nodes

Enable edma support for all lpi2c nodes in imx7ulp-evk.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Li Jun <jun.li@nxp.com>
4 years agoLF-3264-1 i2c: lpi2c: add edma mode support
Clark Wang [Tue, 19 Jan 2021 11:15:40 +0000 (19:15 +0800)]
LF-3264-1 i2c: lpi2c: add edma mode support

Add eDMA receive and send mode support.
Support to read and write data larger than 256 bytes in one frame.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Li Jun <jun.li@nxp.com>
4 years agoLF-3652 gpu-viv: Integrate 6.4.3.p2 20210416 release
Xianzhong [Wed, 21 Apr 2021 10:15:22 +0000 (18:15 +0800)]
LF-3652 gpu-viv: Integrate 6.4.3.p2 20210416 release

This version includes more bug-fixings for 8ULP GPU

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
4 years agogpu-viv: Integrate 6.4.3.p2 GPU kernel driver
Xianzhong [Mon, 29 Mar 2021 08:44:28 +0000 (16:44 +0800)]
gpu-viv: Integrate 6.4.3.p2 GPU kernel driver

Major accomplishments
*  Vulkan driver memory leak issue
*  Android11 NN1.3 CTS
*  OCL3.0 CTS(not fully pass yet)
*  Solved Antutu v8 Quality and unstable issue

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
4 years agotty: serial: imx: add peripheral_config/peripheral_size for config
Robin Gong [Tue, 23 Mar 2021 17:02:44 +0000 (01:02 +0800)]
tty: serial: imx: add peripheral_config/peripheral_size for config

Add peripheral_config/peripheral_size for sdma, otherwise, the random
value of local variable slave_config may cause unexpected
peripheral_config and make sdma mess up.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit ba33de1c9535416f702fbf8bcbcef17f9cced409)

4 years agospi: spi-imx: add peripheral_config/peripheral_size for config
Robin Gong [Tue, 23 Mar 2021 17:12:08 +0000 (01:12 +0800)]
spi: spi-imx: add peripheral_config/peripheral_size for config

Add peripheral_config/peripheral_size for sdma, otherwise, the random
value of local variable tx/rx may cause unexpected
peripheral_config and make sdma mess up.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 77e7980fb495193019bf74639ef9198045fb6045)

4 years agodmaengine: fsl-edma-v3: dynamic change burst length
Robin Gong [Fri, 22 May 2020 14:00:28 +0000 (22:00 +0800)]
dmaengine: fsl-edma-v3: dynamic change burst length

Dynamic change burst length in case transfer length is not multiple of
burst length to  meet the edmav3 hardware limitation.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 4b92c1194ba9f1c6f6d9a6f13a09639323787ce9)

4 years agoLF-3435: arm64: defconfig: remove CONFIG_COMMON_CLK_BD718XX
Robin Gong [Fri, 26 Feb 2021 17:08:08 +0000 (01:08 +0800)]
LF-3435: arm64: defconfig: remove CONFIG_COMMON_CLK_BD718XX

remove CONFIG_COMMON_CLK_BD718XX since 32khz out from BD71847 not used on
i.mx8mm/i.mx8mn board, otherwise, below clk-bd718x7.ko would be inserted
by Yocto and below warning comes out:

[    8.944889] bd718xx-clk: probe of bd71847-clk.2.auto failed with error -22

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Clark Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 634bd96794c640e8442493c91a3e8408f893fcc1)

4 years agodmaengine: imx-sdma: add fifo offset/words_per_fifo for sais script
Robin Gong [Tue, 23 Mar 2021 16:48:27 +0000 (00:48 +0800)]
dmaengine: imx-sdma: add fifo offset/words_per_fifo for sais script

Add fifo offset and words_per_fifo for  mcu_2_sai/sai_2_mcu scripts.

fifo offset:
0: no offset between fifos, means all fifos are continuous.
1: means 1 word offset between fifos.
2: means 2 word offset between fifos.
...
n: means n word offset between fifos, n max is 15.

words_per_fifo means how many times of fill/fetch fifo before jump to next
fifo, such as 2 audio channels need to be filled per lane.
0: only one time(audio channel) of fill/fetch per fifo before jump.
1: two times(audio channels) of fill/fetch per fifo before jump.
...
n: means n + 1 times(audio channels) of fill/fetch per fifo before jump.
   n max is 15.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit b59cc564e30dc789a78ea3abf8ae1920369b5e56)

4 years agodt-bindings: dma: fsl-imx-sdma: remove sw_done/selector
Robin Gong [Wed, 24 Mar 2021 16:56:35 +0000 (00:56 +0800)]
dt-bindings: dma: fsl-imx-sdma: remove sw_done/selector

remove sw_done/selector since they are pass by slave_config instead.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 26d937473479ac9c4acd0779858164d5b03cb673)

4 years agodmaengine: imx-sdma: move dma parameters from imx_dma_data to slave_config
Robin Gong [Wed, 24 Mar 2021 16:50:10 +0000 (00:50 +0800)]
dmaengine: imx-sdma: move dma parameters from imx_dma_data to slave_config

use 'peripheral_config' to pass our special sdma parameters from
dma_request_slave_channel() to dmaengine_slave_config(), thus could make
upper driver much cleaner, besides could make binding docs much cleaner
too and easier to upstreaming.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 6f52f8e232017df86fa50270c206f99b21a37ac2)

4 years agoMLK-25266: dmaengine: imx-sdma: add i2c dma support
Robin Gong [Fri, 8 Jan 2021 17:41:20 +0000 (01:41 +0800)]
MLK-25266: dmaengine: imx-sdma: add i2c dma support

add new i2c dma script.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Clark Wang <xiaoning.wang@nxp.com>
4 years agoLF-3724-7: ak4458: Consider slots number for DSD case
Shengjiu Wang [Wed, 21 Apr 2021 07:41:38 +0000 (15:41 +0800)]
LF-3724-7: ak4458: Consider slots number for DSD case

DSD clock frequency need to consider the slots number,
previously on slots=1 is considered.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-6: ASoC: fsl_asrc_dma: add sdma_audio_config support
Shengjiu Wang [Thu, 25 Mar 2021 02:59:14 +0000 (10:59 +0800)]
LF-3724-6: ASoC: fsl_asrc_dma: add sdma_audio_config support

Add sdma_audio_config support especially for multi fifo

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-5: ASoC: fsl_asrc_m2m: clear peripheral_config
Shengjiu Wang [Mon, 29 Mar 2021 02:22:12 +0000 (10:22 +0800)]
LF-3724-5: ASoC: fsl_asrc_m2m: clear peripheral_config

clear peripheral_config

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-4: ASoC: fsl_easrc_m2m: clear peripheral_config
Shengjiu Wang [Mon, 29 Mar 2021 02:22:50 +0000 (10:22 +0800)]
LF-3724-4: ASoC: fsl_easrc_m2m: clear peripheral_config

clear peripheral_config

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-3: ASoC: fsl_micfil: add sdma_audio_config support
Shengjiu Wang [Thu, 25 Mar 2021 02:55:35 +0000 (10:55 +0800)]
LF-3724-3: ASoC: fsl_micfil: add sdma_audio_config support

Add sdma_audio_config support especially for multi fifo

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-2: ASoC: fsl_sai: add sdma_audio_config support
Shengjiu Wang [Thu, 25 Mar 2021 02:45:38 +0000 (10:45 +0800)]
LF-3724-2: ASoC: fsl_sai: add sdma_audio_config support

Add sdma_audio_config support especially for multi fifo.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoLF-3724-1: ASoC: fsl_ssi: add sdma_audio_config support
Shengjiu Wang [Thu, 25 Mar 2021 02:47:53 +0000 (10:47 +0800)]
LF-3724-1: ASoC: fsl_ssi: add sdma_audio_config support

Add sdma_audio_config support especially for dual fifo

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
4 years agoASoC: dmaengine_pcm: add peripheral configuration
Shengjiu Wang [Fri, 5 Feb 2021 07:26:25 +0000 (15:26 +0800)]
ASoC: dmaengine_pcm: add peripheral configuration

The commit e7bbb7acabf4 ("dmaengine: add peripheral configuration")
adds peripheral configuration for dma_slave_config.

This configuration is useful for some audio peripherals, for
example, the peripheral supports multi fifos, we can
let the DMA know which fifos are selected. So also add
this configuration for snd_dmaengine_dai_dma_data.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1612509985-11063-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodmaengine: add peripheral configuration
Vinod Koul [Mon, 9 Nov 2020 08:54:49 +0000 (14:24 +0530)]
dmaengine: add peripheral configuration

Some complex dmaengine controllers have capability to program the
peripheral device, so pass on the peripheral configuration as part of
dma_slave_config

Link: https://lore.kernel.org/r/20201109085450.24843-3-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
4 years agoRevert "MLK-16224-3: ASoC: imx-pcm-dma-v2: fifo_num is used by dma slave config"
Shengjiu Wang [Thu, 25 Mar 2021 02:58:58 +0000 (10:58 +0800)]
Revert "MLK-16224-3: ASoC: imx-pcm-dma-v2: fifo_num is used by dma slave config"

This reverts commit a28e7b0e8505b0d235f266e6fc0b35168de14cf4.

4 years agoRevert "MLK-16224-2: ASoC: dmaengine_pcm: add fifo_num to snd_dmaengine_dai_dma_data"
Shengjiu Wang [Mon, 22 Mar 2021 02:37:40 +0000 (10:37 +0800)]
Revert "MLK-16224-2: ASoC: dmaengine_pcm: add fifo_num to snd_dmaengine_dai_dma_data"

This reverts commit 32cabc13306693b05e1a22cf1627c765ac82e861.

4 years agoRevert "MLK-16224-1: dmaengine: add src_fifo_num and dst_fifo_num in dma_slave_config"
Shengjiu Wang [Wed, 21 Apr 2021 03:19:21 +0000 (11:19 +0800)]
Revert "MLK-16224-1: dmaengine: add src_fifo_num and dst_fifo_num in dma_slave_config"

This reverts commit 54311ce5f603cdf36ba00c7101e0dbb7599bf497.

4 years agoMLK-21499 arm: imx: put pads into OFF state before entering VLLS
Shenwei Wang [Tue, 20 Aug 2019 20:07:36 +0000 (15:07 -0500)]
MLK-21499 arm: imx: put pads into OFF state before entering VLLS

Due to the hardware limitation, the power supply for the PADs could not
be off during VLLS mode. To reduce the power consumption under VLLS
state, put all the PADs on iomuxc1 into OFF state before the
system enters into VLLS mode.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
4 years agoMA-18933-02: media: isi-m2m: add invalid format handle for ISI mem2mem
Guoniu.zhou [Tue, 20 Apr 2021 06:08:40 +0000 (14:08 +0800)]
MA-18933-02: media: isi-m2m: add invalid format handle for ISI mem2mem

When user set invalid value for width or height, driver will return
error, so adding invalid format handle for the case. The value will
be selected among the minimum and maximum value of ISI support

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
4 years agoMA-18933-01: media: imx8-common: change integer data type to unsigned
Guoniu.zhou [Tue, 20 Apr 2021 05:50:25 +0000 (13:50 +0800)]
MA-18933-01: media: imx8-common: change integer data type to unsigned

Change data type of ISI_2K, ISI_4K, ISI_8K to unsign integer and add macro
for ISI minimum support width or height.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
4 years agoMLK-25455-02: media: isi: refine error message handle for ISI core driver
Guoniu.zhou [Thu, 15 Apr 2021 08:46:33 +0000 (16:46 +0800)]
MLK-25455-02: media: isi: refine error message handle for ISI core driver

Refine error message handle for ISI core driver

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
4 years agoMLK-25455-01: media: csi: refine error message handle for Samsung mipi csi driver
Guoniu.zhou [Thu, 15 Apr 2021 08:36:40 +0000 (16:36 +0800)]
MLK-25455-01: media: csi: refine error message handle for Samsung mipi csi driver

Refine error message handle for Samsung mipi csi driver

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
4 years agoMLK-25441 clk: imx8mp: fix ISP clocks in mediamix
Robby Cai [Thu, 15 Apr 2021 10:18:57 +0000 (18:18 +0800)]
MLK-25441 clk: imx8mp: fix ISP clocks in mediamix

ISP1/2 share the core/axi/ahb clock in mediamix
BIT13/14/15(ISP1_core/axi/ahb) should be reserved bits.

The patch fixed it.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: G.n. Zhou <guoniu.zhou@nxp.com>
4 years agoMLK-25356 arm64: dts: imx8mp: fix overlap for reserved memory for isp
Robby Cai [Thu, 1 Apr 2021 12:09:30 +0000 (20:09 +0800)]
MLK-25356 arm64: dts: imx8mp: fix overlap for reserved memory for isp

Remove reserved memory for isp1 because now only use one isp0 for tuning tool.
The reserved memory is only used for tuning tool, could be removed for normal
operations.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: G.n. Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 5f2220e87dd8a8fb86f524ea7945ab1d4155bc73)

4 years agoMLK-25362 arm64: dts: imx8mp: use max-pixel-frequency to differentiate used MIPI...
Robby Cai [Tue, 23 Mar 2021 06:38:57 +0000 (07:38 +0100)]
MLK-25362 arm64: dts: imx8mp: use max-pixel-frequency to differentiate used MIPI clock

This patch replaced link-frequencies to express single/dual cameras case, which
is introduced from 21c3114f6b280aef16b9298857ba2cd6f3e6d479
MLK-23600-6 Update Basler camera link-frequencies to differentiate used MIPI clock

Originally from Thies Moeller <thies.moeller@baslerweb.com>
With the fix for max-pixel-frequency for dual cameras basler camera + ov5640.

For other sensor porting, could also use max-pixel-frequency property.
Other properties might be optional.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: G.n. Zhou <guoniu.zhou@nxp.com>
4 years agoMLK-23600-6 Update Basler camera link-frequencies to differentiate used MIPI clock
Robby Cai [Tue, 9 Feb 2021 23:04:33 +0000 (07:04 +0800)]
MLK-23600-6 Update Basler camera link-frequencies to differentiate used MIPI clock

for 1 ISP camera on CSI0, MIPI CSI clock set to 500MHz
for 2 ISP cameras on CSI0/CSI1, MIPI CSI clock both set to 266MHz

Basler camera driver uses link-frequencies to retrieve proper clocks on
1 ISP or 2 ISP cameras cases.

Originally from Thies Moeller <thies.moeller@baslerweb.com>

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit bb98a98727e49cc40539be66c5f7aefc8e6009b9)

4 years agoMLK-23600-5 Fix the way VIV_VIDIOC_QUERY_EXTMEM used reserved memory
Robby Cai [Wed, 13 Jan 2021 02:54:39 +0000 (10:54 +0800)]
MLK-23600-5 Fix the way VIV_VIDIOC_QUERY_EXTMEM used reserved memory

use memory-region to get reserved memory

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 5a28380ef4f4afffdabcfacd062706487cc150f8)

4 years agoMLK-23600-4 Use GPR to control dewarp in driver
Robby Cai [Mon, 11 Jan 2021 09:05:36 +0000 (17:05 +0800)]
MLK-23600-4 Use GPR to control dewarp in driver

Previously it controls dewarp in mipi driver which is not standard way.
Now use gpr to control dewarp in dewarp driver.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 22373bd4b6979bc9c8e63b678bcd5204714fd4c9)

4 years agoMLK-23600-2 Update Dewarp power domain
Robby Cai [Thu, 24 Dec 2020 12:41:57 +0000 (20:41 +0800)]
MLK-23600-2 Update Dewarp power domain

update Dewarp power domain

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e6031680ba2d67a6961a5da5fc68a913962c66d2)

4 years agoMLK-23600-1 Change MIPI CSI clock to 266MHz for dual ISP cameras
Robby Cai [Wed, 27 Jan 2021 13:54:32 +0000 (21:54 +0800)]
MLK-23600-1 Change MIPI CSI clock to 266MHz for dual ISP cameras

Set MIPI clock according to IC team.
for 1 ISP camera on CSI0, MIPI CSI clock set to 500MHz
for 2 ISP cameras on CSI0/CSI1, MIPI CSI clock both set to 266MHz

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit a38f457b63fa8a0d9b4c5de39a12959c172e7e35)

4 years agoMLK-25215-4 ARM64: dts: imx8mp-evk: add dual baslers cameras support
Robby Cai [Wed, 6 Jan 2021 11:03:37 +0000 (19:03 +0800)]
MLK-25215-4 ARM64: dts: imx8mp-evk: add dual baslers cameras support

add dual baslers camera support to work with dual ISPs

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit a755ce242b551dafcca648f9d54585fd9ba02493)

4 years agoMLK-25215-3 ARM64: dts: imx8mp-evk: add dual isp cameras basler and ov2775
Robby Cai [Wed, 6 Jan 2021 10:57:40 +0000 (18:57 +0800)]
MLK-25215-3 ARM64: dts: imx8mp-evk: add dual isp cameras basler and ov2775

add dual isp supports with basler camera and ov2775

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
(cherry picked from commit af20fa807f455ef846f7ffcebc6f489f285b1622)

4 years agoLF-3712 net: stmmac: fix kernel dump when system suspend if EQOS down
Joakim Zhang [Fri, 16 Apr 2021 01:33:26 +0000 (09:33 +0800)]
LF-3712 net: stmmac: fix kernel dump when system suspend if EQOS down

Fix kernel dump when system suspend if EQOS down:

[  136.705424] ------------[ cut here ]------------
[  136.705428] enet_qos_root_clk already disabled
[  136.705466] WARNING: CPU: 0 PID: 503 at drivers/clk/clk.c:952 clk_core_disable+0xa0/0xa8
[  136.705468] Modules linked in:
[  136.705476] CPU: 0 PID: 503 Comm: sh Not tainted 5.10.29-103840-g470aa06b5004 #1064
[  136.705478] Hardware name: NXP i.MX8MPlus EVK board (DT)
[  136.705482] pstate: 40000085 (nZcv daIf -PAN -UAO -TCO BTYPE=--)
[  136.705485] pc : clk_core_disable+0xa0/0xa8
[  136.705488] lr : clk_core_disable+0xa0/0xa8
[  136.705490] sp : ffff800012433a10
[  136.705492] x29: ffff800012433a10 x28: ffff800011aafd68
[  136.705496] x27: 0000000000000000 x26: ffff800010784040
[  136.705500] x25: ffff800011ba0000 x24: 0000001fd4235124
[  136.705504] x23: 0000000000000000 x22: ffff800011b4e000
[  136.705508] x21: ffff0000c0defe00 x20: ffff0000c0addb00
[  136.705513] x19: ffff0000c0addb00 x18: ffff0000c74f44c0
[  136.705516] x17: 0000000000000000 x16: 0000000000000000
[  136.705520] x15: 0000000000000000 x14: 00000000000000fe
[  136.705524] x13: ffff8000119f1650 x12: 0000000000000001
[  136.705528] x11: 0000000000000000 x10: 00000000000009d0
[  136.705532] x9 : 00000000fffffffe x8 : 646165726c61206b
[  136.705536] x7 : 6c635f746f6f725f x6 : ffff800012433728
[  136.705540] x5 : ffff00017f36f900 x4 : 0000000000000000
[  136.705544] x3 : 0000000000000027 x2 : 0000000000000023
[  136.705548] x1 : 5d31c447452a7300 x0 : 0000000000000000
[  136.705552] Call trace:
[  136.705556]  clk_core_disable+0xa0/0xa8
[  136.705560]  clk_core_disable_lock+0x20/0x38
[  136.705563]  clk_disable+0x1c/0x28
[  136.705568]  stmmac_bus_clks_enable+0x4c/0xf0
[  136.705572]  stmmac_noirq_suspend+0x38/0x50
[  136.705578]  dpm_run_callback.isra.0+0x38/0xd8
[  136.705582]  __device_suspend_noirq+0xc4/0x1b8
[  136.705584]  dpm_suspend_noirq+0x100/0x258
[  136.705588]  suspend_devices_and_enter+0x160/0x5b8
[  136.705591]  pm_suspend+0x2ec/0x350
[  136.705595]  state_store+0x88/0x108
[  136.705599]  kobj_attr_store+0x14/0x28
[  136.705603]  sysfs_kf_write+0x40/0x50
[  136.705606]  kernfs_fop_write_iter+0x110/0x1a0
[  136.705610]  new_sync_write+0xe4/0x178
[  136.705613]  vfs_write+0x24c/0x380
[  136.705616]  ksys_write+0x68/0xf0
[  136.705619]  __arm64_sys_write+0x18/0x20
[  136.705625]  el0_svc_common.constprop.0+0x68/0x160
[  136.705628]  do_el0_svc+0x20/0x80
[  136.705632]  el0_svc+0x10/0x18
[  136.705635]  el0_sync_handler+0xa8/0xb0
[  136.705639]  el0_sync+0x140/0x180
[  136.705641] ---[ end trace f87fd1287132338e ]---
[  136.705644] ------------[ cut here ]------------
[  136.705645] enet_qos_root_clk already unprepared
[  136.705667] WARNING: CPU: 0 PID: 503 at drivers/clk/clk.c:810 clk_core_unprepare+0xe0/0x100
[  136.705669] Modules linked in:
[  136.705674] CPU: 0 PID: 503 Comm: sh Tainted: G        W         5.10.29-103840-g470aa06b5004 #1064
[  136.705675] Hardware name: NXP i.MX8MPlus EVK board (DT)
[  136.705678] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--)
[  136.705681] pc : clk_core_unprepare+0xe0/0x100
[  136.705684] lr : clk_core_unprepare+0xe0/0x100
[  136.705686] sp : ffff800012433a20
[  136.705688] x29: ffff800012433a20 x28: ffff800011aafd68
[  136.705692] x27: 0000000000000000 x26: ffff800010784040
[  136.705696] x25: ffff800011ba0000 x24: 0000001fd4235124
[  136.705700] x23: 0000000000000000 x22: ffff800011b4e000
[  136.705704] x21: ffff0000c0defe00 x20: ffff0000c0e40940
[  136.705708] x19: ffff0000c0addb00 x18: ffff0000c74f44c0
[  136.705712] x17: 0000000000000000 x16: 0000000000000000
[  136.705716] x15: 0000000000000000 x14: 00000000000000fe
[  136.705720] x13: ffff8000119f1650 x12: 0000000000000001
[  136.705724] x11: 0000000000000000 x10: 00000000000009d0
[  136.705728] x9 : 00000000fffffffe x8 : 646165726c61206b
[  136.705731] x7 : 6c635f746f6f725f x6 : ffff800012433738
[  136.705735] x5 : ffff00017f36f900 x4 : 0000000000000000
[  136.705739] x3 : 0000000000000027 x2 : 0000000000000023
[  136.705743] x1 : 5d31c447452a7300 x0 : 0000000000000000
[  136.705747] Call trace:
[  136.705751]  clk_core_unprepare+0xe0/0x100
[  136.705754]  clk_unprepare+0x28/0x40
[  136.705757]  stmmac_bus_clks_enable+0x58/0xf0
[  136.705760]  stmmac_noirq_suspend+0x38/0x50
[  136.705764]  dpm_run_callback.isra.0+0x38/0xd8
[  136.705767]  __device_suspend_noirq+0xc4/0x1b8
[  136.705770]  dpm_suspend_noirq+0x100/0x258
[  136.705772]  suspend_devices_and_enter+0x160/0x5b8
[  136.705775]  pm_suspend+0x2ec/0x350
[  136.705778]  state_store+0x88/0x108
[  136.705781]  kobj_attr_store+0x14/0x28
[  136.705784]  sysfs_kf_write+0x40/0x50
[  136.705786]  kernfs_fop_write_iter+0x110/0x1a0
[  136.705789]  new_sync_write+0xe4/0x178
[  136.705792]  vfs_write+0x24c/0x380
[  136.705795]  ksys_write+0x68/0xf0
[  136.705798]  __arm64_sys_write+0x18/0x20
[  136.705801]  el0_svc_common.constprop.0+0x68/0x160
[  136.705804]  do_el0_svc+0x20/0x80
[  136.705807]  el0_svc+0x10/0x18
[  136.705810]  el0_sync_handler+0xa8/0xb0
[  136.705812]  el0_sync+0x140/0x180
[  136.705814] ---[ end trace f87fd1287132338f ]---

Fixes: 0ad8ae3531f2 LF-3101-1 net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
4 years agoMLK-25446-5: arm64: dts: imx8mp-evk: enable usdhc1 bus on M.2 interface
Sherry Sun [Wed, 14 Apr 2021 07:34:11 +0000 (15:34 +0800)]
MLK-25446-5: arm64: dts: imx8mp-evk: enable usdhc1 bus on M.2 interface

The patch is to enable usdhc1 on M.2 interface for SDIO wlan, and need
to disable PCIE interface on M.2.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoMLK-25446-4: arm64: dts: imx8mq-evk: add gpio interrupt for M.2 SDIO wifi to wakeup...
Sherry Sun [Mon, 12 Apr 2021 05:02:32 +0000 (13:02 +0800)]
MLK-25446-4: arm64: dts: imx8mq-evk: add gpio interrupt for M.2 SDIO wifi to wakeup the host

Add a child node to the SDIO controller to provide the wakeup gpio
interrupt properties for M.2 SDIO interface 89xx wifi driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoMLK-25446-3: arm64: dts: imx8m: add gpio interrupt for wifi to wakeup the host
Sherry Sun [Wed, 10 Mar 2021 06:11:45 +0000 (14:11 +0800)]
MLK-25446-3: arm64: dts: imx8m: add gpio interrupt for wifi to wakeup the host

Add a child node to the SDIO/PCIE controller to provide the wakeup gpio
interrupt properties for 8987/8997 wifi driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoMLK-25446-2: arm64: dts: imx8mn-evk: remove unused brcmf node
Sherry Sun [Mon, 19 Apr 2021 06:08:16 +0000 (14:08 +0800)]
MLK-25446-2: arm64: dts: imx8mn-evk: remove unused brcmf node

Now imx8mn only supports the on-board nxp 8987 wifi chip, not the brcm
wifi chip, so brcmf device node is useless, remove it here.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoMLK-25446-1: dt-bindings: nxp,wifi-wake-host: add DT Binding doc for nxp,wifi-wake...
Sherry Sun [Wed, 14 Apr 2021 02:53:21 +0000 (10:53 +0800)]
MLK-25446-1: dt-bindings: nxp,wifi-wake-host: add DT Binding doc for nxp,wifi-wake-host

Add DT Binding doc for nxp,wifi-wake-host, which is used for nxp 89XX
wireless device to wakeup the host.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoMerge tag 'v5.10.31' into lf-5.10.y
Jason Liu [Mon, 19 Apr 2021 02:20:13 +0000 (10:20 +0800)]
Merge tag 'v5.10.31' into lf-5.10.y

This is the 5.10.31 stable release

* tag 'v5.10.31': (213 commits)
  Linux 5.10.31
  xen/events: fix setting irq affinity
  net: sfp: cope with SFPs that set both LOS normal and LOS inverted
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
 Conflicts:
drivers/gpu/drm/imx/imx-ldb.c

4 years agoarm64: imx8mx: vpu: integrate vsi 20210416 release
Zhou Peng [Fri, 16 Apr 2021 10:49:24 +0000 (18:49 +0800)]
arm64: imx8mx: vpu: integrate vsi 20210416 release

- M865SW-738: VSI V4L2 Engineer release package 20210416
  M865SW-636: [VPU/V4L2] H264 decoder: Resolution change stream seek hang
  M865SW-696: [VPU/V4L2] VC8000E: Flush encoder then get V4L2_EVENT_CODEC_ERROR event
  M865SW-730: [VPU/V4L2] encoder: Android poll() waiting timeout at beginning
  M865SW-734: [VPU/V4L2] decoder: daemon occurs error when running unit test
  M865SW-697: [VPU/V4L2] encoder: the bitrate of encoding vp8 is not accurate
  M865SW-726: [VPU/V4L2] 8MM/8MP HEVC 10bit decoder: cannot play on Android

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit ddf936035cb532689a9442529089e648729ac378)

4 years agoLinux 5.10.31
Greg Kroah-Hartman [Fri, 16 Apr 2021 09:43:22 +0000 (11:43 +0200)]
Linux 5.10.31

Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Andrei Rabusov <a.rabusov@tum.de>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Jason Self <jason@bluehome.net>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20210415144413.165663182@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoxen/events: fix setting irq affinity
Juergen Gross [Mon, 12 Apr 2021 06:28:45 +0000 (08:28 +0200)]
xen/events: fix setting irq affinity

The backport of upstream patch 25da4618af240fbec61 ("xen/events: don't
unmask an event channel when an eoi is pending") introduced a
regression for stable kernels 5.10 and older: setting IRQ affinity for
IRQs related to interdomain events would no longer work, as moving the
IRQ to its new cpu was not included in the irq_ack callback for those
events.

Fix that by adding the needed call.

Note that kernels 5.11 and later don't need the explicit moving of the
IRQ to the target cpu in the irq_ack callback, due to a rework of the
affinity setting in kernel 5.11.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet: sfp: cope with SFPs that set both LOS normal and LOS inverted
Russell King [Sun, 10 Jan 2021 10:58:32 +0000 (10:58 +0000)]
net: sfp: cope with SFPs that set both LOS normal and LOS inverted

commit 624407d2cf14ff58e53bf4b2af9595c4f21d606e upstream.

The SFP MSA defines two option bits in byte 65 to indicate how the
Rx_LOS signal on SFP pin 8 behaves:

bit 2 - Loss of Signal implemented, signal inverted from standard
        definition in SFP MSA (often called "Signal Detect").
bit 1 - Loss of Signal implemented, signal as defined in SFP MSA
        (often called "Rx_LOS").

Clearly, setting both bits results in a meaningless situation: it would
mean that LOS is implemented in both the normal sense (1 = signal loss)
and inverted sense (0 = signal loss).

Unfortunately, there are modules out there which set both bits, which
will be initially interpret as "inverted" sense, and then, if the LOS
signal changes state, we will toggle between LINK_UP and WAIT_LOS
states.

Change our LOS handling to give well defined behaviour: only interpret
these bits as meaningful if exactly one is set, otherwise treat it as
if LOS is not implemented.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/E1kyYQa-0004iR-CU@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonet: sfp: relax bitrate-derived mode check
Russell King [Wed, 9 Dec 2020 11:22:54 +0000 (11:22 +0000)]
net: sfp: relax bitrate-derived mode check

commit 7a77233ec6d114322e2c4f71b4e26dbecd9ea8a7 upstream.

Do not check the encoding when deriving 1000BASE-X from the bitrate
when no other modes are discovered. Some GPON modules (VSOL V2801F
and CarlitoxxPro CPGOS03-0490 v2.0) indicate NRZ encoding with a
1200Mbaud bitrate, but should be driven with 1000BASE-X on the host
side.

Tested-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoperf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches
Arnaldo Carvalho de Melo [Fri, 5 Mar 2021 13:02:09 +0000 (10:02 -0300)]
perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches

commit 77d02bd00cea9f1a87afe58113fa75b983d6c23a upstream.

Noticed on a debian:experimental mips and mipsel cross build build
environment:

  perfbuilder@ec265a086e9b:~$ mips-linux-gnu-gcc --version | head -1
  mips-linux-gnu-gcc (Debian 10.2.1-3) 10.2.1 20201224
  perfbuilder@ec265a086e9b:~$

    CC       /tmp/build/perf/util/map.o
  util/map.c: In function 'map__new':
  util/map.c:109:5: error: '%s' directive output may be truncated writing between 1 and 2147483645 bytes into a region of size 4096 [-Werror=format-truncation=]
    109 |    "%s/platforms/%s/arch-%s/usr/lib/%s",
        |     ^~
  In file included from /usr/mips-linux-gnu/include/stdio.h:867,
                   from util/symbol.h:11,
                   from util/map.c:2:
  /usr/mips-linux-gnu/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output 32 or more bytes (assuming 4294967321) into a destination of size 4096
     67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     68 |        __bos (__s), __fmt, __va_arg_pack ());
        |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Since we have the lenghts for what lands in that place, use it to give
the compiler more info and make it happy.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonetfilter: x_tables: fix compat match/target pad out-of-bound write
Florian Westphal [Wed, 7 Apr 2021 19:38:57 +0000 (21:38 +0200)]
netfilter: x_tables: fix compat match/target pad out-of-bound write

commit b29c457a6511435960115c0f548c4360d5f4801d upstream.

xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.

Remove this code and zero the entire blob beforehand.

Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appspotmail.com
Reported-by: Andy Nguyen <theflow@google.com>
Fixes: 9fa492cdc160c ("[NETFILTER]: x_tables: simplify compat API")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoblock: don't ignore REQ_NOWAIT for direct IO
Pavel Begunkov [Fri, 20 Nov 2020 17:10:28 +0000 (17:10 +0000)]
block: don't ignore REQ_NOWAIT for direct IO

[ Upstream commit f8b78caf21d5bc3fcfc40c18898f9d52ed1451a5 ]

If IOCB_NOWAIT is set on submission, then that needs to get propagated to
REQ_NOWAIT on the block side. Otherwise we completely lose this
information, and any issuer of IOCB_NOWAIT IO will potentially end up
blocking on eg request allocation on the storage side.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agoriscv,entry: fix misaligned base for excp_vect_table
Zihao Yu [Wed, 17 Mar 2021 08:17:25 +0000 (16:17 +0800)]
riscv,entry: fix misaligned base for excp_vect_table

[ Upstream commit ac8d0b901f0033b783156ab2dc1a0e73ec42409b ]

In RV64, the size of each entry in excp_vect_table is 8 bytes. If the
base of the table is not 8-byte aligned, loading an entry in the table
will raise a misaligned exception. Although such exception will be
handled by opensbi/bbl, this still causes performance degradation.

Signed-off-by: Zihao Yu <yuzihao@ict.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agoio_uring: don't mark S_ISBLK async work as unbounded
Jens Axboe [Thu, 1 Apr 2021 14:38:34 +0000 (08:38 -0600)]
io_uring: don't mark S_ISBLK async work as unbounded

[ Upstream commit 4b982bd0f383db9132e892c0c5144117359a6289 ]

S_ISBLK is marked as unbounded work for async preparation, because it
doesn't match S_ISREG. That is incorrect, as any read/write to a block
device is also a bounded operation. Fix it up and ensure that S_ISBLK
isn't marked unbounded.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agonull_blk: fix command timeout completion handling
Damien Le Moal [Wed, 31 Mar 2021 22:52:44 +0000 (07:52 +0900)]
null_blk: fix command timeout completion handling

[ Upstream commit de3510e52b0a398261271455562458003b8eea62 ]

Memory backed or zoned null block devices may generate actual request
timeout errors due to the submission path being blocked on memory
allocation or zone locking. Unlike fake timeouts or injected timeouts,
the request submission path will call blk_mq_complete_request() or
blk_mq_end_request() for these real timeout errors, causing a double
completion and use after free situation as the block layer timeout
handler executes blk_mq_rq_timed_out() and __blk_mq_free_request() in
blk_mq_check_expired(). This problem often triggers a NULL pointer
dereference such as:

BUG: kernel NULL pointer dereference, address: 0000000000000050
RIP: 0010:blk_mq_sched_mark_restart_hctx+0x5/0x20
...
Call Trace:
  dd_finish_request+0x56/0x80
  blk_mq_free_request+0x37/0x130
  null_handle_cmd+0xbf/0x250 [null_blk]
  ? null_queue_rq+0x67/0xd0 [null_blk]
  blk_mq_dispatch_rq_list+0x122/0x850
  __blk_mq_do_dispatch_sched+0xbb/0x2c0
  __blk_mq_sched_dispatch_requests+0x13d/0x190
  blk_mq_sched_dispatch_requests+0x30/0x60
  __blk_mq_run_hw_queue+0x49/0x90
  process_one_work+0x26c/0x580
  worker_thread+0x55/0x3c0
  ? process_one_work+0x580/0x580
  kthread+0x134/0x150
  ? kthread_create_worker_on_cpu+0x70/0x70
  ret_from_fork+0x1f/0x30

This problem very often triggers when running the full btrfs xfstests
on a memory-backed zoned null block device in a VM with limited amount
of memory.

Avoid this by executing blk_mq_complete_request() in null_timeout_rq()
only for commands that are marked for a fake timeout completion using
the fake_timeout boolean in struct null_cmd. For timeout errors injected
through debugfs, the timeout handler will execute
blk_mq_complete_request()i as before. This is safe as the submission
path does not execute complete requests in this case.

In null_timeout_rq(), also make sure to set the command error field to
BLK_STS_TIMEOUT and to propagate this error through to the request
completion.

Reported-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Tested-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Reviewed-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20210331225244.126426-1-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agoidr test suite: Create anchor before launching throbber
Matthew Wilcox (Oracle) [Thu, 1 Apr 2021 11:46:49 +0000 (07:46 -0400)]
idr test suite: Create anchor before launching throbber

[ Upstream commit 094ffbd1d8eaa27ed426feb8530cb1456348b018 ]

The throbber could race with creation of the anchor entry and cause the
IDR to have zero entries in it, which would cause the test to fail.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agoidr test suite: Take RCU read lock in idr_find_test_1
Matthew Wilcox (Oracle) [Thu, 1 Apr 2021 11:44:48 +0000 (07:44 -0400)]
idr test suite: Take RCU read lock in idr_find_test_1

[ Upstream commit 703586410da69eb40062e64d413ca33bd735917a ]

When run on a single CPU, this test would frequently access already-freed
memory.  Due to timing, this bug never showed up on multi-CPU tests.

Reported-by: Chris von Recklinghausen <crecklin@redhat.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>