linux.git
3 years agoMLK-25465-1 dmaengine: imx-sdma: move runtime behind to transfer phase
Robin Gong [Wed, 31 Mar 2021 11:30:42 +0000 (19:30 +0800)]
MLK-25465-1 dmaengine: imx-sdma: move runtime behind to transfer phase

move runtime behind to transfer phase instead of request channel phase,
thus, runtime could be much preciser, because some driver like ALSA request
channel in driver probe but dma transfer may never start indeed.

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

4 years agoLF-3469: net: phy: at803x: Disable PHY hibernation during init
Shenwei Wang [Tue, 27 Apr 2021 16:27:28 +0000 (11:27 -0500)]
LF-3469: net: phy: at803x: Disable PHY hibernation during init

The Atheros 803x PHY will go to hibernate mode after
10 seconds if no activity on the link.
When in hibernation, it will not provide any clock to the MAC.

This caused issue when trying to bring up the interface when
no cable was connected: MAC driver would timeout, and the PHY
power domain would stay on. It is also possible that this caused
issues with EEE capable remote PHY.

Disabling this feature during initialization to avoid potential
side effects.

Signed-off-by: Seb Haezebrouck <sebastien.haezebrouck@nxp.com>
Reviewed-by: Shenwei Wang <shenwei.wang@nxp.com>
4 years agoMLK-25371 arm64: dts: imx8m: disable the l1ss in default
Richard Zhu [Tue, 27 Apr 2021 07:07:05 +0000 (15:07 +0800)]
MLK-25371 arm64: dts: imx8m: disable the l1ss in default

Disable the L1SS feature in default.
Please remove this patch, if L1SS is required, and make sure
that the HW supports L1SS.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
(cherry picked from commit 2843e1e62c991aab16150a56508d415fd43f3fbc)

4 years agoMLK-25464 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: append end_of_seq instead of end_of_st...
Shijie Qin [Mon, 26 Apr 2021 10:27:21 +0000 (18:27 +0800)]
MLK-25464 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: append end_of_seq instead of end_of_stream at end

Append end of sequence data instead of end of stream data at the end.
This is more appropriate since drvice doesn't know is current user
case is reset or actual end encode.
Besides, Amphion decoder will quit early during decoding if parse
end of stream data.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
(cherry picked from commit 9c9b3e52885e90d2ed2ceb925fe67e1c67161d31)

4 years agoMLK-25457 [[8QM_MEK/8QXP_MEK] mxc: vpu_windsor: ignore VUI operation in try_fmt
Shijie Qin [Wed, 21 Apr 2021 10:39:50 +0000 (18:39 +0800)]
MLK-25457 [[8QM_MEK/8QXP_MEK] mxc: vpu_windsor: ignore VUI operation in try_fmt

Encoder support all valid VUI formats.
In gstreamer, the range/matrix/transfer of following try_fmt() all the same
as firt time. So donot change VUI in try_fmt(), otherwise, gstreamer get
supported VUI list is incorrect.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
(cherry picked from commit aea600d6f7f47e8cfa5491a2f7378afc5d24816b)

4 years agoMLK-25456 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: donot return V4L2_FIELD_ANY
Shijie Qin [Wed, 21 Apr 2021 10:23:15 +0000 (18:23 +0800)]
MLK-25456 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: donot return V4L2_FIELD_ANY

Regarding field order, since encoder support progressive format only,
should return V4L2_FIELD_NONE. Drivers must never return V4L2_FIELD_ANY.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
(cherry picked from commit c47cab6f5784b17aa735f9863bbcdbea2bcbe393)

4 years agoLF-3753 arm64: dts: imx8mp-ddr4-evk: change hsio to be 400M
Li Jun [Mon, 19 Apr 2021 06:58:44 +0000 (14:58 +0800)]
LF-3753 arm64: dts: imx8mp-ddr4-evk: change hsio to be 400M

Change hsio clock to be 400M(Nominal mode) for ddr4 board.

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
4 years agoLF-3751 usb: dwc3: core: set port cap dir to be device mode for disconnect
Li Jun [Tue, 2 Feb 2021 09:16:51 +0000 (17:16 +0800)]
LF-3751 usb: dwc3: core: set port cap dir to be device mode for disconnect

If the dual role port does not connect to either host or device,
do not leave the port cap dir to be the value of last role, instead
we set it to be device mode, power measure test shows the power
will be high if leave the port cap dir register to be host mode
while the port is empty.

Reviewed-by: Ran Wang<ran.wang_1@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
4 years agoLF-3752 usb: dwc3: core: don't enable wakeup for runtime PM
Li Jun [Wed, 3 Mar 2021 09:56:10 +0000 (17:56 +0800)]
LF-3752 usb: dwc3: core: don't enable wakeup for runtime PM

Don't enable dwc3 core to wakeup system by default if runtime suspended,
this will make the power domain of dwc3 core or its parent device can't be
off while system sleep even system wakeup by usb is not required.

Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
Cc: <Stable@vger.kernel.org>
Reviewed-by: Ran Wang<ran.wang_1@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
4 years agoMLK-25454-2: dts: imx8mp: Change hdmi_apb clock rate to 133MHz
Sandor Yu [Tue, 27 Apr 2021 01:24:37 +0000 (09:24 +0800)]
MLK-25454-2: dts: imx8mp: Change hdmi_apb clock rate to 133MHz

According iMX8MP formal datasheet, the clock rate of hdmi_apb
should set to 133MHz.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 60123c889996e812904cf1156b1b1fd84e0c598c)

4 years agoMLK-25454-1 dts: iMX8MP_DDR4: Set LCDIF/HDMI AXI clock rate to nominal mode
Sandor Yu [Tue, 20 Apr 2021 03:27:15 +0000 (11:27 +0800)]
MLK-25454-1 dts: iMX8MP_DDR4: Set LCDIF/HDMI AXI clock rate to nominal mode

According IMX8MPIEC, both LCIDF and HDMI AXI clock rate should set
to nominal mode for iMX8MP DDR4 board.
Clock root         Nominal mode Overdrive mode   Unit
MEDIA_AXI_CLK_ROOT    400           500           MHz
HDMI_AXI_CLK_ROOT     400           500           MHz

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 4e698891f8d8c6bf6a3f6bf870bef1bb603dcddd)

4 years agofsl_qbman: qman_debugfs: initialize buffer
Florinel Iordache [Mon, 26 Apr 2021 08:12:53 +0000 (11:12 +0300)]
fsl_qbman: qman_debugfs: initialize buffer

Fix Coverity issue Untrusted value as argument: tainted_argument: Calling function copy_from_user taints argument *buf

Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
4 years agofsl_qbman: usdpaa: initialize ioctl structures
Florinel Iordache [Mon, 26 Apr 2021 12:16:12 +0000 (15:16 +0300)]
fsl_qbman: usdpaa: initialize ioctl structures

Fix 4 x Coverity issues: Untrusted loop bound (TAINTED_SCALAR):  tainted_argument: Calling function copy_from_user taints argument input

Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
4 years agofsl_qbman: usdpaa: clear ioctl_dma_map string buffers
Florinel Iordache [Mon, 26 Apr 2021 06:32:26 +0000 (09:32 +0300)]
fsl_qbman: usdpaa: clear ioctl_dma_map string buffers

Clear all string buffers memory locations in ioctl_dma_map before using strncpy to copy the string name

Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
4 years agodpaa2-eth: export the rx copybreak value as an ethtool tunable
Ioana Ciornei [Fri, 2 Apr 2021 09:55:32 +0000 (12:55 +0300)]
dpaa2-eth: export the rx copybreak value as an ethtool tunable

It's useful, especially for debugging purposes, to have the Rx copybreak
value changeable at runtime. Export it as an ethtool tunable.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agodpaa2-eth: add rx copybreak support
Ioana Ciornei [Fri, 2 Apr 2021 09:55:31 +0000 (12:55 +0300)]
dpaa2-eth: add rx copybreak support

DMA unmapping, allocating a new buffer and DMA mapping it back on the
refill path is really not that efficient. Proper buffer recycling (page
pool, flipping the page and using the other half) cannot be done for
DPAA2 since it's not a ring based controller but it rather deals with
multiple queues which all get their buffers from the same buffer pool on
Rx.

To circumvent these limitations, add support for Rx copybreak. For small
sized packets instead of creating a skb around the buffer in which the
frame was received, allocate a new sk buffer altogether, copy the
contents of the frame and release the initial page back into the buffer
pool.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agodpaa2-eth: rename dpaa2_eth_xdp_release_buf into dpaa2_eth_recycle_buf
Ioana Ciornei [Fri, 2 Apr 2021 09:55:30 +0000 (12:55 +0300)]
dpaa2-eth: rename dpaa2_eth_xdp_release_buf into dpaa2_eth_recycle_buf

Rename the dpaa2_eth_xdp_release_buf function into dpaa2_eth_recycle_buf
since in the next patches we'll be using the same recycle mechanism for
the normal stack path beside for XDP_DROP.

Also, rename the array which holds the buffers to be recycled so that it
does not have any reference to XDP.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agobus: fsl-mc: force device rescan if endpoint not discovered
Laurentiu Tudor [Tue, 23 Mar 2021 11:01:15 +0000 (13:01 +0200)]
bus: fsl-mc: force device rescan if endpoint not discovered

If the endpoint of a device is not yet probed on the bus force
a rescan of the devices and retry to get a reference to the
endpoint device. If the device is still not found then we assume
it's in a different isolation context (container/DPRC) thus
unavailable and return a permission error.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
4 years agodpaa2-mac: probe standalone DPMAC objects
Ioana Ciornei [Tue, 22 Sep 2020 13:19:07 +0000 (16:19 +0300)]
dpaa2-mac: probe standalone DPMAC objects

In upstream, at the moment, we only support DPMAC objects which are
connected to DPNIs driver by the Linux kernel. To close the gap (aka
driver any other DPMAC object in TYPE_PHY) we build a standalone
driver around the dpaa2-mac.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
4 years agodpaa2-eth: do not hold rtnl_lock on phylink_create() or _destroy()
Ioana Ciornei [Thu, 21 Nov 2019 19:15:25 +0000 (21:15 +0200)]
dpaa2-eth: do not hold rtnl_lock on phylink_create() or _destroy()

The rtnl_lock should not be held when calling phylink_create() or
phylink_destroy() since it leads to the deadlock listed below:

[   18.656576]  rtnl_lock+0x18/0x20
[   18.659798]  sfp_bus_add_upstream+0x28/0x90
[   18.663974]  phylink_create+0x2cc/0x828
[   18.667803]  dpaa2_mac_connect+0x14c/0x2a8
[   18.671890]  dpaa2_eth_connect_mac+0x94/0xd8

Fix this by moving the _lock() and _unlock() calls just outside of
phylink_of_phy_connect() and phylink_disconnect_phy().

Fixes: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink")
Reported-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
4 years agonet: dpaa2-mac: add support for more ethtool 10G link modes
Russell King [Tue, 9 Mar 2021 15:35:05 +0000 (15:35 +0000)]
net: dpaa2-mac: add support for more ethtool 10G link modes

Phylink documentation says:
 * Note that the PHY may be able to transform from one connection
 * technology to another, so, eg, don't clear 1000BaseX just
 * because the MAC is unable to BaseX mode. This is more about
 * clearing unsupported speeds and duplex settings. The port modes
 * should not be cleared; phylink_set_port_modes() will help with this.

So add the missing 10G modes. This allows SFP+ modules to be used with
the SolidRun boards.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
4 years agonet: dpaa2-mac: add backplane link mode support
Russell King [Fri, 5 Feb 2021 10:40:09 +0000 (10:40 +0000)]
net: dpaa2-mac: add backplane link mode support

Add support for backplane link mode, which is, according to discussions
with NXP earlier in the year, is a mode where the OS (Linux) is able to
manage the PCS and Serdes itself.

This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agonet: dpaa2-mac: add 1000BASE-X support
Russell King [Fri, 5 Feb 2021 10:40:04 +0000 (10:40 +0000)]
net: dpaa2-mac: add 1000BASE-X support

Now that pcs-lynx supports 1000BASE-X, add support for this interface
mode to dpaa2-mac. pcs-lynx can be switched at runtime between SGMII
and 1000BASE-X mode, so allow dpaa2-mac to switch between these as
well.

This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agonet: pcs: add pcs-lynx 1000BASE-X support
Russell King [Fri, 5 Feb 2021 10:39:59 +0000 (10:39 +0000)]
net: pcs: add pcs-lynx 1000BASE-X support

Add support for 1000BASE-X to pcs-lynx for the LX2160A.

This commit prepares the ground work for allowing 1G fiber connections
to be used with DPAA2 on the SolidRun CEX7 platforms.

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agodpaa2-mac: fix the remove path for non-MAC interfaces
Ioana Ciornei [Mon, 11 Jan 2021 17:18:02 +0000 (19:18 +0200)]
dpaa2-mac: fix the remove path for non-MAC interfaces

Check if the interface is indeed connected to a MAC before trying to
close the DPMAC object representing it. Without this check we end up
working with a NULL pointer.

Fixes: d87e606373f6 ("dpaa2-mac: export MAC counters even when in TYPE_FIXED")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20210111171802.1826324-1-ciorneiioana@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agodpaa2-mac: remove a comment regarding pause settings
Ioana Ciornei [Fri, 8 Jan 2021 09:07:27 +0000 (11:07 +0200)]
dpaa2-mac: remove a comment regarding pause settings

The MC firmware takes these PAUSE/ASYM_PAUSE flags provided by the
driver, transforms them back into rx/tx pause enablement status and
applies them to hardware. We are not losing information by this
transformation, thus remove the comment.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agodpaa2-mac: remove an unnecessary check
Ioana Ciornei [Fri, 8 Jan 2021 09:07:26 +0000 (11:07 +0200)]
dpaa2-mac: remove an unnecessary check

The dpaa2-eth driver has phylink integration only if the connected dpmac
object is in TYPE_PHY (aka the PCS/PHY etc link status is managed by
Linux instead of the firmware). The check is thus unnecessary because
the code path that reaches the .mac_link_up() callback is only with
TYPE_PHY dpmac objects.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agodpaa2-eth: retry the probe when the MAC is not yet discovered on the bus
Ioana Ciornei [Fri, 8 Jan 2021 09:07:25 +0000 (11:07 +0200)]
dpaa2-eth: retry the probe when the MAC is not yet discovered on the bus

The fsl_mc_get_endpoint() function now returns -EPROBE_DEFER when the
dpmac device was not yet discovered by the fsl-mc bus. When this
happens, pass the error code up so that we can retry the probe at a
later time.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agobus: fsl-mc: return -EPROBE_DEFER when a device is not yet discovered
Ioana Ciornei [Fri, 8 Jan 2021 09:07:24 +0000 (11:07 +0200)]
bus: fsl-mc: return -EPROBE_DEFER when a device is not yet discovered

The fsl_mc_get_endpoint() should return a pointer to the connected
fsl_mc device, if there is one. By interrogating the MC firmware, we
know if there is an endpoint or not so when the endpoint device is
actually searched on the fsl-mc bus and not found we are hitting the
case in which the device has not been yet discovered by the bus.

Return -EPROBE_DEFER so that callers can differentiate this case.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agodpaa2-mac: export MAC counters even when in TYPE_FIXED
Ioana Ciornei [Fri, 8 Jan 2021 09:07:23 +0000 (11:07 +0200)]
dpaa2-mac: export MAC counters even when in TYPE_FIXED

If the network interface object is connected to a MAC of TYPE_FIXED, the
link status management is handled exclusively by the firmware. This does
not mean that the driver cannot access the MAC counters and export them
in ethtool.

For this to happen, we open the attached dpmac device and keep a pointer
to it in priv->mac. Because of this, all the checks in the driver of the
following form 'if (priv->mac)' have to be updated to actually check
the dpmac attribute and not rely on the presence of a non-NULL value.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agodpaa2-mac: split up initializing the MAC object from connecting to it
Ioana Ciornei [Fri, 8 Jan 2021 09:07:22 +0000 (11:07 +0200)]
dpaa2-mac: split up initializing the MAC object from connecting to it

Split up the initialization phase of the dpmac object from actually
configuring the phylink instance, connecting to it and configuring the
MAC. This is done so that even though the dpni object is connected to a
dpmac which has link management handled by the firmware we are still
able to export the MAC counters.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agoarm64: dts: ls1088ardb: add necessary DTS nodes for DPMAC2
Ioana Ciornei [Fri, 30 Oct 2020 11:35:49 +0000 (13:35 +0200)]
arm64: dts: ls1088ardb: add necessary DTS nodes for DPMAC2

Annotate the external MDIO2 node and describe the 10GBASER PHY found on
the LS1088ARDB board and add a phy-handle for DPMAC2 to link it.
Also, add the internal PCS MDIO node for the internal MDIO buses found
on the LS1088A SoC along with its internal PCS PHY and link the
corresponding DPMAC to the PCS through the pcs-handle.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
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>