The driver sends an action frame down and waits for a completion signal
triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event
to continue the process. However, the action frame could be transmitted
either on the current channel or on an off channel. For the on-channel
case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when
the frame is transmitted, which make the driver always wait a full
timeout duration. This patch has the completion signal be triggered by
receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel
case.
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Finding a common channel to send an action frame out is required for
some action types. Since a loop with several scan retry is used to find
the channel, a short wait time could be considered for each attempt.
This patch reduces the wait time from 1500 to 450 msec for each action
frame scan.
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Will enable FMAC to push more packets to bus tx queue and help
improve throughput when fws queuing is enabled. This change is
required to tune the throughput for passing WMM CERT tests.
Signed-off-by: Madhan Mohan R <MadhanMohan.R@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Transaction between AOS and SDIOD is not protected, and if cmd 52
received in AOS and in the middle of response state changed from AOS to
SDIOD, response is corrupted and it causes to SDIO Host controller to
hang.
Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
P2p spec mentioned that the p2p device address should be the globally
administered address with locally administered bit set. Therefore,
follow this guideline by default.
When the primary interface is set to a locally administered address, the
locally administered bit cannot be set again. Generate a random locally
administered address for this case.
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Send P2P Presence Response from the p2p interface address instead
of the p2p device address.
Signed-off-by: Madhan Mohan R <MadhanMohan.R@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
brcmfmac is a FullMAC driver and it implements/uses cfg80211 interface
for stations management. At the same time it doesn't receive or pass up
management frames.
This flag indicates that authenticator doesn't have to subscribe to or
handle management frames. Some authenticators (e.g. hostapd) were
working with brcmfmac thanks to some extra assumptions. This commit
clears up the situation.
Signed-off-by: Rafal Milecki <rafal@milecki.pl>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Transaction between AOS and SDIOD is not protected, and if cmd 52
received in AOS and in the middle of response state changed from AOS to
SDIOD, response is corrupted and it causes to SDIO Host controller to
hang.
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
The variable "wq_flags" is not used anymore. Remove it.
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
The firmware does not respond ARP request and causes ping failed with
following steps.
1. Bring up inteface
ifconfig wlan0 up or start wpa_supplicant
2. Set the IP address
ifconfig wlan0 192.168.100.10
3. Bring down interface or
ifconfig wlan0 down or kill wpa_supplicant
4. Bring up inteface again and set the same IP address
5. Connect to AP(192.168.100.1) and ping to AP will be failed.
FMAC clears arp_hostip when bringing down the interface, but not set it
back if setting the same IP address. We are able to see the IP address
in interface info(inconfig wlan0) but the ping still cannot work because
the firmware ARP offload does not respond the ARP request.
Because of that, we remove "arp_hostip_clear" from function
"brcmf_netdev_stop"
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
The credit numbers are static and tunable per chip in firmware side.
However the credit number may be changed that is based on packet pool
length and will send BRCMF_E_FIFO_CREDIT_MAP event to ask host driver
updating the credit numbers during interface up.
The purpose of this patch is making host driver has ability of updating
the credit numbers when receiving the BRCMF_E_FIFO_CREDIT_MAP event.
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
With setting sdio_wq_highpri=1 in module parameters, tasks submitted to
SDIO workqueue will put at the head of the queue and run immediately.
This parameter is for getting higher TX/RX throughput with SDIO bus.
Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Firmware inform the driver about tx status by normal tx status signal
or compressed tx status signal. This patch adds support to handle the
compressed tx status signal.
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
CYW89342 is a 2x2 MIMO,802.11a/b/g/n/ac,SDIO 3.0 and PCIe 3.0 for WLAN.
It is an automotive wireless chip.
Signed-off-by: Saint Chuang <jiac@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
For imx8mq-evk board, B4 board change touch/mipi-hdmi connected i2c bus from i2c1 to i2c3.
So this patch make the touch and mipi-hdmi work for both B4 and B3 board.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
retry logic cause high cpu load for multiple instances,
should use simple mutex to sync dpu blitter directly.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
video playback cause system hang with Wayland g2d compositor,
this also can be reproduced with Android G2D HWComposer.
the problem is second prg not handled between GPU and video.
need re-enable dprc & prg pipes when modifier changed.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
For i.MX8QM/i.MX8QXP, one power domain could have several devices
inside, such as cs42888 and wm8960 both belong to pd_mclk_out0
power domain, when these two devices probed, imx8_attach_dev() will
be called and these two devices' clocks will be add to pd_mclk_out0's
clock list, then if the second device probe failed and imx8_detach_dev()
will be called, the original code will go through the whole pd_mclk_out0
power domian's clock list and delete all the clock nodes, when the
clock node are NOT belonging to this device, below kernel warning will
show out by devm_kfree() function:
[ 4.998488] [<ffff0000086a8cac>] devm_kfree+0x2c/0x38
[ 5.003543] [<ffff000008595b60>] imx8_detach_dev+0xb4/0x14c
[ 5.009121] [<ffff0000086b8e8c>] genpd_remove_device+0x70/0xe8
[ 5.014959] [<ffff0000086b98d8>] genpd_dev_pm_detach+0x3c/0xc8
[ 5.020797] [<ffff0000086adc68>] dev_pm_domain_detach+0x20/0x28
[ 5.026722] [<ffff000008928940>] i2c_device_probe+0x1d4/0x35c
[ 5.032472] [<ffff0000086a4d50>] driver_probe_device+0x220/0x2d4
[ 5.038484] [<ffff0000086a4ea8>] __driver_attach+0xa4/0xa8
[ 5.043978] [<ffff0000086a2ea4>] bus_for_each_dev+0x58/0x98
[ 5.049552] [<ffff0000086a4678>] driver_attach+0x20/0x28
[ 5.054869] [<ffff0000086a41f4>] bus_add_driver+0x1c0/0x224
[ 5.060446] [<ffff0000086a57cc>] driver_register+0x68/0x108
[ 5.066024] [<ffff00000892a35c>] i2c_register_driver+0x44/0x84
[ 5.071862] [<ffff0000093b68a4>] wm8960_i2c_driver_init+0x18/0x20
[ 5.077961] [<ffff000008084144>] do_one_initcall+0x38/0x124
[ 5.083538] [<ffff000009350d28>] kernel_init_freeable+0x18c/0x228
[ 5.089638] [<ffff000008d409c0>] kernel_init+0x10/0x100
[ 5.094869] [<ffff000008085348>] ret_from_fork+0x10/0x18
The correct operation is to just delete those clock nodes belonged
to the device being detached, to avoid this case, we can add a device
point which can be assigned to device during attach_dev phase, then
in detach_dev phase, check the device pointer to make sure ONLY delete
those clock nodes belonged to its own and keep other clock nodes in the
same power domain there.
Reported-by: Chen Guoyin <guoyin.chen@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
When an abnormal condition causes the wptr/rptr pointer to be abnormal, cancel update stream address and report the error.
Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
This patch improves FrameGen kick and TCON kachuck signal configurations
as recommended by SoC designer. This should achieve more stability
and safety to set up a display pipeline and load prefetch engine shadow
registers.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
The quality selection bitfield is represented as following:
* Medium» 0 0 0
* High»» 0 0 1
* Very Low 2» 1 0 0
* Very Low 1» 1 0 1
* Very Low 0» 1 1 0
* Low» » 1 1 1
One might notice that from High to Very Low 2 quality there is
a gap of 2 (010 and 011) are missing. In the previous implementation
of amixer control, when you are selecting other quality than
the default mode, the value will always jump from High to Low
with a 2 step and will not be able to go back to a previous value.
The solution was to add two "N/A" undefined values in the
selection texts since those two values are marked as reserved
in the micfil RM.
The alternative was to write custom get and put functions to
only do the translation but the aproach in this patch is easier
to understand and less error prone.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit 976f005b20ddc12c7fe0ce60edd99e5fb9400d21)
Add control for Voice Activity Detector Noise OR Enable.
Enables a OR logic in the output of minimum noise estimator block. For
more information see Filter Result Gain Setting on page 71 - micfil
reference manual:
0b - Noise input is not decimated.
1b - Noise input is decimated.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit 317d2226fcfbbd8ae91eac9f685d71663227ae2a)
Add amixer controls for the following hardware voice activity
detection parameters: initialization mode, initialization time,
frame time, high-pass filter mode, input gain, sound gain, noise
gain, noise filter adjustment, zero-crossing detector(zcd)
enablement, zcd threshold, zcd auto-threshold, zcd filter adjustment
All of those parameters are now saved into micfil private data and
used when hardware voice detection is enabled.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
(cherry picked from commit 79972452e553f9a18cc57a89383f3be93a202c05)
Hardware Voice Activity Detector (HWVAD) is a block responsible for
detect voice activity in a channel selected by the user and it can be
configured in Envelope-based or Energy-based mode. Optionally, a
Zero-Crossing Detector can be enabled to improve the voice detection.
To enable hwvad from userspace there is a interface and you should write
the number of channels in /sys/devices/platform/30080000.micfil/hwvad/enable
to enable the hardware voice activity detection for micfil or 0
to disable it.
When voice activity is detected, an udev event will be generated:
"EVENT=PDM_VOICE_DETECT" and hwvad will be disabled afterwards.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
(cherry picked from commit 06495dd0cb0d0e2de225e32251b78edafa473406)
Remove regmap_cache_only from probe since this should be done
in suspend/resume or when hwvad is enabled/disabled. If regmap
is cached in probe, all volatile registers cannot be read/write
until caching is set to false (which in our case was done only
in resume function).
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
(cherry picked from commit 4cf9ddee84c995e02931be9de5448cb162130862)
As the typec2(usbotg2) is always with charger on, which makes the usbotg2
can't enter runtime suspend, thus high bus can't be released, disable it
for now and will improve high bus only for data communication.
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit 5b4290c370064cf9aa3a5e5c0cd12194f42aea7a)
Make fsl_get_pins_state function inline.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit badcb97ebd8c0aae89f76e979bcc801be35c7400)
1. add CHNL_SCL_IMG_CFG register that is new added in QXP/QM B0
2. according to isi owner's comments, CHNL_SCL_IMG_CFG need to
equal to CHNL_IMG_CFG when scaling disabled and equal to scaled
image size when scaling enabled, so add configuration for this
register.
3. Becuse isi software reset can't reset isi register to default
, so it need to manual clear if there is no scaling.
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
In order to use ISI ping-pong buffer, driver add another list
for V4L2 m2m cap_q queue and add new list member to it from
cap_q default list without decreasing the related counter, so
it leads to overflow when run 254 times. So correct it.
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
note for the rework:
eMMC on EVK board has pad conflict with NAND and Micro-SD.
NAND on EVK board has pin conflict with QSPI and SD2(eMMC).
Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
When the register setting for fifo_send_level is set to high, some residual
data of a frame which cannot fill up to the send_level, will be sent with
the next frame data. In this case, for CSI receive dma, sometimes,
the vertical blanking is too short to finish the storage of the previous
frame before the next frame start, depending on the system bandwidth.
Tested on imx8mq-evk rev B4 and B3, with OV5640 camera.
This patch was proposed by Tom Zheng <haidong.zheng@nxp.com>
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>