Add support for Wave6 VPU passive cooling using dynamic frequency scaling.
Signed-off-by: Mihai Despotovici <mihai.despotovici@nxp.comn>
Reviewed-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Nas Chung <nas.chung@chipsnmedia.com>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mihai Despotovici <mihai.despotovici@nxp.comn>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Nas Chung <nas.chung@chipsnmedia.com>
Add support for Wave6 VPU passive cooling using dynamic frequency scaling.
Signed-off-by: Mihai Despotovici <mihai.despotovici@nxp.comn>
Reviewed-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Nas Chung <nas.chung@chipsnmedia.com>
light sensor isl29023 share the interrupt with lsm303arg, but these
two devices use different interrupt type. According to the datasheet
of these two devides, both support low level trigger type, so correct
the interrupt type here to avoid the following error log:
irq: type mismatch, failed to map hwirq-11 for gpio@5d0c0000!
Reviewed-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
DWC3 host driver has problem after v6.6.36 merge completed. This will
fix the conflict by remove one platform_device_add_data(), then assign
dwc3_pdata->xhci_priv->quirks to dwc3_xhci_plat_quirk.quirks, finally
use dwc3_xhci_plat_quirk as xhci platform data.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
This reverts commit 2912914ad7.
upstream (5af155f9b1 perf pmu: Count sys and cpuid JSON events
separately) is the correct patch for this issue. So this patch can
be removed now. This will revert it.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
"s_selection" interface is implemented on "input0" video node (output).
Size of "frame" video node (capture) should match input crop size.
Crop is operated by offsetting input image start address and line
stride.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Alexi Birlinger <alexi.birlinger@nxp.com>
Current driver allocates a dma mapped buffer for parameters and copy each
queued buffer to it. This was done to mimic the pisp driver and is useless
for neoisp.
This patch removes this extra copy and uses the vb2 queue instead.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Alexi Birlinger <alexi.birlinger@nxp.com>
Support profile and level v4l2 controls for decoder.
These controls can be used by host for reference.
The control values are updated by decoder driver after parsing header.
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
Reviewed-by: MingQian <ming.qian@nxp.com>
The bstatus was missing one byte. Need to increase size to 2 bytes.
Signed-off-by: Oliver F. Brown <oliver.brown@oss.nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Regmap framework includes useful registers dump to debugfs, but this is
not functional for neoisp driver.
This patch adds needed settings to enable debugfs for neoisp.
It also adds a module parameter enable_debugfs that should be set to 1
to prevent clock disabling at probe.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Antoine Bouyer <antoine.bouyer@nxp.com>
HDR decompression isp block is unable to output 20 bits per pixel if input
bit width is less than 12 bits.
This patch involves obwb block to compensate this limitation and reach
20 bits per pixel in isp internal pipeline 0, also adds the same procedure
to handle 16 bits internal bit width for pipeline 1.
This patch also set the default BNR configuration to the default ISP
registers values.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Signed-off-by: Celine Laurencin <celine.laurencin@nxp.com>
Reviewed-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
The YVYU is an unsupported format which is a leftover
that was wrongly swapped with VYUY supported format.
Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
Reviewed-by: Aymen Sghaier <aymen.sghaier@nxp.com>
After neoisp module is removed isp and isi clock are still enabled
This patch fixes pm_runtime management by setting autosuspend mode
with a delay defined by NEOISP_SUSPEND_TIMEOUT_MS.
Clocks are disabled at the end of probe function to release them
while driver is not in use.
Also, it calls pm_runtime_dont_use_autosuspend
while autosuspend mode is not used.
Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
Reviewed-by: Aymen Sghaier <aymen.sghaier@nxp.com>
The size for DRC local sum is 1024 words of 32bits.
Signed-off-by: Celine Laurencin <celine.laurencin@nxp.com>
Reviewed-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Add '-@' DTC flags to build LPA and LPV DT so that phandle based target
method overlay DT format can use the two DT as base DT.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
This sets the default power save mode setting to enabled.
The power save feature is now stable and stress test issues, such as the
TX timeout error, have been resolved.
commit c7ee0bc8db32 ("Bluetooth: btnxpuart: Resolve TX timeout error in
power save stress test")
With this setting, the driver will send the vendor command to FW at
startup, to enable power save feature.
User can disable this feature using the following vendor command:
hcitool cmd 3f 23 03 00 00 (HCI_NXP_AUTO_SLEEP_MODE)
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 1db01d15e2dace241998151499ee9b986ff135e3)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
This handles the timeout error codes sent by the chip as part of the
bootloader signatures during firmware download process.
When the bootloader does not receive a response packet from the host
within a specific time, it adds an error code to the bootloader
signature while requesting for the FW chunk from the same offset.
The host is expected to clear this error code with a NAK, and reply to
only those bootloader signatures which have error code 0.
However, the driver was ignoring this error code and replying with the
firmware chunks instead, which is apparently ignored by the chip and the
chip resends the same bootloader signature with the error code again. This
happens in a loop until the error code self clears and firmware download
proceeds ahead, adding a couple of milliseconds to the total firmware
download time.
Commit 689ca16e52 was an initial implementation which simply printed
the following line during driver debug:
- FW Download received err 0x04 from chip
This commit adds the expected handling to the error codes.
This error handling is valid for data_req bootloader signatures for V3
and future bootloader versions.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Fixes: 689ca16e52 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 96385cbdfb95d96f80fd1c76a460740dc04ee08d)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
This updates the firmware names of 3 chipsets: w8987, w8997, w9098.
These changes are been done to standardize chip specific firmware
file names to be in sync with firmware names of newer chipsets.
The naming convention for BT-only files would be as follows:
For dual-radio WiFi+BT chipsets:
- <protocol-BT><chip-name>_bt_v<HW-version>.bin
For tri-radio WiFi+BT+15.4 chipsets:
- <protocol-BT><protocol-15.4><chip-name>_bt_v<HW-version>.bin
To maintain backward compatibility, this commit adds a provision to
request older firmware file name, if new firmware file name not found in
/lib/firmware/nxp/.
A new device tree property has been introduced called firmware-name, to
override the hardcoded firmware names (old and new) in the driver.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 2c4d9d8e879bf99d498631efbc7c3b8fc0311ce6)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
This adds a new flag BTNXPUART_FW_DOWNLOAD_ABORT which handles the
situation where driver is removed while firmware download is in
progress.
logs:
modprobe btnxpuart
[65239.230431] Bluetooth: hci0: ChipID: 7601, Version: 0
[65239.236670] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se
rmmod btnxpuart
[65241.425300] Bluetooth: hci0: FW Download Aborted
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Tested-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 813da00098fd0a064b11a161c30eb0d80172979e)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
This config will enable usb frontend driver to let DomU could use usb
feature with PVUSB.
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
With gplay test[1] together with system suspend/resume, linux sometimes
stuck with all 6 A55 cores in cpuidle. It is the broadcast timer not
trigger interrupt, although set_next_event set the experied time.
In set_next_event:
write CMP_CR to disable CMP EVENT
write CMP_HI
write CMP_LO
write CMP_CR to enable CMP EVENT (a)
After step (a) CMP_HI value was unexpected changed to a very large value.
So broadcast timer interrupt not trigger in time.
Per HW team:
CR 101100 -> Writing to CR can end up updating to HI/LO or address 0x0
HI 100100 -> Writing to HI can end up updating LO or 0x0.
LO 100000 -> Writing to LO can end up updating 0x0.
register address 0x0 is write ignored, so no need handle it.
The fix for errata ERR052268 is:
before the upper step (a), disable sysctr interrupt
after upper step a:
write CMP_HI, in case step (a) wrongly updates CMP_HI
write CMP_LO, in case step (a) or updating CMP_HI wrongly updates CMP_LO
read back CMP_HI and CMP_LO to check, but this should always be correct
value.
enable sysctr interrupt.
Because step (a) may wrongly update CMP_HI and CMP_LO, so need disable
interrupt to avoid interrupt firing immediately.
[1]:
gst-launch-1.0 videotestsrc ! waylandsink window-width=800
window-height=600 > /dev/null &
while true; do glmark2-es2-wayland > /dev/null; done &
Reviewed-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Report the average QP value of current encoded frame via the control
V4L2_CID_MPEG_VIDEO_AVERAGE_QP, the value applies to the last dequeued
capture buffer.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
update wave6 v4l2 driver to v1.3.10, and the following patch is still
retained
LF-10673: mxc: vpu: wave6: add fps statistics
LF-11686-5: NXPSEU-267: mxc: vpu: wave6: support sei recovery flag
LF-11686-9: mxc: vpu: wave6: report the firmware git sha code
LF-10942-1: NXPSEU-269: mxc: vpu: wave6: add a debugfs to get the
firmware log
LF-10942-2: mxc: vpu: wave6: support to reload firmware
fix some coverity issues in v1.3.10
increase some error log levels
fix some coding style in wave6-hw.c
Fix some issues based on v1.3.10
NXPSEU-310: add compatible firmware version
NXPSEU-308: Fix some coverity issues.
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: TaoJiang <tao.jiang_2@nxp.com>
some ctrl is only applicable for certain format, if the format is not
supported by vpu hardware, just filter out it.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
there are some coverity issues found in hantro_v4l2, try to fix them
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
Report the average QP value of current encoded frame via the control
V4L2_CID_MPEG_VIDEO_AVERAGE_QP, the value applies to the last dequeued
capture buffer.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
remove some unused ioctl cmd.
clear some building warning.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
remove some unused ioctl cmd.
clear some building warning.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
remove some unused ioctl cmd.
clear some building warning.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.
remove some unused ioctl cmd.
clear some building warning.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
Report the average QP value of the current encoded frame via the
V4L2_CID_MPEG_VIDEO_AVERAGE_QP control, the value applies to the last
dequeued capture buffer.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
There is no need to add a lock in s_ctrl callback, it has been
synchronized by the ctrl_handler's lock, otherwise it may led to
a deadlock if the driver calls v4l2_ctrl_s_ctrl().
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Add a control V4L2_CID_MPEG_VIDEO_AVERAGE_QP to report the average QP
value of the current encoded frame. The value applies to the last
dequeued capture buffer.
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Currently, if less than 4 cameras are needed, one has to modify the DTB
in order to have the new topology work. That's because we enabled all
configured GMSL links by default. This fix simply disables the links
that didn't lock and we can connect sensors in various configurations.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
It may happen when booting the system up that GMSL links do not lock.
However, a simple chip reset can fix it easily. So, this patch modifies
the init sequence by implementing a retry mechanism that checks the GMSL
links, resetting the chip in case no link has locked. The checks will be
done at the beginning of the init sequence, instead of the end. Also,
remove the links reset call from max96724_reset_gmsl_links() and rename
the function to max96724_check_gmsl_links().
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Since the MX95MBCAM sensor module has the PWDNB pin, that should reset
the serializer, hard-wired to HIGH, we need to make sure we leave the
serializer in the default state when we remove the module or we perform
a warm reboot. This would avoid issues with GMSL links not locking when
rebooting the board.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
We'll need this in order to reset the chip before warm reboot or module
removal, as the PWDNB pin is always HIGH.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Use the os08a20 implementation from ox05b1s driver.
It seems the deprecated of_get_named_gpio/gpio_set_value
did not take into account the GPIO_ACTIVE_LOW/HIGH from DT.
Instead, the new devm_gpiod_get/gpiod_set_value does.
Use GPIO_ACTIVE_LOW in DT to line up with the datasheet power up diagram.
Removed pinctrl, the error was:
ovraw 2-0036: Error applying setting, reverse things back
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
This is an 8MP raw10/raw12 sensor with HDR capabilities.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>