linux.git
6 years agoMLK-14379: drivers: perf: Add DDR perf count support
Frank Li [Wed, 5 Oct 2016 19:54:42 +0000 (14:54 -0500)]
MLK-14379: drivers: perf: Add DDR perf count support

perf stat -a -e ddr0/cycles/,ddr0/read-bytes/,ddr0/write-bytes/,ddr1/cycles/,d
dr1/read-bytes/,ddr1/write-bytes/ dd if=/dev/zero of=/dev/null bs=10M count=1
1+0 records in
1+0 records out

 Performance counter stats for 'system wide':

           7236174      ddr0/cycles/                                                  (99.97%)
              8573      ddr0/read-bytes/                                              (99.99%)
            163628      ddr0/write-bytes/
           7256543      ddr1/cycles/                                                  (99.99%)
              9308      ddr1/read-bytes/                                              (100.00%)
            165039      ddr1/write-bytes/

       0.008990125 seconds time elapsed

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoof: of_reserved_mem: Ensure cma reserved region not cross the low/high memory
Jason Liu [Wed, 23 Nov 2016 07:42:54 +0000 (15:42 +0800)]
of: of_reserved_mem: Ensure cma reserved region not cross the low/high memory

Need ensure the cma reserved region not cross the low/high memory boundary
when using the dynamic allocation methond through device-tree, otherwise,
kernel will fail to boot up when cma reserved region cross how/high mem.

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-18261 irqchip: imx-irqsteer: fix idx calculation for mask callback
Antoine Bouyer [Fri, 4 May 2018 09:48:09 +0000 (11:48 +0200)]
MLK-18261 irqchip: imx-irqsteer: fix idx calculation for mask callback

Fixes: a2e6a7833495 (MLK-16136-9 irqchip: imx-irqsteer: adjust irq config
via 'endian')

This patch fixes mask register offset calculation, when endian is not
default value 0 (i.e imx8mq).

Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-17290-01 irqchip: imx-irqsteer: add runtime pm support
Fugang Duan [Thu, 21 Dec 2017 01:03:57 +0000 (09:03 +0800)]
MLK-17290-01 irqchip: imx-irqsteer: add runtime pm support

Add runtime pm to manage irqsteer clock and its power domain in system
idle and suspend status to save power.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Tested-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16909 irqchip: imx-irqsteer: restore registers after power off
Fugang Duan [Mon, 20 Nov 2017 07:55:40 +0000 (15:55 +0800)]
MLK-16909 irqchip: imx-irqsteer: restore registers after power off

Once irqsteer controller is power off during suspend, the registers
are lost, it should restore the registers after resume back.

BuildInfo:
 - SCFW a479ff78, IMX-MKIMAGE ff9860c5, ATF 923651a
 - U-Boot 2017.03-00691-g96cf020

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Pandy.gao <pandy.gao@nxp.com>
Acked-by: Pandy.gao <pandy.gao@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16473 irqchip: imx-irqsteer: change irqsteer type to level
Seb Laveze [Wed, 23 Aug 2017 08:55:00 +0000 (10:55 +0200)]
MLK-16473 irqchip: imx-irqsteer: change irqsteer type to level

Irqsteer block only supports level interrupts.

(BuildInfo: SCFW 3e70523d, IMX-MKIMAGE 0, ATF 0)

Signed-off-by: Seb Laveze <sebastien.laveze@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16368: irqchip: intmux: fix address definition of register
Shengjiu Wang [Tue, 5 Sep 2017 08:22:45 +0000 (16:22 +0800)]
MLK-16368: irqchip: intmux: fix address definition of register

Fix the offset of CHANIPR register address. Document is KL28Z
reference manual

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16136-9 irqchip: imx-irqsteer: adjust irq config via 'endian'.
Fancy Fang [Fri, 4 Aug 2017 10:33:44 +0000 (18:33 +0800)]
MLK-16136-9 irqchip: imx-irqsteer: adjust irq config via 'endian'.

Change the irq configurations with adding endianness
determination for different platforms which may choose
different kinds of endianess.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16136-7 irqchip: imx-irqsteer: correct registers macro defitions
Fancy Fang [Fri, 4 Aug 2017 06:32:46 +0000 (14:32 +0800)]
MLK-16136-7 irqchip: imx-irqsteer: correct registers macro defitions

Correct several macro definitions related with irqsteer
to avoid incorrect expression calculation due to operators
priority.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16077-1: irqchip: intmux: add interrupt multiplexing support
Shengjiu Wang [Mon, 24 Jul 2017 06:09:57 +0000 (14:09 +0800)]
MLK-16077-1: irqchip: intmux: add interrupt multiplexing support

The intmux module is used to output internal interrupt in subsystem
to system with 32-to-8 configuration. It has several multiplex
channels depends on system. intmux is introduced in KL28Z reference
manual.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15009 irqchip: imx-irqsteer: correct type of irqstat
Peng Fan [Mon, 5 Jun 2017 11:47:17 +0000 (19:47 +0800)]
MLK-15009 irqchip: imx-irqsteer: correct type of irqstat

The type of irqstat in irqsteer_irqchip_data unsigned long, actually
it needs to be 32bits width, so use unsigned int.

And use sizeof(irqsteer_data->irqstat[0]), instead of 4 when alloc
memory for irqsteer_data.

for_each_set_bit needs the second param type is unsigned long *, so
cast the irqsteer_data->irqstat to unsigned long *, this is safe here.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15005-03 irqchip: irqsteer: add ipg clock support
Fugang Duan [Mon, 5 Jun 2017 03:31:10 +0000 (11:31 +0800)]
MLK-15005-03 irqchip: irqsteer: add ipg clock support

Some subsystems have lpcg sw_bit to control the ipg_clk to LIS,
so add the ipg clock for the module.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14978 irqchip: irqsteer: add NXP imx8 irq steer controller support
Fugang Duan [Sat, 13 May 2017 11:19:29 +0000 (19:19 +0800)]
MLK-14978 irqchip: irqsteer: add NXP imx8 irq steer controller support

The IrqSteer module redirects/steers the incoming interrupts to output
interrupts of a selected/designated channel as specified by a set of
configuration registers.

NXP i.MX8x chips integrate IrqSteer controller for some DSC to share irq
line for all modules in the subsystem which can reduce the IRQ lines
connected to the parent interrupt controller GIC, so IrqSteer irqchip
acts as the second irq domain in the system.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-17740 ARM: imx_v7_defconfig: enable wireless HOSTAP
Fugang Duan [Thu, 8 Mar 2018 10:43:10 +0000 (18:43 +0800)]
MLK-17740 ARM: imx_v7_defconfig: enable wireless HOSTAP

Add wireless HOSTAP config enable for i.MX7ULP Murata 1PJ (Qca9377-3).

Reviewed-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18276-01 ARM: imx_v7_defconfig: add regulatory rules t database config
Andy Duan [Fri, 11 May 2018 02:26:51 +0000 (10:26 +0800)]
MLK-18276-01 ARM: imx_v7_defconfig: add regulatory rules t database config

Enable regulatory rules database config:
        CONFIG_CFG80211_INTERNAL_REGDB

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18993 brcmfmac: configure wowl parameters only if firmware support wowl
Lo-Hsiang Lo [Fri, 21 Sep 2018 06:37:41 +0000 (14:37 +0800)]
MLK-18993 brcmfmac: configure wowl parameters only if firmware support wowl

Configure wowl parameters only if firmware support wowl.

Tested-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit:ceccd33fb63e49cb816a827c0dfcb8abf7059e7f)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-18 brcmfmac: map 802.1d priority to precedence level based on AP WMM params
Saravanan Shanmugham [Wed, 13 Sep 2017 05:04:14 +0000 (14:04 +0900)]
MLK-19517-18 brcmfmac: map 802.1d priority to precedence level based on AP WMM params

In WLAN, priority among various access categories of traffic is
always set by the AP using WMM parameters and this may not always
follow the standard 802.1d priority.
In this change, priority is adjusted based on the AP WMM params
received as part of the Assoc Response and the same is later used
to map the priority of all incoming traffic.

This change should fix the following 802.11n certification tests:
* 5.2.31 ACM Bit Conformance test
* 5.2.32 AC Parameter Modification test

Signed-off-by: Saravanan Shanmugham <sasm@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit:62657fc5931db1c1d48c3181f2f4effebf37a74b)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-17 brcmfmac: 4373 save-restore support
Chi-Hsien Lin [Tue, 12 Jun 2018 09:41:43 +0000 (04:41 -0500)]
MLK-19517-17 brcmfmac: 4373 save-restore support

Use sr_eng_en bit to check 4373 sr support.

Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit:af0f9024b058dbbf529dcb2dedae9ae3919ebe8b)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-16 brcmfmac: fix full timeout waiting for action frame on-channel tx
Chung-Hsien Hsu [Mon, 11 Jun 2018 09:32:21 +0000 (17:32 +0800)]
MLK-19517-16 brcmfmac: fix full timeout waiting for action frame on-channel tx

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>
(cherry picked from commit:3758e8288d6feb7b5dc125a4b8107a4f7e5963ab)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-15 brcmfmac: reduce timeout for action frame scan
Chung-Hsien Hsu [Fri, 8 Jun 2018 09:34:33 +0000 (17:34 +0800)]
MLK-19517-15 brcmfmac: reduce timeout for action frame scan

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>
(cherry picked from commit:4435f37332bd39026028a81b6e442bbe3105e790)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-14 brcmfmac: increase max hanger slots from 1K to 3K in fws layer
Madhan Mohan R [Thu, 24 May 2018 08:49:00 +0000 (14:19 +0530)]
MLK-19517-14 brcmfmac: increase max hanger slots from 1K to 3K in fws layer

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>
(cherry picked from commit:48195bf1b7dea8c6030dfce45900dda60f2d0ea4)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-13 brcmfmac: disable command decode in sdio_aos for 4354
Double Lo [Wed, 6 Jun 2018 02:39:58 +0000 (21:39 -0500)]
MLK-19517-13 brcmfmac: disable command decode in sdio_aos for 4354

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>
(cherry picked from commit:50ad46dcdb5f23514f81567e7b0ac7f3ec9dc281)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-12 brcmfmac: only generate random p2p address when needed
Chi-Hsien Lin [Fri, 1 Jun 2018 10:22:05 +0000 (05:22 -0500)]
MLK-19517-12 brcmfmac: only generate random p2p address when needed

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>
(cherry picked from commit:930ac6e9230a48a775e55ee6cb31c4dffe5d5dcc)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-11 brcmfmac: P2P CERT 6.1.9-Support GOUT handling P2P Presence Request
Madhan Mohan R [Wed, 23 May 2018 11:52:44 +0000 (17:22 +0530)]
MLK-19517-11 brcmfmac: P2P CERT 6.1.9-Support GOUT handling P2P Presence Request

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>
(cherry picked from commit:1ce946c329e68457fd8e72da33d17251a7f2377c)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-09 brcmfmac: disable command decode in sdio_aos for 4339/4345
Wright Feng [Thu, 31 May 2018 02:11:20 +0000 (21:11 -0500)]
MLK-19517-09 brcmfmac: disable command decode in sdio_aos for 4339/4345

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>
(cherry picked from commit:166eee38c42e1dad00b05c52f9c3a8d6b5c8853f)
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-08 brcmfmac: fix unused variable building warning message
Wright Feng [Tue, 29 May 2018 07:52:58 +0000 (02:52 -0500)]
MLK-19517-08 brcmfmac: fix unused variable building warning message

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>
(cherry picked from commit:453591909a747bede4ff3fabe1d4073370f920f4)
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-07 brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"
Wright Feng [Fri, 25 May 2018 07:02:04 +0000 (02:02 -0500)]
MLK-19517-07 brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop"

The firmware does not respond ARP request and causes ping failed with
following steps.

1. Bring up interface
   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 interface 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>
(cherry picked from commit: 840f43680465c41ab40be3758f9dc91a91175d98)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-06 brcmfmac: add 4-way handshake offload detection for FT-802.1X
Chung-Hsien Hsu [Thu, 24 May 2018 03:15:09 +0000 (11:15 +0800)]
MLK-19517-06 brcmfmac: add 4-way handshake offload detection for FT-802.1X

Add 4-way handshake offload detection for FT with EAP authentication.

Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: e25e421d61441199b50e4c13f50a27416f00c65c)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-05 brcmfmac: add credit map updating support
Wright Feng [Wed, 18 Apr 2018 02:33:21 +0000 (21:33 -0500)]
MLK-19517-05 brcmfmac: add credit map updating support

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>
(cherry picked from commit: b26faa8fe2a6cc7e8b2acceb35254b9fad5bd461)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-04 brcmfmac: make setting SDIO workqueue WQ_HIGHPRI a module parameter
Wright Feng [Mon, 26 Mar 2018 02:53:42 +0000 (21:53 -0500)]
MLK-19517-04 brcmfmac: make setting SDIO workqueue WQ_HIGHPRI a module parameter

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>
(cherry picked from commit: 7c2b310299f051be555c6928f0f858fdbac35abb)
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-03 revert: brcmfmac: add a module parameter to set scheduling priority...
Wright Feng [Thu, 26 Apr 2018 06:35:53 +0000 (01:35 -0500)]
MLK-19517-03 revert: brcmfmac: add a module parameter to set scheduling priority of sdio_dpc

will use WQ_HIGHPRI instead.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: 2925b73171942933311e87ab51747a055cfd8abf)
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-02 brcmfmac: handle compressed tx status signal
Chung-Hsien Hsu [Tue, 8 May 2018 07:29:35 +0000 (15:29 +0800)]
MLK-19517-02 brcmfmac: handle compressed tx status signal

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>
(cherry picked from commit: 480bdeffb48904468ca5591721b148a736e03d68)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19517-01 brcmfmac: add CYW89342 PCIE device
Saint Chuang [Fri, 4 May 2018 08:49:53 +0000 (03:49 -0500)]
MLK-19517-01 brcmfmac: add CYW89342 PCIE device

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>
(cherry picked from commit: 53fda4df73934276239dc5b43cceecf2d9f62c52)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19091 cfg80211: make phy index match after wiphy dev is released
Andy Duan [Thu, 13 Sep 2018 09:23:37 +0000 (17:23 +0800)]
MLK-19091 cfg80211: make phy index match after wiphy dev is released

During insmod/rmmod test, the phy index increases that cause troube
for test case. To make global variable wiphy_counter match between
creat and free wiphy device, it needs to decrease the atomic counter
when wiphy device is freed.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-19516 brcmfmac: fix 4339 CRC error under SDIO 3.0 SDR104 mode
Double Lo [Thu, 6 Sep 2018 05:49:41 +0000 (00:49 -0500)]
MLK-19516 brcmfmac: fix 4339 CRC error under SDIO 3.0 SDR104 mode

This patch fixes 4339 CRC error while running Tput test with
suspend/resume test script. Update F2 Watermark to 48 to avoid
CRC error.

The continuous failure messages before system crash:
brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
brcmfmac: brcmf_sdio_rxglom: glom read of 25600 bytes failed: -5
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
brcmfmac: brcmf_sdio_rxglom: glom read of 24576 bytes failed: -5
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame

Tested-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-21 brcmfmac: Remove WOWL configuration in disconnect state
Double Lo [Tue, 13 Mar 2018 08:22:20 +0000 (03:22 -0500)]
MLK-18675-21 brcmfmac: Remove WOWL configuration in disconnect state

Set wowl configuration in disconnect state is redundant.
Remove it to fix no scan result issue after resume.

Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-20 brcmfmac: Support wake on ping packet
Double Lo [Tue, 6 Feb 2018 11:07:05 +0000 (05:07 -0600)]
MLK-18675-20 brcmfmac: Support wake on ping packet

FMAC driver need to provide a dummy wowlan filter for kernel and
provided the well configured wowlan stack. So the system will
keep driver in connected state in suspend mode and can be wake
up by ping packet.

Enable unicast packet filter before system suspend and
disable it after resume.

Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-19 brcmfmac: make firmware eap_restrict a module parameter
Wright Feng [Fri, 2 Mar 2018 06:45:32 +0000 (00:45 -0600)]
MLK-18675-19 brcmfmac: make firmware eap_restrict a module parameter

When eap_restrict is enabled, firmware will toss non-802.1x frames from
tx/rx data path if station not yet authorized.
Internal firmware eap_restrict is disabled by default. This patch makes
it possible to enable firmware eap_restrict by specifying
eap_restrict=1 as module parameter.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-18 brcmfmac: add a module parameter to set scheduling priority of sdio_dpc
Wright Feng [Fri, 2 Mar 2018 02:41:21 +0000 (20:41 -0600)]
MLK-18675-18 brcmfmac: add a module parameter to set scheduling priority of sdio_dpc

To enhance RX throughput, we add a module parameter "sdio_dpc_prio" to let
user can set scheduling  priority for sdio_dpc. It can improve RX
throughput by reducing the receiving time in sdio_dpc.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-17 brcmfmac: fix system warning message during wowl suspend
Double Lo [Mon, 5 Feb 2018 10:33:49 +0000 (04:33 -0600)]
MLK-18675-17 brcmfmac: fix system warning message during wowl suspend

There is a system warning message, warn_slowpath-fmt, during suspend
while using supplicant join AP and enable wowl feature by IW command.
It's cuased by brcmf_pno_remove_request path can't find the reqid.
This fix will not go to remove pno request function if there is no
pno scan.

Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-16 brcmfmac: do not print ulp_sdioctrl get error
Naveen [Tue, 6 Feb 2018 06:22:58 +0000 (11:52 +0530)]
MLK-18675-16 brcmfmac: do not print ulp_sdioctrl get error

Don't print ulp_sdioctrl get error as errors are expected for non ulp
cases.

Signed-off-by: Naveen Gupta <nagu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-15 brcmfmac: support AP isolation
Wright Feng [Wed, 31 Jan 2018 10:07:12 +0000 (04:07 -0600)]
MLK-18675-15 brcmfmac: support AP isolation

Hostap daemon has a parameter "ap_isolate which is used to prevent
low-level bridging of frames between associated stations in the BSS.
For driver side, we add cfg80211 ops method change_bss to support
setting AP isolation from user space.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-14 brcmfmac: Add support for 43428 SDIO device ID
Wright Feng [Mon, 29 Jan 2018 02:52:08 +0000 (20:52 -0600)]
MLK-18675-14 brcmfmac: Add support for 43428 SDIO device ID

The device 43428 is a new SDIO device ID but shares the same WLAN core
with device 43430a1. It is a 1x1 802.11b/g/n 2.4GHz HT20,
256-QAM/Turbo QAM WLAN chip.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-13 brcmfmac: add FT-based AKMs in brcmf_set_key_mgmt() for FT support
Chung-Hsien Hsu [Thu, 1 Feb 2018 03:50:33 +0000 (11:50 +0800)]
MLK-18675-13 brcmfmac: add FT-based AKMs in brcmf_set_key_mgmt() for FT support

Add WLAN_AKM_SUITE_FT_8021X and WLAN_AKM_SUITE_FT_PSK in
brcmf_set_key_mgmt() for FT support.

Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agobrcmfmac: Fix compilation error
Vipul Kumar [Tue, 8 Jan 2019 09:13:36 +0000 (14:43 +0530)]
brcmfmac: Fix compilation error

This patch fix the below compilation errors.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function â€˜brcmf_sdio_ulp_pre_redownload_check’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2631:10: error: implicit declaration of function â€˜brcmf_sdiod_regrb’; did you mean â€˜brcmf_sdiod_readb’? [-Werror=implicit-function-declaration]
  value = brcmf_sdiod_regrb(bus->sdiodev, SDIO_CCCR_IOEx, &err);
          ^~~~~~~~~~~~~~~~~
          brcmf_sdiod_readb
In file included from drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:42:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h:437:2: error: implicit declaration of function â€˜brcmf_sdiod_regrl’; did you mean â€˜brcmf_sdiod_readl’? [-Werror=implicit-function-declaration]
  brcmf_sdiod_regrl(sdh, D11SHM_ADDR(offset), ret)
  ^~~~~~~~~~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2636:18: note: in expansion of macro â€˜D11SHM_RD’
   ulp_wake_ind = D11SHM_RD(bus->sdiodev, M_ULP_WAKE_IND(
                  ^~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h:434:2: error: implicit declaration of function â€˜brcmf_sdiod_regwl’; did you mean â€˜brcmf_sdiod_readl’? [-Werror=implicit-function-declaration]
  brcmf_sdiod_regwl(sdh, D11SHM_ADDR(offset), val, ret)
  ^~~~~~~~~~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2654:4: note: in expansion of macro â€˜D11SHM_WR’
    D11SHM_WR(bus->sdiodev, M_DS1_CTRL_SDIO(
    ^~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function â€˜brcmf_sdio_firmware_callback’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4388:9: error: implicit declaration of function â€˜brcmf_bus_started’; did you mean â€˜brcmf_bus_txctl’? [-Werror=implicit-function-declaration]
   err = brcmf_bus_started(dev);
         ^~~~~~~~~~~~~~~~~
         brcmf_bus_txctl
cc1: some warnings being treated as errors
scripts/Makefile.build:303: recipe for target 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o' failed
make[6]: *** [drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o] Error 1

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agobrcmfmac: pass struct in brcmf_fw_get_firmwares()
Vipul Kumar [Tue, 8 Jan 2019 08:59:39 +0000 (14:29 +0530)]
brcmfmac: pass struct in brcmf_fw_get_firmwares()

As per 'commit d09ae51a4b67 ("brcmfmac: pass struct in
brcmf_fw_get_firmwares()")', make changes in the brcmf_fw_get_firmwares()
call to fix the compilation error.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function â€˜brcmf_sdio_ulp_reinit_fw’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2597:45: error: â€˜BRCMF_FW_REQUEST_NVRAM’ undeclared (first use in this function); did you mean â€˜BRCMF_FW_TYPE_NVRAM’?
  err = brcmf_fw_get_firmwares(sdiodev->dev, BRCMF_FW_REQUEST_NVRAM,
                                             ^~~~~~~~~~~~~~~~~~~~~~
                                             BRCMF_FW_TYPE_NVRAM
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2597:45: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2598:17: error: passing argument 3 of â€˜brcmf_fw_get_firmwares’ from incompatible pointer type [-Werror=incompatible-pointer-types]
          sdiodev->fw_name, sdiodev->nvram_name,
          ~~~~~~~^~~~~~~~~
In file included from drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h:22,
                 from drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:42:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h:93:14: note: expected â€˜void (*)(struct device *, int,  struct brcmf_fw_request *)’ but argument is of type â€˜char *’
       void (*fw_cb)(struct device *dev, int err,
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       struct brcmf_fw_request *req));
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2597:8: error: too many arguments to function â€˜brcmf_fw_get_firmwares’
  err = brcmf_fw_get_firmwares(sdiodev->dev, BRCMF_FW_REQUEST_NVRAM,
        ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h:22,
                 from drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:42:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h:92:5: note: declared here
 int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
     ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-12 brcmfmac: DS1 Exit should re download the firmware.
Naveen [Tue, 9 Jan 2018 06:03:10 +0000 (11:33 +0530)]
MLK-18675-12 brcmfmac: DS1 Exit should re download the firmware.

In Deep Sleep mode ARM is off and once Exit trigger comes than
Mail Box Interrupt comes to Host and whole Re Initiation should be done
in the ARM to start TX/RX.

Signed-off-by: Naveen Gupta <nagu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Vipul: Fixed merge conflicts
Conflict:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-11 brcmfmac: 43012 Update F2 Watermark to 0x60 to fix DMA Error during...
Naveen [Thu, 4 Jan 2018 06:04:15 +0000 (11:34 +0530)]
MLK-18675-11 brcmfmac: 43012 Update F2 Watermark to 0x60 to fix DMA Error during UDP RX Traffic.

The number of words that the read FIFO has to contain except
the end of frame before sends data back to the host.
Max watermark = (512B - 2* (BurstLength))/4 =
(512 - 128)/4 = 384/4 = 0x60
so if burst length (i.e. BurstLength = 64) is increased,
watermark has to be reduced. This is the optimal setting for this chip.

Signed-off-by: Naveen Gupta <nagu@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-10 brcmfmac: calling skb_orphan before sending skb to SDIO bus
Wright Feng [Tue, 2 Jan 2018 02:12:54 +0000 (20:12 -0600)]
MLK-18675-10 brcmfmac: calling skb_orphan before sending skb to SDIO bus

Linux 3.6 introduces TSQ which has a per socket threshold for TCP Tx
packet to reduce latency. In fcmode 1/2, host driver enqueues skb in
hanger and TCP doesn't push new skb frees until host frees the skb when
receiving fwstatus event. So using skb_orphan before sending skb to bus
will make the skb removing the ownership of socket. With this patch, we
got better throughput in fcmode 1/2.

Tested 43455 TCP throughput in 20 MHz bandwidth with/without this patch.
fcmode 0: 59.5 / 59.6 (Mbps)
fcmode 1: 59.3 / 23.4 (Mbps)
fcmode 2: 59.6 / 21.5 (Mbps)

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-07 brcmfmac: Saverestore support changes for 43012
Andy Duan [Mon, 25 Jun 2018 08:54:07 +0000 (16:54 +0800)]
MLK-18675-07 brcmfmac: Saverestore support changes for 43012

Saverestore register settings for 43012.

Signed-off-by: Praveen Babu Chandran <pucn@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Vipul: updated while rebase on v4.19
conflicts:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-06 brcmfmac: set apsta to 1 when AP start on primary interface.
Wright Feng [Mon, 11 Sep 2017 07:48:57 +0000 (02:48 -0500)]
MLK-18675-06 brcmfmac: set apsta to 1 when AP start on primary interface.

APSTA can work on two band concurrently with using VSDB(Virtual
Simultaneous Dual-Band) or RSDB(Real Simultaneous Dual-Band) features.
In this case, we have to keep apsta is 1 in firmware side. However, if
we start wpa_supplicant on wlan0 and then start hostapd on wlan 1, the
apsta will be set to 0, and we will see data stall on wlan0(station)
So that, we only set apsta to 1 when AP start on primary interface.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-05 brcmfmac: Add support for CYW43012 SDIO chipset
Chi-Hsien Lin [Tue, 20 Jun 2017 07:20:23 +0000 (02:20 -0500)]
MLK-18675-05 brcmfmac: Add support for CYW43012 SDIO chipset

CYW43012 is a 1x1 802.11a/b/g/n Dual-Band HT20, 256-QAM/Turbo QAM. It
is an Ultra Low Power WLAN+BT combo chip.

Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Vipul: updated whilre rebase on v4.19
conflicts:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-04 brcmfmac: return -EPERM when getting error in vendor command handler
Wright Feng [Tue, 22 Aug 2017 03:36:04 +0000 (22:36 -0500)]
MLK-18675-04 brcmfmac: return -EPERM when getting error in vendor command handler

Firmware returns proprietary error code when getting error in
fil_cmd_data_set or fil_cmd_data_get. Sometimes the vendor tool or
utilities which uses libnl may stuck in some commands when wl is down.
For example, issue "scan" command after issuing "down" command, the
"scan" command will be the blocking call and stuck as no response from
firmware. It is caused by that firmware returns BCME_NOTUP(-4) when wl
is down, but in Linux the -4 is -EINTR, so libnl catches the error and
not pass to upper layer.
Because of that, the driver should return Linux error code instead of the
proprietary error code, and the tools or utilities need to get the real
firmware error code by another command "bcmerrorstr" after receiving
the error.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-03 brcmfmac: Add sg parameters dts parsing
Chi-Hsien Lin [Tue, 15 Aug 2017 05:25:14 +0000 (00:25 -0500)]
MLK-18675-03 brcmfmac: Add sg parameters dts parsing

broken_sg_support, sd_head_align, and sd_sgentry_align are used in
brcmfmac code but not configurable in dts file. Add the parsing logic.
Now they can be configured like below in dts:
brcm,broken_sg_support;
brcm,sd_head_align = /bits/ 16 <4>;
brcm,sd_sgentry_align = /bits/ 16 <4>;

Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agobrcmfmac: Rename / replace old IO functions with simpler ones.
Vipul Kumar [Tue, 8 Jan 2019 06:46:20 +0000 (12:16 +0530)]
brcmfmac: Rename / replace old IO functions with simpler ones.

As per 'commit 71bd508d7ded ("brcmfmac: Rename / replace old IO functions
with simpler ones.")', rename/ replace old IO functions to fix the
compilation errors.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function â€˜brcmf_sdio_firmware_callback’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4116:4: error: implicit declaration of function â€˜brcmf_sdiod_regwb’; did you mean â€˜brcmf_sdiod_readb’? [-Werror=implicit-function-declaration]
    brcmf_sdiod_regwb(sdiodev, SBSDIO_WATERMARK, CY_4373_F2_WATERMARK, &err);
    ^~~~~~~~~~~~~~~~~
    brcmf_sdiod_readb
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4116:22: error: â€˜sdiodev’ undeclared (first use in this function); did you mean â€˜sdiod’?
    brcmf_sdiod_regwb(sdiodev, SBSDIO_WATERMARK, CY_4373_F2_WATERMARK, &err);
                      ^~~~~~~
                      sdiod
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4116:22: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4117:13: error: implicit declaration of function â€˜brcmf_sdiod_regrb’; did you mean â€˜brcmf_sdiod_readb’? [-Werror=implicit-function-declaration]
    devctl = brcmf_sdiod_regrb(sdiodev, SBSDIO_DEVICE_CTL, &err);
             ^~~~~~~~~~~~~~~~~
             brcmf_sdiod_readb
cc1: some warnings being treated as errors
scripts/Makefile.build:303: recipe for target 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o' failed

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agobrcmfmac: Fix compilation error
Vipul Kumar [Tue, 8 Jan 2019 06:30:10 +0000 (12:00 +0530)]
brcmfmac: Fix compilation error

As per 'commit 2d6edad4b2da ("brcmfmac: remove duplicate pointer variable
from brcmf_sdio_firmware_callback()")', make changes to fix the
compilation error.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function â€˜brcmf_sdio_firmware_callback’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4112:11: error: â€˜sdiodev’ undeclared (first use in this function); did you mean â€˜sdiod’?
   switch (sdiodev->func0->device) {
           ^~~~~~~
           sdiod
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:4112:11: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agobrcmfmac: Remove array of functions
Vipul Kumar [Tue, 8 Jan 2019 06:24:52 +0000 (11:54 +0530)]
brcmfmac: Remove array of functions

As per 'commit c9aa7a91de74 ("brcmfmac: Remove array of functions")'
replace the array of functions with a pair of pointers to the
relevant functions to fix the compilation errors.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c: In function â€˜brcmf_sdiod_probe’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:920:15: error: â€˜struct brcmf_sdio_dev’ has no member named â€˜func’; did you mean â€˜func1’?
  if (sdiodev->func[0]->device == SDIO_DEVICE_ID_CYPRESS_4373) {
               ^~~~
               func1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:924:37: error: â€˜struct brcmf_sdio_dev’ has no member named â€˜func’; did you mean â€˜func1’?
  ret = sdio_set_block_size(sdiodev->func[2], f2_blksz);
                                     ^~~~
                                     func1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function â€˜brcmf_sdio_firmware_callback’:

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-18675-02 brcmfmac: Set F2 blksz and Watermark to 256 for 4373
Wright Feng [Tue, 20 Jun 2017 10:11:24 +0000 (05:11 -0500)]
MLK-18675-02 brcmfmac: Set F2 blksz and Watermark to 256 for 4373

We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional
throughput test. Setting F2 blocksize and enable watermark to 256 to
guarantee the operation stability.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(Vipul: Fixed merge conflictts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-17362-01 Changes for wireless and cfg80211 support
Nakul Kachhwaha [Tue, 28 Feb 2017 06:17:01 +0000 (11:47 +0530)]
MLK-17362-01 Changes for wireless and cfg80211 support

[Patch] Pulling the following commits and some general changes
from custom v3.10 kernel for supporting qcacld2.0 on kernel v4.9.11.
1. cfg80211: Using new wiphy flag WIPHY_FLAG_DFS_OFFLOAD
When flag WIPHY_FLAG_DFS_OFFLOAD is defined, the driver would handle
all the DFS related operations. Therefore the kernel needs to ignore
the DFS state that it uses to block the userspace calls to the driver
through cfg80211 APIs. Also it should treat the userspace calls to
start radar detection as a no-op.

Please note that changes in util.c is not picked up explicitly.
Kernel v4.9.11 uses wrapper cfg80211_get_chans_dfs_required which takes
care of this change.

Change-Id: I9dd2076945581ca67e54dfc96dd3dbc526c6f0a2
IRs-Fixed: 202686

2. New db.txt from git/sforshee/wireless-regdb.git
CONFIG_CFG80211_INTERNAL_REGDB is enabled in build. This causes
kernel warn messages as db.txt is empty. A new db.txt is added
from:
git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git

IRs-Fixed: 202686

3. Picked up the declaration and definition of the function
cfg80211_is_gratuitous_arp_unsolicited_na

Change-Id: I1e4083a2327c121073226aa6b75bb6b5b97cec00
CRs-fixed: 1079453

Signed-off-by: Nakul Kachhwaha <nkachh@codeaurora.org>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(Vipul: Fixed merge conflicts)
(TODO: checkpatch warnings)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-17136 ath10k: clear fetch board fail log
Gao Pan [Tue, 8 Jan 2019 05:46:48 +0000 (11:16 +0530)]
MLK-17136 ath10k: clear fetch board fail log

Below fail log is caused by firmware version issue.
"ath10k_pci 0000:01:00.0: failed to fetch board data"

To clear the log, ath10k_dbg is used to replace ath10k_err.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-17033: ath10k: fix suspend/resume fail issue
Gao Pan [Fri, 1 Dec 2017 05:17:07 +0000 (13:17 +0800)]
MLK-17033: ath10k: fix suspend/resume fail issue

qca6174 wifi driver causes system hang during suspend/resume stress test.
This patch fix this suspend/resume fail issue.

Signed-off-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
(cherry-picked from 72fbaf4aa36e7407108d1c0b7d857287f84bee3d)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-17819 ARM: imx7ulp: update iomux header for i.MX7ULP B0 silicon
Fugang Duan [Thu, 15 Mar 2018 09:36:29 +0000 (17:36 +0800)]
MLK-17819 ARM: imx7ulp: update iomux header for i.MX7ULP B0 silicon

- Update iomux header for i.MX7ULP B0 silicon.
- Align the pin func name with header file for all dts files.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Shenwei Wang <shenwei.wang@nxp.com>
During the 4.14 rebase all intermediate commits were adjusted for
upstream prefix so this has many fewer dts changes.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13441-1 ARM: imx7ulp: iomux: add imx7ulp header file
Andy Duan [Mon, 9 May 2016 09:54:12 +0000 (17:54 +0800)]
MLK-13441-1 ARM: imx7ulp: iomux: add imx7ulp header file

Add imx7ulp header file.

Two changes base on original header file from iomux tool team:
- Remove the mux register column since mux and conf is shared in
  one register.
- IOMUX_0 part:
  The register address: 0x4103_d000 ~ 0x4103_d0cc, the header file
  offset is 0xdxxx, now change it to 0x0xxx. The common base address
  0x4103_d000 is defined by dts file.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Renamed to same convention as upstream

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16065-5 extcon: ptn5150: add PTN5150 Type-C CC logic chip
Peter Chen [Mon, 24 Jul 2017 09:30:23 +0000 (17:30 +0800)]
MLK-16065-5 extcon: ptn5150: add PTN5150 Type-C CC logic chip

Add NXP PTN5150 Type-C CC logic chip, this chip supplies CC flip
function automatically, and the driver will notify extcon
consumer (USB controller driver) attach and detach events.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14720 epdc: correct WFE setting when bypass legacy process
Robby Cai [Thu, 20 Apr 2017 09:17:42 +0000 (17:17 +0800)]
MLK-14720 epdc: correct WFE setting when bypass legacy process

set WFE (WFE_A on imx7d, and WFE_B on imx6ull/imx6sll) input address to
framebuffer start address, and set left/top coordinate since the framebuffer is
the original source of WFE (i.e., not from PXP output) when bypass legacy mode.
The patch also limits the condition to bypass legacy mode when not use
EPDC_FLAG_USE_ALT_BUFFER.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 7f19940705902623166777c675f5e10c9e7fc477)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15030: EPDC: Filled stride value of s0_param layer
Guoniu.Zhou [Sat, 10 Jun 2017 07:51:59 +0000 (15:51 +0800)]
MLK-15030: EPDC: Filled stride value of s0_param layer

When epdc driver use pxp, it didn't fill stride value of s0_parm, so it leads to
epdc can display picture normally.

So fill it in this patch.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14516 epdc: bypass pxp legacy process when there's no transformation
Robby Cai [Thu, 9 Mar 2017 13:42:04 +0000 (21:42 +0800)]
MLK-14516 epdc: bypass pxp legacy process when there's no transformation

when there's no transform (Y8 format in framebuffer, no rotation,
no look-up transformation such as CMAP, no scaling/flip, etc.)
and no dithering, bypass pxp legacy process to save time.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13982: 4.9 rebase: EPDC does not work
Cristina Ciocan [Mon, 27 Feb 2017 10:04:17 +0000 (12:04 +0200)]
MLK-13982: 4.9 rebase: EPDC does not work

The Linux kernel regulator core implementation does not accept negative
voltage values; all negative values are treated as errors.

The problem with the EPDC is that the panel uses a negative voltage
regulator which fails to be enabled by the regulator core. This issue has
slipped up until the 4.9 rebase because the voltage range [min, max] was
checked against only when min = max. This has been fixed in 4.9, resulting
in errors in the VCOM regulator driver.

The fix is to use the negative values when communicating with the hardware,
but send only positive values to the regulator core.

This patch sends the absolute value to the regulator core and transforms
the received value (from the regulator core) to negative one before sending
it to hardware.

Fix device tree to deal with negative voltage regulator values by setting
min_value = -real_max_value and vice versa. Boards affected:
- imx6dl-sabresd
- imx6ull-14x14-ddr3-arm2
- imx7d-12x12-lpddr3-arm2
- imx7d-sdb
- imx6sll-evk
- imx6sl-evk
- imx6sll-lpddr3-arm2

Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
[Arul: Fix merge conflicts]
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-12179 epdc: use outer_flush_range instead of outer_flush_all
Robby Cai [Tue, 12 Jan 2016 08:35:12 +0000 (16:35 +0800)]
MLK-12179 epdc: use outer_flush_range instead of outer_flush_all

l2c210_flush_all, the underlying implementation of outer_flush_all()
has the constraint on 4.1 kernel that, it can not be called under interrupt
 context. However the EPDC driver can not guarantee this condition at
calling point, thus it could cause kernel dump. This has been observed on
i.MX6SL, and theorically on other platforms like i.MX6DL
(using PL310 L2 cache). So use outer_flush_range to fix it.

Although we don't have such issue on i.MX7D (not PL310 L2), we still prefer
to use outer_flush_range() for legacy software dithering support and
for easy maintenance. Then we do the change in both EPDC driver.

------------[ cut here ]------------
Kernel BUG at 800204d8 [verbose debug info unavailable]
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in: galcore(O) evbug
CPU: 0 PID: 842 Comm: kworker/u3:1 Tainted: G           O    4.1.8-1.0.0+ge352a0b #1
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
Workqueue: EPDC Submit epdc_submit_work_func
task: a8a8f900 ti: a92a4000 task.ti: a92a4000
PC is at l2c210_flush_all+0x5c/0x60
LR is at epdc_submit_work_func+0x684/0xbf8
pc : [<800204d8>]    lr : [<8030702c>]    psr: 600b0013
sp : a92a5e90  ip : a9150c8c  fp : a8480518
r10: a84a28c0  r9 : 00000008  r8 : a9150644
r7 : a91512e0  r6 : 0000012c  r5 : a91512e0  r4 : a91512dc
r3 : a00b0013  r2 : 80b184a0  r1 : 701fe019  r0 : f4a02000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: a943404a  DAC: 00000015
Process kworker/u3:1 (pid: 842, stack limit = 0xa92a4210)
Stack: (0xa92a5e90 to 0xa92a6000)
5e80:                                     a92a5ed0 8005d058 0000bbc2 a851d4c0
5ea0: 00000000 a9150000 a8480000 a8480440 00000190 00000193 55555556 a84a28c0
5ec0: a8480518 a8500000 80b18088 a94f3900 00000000 00000000 00000190 0000012c
5ee0: a94f3900 a8480518 a87e8d80 a8479000 a845a200 00000020 00000000 a8479000
5f00: a8479000 80046458 a92a4000 a8479000 a8479014 a8479000 a87e8d98 a8479014

...

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-12144 epdc: fix gpio active level to enable epdc signal
Robby Cai [Thu, 7 Jan 2016 10:19:34 +0000 (18:19 +0800)]
MLK-12144 epdc: fix gpio active level to enable epdc signal

There's a GPIO pin to enable epdc signals on some platform like i.MX7D SDB.
However, it's changed from active-low to active-high on i.MX7D SDB RevB
board.
Enhance the driver to handle the active level automatically, then only
need to adjust gpio as well as active level in dts file if necessary.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-11476 iio: adc: Enable i.MX6SX adc driver.
Luwei Zhou [Thu, 6 Mar 2014 07:47:47 +0000 (15:47 +0800)]
MLK-11476 iio: adc: Enable i.MX6SX adc driver.

Enable i.MX6SX adc driver. ADC driver will try getting ADC controller
channel number via device tree, because i.MX chip enable 4 channels
on each controller.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 14a6a98f64e26702b1c0ecfc7d58a45ee5752d54)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-19258-4 doc: dts: ci-hdrc-usb2: add property for picophy
Peter Chen [Tue, 21 Aug 2018 09:15:36 +0000 (17:15 +0800)]
MLK-19258-4 doc: dts: ci-hdrc-usb2: add property for picophy

Add two parameters which are used to tune USB signal for picophy,
picophy is used at imx7d and imx845.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-18535-13 dt-bindings: display: bridge: add sec-dsim bindings
Fancy Fang [Thu, 7 Jun 2018 07:13:57 +0000 (15:13 +0800)]
MLK-18535-13 dt-bindings: display: bridge: add sec-dsim bindings

Add the device-tree bindings for the display bridge
Samsung MIPI DSIM on i.MX platforms.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-17491-40 dt-bindings: clock: add imx7ulp clock binding doc
Dong Aisheng [Sat, 13 May 2017 09:25:03 +0000 (17:25 +0800)]
MLK-17491-40 dt-bindings: clock: add imx7ulp clock binding doc

i.MX7ULP Clock functions are under joint control of the System
Clock Generation (SCG) modules, Peripheral Clock Control (PCC)
modules, and Core Mode Controller (CMC)1 blocks

Note IMX7ULP has two clock domains: M4 and A7. This binding doc
is only for A7 clock domain.

Cc: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16973-1 dt-bindings: display: Add JDI TX26D202VM0BWA LCD panel bindings
Liu Ying [Fri, 24 Nov 2017 07:34:03 +0000 (15:34 +0800)]
MLK-16973-1 dt-bindings: display: Add JDI TX26D202VM0BWA LCD panel bindings

The JDI TX26D202VM0BWA LCD panel is a 10.1" panel
with a 1920x1200 (WUXGA) resolution.
The panel has dual LVDS channels.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16065-6 doc: binding: cdns-usb3: add binding-doc for Cadence USB3
Peter Chen [Tue, 25 Jul 2017 01:38:25 +0000 (09:38 +0800)]
MLK-16065-6 doc: binding: cdns-usb3: add binding-doc for Cadence USB3

Add binding-doc for Cadence USB3

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15001-24 dt-bindings: Add ITE vendor prefix
Liu Ying [Mon, 27 Mar 2017 03:31:45 +0000 (11:31 +0800)]
MLK-15001-24 dt-bindings: Add ITE vendor prefix

Add vendor prefix for ITE Tech Inc. http://ite.com.tw/en

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15001-19 dt-bindings: Add Mixel vendor prefix
Liu Ying [Mon, 24 Apr 2017 05:57:11 +0000 (13:57 +0800)]
MLK-15001-19 dt-bindings: Add Mixel vendor prefix

Add vendor prefix for Mixel, Inc. http://mixel.com

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14972-01 doc: dt-bindings: add imx sc temp sensor binding doc
Bai Ping [Wed, 24 May 2017 07:38:45 +0000 (15:38 +0800)]
MLK-14972-01 doc: dt-bindings: add imx sc temp sensor binding doc

Add i.MX8QM/QXP temp sensor binding doc.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15004-6: Document: sound: update document for audio
Shengjiu Wang [Mon, 5 Jun 2017 08:01:04 +0000 (16:01 +0800)]
MLK-15004-6: Document: sound: update document for audio

update compatible string for imx-audio-cs42888.txt and fsl,esai.txt

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14985-1 Documentation: i2c: add dt documentation for isl29023
Gao Pan [Wed, 31 May 2017 08:36:17 +0000 (16:36 +0800)]
MLK-14985-1 Documentation: i2c: add dt documentation for isl29023

Add dt documentation for intersil ISL29023 ambient light sensor.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
[Arul: Fix merge conflicts]
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-12284-2 doc: syscon: add clocks as optional property
Dong Aisheng [Thu, 28 Aug 2014 09:01:34 +0000 (17:01 +0800)]
MLK-12284-2 doc: syscon: add clocks as optional property

User can specify clocks in devicetree which is used for accessing the
registers in this regmap.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 4a89ef5b579e6fb5640df099ee13939ca6d3a325)
[Arul: Fix merge conflicts]
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMGS-577 ARM: Export the cache management symbols when !MULTI_CACHE
Shawn Xiao [Fri, 17 Apr 2015 02:48:09 +0000 (10:48 +0800)]
MGS-577 ARM: Export the cache management symbols when !MULTI_CACHE

When compiling a GPU module without CONFIG_MULTI_CACHE enabled, the
compiler prompt warning which says symbol v7_dma_map_area and
v7_dma_flush_area not exported. And when insmod GPU module, it also
warns the above two symbols not found, which cause insmod module failed.

This patch export these dma access functions and fix these issues.

Signed-off-by: Shawn Xiao <b49994@freescale.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-18834 ion: Enable ion on Kernel 4.14
Song Bing [Wed, 11 Jul 2018 00:36:06 +0000 (17:36 -0700)]
MLK-18834 ion: Enable ion on Kernel 4.14

Enable ion driver on Linux platform for Kernel 4.14.

Signed-off-by: Song Bing <bing.song@nxp.com>
[Arul: Fix merge conflicts]
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16784-2 documentation: sound: add documentation for PDM
Cosmin-Gabriel Samoila [Wed, 30 May 2018 14:38:14 +0000 (17:38 +0300)]
MLK-16784-2 documentation: sound: add documentation for PDM

Add documentation for micfil IP.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-17429-2 Documentation: add doc for EMVSIM
Gao Pan [Fri, 19 Jan 2018 07:50:51 +0000 (15:50 +0800)]
MLK-17429-2 Documentation: add doc for EMVSIM

add devicetree binding doc for add for EMVSIM

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-17429-1 Documentation: add doc for SIMv2
Gao Pan [Fri, 19 Jan 2018 07:38:39 +0000 (15:38 +0800)]
MLK-17429-1 Documentation: add doc for SIMv2

add devicetree binding doc for SIMv2

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-16347-2: Documentation: devicetree: Added nwl to vendor-prefixes
Robert Chiras [Mon, 16 Oct 2017 11:07:24 +0000 (14:07 +0300)]
MLK-16347-2: Documentation: devicetree: Added nwl to vendor-prefixes

Added nwl to Documentation in vendor-prefixes.txt, since a new driver
from Nortwest Logic was added to devicetree.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14451: Documentation: Add dt documentation for fxas2100x and fxos8700
Adriana Reus [Thu, 13 Apr 2017 07:47:48 +0000 (10:47 +0300)]
MLK-14451: Documentation: Add dt documentation for fxas2100x and fxos8700

Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13562 ion: Add devicetree bindings for mxc ion
Song Bing [Wed, 30 Nov 2016 08:41:21 +0000 (16:41 +0800)]
MLK-13562 ion: Add devicetree bindings for mxc ion

Add devicetree bindings for mxc ion

Signed-off-by: Song Bing <bing.song@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-12684-3: Documentation: gpmi-nand: document the gpmi-nand compatibility
Han Xu [Tue, 19 Apr 2016 20:28:44 +0000 (15:28 -0500)]
MLK-12684-3: Documentation: gpmi-nand: document the gpmi-nand compatibility

Document the gpmi-nand compatibility for i.MX6ULL and others

Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-12602: Documentation: gpmi-nand: legacy bch geometry option for NAND
Han Xu [Mon, 28 Mar 2016 16:19:44 +0000 (11:19 -0500)]
MLK-12602: Documentation: gpmi-nand: legacy bch geometry option for NAND

document the new option for legacy bch geometry support.

Conflicts:
Documentation/devicetree/bindings/mtd/gpmi-nand.txt

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit c1c24ecd24cb808e825eb13a3e3d016c283322cc)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-11606-01: dcic: Porting dcic driver from 3.14.y
Sandor Yu [Sat, 10 Oct 2015 07:45:29 +0000 (15:45 +0800)]
MLK-11606-01: dcic: Porting dcic driver from 3.14.y

Initial the mxc dcic driver.
Baseline copied from imx_3.14.y branch.

Signed-off-by: Sandor Yu <R01008@freescale.com>
[Arul: Fix merge conflicts]
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-15083 watchdog: imx2_wdt: fallback to timeout reset if explicit reset fails
Octavian Purdila [Wed, 21 Jun 2017 08:01:23 +0000 (11:01 +0300)]
MLK-15083 watchdog: imx2_wdt: fallback to timeout reset if explicit reset fails

If explicit reset fails fallback using the watchdog timeout. We
already have set the timeout counter to 0, but we might need to ping
the watchdog to load the new timeout, if a previous watchdog timeout
value has already been set.

We also decrease the time we spend waiting, to give a chance to log
that the explicit reset failed and that we fallback to watchdog
timeout reset.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13632 driver: watchdog: Fix system reset when sending wdog unlock sequence
Bai Ping [Mon, 19 Dec 2016 10:11:07 +0000 (18:11 +0800)]
MLK-13632 driver: watchdog: Fix system reset when sending wdog unlock sequence

For i.MX7ULP wdog, when we want to unlock the wdog with 16bit unlock command,
the two unlock command sequence must be write to WDOG_CNT register within 16 bus
clocks, otherwise, system may be reset unexpected. As writel include memory barrier,
if we use writel to send the unlock command, it may take more time than 16 bus clock,
so we should use writel_relaxed to write the unlock command to the CNT register.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13564 driver: watchdog: Add system reboot support on imx7ulp
Bai Ping [Mon, 5 Dec 2016 06:31:53 +0000 (14:31 +0800)]
MLK-13564 driver: watchdog: Add system reboot support on imx7ulp

Add system reboot for i.MX7ULP. As there is no other way to reboot the
system, so use wdog restart handler to trigger the system reboot.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Arul: Fix for 4.19 kernel.
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13535 driver: watchdog: fix wdog reset after resume from vlls mode
Bai Ping [Tue, 29 Nov 2016 06:52:46 +0000 (14:52 +0800)]
MLK-13535 driver: watchdog: fix wdog reset after resume from vlls mode

When resuming from VLLS mode, the wdog will be reset, the first we configure
the wdog, an initial timeout value should be write into the TOVAL register,
otherwise, the wdog will not be initialized successfully.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-13520-02 driver: watchdog: Add watchdog driver for imx7ulp
Bai Ping [Thu, 24 Nov 2016 06:44:38 +0000 (14:44 +0800)]
MLK-13520-02 driver: watchdog: Add watchdog driver for imx7ulp

Add watchdog driver for i.MX7ULP.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-18771 ahci: imx: add the bist mode sysfile callback
Richard Zhu [Thu, 5 Jul 2018 02:39:43 +0000 (10:39 +0800)]
MLK-18771 ahci: imx: add the bist mode sysfile callback

In order to do SATA compliance tests, add the bist mode
sysfile callback to generate kinds of test patterns.
- Add the "ahci-imx.bist=1" into kernel command line to
register the bist mode enable callback.
- Use "echo <pattern_#> /sys/devices/.../ahci_bist_pattern"
to generate the responding test pattern.
- Use "cat /sys/devices/.../ahci_bist_pattern" to check
the current pattern configuration.
NOTE:
LBP 0, LFTP 1, MFTP 2, HFTP 3.
- Adjust the TX-DEEMP and COMINT to pass the compliance tests.

BuildInfo:
- SCFW 685bd659, SECO-FW 00000000, IMX-MKIMAGE 53974947, ATF 625d9ed
- U-Boot 2017.03-01018-g6045484

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
[Arul: Fix merge conflicts]
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-11681-2 ata: imx: enable sata on imx6qp
Richard Zhu [Fri, 9 Oct 2015 06:43:24 +0000 (14:43 +0800)]
MLK-11681-2 ata: imx: enable sata on imx6qp

Since the version of the imx6qp's ahci controller
is same to the version of imx6q ahci controller.
So, this work-around should be applied to imx6qp
ahci too.

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
(cherry picked from commit 31a7eab5be9843263535306dbaa08592b66714e5)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>