linux.git
3 years agoLF-3760 media: csi: fill in colorspace
Robby Cai [Wed, 28 Apr 2021 15:40:13 +0000 (23:40 +0800)]
LF-3760 media: csi: fill in colorspace

filling in colorspace, this also fixed v4l2 compliance test issue.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed by: G.n. Zhou <guoniu.zhou@nxp.com>

3 years agonet: enetc: fix link error again
Arnd Bergmann [Thu, 22 Apr 2021 13:35:11 +0000 (15:35 +0200)]
net: enetc: fix link error again

A link time bug that I had fixed before has come back now that
another sub-module was added to the enetc driver:

ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!

The problem is that the enetc Makefile is not actually used for
the ierb module if that is the only built-in driver in there
and everything else is a loadable module.

Fix it by always entering the directory this time, regardless
of which symbols are configured. This should reliably fix the
problem and prevent it from coming back another time.

Fixes: 112463ddbe82 ("net: dsa: felix: fix link error")
Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 74c97ea3b61e4ce149444f904ee8d4fc7073505b)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agonet: enetc: automatically select IERB module
Michael Walle [Tue, 20 Apr 2021 14:28:21 +0000 (16:28 +0200)]
net: enetc: automatically select IERB module

Now that enetc supports flow control we have to make sure the settings in
the IERB are correct. Therefore, we actually depend on the enetc-ierb
module. Previously it was possible that this module was disabled while the
enetc was enabled. Fix it by automatically select the enetc-ierb module.

Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1b8caefaf4f063fdc43e4078384d38ce96147b35)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agonet: enetc: add support for flow control
Vladimir Oltean [Fri, 16 Apr 2021 23:42:25 +0000 (02:42 +0300)]
net: enetc: add support for flow control

In the ENETC receive path, a frame received by the MAC is first stored
in a 256KB 'FIFO' memory, then transferred to DRAM when enqueuing it to
the RX ring. The FIFO is a shared resource for all ENETC ports, but
every port keeps track of its own memory utilization, on RX and on TX.

There is a setting for RX rings through which they can either operate in
'lossy' mode (where the lack of a free buffer causes an immediate
discard of the frame) or in 'lossless' mode (where the lack of a free
buffer in the ring makes the frame stay longer in the FIFO).

In turn, when the memory utilization of the FIFO exceeds a certain
margin, the MAC can be configured to emit PAUSE frames.

There is enough FIFO memory to buffer up to 3 MTU-sized frames per RX
port while not jeopardizing the other use cases (jumbo frames), and
also not consume bytes from the port TX allocations. Also, 3 MTU-sized
frames worth of memory is enough to ensure zero loss for 64 byte packets
at 1G line rate.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a8648887880f90137f0893aeb1a0abef30858c01)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agoarm64: dts: ls1028a: declare the Integrated Endpoint Register Block node
Vladimir Oltean [Fri, 16 Apr 2021 23:42:24 +0000 (02:42 +0300)]
arm64: dts: ls1028a: declare the Integrated Endpoint Register Block node

Add a node describing the address in the SoC memory space for the IERB.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b764dc6cc1ba8b82d844bbcfe97e1d432a2dca5b)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agonet: enetc: add a mini driver for the Integrated Endpoint Register Block
Vladimir Oltean [Fri, 16 Apr 2021 23:42:23 +0000 (02:42 +0300)]
net: enetc: add a mini driver for the Integrated Endpoint Register Block

The NXP ENETC is a 4-port Ethernet controller which 'smells' to
operating systems like 4 distinct PCIe PFs with SR-IOV, each PF having
its own driver instance, but in fact there are some hardware resources
which are shared between all ports, like for example the 256 KB SRAM
FIFO between the MACs and the Host Transfer Agent which DMAs frames to
DRAM.

To hide the stuff that cannot be neatly exposed per port, the hardware
designers came up with this idea of having a dedicated register block
which is supposed to be populated by the bootloader, and contains
everything configuration-related: MAC addresses, FIFO partitioning, etc.

When a port is reset using PCIe Function Level Reset, its defaults are
transferred from the IERB configuration. Most of the time, the settings
made through the IERB are read-only in the port's memory space (if they
are even visible), so they cannot be modified at runtime.

Linux doesn't have any advanced FIFO partitioning requirements at all,
but when reading through the hardware manual, it became clear that, even
though there are many good 'recommendations' for default values, many of
them were not actually put in practice on LS1028A. So we end up with a
default configuration that:

(a) does not have enough TX and RX byte credits to support the max MTU
    of 9600 (which the Linux driver claims already) properly (at full speed)
(b) allows the FIFO to be overrun with RX traffic, potentially
    overwriting internal data structures.

The last part sounds a bit catastrophic, but it isn't. Frames are
supposed to transit the FIFO for a very short time, but they can
actually accumulate there under 2 conditions:

(a) there is very severe congestion on DRAM memory, or
(b) the RX rings visible to the operating system were configured for
    lossless operation, and they just ran out of free buffers to copy
    the frame to. This is what is used to put backpressure onto the MAC
    with flow control.

So since ENETC has not supported flow control thus far, RX FIFO overruns
were never seen with Linux. But with the addition of flow control, we
should configure some registers to prevent this from happening. What we
are trying to protect against are bad actors which continue to send us
traffic despite the fact that we have signaled a PAUSE condition. Of
course we can't be lossless in that case, but it is best to configure
the FIFO to do tail dropping rather than letting it overrun.

So in a nutshell, this driver is a fixup for all the IERB default values
that should have been but aren't.

The IERB configuration needs to be done _before_ the PFs are enabled.
So every PF searches for the presence of the "fsl,ls1028a-enetc-ierb"
node in the device tree, and if it finds it, it "registers" with the
IERB, which means that it requests the IERB to fix up its default
values. This is done through -EPROBE_DEFER. The IERB driver is part of
the fsl_enetc module, but is technically a platform driver, since the
IERB is a good old fashioned MMIO region, as opposed to ENETC ports
which pretend to be PCIe devices.

The driver was already configuring ENETC_PTXMBAR (FIFO allocation for
TX) because due to an omission, TXMBAR is a read/write register in the
PF memory space. But the manual is quite clear that the formula for this
should depend upon the TX byte credits (TXBCR). In turn, the TX byte
credits are only readable/writable through the IERB. So if we want to
ensure that the TXBCR register also has a value that is correct and in
line with TXMBAR, there is simply no way this can be done from the PF
driver, access to the IERB is needed.

I could have modified U-Boot to fix up the IERB values, but that is
quite undesirable, as old U-Boot versions are likely to be floating
around for quite some time from now.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e7d48e5fbf30f85c89d83683c3d2dbdaa8884103)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Conflicts:
drivers/net/ethernet/freescale/enetc/enetc_pf.c

3 years agodt-bindings: net: fsl: enetc: add the IERB documentation
Vladimir Oltean [Fri, 16 Apr 2021 23:42:22 +0000 (02:42 +0300)]
dt-bindings: net: fsl: enetc: add the IERB documentation

Mention the required compatible string and base address for the
Integrated Endpoint Register Block node.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4ac7acc67f29927975e2493a9f4ede0c631bb87a)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agonet: enetc: create a common enetc_pf_to_port helper
Vladimir Oltean [Fri, 16 Apr 2021 23:42:21 +0000 (02:42 +0300)]
net: enetc: create a common enetc_pf_to_port helper

Even though ENETC interfaces are exposed as individual PCIe PFs with
their own driver instances, the ENETC is still fundamentally a
multi-port Ethernet controller, and some parts of the IP take a port
number (as can be seen in the PSFP implementation).

Create a common helper that can be used outside of the TSN code for
retrieving the ENETC port number based on the PF number. This is only
correct for LS1028A, the only Linux-capable instantiation of ENETC thus
far.

Note that ENETC port 3 is PF 6. The TSN code did not care about this
because ENETC port 3 does not support TSN, so the wrong mapping done by
enetc_get_port for PF 6 could have never been hit.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 87614b931c24d9dfc934ef9deaaf55d1cbdc2ac2)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agoenetc: Fix endianness issues for enetc_ethtool
Claudiu Manoil [Thu, 19 Nov 2020 10:12:14 +0000 (12:12 +0200)]
enetc: Fix endianness issues for enetc_ethtool

These particular fields are specified in the H/W reference
manual as having network byte order format, so enforce big
endian annotation for them and clear the related sparse
warnings in the process.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit d548d3930ab635653d1549c864ce1a002dc3b218)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agoenetc: Fix endianness issues for enetc_qos
Claudiu Manoil [Thu, 19 Nov 2020 10:12:15 +0000 (12:12 +0200)]
enetc: Fix endianness issues for enetc_qos

Currently the control buffer descriptor (cbd) fields have endianness
restrictions while the commands passed into the control buffers
don't (with one exception). This patch fixes offending code,
by adding endianness accessors for cbd fields and removing the
unnecessary ones in case of data buffer fields. Currently there's
no need to convert all commands to little endian format, the patch
only focuses on fixing current endianness issues reported by sparse.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 0dfd294c92411da47041cca4ef790ee6112d6b68)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
3 years agoLF-3763 arm64: dts: SOF: Use newly created names for default topologies
Daniel Baluta [Wed, 28 Apr 2021 15:18:05 +0000 (18:18 +0300)]
LF-3763 arm64: dts: SOF: Use newly created names for default topologies

Because i.MX8QXP/i.MX8QM are similar w.r.t audio peripherals
configuration we currently use the following naming for
topologies sof-imx8qxp-<codec>.tplg.

Which is weird to see for i.MX8QM.

In order to make naming more generic use imx8 instead of imx8qxp/imx8qm.

Reviwed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
3 years agoLF-3665-5 arm64: imx_v8_defconfig: Enable SOF compress option
Daniel Baluta [Wed, 28 Apr 2021 12:38:55 +0000 (15:38 +0300)]
LF-3665-5 arm64: imx_v8_defconfig: Enable SOF compress option

This enables ALSA compress support with SOF. When loading topology
with compress bit set, the ALSA sound card will support the compress
API.

This will allow us to render compressed audio (e.g MP3, AAC) using
Compress API.

The userpace sample application is named 'cplay' and uses tinycompress
library.

Reviwed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
3 years agoMLK-25435-2 arm64: dts: imx8mp-evk-basler: delete camera ov5640 node on CSI1
Robby Cai [Fri, 23 Apr 2021 13:29:29 +0000 (21:29 +0800)]
MLK-25435-2 arm64: dts: imx8mp-evk-basler: delete camera ov5640 node on CSI1

The script to start isp media server will check camera device node.
Deleting camera ov5640 node means there's only 1 camera/csi is used.
On this case, the resolution can set to 4K.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed by: G.n. Zhou <guoniu.zhou@nxp.com>

3 years agoMLK-25435-1 arm64: dts: imx8mp-evk-basler-ov5640: limit csi clock to 266MHz
Robby Cai [Thu, 22 Apr 2021 13:02:54 +0000 (21:02 +0800)]
MLK-25435-1 arm64: dts: imx8mp-evk-basler-ov5640: limit csi clock to 266MHz

when dual MIPI CSIs are used, camera clock on each CSI should limit to 266MHz

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed by: G.n. Zhou <guoniu.zhou@nxp.com>

3 years agoarm64: imx8mx: vpu: integrate vsi 20210429 release (pre-v1.6)
Zhou Peng [Thu, 29 Apr 2021 03:03:45 +0000 (11:03 +0800)]
arm64: imx8mx: vpu: integrate vsi 20210429 release (pre-v1.6)

- M865SW-747: VSI V4L2 Engineer release package 20210429
  M865SW-740: [VPU/V4l2] encoder: remove 'V4L2_COLORSPACE_REC709' contraint in vsi_enc_try_fmt()

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

3 years agoLF-3755 PCI: imx: move the compliance tests mode enable to command line
Richard Zhu [Tue, 27 Apr 2021 08:50:02 +0000 (16:50 +0800)]
LF-3755 PCI: imx: move the compliance tests mode enable to command line

To avoid the kernel rebuild after change the menuconfig, move the i.MX
PCIe compliance tests mode enable to kernel command line.
Use the "pcie_cz_enabled=yes" to enable the compliance tests mode.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
4 years agoLF-3665-5 ASoC: SOF: compr: Add compress ops implementation
Daniel Baluta [Tue, 19 Jan 2021 18:57:01 +0000 (20:57 +0200)]
LF-3665-5 ASoC: SOF: compr: Add compress ops implementation

Implement snd_compress_ops. There are a lot of similarities with
PCM implementation.

Few notes:

1) How do we keep track of the total number of transferred bytes?

We make use of Host component updating the position in the current
period via posn.host_posn. See sof_set_transferred_bytes.

2) How do we send compress parameters to SOF?

We make use of sof_ipc_pcm_params struct which SOF knows about. In the
future this might be extended via a new sof_ipc_compress_params.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3665-4 ASoC: SOF: Introduce fragment elapsed notification API
Daniel Baluta [Mon, 18 Jan 2021 13:51:14 +0000 (15:51 +0200)]
LF-3665-4 ASoC: SOF: Introduce fragment elapsed notification API

After each fragment is accepted by the DSP we need to inform
the userspace applications that they can send the next fragment.
This is done via snd_compr_fragment_elapsed.

Similar with the PCM case, in order to avoid sending an IPC before
the previous IPC is handled we need to schedule a delayed work to
call snd_compr_fragment_elapsed().

See snd_sof_pcm_period_elapsed.

To sum up this patch offers the following API to SOF code:
* snd_sof_compr_init_elapsed_work
* snd_sof_compr_fragment_elapsed

Note that implementation for compressed function is in a new file
selected via CONFIG_SND_SOC_SOF_COMPRESS config option.

For symmetry we introduce snd_sof_pcm_init_elapsed_work to setup
the work struct for PCM case.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3665-3 ASoC: SOF: imx8: Read stream position
Daniel Baluta [Tue, 19 Jan 2021 18:58:15 +0000 (20:58 +0200)]
LF-3665-3 ASoC: SOF: imx8: Read stream position

Allow imx8m_ipc_msg_data/imx8_ipc_msg_data to return stream information.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3665-2 ASoC: SOF: Refactor ipc_msg_data to prepare for compress API
Daniel Baluta [Mon, 18 Jan 2021 13:46:31 +0000 (15:46 +0200)]
LF-3665-2 ASoC: SOF: Refactor ipc_msg_data to prepare for compress API

Make second parameter of ipc_msg_data generic
in order to be able to support compressed streams.

This patch doesn't hold any functional change.

snd_sof_pcm_stream holds the information for a PCM stream like:
* page_table buffer for sharing data with the DSP
* snd_pcm_substream
* workqueue for handling period elapsed notifications.

Most of these fields are also useful for compress implementation. So,
snd_sof_pcm_stream will be extended to be used for compress
implementation.

First step, is to make ipc_msg_data parameters more generic:

       void (*ipc_msg_data)(struct snd_sof_dev *sdev,
-                            struct snd_pcm_substream *substream,
+                            struct snd_sof_pcm_stream *sps,
                             void *p, size_t sz); /* mandatory */

With this case we can use ipc_msg_data, to retrieve information from DSP
for both PCM/Compress API.

Note:
     - snd_sof_pcm_stream, will be updated with a new member of type
       snd_compr_stream to account for Compress streams.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoLF-3665-1 ASoC: SOF: Rename compress.c -> probe_compress.c
Daniel Baluta [Mon, 18 Jan 2021 09:10:48 +0000 (11:10 +0200)]
LF-3665-1 ASoC: SOF: Rename compress.c -> probe_compress.c

This will help separate compress probe helpers functions from
compress audio implementation that will follow in the next patches.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
4 years agoMLK-25335 dma: pxp: fix kernel dump for pxp device
Robby Cai [Tue, 9 Mar 2021 18:19:50 +0000 (02:19 +0800)]
MLK-25335 dma: pxp: fix kernel dump for pxp device

dma API(s) can't use NULL device because of following patch:

d7e02a931235 dma-mapping: remove leftover NULL device support

this patch uses pxp_dev instead of NULL device to resolve kernel dump.

[  445.484900] 8<--- cut here ---
[  445.488002] Unable to handle kernel NULL pointer dereference at virtual address 0000015c
[  445.512965] pgd = 2afadd37
[  445.515707] [0000015c] *pgd=00000000
[  445.521436] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[  445.526776] Modules linked in: 8021q mx6s_capture ov5640_camera_v2
[  445.532993] CPU: 0 PID: 2117 Comm: vqueue:src Not tainted 5.4.70-2.3.0+g4f2631b022d8 #1
[  445.541006] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[  445.547214] PC is at pxp_device_ioctl+0xc64/0xe80
[  445.551933] LR is at pxp_buffer_object_lookup+0x30/0x38
[  445.557169] pc : [<80550e20>]    lr : [<8054fd00>]    psr: 60000013
[  445.563446] sp : 93bffea8  ip : 908a03ac  fp : 76957ff8
[  445.568681] r10: 00000036  r9 : 93bfe000  r8 : 93b04540
[  445.573917] r7 : 939d78c0  r6 : 80085007  r5 : 939d77c0  r4 : 00000000
[  445.580454] r3 : 00000001  r2 : 00000000  r1 : 00000002  r0 : 939d77c0
[  445.586993] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  445.594140] Control: 10c5387d  Table: 93bd806a  DAC: 00000051
[  445.599904] Process vqueue:src (pid: 2117, stack limit = 0xcf85841b)
[  445.606270] Stack: (0x93bffea8 to 0x93c00000)
[  445.610645] fea0:                   73800000 8020a840 93ab8800 81304f08 739bc000 93ab8800
[  445.618841] fec0: 93b8f840 739bc000 93b0fa80 8020eddc 93ab8800 00000002 00000001 00100c00
[  445.627037] fee0: 00000000 93bffee8 00000000 81304f08 00000008 741d7ff4 926428d0 80085007
[  445.635234] ff00: 741d7ff4 93b04540 93bfe000 00000036 76957ff8 80256c3c 93ab8800 0000010a
[  445.643430] ff20: 00000106 00000000 00000000 93b8f840 00000001 80210c20 000001e7 00000000
[  445.651626] ff40: 0009a100 93b8f848 93bfff54 0001c200 93bfff7c 00000001 93b04540 0000000b
[  445.659822] ff60: 00000001 00004000 93adc200 81304f08 93b04541 0000000b 80085007 741d7ff4
[  445.668019] ff80: 93b04540 93bfe000 00000036 8025716c 75742980 743caee0 01a152e0 00000036
[  445.676214] ffa0: 80101204 80101000 75742980 743caee0 0000000b 80085007 741d7ff4 743cb004
[  445.684410] ffc0: 75742980 743caee0 01a152e0 00000036 00000002 741d8064 741d81d4 76957ff8
[  445.692605] ffe0: 743caf40 741d7fd4 743b88d1 76d2cfe8 80000030 0000000b 00000000 00000000
[  445.700820] [<80550e20>] (pxp_device_ioctl) from [<80256c3c>] (do_vfs_ioctl+0x404/0x900)
[  445.708936] [<80256c3c>] (do_vfs_ioctl) from [<8025716c>] (ksys_ioctl+0x34/0x60)
[  445.716355] [<8025716c>] (ksys_ioctl) from [<80101000>] (ret_fast_syscall+0x0/0x54)
[  445.724023] Exception stack(0x93bfffa8 to 0x93bffff0)
[  445.729091] ffa0:                   75742980 743caee0 0000000b 80085007 741d7ff4 743cb004
[  445.737287] ffc0: 75742980 743caee0 01a152e0 00000036 00000002 741d8064 741d81d4 76957ff8
[  445.745477] ffe0: 743caf40 741d7fd4 743b88d1 76d2cfe8
[  445.750550] Code: e595100c e3a00000 e12fff34 eafffd39 (e594315c)
[  445.773509] ---[ end trace a4bb9353c99e0cef ]---

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: G.n. Zhou <guoniu.zhou@nxp.com>
4 years agodmaengine: imx-sdma: add terminated list for freed descriptor in worker
Robin Gong [Thu, 25 Mar 2021 10:42:50 +0000 (18:42 +0800)]
dmaengine: imx-sdma: add terminated list for freed descriptor in worker

Add terminated list for keeping descriptor so that it could be freed in
worker without any potential involving next descriptor raised up before
this descriptor freed, because vchan_get_all_descriptors get all
descriptors including the last terminated descriptor and the next
descriptor, hence, the next descriptor maybe freed unexpectly when it's
done in worker without this patch.
https://www.spinics.net/lists/dmaengine/msg23367.html

Change-Id: Iece434f55f3c6b5cf861fc23e4076fd4aa670ac4
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reported-by: Richard Leitner <richard.leitner@skidata.com>
(cherry picked from commit 24e30e721438600a496bcf1ae44cb4d7c93eafd8)

4 years agoLF-3401 spi: imx: remove CLK calculation and divider in slave mode
Clark Wang [Tue, 27 Apr 2021 07:58:58 +0000 (15:58 +0800)]
LF-3401 spi: imx: remove CLK calculation and divider in slave mode

In the slave mode, the clock signal is controlled by the master.
The slave does not need to calculate and configure the clock
frequency division. The slave can directly use the root clock
to sample the SCL signal.
Therefore, remove the calculation and frequency division
function of the clock in the slave mode.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
4 years agoMLK-25465-6 dmaengine: imx-sdma: fix the long dma transfer timing grater than 2s
Robin Gong [Mon, 26 Apr 2021 18:19:47 +0000 (02:19 +0800)]
MLK-25465-6 dmaengine: imx-sdma: fix the long dma transfer timing grater than 2s

In case the dma transfer timing longer than 2s, sdma would be power
off so that cyclic transfer would be broken, forbid runtime auto suspend
in such case instead.

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

4 years agoMLK-25465-5 dmaengine: fsl-edma-v3: add worker to issue pending
Robin Gong [Wed, 21 Apr 2021 10:59:59 +0000 (18:59 +0800)]
MLK-25465-5 dmaengine: fsl-edma-v3: add worker to issue pending

For fix the block/sleep limitation of scu-pd on i.mx8qm/qxp, hence, on
some atomic user case like tty/ALSA kernel warnings come out. Move the
pm_runtime_get_sync from issue pending to worker and forbid runtime auto
suspend until channel terminated.

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

4 years agoMLK-25465-4 spi: imx: keep dma request disabled before dma transfer setup
Robin Gong [Fri, 9 Apr 2021 10:07:16 +0000 (18:07 +0800)]
MLK-25465-4 spi: imx: keep dma request disabled before dma transfer setup

Since sdma hardware configure postpone to transfer phase, have to disable
dma request on uart driver before dma transfer setup because there is
a hardware limitation on sdma event enable(ENBLn) as below:

"It is thus essential for the Arm platform to program them before any DMA
 request is triggered to the SDMA, otherwise an unpredictable combination
 of channels may be started."

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

4 years agoMLK-25465-3 dmaengine: fsl-edma-v3: move runtime behind to tanfser setup phase
Robin Gong [Thu, 1 Apr 2021 14:03:54 +0000 (22:03 +0800)]
MLK-25465-3 dmaengine: fsl-edma-v3: move runtime behind to tanfser setup phase

move runtime behind to transfer phase instead of request channel phase
like sdma.

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

4 years agoMLK-25465-2 tty: serial: imx: keep dma request not enable before dma transfer setup
Robin Gong [Thu, 8 Apr 2021 17:01:49 +0000 (01:01 +0800)]
MLK-25465-2 tty: serial: imx: keep dma request not enable before dma transfer setup

Since sdma hardware configure postpone to transfer phase, have to disable
dma request on uart driver before dma transfer setup because there is
a hardware limitation on sdma event enable(ENBLn) as below (event enabled
in imx_uart_dma_init() before where's ahead of dma request enable):

"It is thus essential for the Arm platform to program them before any DMA
request is triggered to the SDMA, otherwise an unpredictable combination
of channels may be started."

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

4 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>