Fixes a bug in the CAAM probe on i.MX8ULP.
Due to the change of device-tree node name of secure-enclave,
was not updated in CAAM driver.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Force CLKREQ# override active low for i.MX95 B0 PCIe if the supports-clkreq
is not present.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
To avoid the mis-trigger from the wakeup sources on M.2 port when
system enters into suspend mode and M.2 regulator is gated off.
Let M.2 regulator always on.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Removes the limitation for input buffer size greater than 4096.
For the input buffer is divided in to chunks of 4096 bytes, the performance
with buffer size greater than 4096, tends to remain flat or lower.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Add shader and tiler time in debugfs dvfs_utilization
so that gputop can add shader and tiler utilization in page 4.
Signed-off-by: Chingling Wang <chingling.wang@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
gputop issue u32 type will make busy_time and idle_time overflow,
which resulting crazy output in kernle debugfs dvfs_utilization output data
Signed-off-by: Chingling Wang <chingling.wang@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
(cherry picked from commit 425d9bee92e304ec53f53279103223915ac15bc5)
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Change-Id: I20d207ce5125c2733f6bb6202e916e6e16904ade
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
(cherry picked from commit 71024e54b222ae9f08658c40f32cd84b879e2333)
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Change-Id: I5b1888024550a20800359d86bfb64e5531a2aef2
(cherry picked from commit 2c8e299fef2444c9ef045094434e185113e511ff)
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Change-Id: I5016937b6ed0b266cee1e66788e8ec0a38309eb9
(cherry picked from commit 91553b26b17cd22c4537e9d0a870fd7d42b75b4a)
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
this was introduced in MGS-6394 imx-2620, to support trace-cmd
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
(cherry picked from commit 05c19f3b781dc0101275a3f5707492f66f4ee8e8)
Change-Id: Ibd70ff1c8d8efad998ca21b5c88df2fc54ed4c16
Reviewed-by: jiajia Qian <jiajia.qian@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Remove UAF during ctx termination
Change-Id: I9fb60cae7b576c0836196dc0c64771bd0be229f9
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Signed-off-by: Jessie Hao <juan.hao@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Issue: ELE TRNG register with hwrng and open a kthread
which remains running after suspend also and results in
random interrupts from ELE.
Fix: unregister hwrng in suspend and re-register in resume
Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@nxp.com>
There is a potential crash issue when disabling and re-enabling the
network port. When disabling the network port, phy_detach() calls
device_link_del() to remove the device link, but it does not clear
phydev->devlink, so phydev->devlink is not a NULL pointer. Then the
network port is re-enabled, but if phy_attach_direct() fails before
calling device_link_add(), the code jumps to the "error" label and
calls phy_detach(). Since phydev->devlink retains the old value from
the previous attach/detach cycle, device_link_del() uses the old value,
which accesses a NULL pointer and causes a crash. The simplified crash
log is as follows.
[ 24.702421] Call trace:
[ 24.704856] device_link_put_kref+0x20/0x120
[ 24.709124] device_link_del+0x30/0x48
[ 24.712864] phy_detach+0x24/0x168
[ 24.716261] phy_attach_direct+0x168/0x3a4
[ 24.720352] phylink_fwnode_phy_connect+0xc8/0x14c
[ 24.725140] phylink_of_phy_connect+0x1c/0x34
Therefore, phydev->devlink needs to be cleared when the device link is
deleted.
Fixes: bc66fa87d4 ("net: phy: Add link between phy dev and mac dev")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250523083759.3741168-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Enables dual FW support for i.MX95
- loading of runtime fw from rootfs.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Adds a new API ELE_GET_FW_VERSION, to fetch the FW version and other
misc. details.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Enables the support for V2X-SG#0 & V2X-SG#1 on i.MX95 B0.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
New API support is added for dumping v2x debug logs.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
As part linux suspend resume, v2x-fw is requested to:
- power-down as part of suspend.
- power-up as part of resume.
Squash: 8fd2c1e95e24a ("TBS: drivers: firmware: imx: replace the hardcoded debugging address.")
4a6e34427205b TBS: LF-14638: driver: firmware: imx: v2x suspend-resume snd-rcv error checking
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
imx: Enforcing the msg-seq flow feature is applied
to change voltage API(s).
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Tested-by: Ye Li <ye.li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
New kernel feature to enforce the msg-seq flow:
- Once started before the first API,
- will continue for all the intermediate participating API(s),
- will halt after the last API successfully exchanged.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Tested-by: Ye Li <ye.li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
export se-api(s) in se_api.h:
- for reading/writing fuses
- for voltage control interface.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Acked-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Acked-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Add support for imx93 soc and its platforms.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Acked-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Acked-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Debugging feature to enable time synchronised logging of:
- the Message exchange over MU with FW.
- IOCTL(s)
- any user articulated debug messages.
The logs are saved to a file in the linux filesystem.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Acked-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Acked-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
additional changes to the upstream driver.
- construct se_name from se_type_id and instance id
- move soc_register to info_list
- move fetch soc info function pointer to info_list
- ele soc fetch generalization
- ele debug dump
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Acked-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Acked-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
NXP hardware IP(s) for secure-enclaves like Edgelock Enclave(ELE),
are embedded in the SoC to support the features like HSM, SHE & V2X,
using message based communication interface.
The secure enclave FW communicates on a dedicated messaging unit(MU)
based interface(s) with application core, where kernel is running.
It exists on specific i.MX processors. e.g. i.MX8ULP, i.MX93.
This patch adds the driver for communication interface to secure-enclave,
for exchanging messages with NXP secure enclave HW IP(s) like EdgeLock
Enclave (ELE) from Kernel-space, used by kernel management layers like
- DM-Crypt.
squash e7d2fac2d1ceb TBS: LF-14067: drivers: firmware: imx: se suspend-resume
squash c4c9b2f7cf710 TBS: drivers: firmware: imx: correct macro ELE_DEBUG_DUMP_RSP_SZ value
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Acked-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com>
Acked-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Acked-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
When not getting the se-fw2 device, calling read_common_fuse() or
ele_write_fuse() will result in segmentation fault because fuse->se_dev
is a NULL pointer. Check fuse->se_dev to avoid this error.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
This update is according to i.MX95_Fusemap_v1.13_documentation.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Design team says that the frequency limitation mentioned at controller
specification is just a general guideline for the IP. The maximum frequency
depends on the process technology and SoC architecture requirement of the
SoC. Specifically for i.MX95, the frequency of dspx_clk is signed off at
350MHz at UD/NM/OD mode. So 350MHz is the limit of the chip, not 300MHz.
So, change maximum FrameGen display clock frequency from 300MHz to 350MHz.
Reported-by: Qiang Li <qiang.li@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Add some USB3 PHY tuning properties for imx95-15x15-evk and
imx95-19x19-evk boards.
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Fix USB3 PHY tuning properties name and parameters value.
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
The i.MX8MP and i.MX95 USB3 PHY have different tuning parameter for same
tuning field, this will add i.MX95 tuning support.
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
The description of TX_VBOOST_LVL is wrong in register PHY_CTRL3
bit[31:29].
The updated description as below:
011: Corresponds to a launch amplitude of 0.844 V.
100: Corresponds to a launch amplitude of 1.008 V.
101: Corresponds to a launch amplitude of 1.156 V.
This will fix the parsing function
phy_tx_vboost_level_from_property() to return correct value.
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
The parameter value of below 3 properties are USB PHY specific. i.MX8MP
and i.MX95 USB PHY has different meanings. This will enlarge parameters
value and add constraints for them.
- fsl,phy-tx-vref-tune-percent
- fsl,phy-tx-rise-tune-percent
- fsl,phy-comp-dis-tune-percent
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>