linux.git
7 years agoMLK-14895-1 ARM: dts: add usb otg1 ID pinctrl for i.mx6ull evk
Li Jun [Mon, 15 May 2017 15:00:33 +0000 (23:00 +0800)]
MLK-14895-1 ARM: dts: add usb otg1 ID pinctrl for i.mx6ull evk

Add USB OTG1 port ID pin for imx6ull-14x14-evk.dts

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMLK-11403: I2C: imx: restore pin setting for i2c
Gao Pan [Tue, 25 Aug 2015 06:00:32 +0000 (14:00 +0800)]
MLK-11403: I2C: imx: restore pin setting for i2c

restore pin setting for i2c in suspend/resume

Signed-off-by: Gao Pan <gaopan@freescale.com>
(cherry picked from commit 8aed73af218f25e0677b8980b3706246dd68790d)
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Conflicts:
drivers/i2c/busses/i2c-imx.c

7 years agoMLK-14902 ARM64: dts: freescale: imx8qm: make default dtb boot up all cores
Anson Huang [Mon, 15 May 2017 09:08:58 +0000 (17:08 +0800)]
MLK-14902 ARM64: dts: freescale: imx8qm: make default dtb boot up all cores

Change dtb's core settings as below on i.MX8QM:

boot up 4 CA53 and 2 CA72 (using CA53 specific flash.bin)
fsl-imx8qm-lpddr4-arm2.dts

boot up 4 CA53 (using CA53 specific flash.bin)
fsl-imx8qm-lpddr4-arm2_ca53.dts

boot up 2 CA72 (using CA72 specific flash.bin)
fsl-imx8qm-lpddr4-arm2_ca72.dts

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14736 net: fec: move the ahb clock to runtime pm
Fugang Duan [Fri, 12 May 2017 03:12:59 +0000 (11:12 +0800)]
MLK-14736 net: fec: move the ahb clock to runtime pm

Some SOC clock have some limits:
- ahb clock should be disabled before ipg.
- ahb and ipg clocks are required for MAC mii to work.
So, move the ahb clock to runtime pm together with ipg clock.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-14893 ARM64: dts: freescale: imx8qm: add CA72 only dtb
Anson Huang [Fri, 12 May 2017 13:16:47 +0000 (21:16 +0800)]
MLK-14893 ARM64: dts: freescale: imx8qm: add CA72 only dtb

Add CA72 only dtb to support booting up kernel with
CA72 cluster only, need to use CA72 specific flash.bin
and CA72 specific dtb to boot up kernel.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-13967 ARM64: dts: imx8qxp: add SAI0 and ASRC0 nodes
Viorel Suman [Thu, 11 May 2017 16:04:26 +0000 (19:04 +0300)]
MLK-13967 ARM64: dts: imx8qxp: add SAI0 and ASRC0 nodes

Add audio SAI0 and ASRC0 nodes.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-14774 mmc: sdhci-esdhc-imx: restore pins state after suspend
Dong Aisheng [Thu, 11 May 2017 12:38:17 +0000 (20:38 +0800)]
MLK-14774 mmc: sdhci-esdhc-imx: restore pins state after suspend

After commit 3e3274ab9ff3 ("mmc: sdhci-esdhc-imx: Use common
sdhci_suspend|resume_host()"), we lost the pins state store and save
in common sdhci_pltfm_{suspend|resume} API which results in the
pins state lost in state un-retainable suspend/resume, then
CMD transfer will meet timeout subsequently.

Due to sdhci_pltfm_{suspend|resume} API becomes static after
that commit later, we then do manual pins state save and restore
in our platform suspend/resume API instead.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-13972-4 ARM64: dts: imx8qxp: add EDMA2 and ACM nodes
Viorel Suman [Wed, 10 May 2017 13:49:15 +0000 (16:49 +0300)]
MLK-13972-4 ARM64: dts: imx8qxp: add EDMA2 and ACM nodes

Add audio EDMA2 and ACM nodes.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-13972-3 ARM64: dts: imx8qxp: add audio power domain
Viorel Suman [Wed, 10 May 2017 13:45:36 +0000 (16:45 +0300)]
MLK-13972-3 ARM64: dts: imx8qxp: add audio power domain

Add audio power domain definitions.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-13972-2 clk: imx8qxp: add audio clocks
Viorel Suman [Wed, 10 May 2017 13:28:51 +0000 (16:28 +0300)]
MLK-13972-2 clk: imx8qxp: add audio clocks

Add audio clocks.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-13972-1 soc: scfw: imx8qxp: fix audio LPCGs
Viorel Suman [Wed, 10 May 2017 13:21:08 +0000 (16:21 +0300)]
MLK-13972-1 soc: scfw: imx8qxp: fix audio LPCGs

Cleanup audio LPCGs: add missing, fix names, remove unneeded.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-14823 dts: imx6sx-sabreauto: correct cd and wp pin
Dong Aisheng [Thu, 11 May 2017 08:46:54 +0000 (16:46 +0800)]
MLK-14823 dts: imx6sx-sabreauto: correct cd and wp pin

Correct CD/WP pin in dts. Otherwise the card detection and write
protection function does not work.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-14884 mmc: sdhci: make DDR50 tuning optionally
Dong Aisheng [Thu, 11 May 2017 08:08:08 +0000 (16:08 +0800)]
MLK-14884 mmc: sdhci: make DDR50 tuning optionally

DDR50 tuning is optinally defined in sd 3.0 spec. Per IC guys
suggestion, it internally already uses a fixed optimized timing
and normally does not require tuning.

Make it optionally and platform can claim SDHCI_DDR50_NEEDS_TUNING
support if it wants tuning.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-14866-2: dts: imx7ulp-evk: remove duplicated mux setting in config
Dong Aisheng [Wed, 10 May 2017 07:09:09 +0000 (15:09 +0800)]
MLK-14866-2: dts: imx7ulp-evk: remove duplicated mux setting in config

According to RM, Bit[11-8] is MUX_MODE which is configured by
the PIN_FUNC_ID automatically, specify it in config part is wrong
and violates the binding doc. So remove them all.

It can also avoid the future confusing when customer wants to
configure a pad by following the exist code.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-14866-1 dt-bindings: pinctrl: add imx7ulp binding doc
Dong Aisheng [Wed, 10 May 2017 07:04:14 +0000 (15:04 +0800)]
MLK-14866-1 dt-bindings: pinctrl: add imx7ulp binding doc

Add i.MX7ULP binding doc. Note i.MX7ULP PIN_FUNC_ID consists of 4
integers as it shares one mux and config register as follows:
<mux_conf_reg input_reg mux_mode input_val>

Also fix the copyright.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
7 years agoMLK-14807-2: ARM: dts: imx6: correct all ldo-enable dts
Robin Gong [Tue, 9 May 2017 02:49:10 +0000 (10:49 +0800)]
MLK-14807-2: ARM: dts: imx6: correct all ldo-enable dts

'vin-supply' property used in ldo-bypass mode while 'vin-supply' deleted
in ldo-enable mode on v4.9 rather than dirctly switch 'supply' to internal
regulator and external pmic regulator on v4.1. Correct it for all *-ldo.dts,
otherwise, still work in ldo-bypass mode.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-14807-1: ARM: dts: imx6qp-sabresd-hdcp: gpu probe failed
Robin Gong [Tue, 9 May 2017 02:10:37 +0000 (10:10 +0800)]
MLK-14807-1: ARM: dts: imx6qp-sabresd-hdcp: gpu probe failed

I2C2 have to be disabled on hdcp board since those I2C2 bus pins
used for others, that said there is no all pmic regulators. In this
case, ldo-enable mode should be used and reg_arm/reg_soc/reg_pu should
be swithed to internal ldo instead. Otherwise, no reg_pu regulator
probed successfully by gpu driver, and cause gpu probe failed. Also,
cause cpufreq probe failed too.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-14870: ASoC: fsl_sai: Remove support for S20_3LE
Daniel Baluta [Wed, 10 May 2017 11:21:40 +0000 (14:21 +0300)]
MLK-14870: ASoC: fsl_sai: Remove support for S20_3LE

With current clock configuration we cannot derive bitclk for S20_3LE
format in SAI master mode. There was an attempt to fix this in commit
65e6b5f1b4a7 ("MLK-14536: ASoC: wm8960: Fix playback in CPU DAI master mode")
but this broke codec-master mode, thus the patch was partially reverted in
96f0d36e420 ("MLK-14798: arm: dts: imx6ul: Fix wm8960 codec master mode")

So, remove S20_3LE support for SAI master mode. Clients using this
feature should use codec master mode, which is the default one in the
dts anyway.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14885 dma: pxp: fix potential multi-definition issue
Fancy Fang [Thu, 11 May 2017 08:23:56 +0000 (16:23 +0800)]
MLK-14885 dma: pxp: fix potential multi-definition issue

When 'CONFIG_MXC_PXP_CLIENT_DEVICE' disabled, the
'register_pxp_device' and 'unregister_pxp_device'
may cause multiple definitions compiling error.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-14841: ARM: dts: Fix DAI CPU node name
Daniel Baluta [Wed, 10 May 2017 13:46:00 +0000 (16:46 +0300)]
MLK-14841: ARM: dts: Fix DAI CPU node name

For wm8962 we use imx-wm8962 machine driver which expects DAI CPU node
name to be "cpu-dai".

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14795 PCI: designware: fail to read the ep mem on rc board
Richard Zhu [Fri, 5 May 2017 09:22:39 +0000 (17:22 +0800)]
MLK-14795 PCI: designware: fail to read the ep mem on rc board

The mem_base address is configured as the outbound
memory region twice when imx pcie ep/rc validation
is enabled.
Mask the one contained in desigware driver to fix
this issue.
Remove the usleep_range usage in designware driver,
since that function maybe used in imx noirq pm
calls.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-13853-3 ARM64: dts: imx8qm: Enable SPDIF0
Viorel Suman [Wed, 10 May 2017 10:37:49 +0000 (13:37 +0300)]
MLK-13853-3 ARM64: dts: imx8qm: Enable SPDIF0

Add SPDIF0 node and the related EDMA configuration:
channels and interrupts. Comments provided for
component's related EDMA configuration given the
increased number of channels and interrupts.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-13853-2 ARM64: defconfig: add SND_SOC_IMX_SPDIF
Viorel Suman [Wed, 10 May 2017 09:30:24 +0000 (12:30 +0300)]
MLK-13853-2 ARM64: defconfig: add SND_SOC_IMX_SPDIF

Add SND_SOC_IMX_SPDIF to support IMX SPDIF by default.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-13853-1 ARM64: clk: imx8qm: Fix SPDIF TX clk parents
Viorel Suman [Wed, 10 May 2017 09:17:01 +0000 (12:17 +0300)]
MLK-13853-1 ARM64: clk: imx8qm: Fix SPDIF TX clk parents

Set the appropriate parents for SPDIF TX clocks.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-14796 PCI: imx: kernel panic when reboot ep board
Richard Zhu [Thu, 4 May 2017 06:58:35 +0000 (14:58 +0800)]
MLK-14796 PCI: imx: kernel panic when reboot ep board

pp->ops is not assigned properly, thus there
would be kernel panic when reboot ep board.
Initialized pp->ops in ep initializatione,
fix this issue.
don't call dw_pcie_wait_for_link because
the usleep is used in it.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-14851: ASoC: wm8962: fix clock issue for S20_3LE
Shengjiu Wang [Mon, 8 May 2017 07:15:44 +0000 (15:15 +0800)]
MLK-14851: ASoC: wm8962: fix clock issue for S20_3LE

There is error log "wm8962 3-001a: Unsupported BCLK ratio 6"
When the bitstream's format is S20_3LE.
The reason is that the pll output is samplerate*256, which
can't divide to clock samplerate*20*2. So in this patch change
the pll output to samplerate*384, and use the physical_width
for S20_3LE to calculate the bclk.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-14333 firmware: imx: sdma: fix SSI dual fifo swap
Robin Gong [Mon, 8 May 2017 09:31:18 +0000 (17:31 +0800)]
MLK-14333 firmware: imx: sdma: fix SSI dual fifo swap

There is a bug in ssi sdma script cause dual fifo swap.Correct
it in sdma script.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-14798: arm: dts: imx6ul: Fix wm8960 codec master mode
Daniel Baluta [Mon, 8 May 2017 15:39:47 +0000 (18:39 +0300)]
MLK-14798: arm: dts: imx6ul: Fix wm8960 codec master mode

Commit 65e6b5f1b4a7 ("ASoC: wm8960: Fix playback in CPU DAI master
mode") broke wm8960 codec master mode by choosing "bad" SYSCLK values.

This patch partially reverts commit mentioned above by restoring the
SYSCLK values. It turns out that using params_physical_width instead of
params_width in the previous patch it is enough to fix CPU DAI mode.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14695-6 ARM64: defconfig: add HID_MULTITOUCH
Anson Huang [Mon, 8 May 2017 12:15:24 +0000 (20:15 +0800)]
MLK-14695-6 ARM64: defconfig: add HID_MULTITOUCH

Add HID_MULTITOUCH to support multi-touch by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14695-5 ARM64: defconfig: add sc rtc support
Anson Huang [Mon, 8 May 2017 12:35:42 +0000 (20:35 +0800)]
MLK-14695-5 ARM64: defconfig: add sc rtc support

Enabled IMX_SC RTC by default.

The other changes in this patch are introduced by
running savedefconfig, it does NOT impact any function.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14695-4 ARM64: dts: freescale: imx8qm: add sc rtc node
Anson Huang [Mon, 8 May 2017 11:14:38 +0000 (19:14 +0800)]
MLK-14695-4 ARM64: dts: freescale: imx8qm: add sc rtc node

Add system controller RTC support for i.MX8QM.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14695-3 rtc: add imx sc rtc driver
Anson Huang [Fri, 28 Apr 2017 06:09:33 +0000 (14:09 +0800)]
MLK-14695-3 rtc: add imx sc rtc driver

Add i.MX system controller RTC driver. The RTC
is controlled by system controller, and kernel RTC
driver needs to communicate with system controller
via SC firmware API.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14695-2 ARM64: dts: freescale: add i.mx8qm lpddr4 arm2 board
Anson Huang [Tue, 2 May 2017 23:51:22 +0000 (07:51 +0800)]
MLK-14695-2 ARM64: dts: freescale: add i.mx8qm lpddr4 arm2 board

Add support for i.MX8QM-LPDDR4-ARM2 board.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14695-1 ARM64: dts: freescale: imx8qm: update changes on bring-up
Anson Huang [Wed, 3 May 2017 00:06:47 +0000 (08:06 +0800)]
MLK-14695-1 ARM64: dts: freescale: imx8qm: update changes on bring-up

Update changes based on i.MX8QM-LPDDR4-ARM2 board
bring-up.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-14847: Revert "ASoC: fsl-sai: set xCR4/xCR5/xMR for SAI master mode"
Mihai Serban [Fri, 21 Apr 2017 12:57:58 +0000 (15:57 +0300)]
MLK-14847: Revert "ASoC: fsl-sai: set xCR4/xCR5/xMR for SAI master mode"

This reverts commit c768ed336bba ("ASoC: fsl-sai: set xCR4/xCR5/xMR for
SAI master mode")

This change was already introduced by commit 51659ca069ce ("ASoC: fsl-sai:
set xCR4/xCR5/xMR for SAI master mode") from upstream.

Manually adjust the code to match the changes introduced by subsequent
commit b2936555bb38 ("MLK-13609: ASoC: fsl_sai: fix for synchronize mode")
by removing updates to FSL_SAI_TMR/FSL_SAI_RMR registers.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
7 years agoMLK-14844 pxp: Add RGB32 format to back-compatible.
Guoniu.Zhou [Mon, 8 May 2017 09:47:24 +0000 (17:47 +0800)]
MLK-14844 pxp: Add RGB32 format to back-compatible.

The latest pxp_dma.h file change PXP_PIX_FMT_RGB32 to PXP_PIX_FMT_XRGB32 format,
but the userspace still use PXP_PIX_FMT_RGB32, so add back it and keep the same
with PXP_PIX_FMT_XRGB32 format.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
7 years agoMLK-14667 ARM: imx v7/v7_mfg defconfig: disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
Octavian Purdila [Wed, 19 Apr 2017 12:50:04 +0000 (15:50 +0300)]
MLK-14667 ARM: imx v7/v7_mfg defconfig: disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS

Commit 556fa2d7d7e9 ("ENGR00318895-9: mtd: spi-nor: add more read
transfer flags for n25q256a") was incompletely cherry-picked, leaving
out the removal of the SECT_4K flag:

"From the datasheet, the chip support the 64K sector erase operation.
So remove the SECT_4K for the chip which makes the flash_erase
faster."

However, the above statement is not entirely correct. Using SECT_4K
can result in faster erase operations, if the block to erase is
smaller. The documentation in spi-nor.c also states:

"All newly added entries should describe *hardware* and should use
SECT_4K (or SECT_4K_PMC) if hardware supports erasing 4 KiB
sectors. For usage scenarios excluding small sectors there is config
option that can be disabled: CONFIG_MTD_SPI_NOR_USE_4K_SECTORS.  For
historical (and compatibility) reasons (before we got above config)
some old entries may be missing 4K flag."

Unfortunately, using SECT_4K means that ubifs will fail, because it
needs a minimum LBE of 15K.

Based on the above comments, it looks like the best way to handle the
ubifs issue is to disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS instead of
removing SECT_4K for the particular n25q256a chip. This approach also
has the advantage that will make ubifs work with any chip that has the
SECT_4K flag.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
Reviewed-by: Han Xu <han.xu@nxp.com>
7 years agoMGS-2848-2 [#imx-523] fix gpu hang for flat mapping optimization
Xianzhong [Wed, 3 May 2017 14:09:44 +0000 (22:09 +0800)]
MGS-2848-2 [#imx-523] fix gpu hang for flat mapping optimization

fix the logical offset to set the correct buffer for the slave tlb entries,
the pointers are defined with gctPHYS_ADDR and gctUINT32_PTR, not void*.

Date: May 03, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMGS-2848 [#imx-523] Optimize MMUv1 FlatMapping performances
Marouen Ghodhbane [Thu, 27 Apr 2017 15:23:16 +0000 (17:23 +0200)]
MGS-2848 [#imx-523] Optimize MMUv1 FlatMapping performances

Allocating The STLB structs seperately in a loop can affect performance
This patch would allocate the STLBs in one shot and keep track of these allocations
in case of multiple FlatMappings.

Date: May 02, 2017
Signed-off-by: Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMLK-14528: ASoC: sdma: Update period/segment max bytes
Daniel Baluta [Fri, 5 May 2017 07:09:55 +0000 (10:09 +0300)]
MLK-14528: ASoC: sdma: Update period/segment max bytes

Commit 665ced16cf044 ("MLK-10050 dma: imx-sdma: add support for sdma
memory copy") enforces maximum SDMA buffer descriptor length at 65532,
but doesn't update period_bytes_max or max_segment size in DMA drivers.

Thus, resulting in the following bug:

$ arecord -Dhw:0,0 -r 192000 -f S20_3LE -c 1 -d 10 audio192k20b1c.wav
imx-sdma: SDMA channel 5: maximum period size exceeded: 65534 > 65532

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14786: ARM: dts: imx6x-sabreauto-m4: add reg info to the rpmsg node
Octavian Purdila [Thu, 4 May 2017 12:58:24 +0000 (15:58 +0300)]
MLK-14786: ARM: dts: imx6x-sabreauto-m4: add reg info to the rpmsg node

Without this information probing of imx-rpmsg fails as it is not able
to setup the vring due to missing allocated physical memory.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoARM64: dts: imx8qm: add missing sai0 clk, rename asrc0 clk
Viorel Suman [Thu, 4 May 2017 12:17:51 +0000 (15:17 +0300)]
ARM64: dts: imx8qm: add missing sai0 clk, rename asrc0 clk

sai0 node: add missing mclk0 clk.
asrc0 node: rename dma clk to spba.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviwed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14771 dma: pxp-v3: add new added 2D features support
Guoniu.Zhou [Tue, 2 May 2017 02:59:38 +0000 (10:59 +0800)]
MLK-14771 dma: pxp-v3: add new added 2D features support

 The V3 version PXP has added below new 2D features:
1. Input fetch/store blocks to accept different formats input/output.
2. Add Rotation1 block to do rotation before alpha blending.
3. Add Composite1 block to accept source from input fetch.
4. AS and PS have increased supported pixel formats.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4daef24b19890ca65135c48fc24018f64761444f)

7 years agoMLK-14314-14 dma: pxp-v3: derive the shortest path table for 2D nodes
Fancy Fang [Fri, 3 Mar 2017 03:06:59 +0000 (11:06 +0800)]
MLK-14314-14 dma: pxp-v3: derive the shortest path table for 2D nodes

Based on the previously caculated adjacent list and mux
config info, the shortest path table can be derived by
distance calculation between two different 2D nodes.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit c8adf0f7089d5c5e286d7ae74c138a84bed5e280)

7 years agoMLK-14314-13 dma: pxp-v3: construct graph structures to store pxp nodes.
Fancy Fang [Fri, 3 Mar 2017 02:19:58 +0000 (10:19 +0800)]
MLK-14314-13 dma: pxp-v3: construct graph structures to store pxp nodes.

According to the PXP arch diagram, the V3 PXP can be
abstracted to a graph structure. There are totally
16 2D nodes in PXP and 16 2D related mux nodes:

     1. Using '16x16' adjacent array to record the 2D nodes
        relationship and '16' size array to record the
        input and output nodes for each muxe node.
     2. Construct the adjacent list to store all the 2D
        nodes and also config the mux info used by each
        two nodes of one edge during pxp probing stage.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit e8087406df2e04982fd90b4070ac68fafa4ad3d5)

7 years agoMLK-14314-12 dma: pxp-v3: refine pxp timer init in probe()
Fancy Fang [Fri, 3 Mar 2017 01:07:20 +0000 (09:07 +0800)]
MLK-14314-12 dma: pxp-v3: refine pxp timer init in probe()

Extract the timer initialization from pxp_probe()
to a seperate function call to make probing process
more clear.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit c8a127e506bca2e38fae02c03ceae4e6956d6ea3)

7 years agoMLK-14314-11 dma: pxp-v3: refine attributes create in probe()
Fancy Fang [Thu, 13 Apr 2017 10:49:57 +0000 (18:49 +0800)]
MLK-14314-11 dma: pxp-v3: refine attributes create in probe()

Extract the attributes creation from the pxp_probe()
to a seperate function call to make the probing process
more clear.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 85ab5476bf59a407037b43419b920b681b58b52d)

7 years agoMLK-14314-10 dma: pxp-v3: refine m4 init in probe()
Fancy Fang [Thu, 2 Mar 2017 13:07:22 +0000 (21:07 +0800)]
MLK-14314-10 dma: pxp-v3: refine m4 init in probe()

Extract the m4 related initialization code from
pxp_probe() to make the probing function more
clear.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit f1bd8146332f880b75f08eab64505070069018fb)

7 years agoMLK-14314-9 dma: pxp-v3: refine pxp interrupt init code
Fancy Fang [Thu, 13 Apr 2017 10:37:23 +0000 (18:37 +0800)]
MLK-14314-9 dma: pxp-v3: refine pxp interrupt init code

The PXP interrupt functions in V3 is relatively complex.
So do the interrupt initalization in a sperate function
to make the pxp_probe() more clear.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 2fa43d26f81cf0331820b41bc198adbb414c0c37)

7 years agoMLK-14314-8 dma: pxp: remove meaningless assignments in probe()
Fancy Fang [Thu, 2 Mar 2017 12:39:29 +0000 (20:39 +0800)]
MLK-14314-8 dma: pxp: remove meaningless assignments in probe()

Remove some assignments which have no real effects for
V2 and V3 PXP drivers, since using devm_kzalloc() to
make the data to be zero.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit a6d6e4d2b6b21427c529a33a7d47ddc918b19eb7)

7 years agoMLK-14314-7 dma: pxp: add some new pixel formats definition.
Fancy Fang [Thu, 2 Mar 2017 10:50:27 +0000 (18:50 +0800)]
MLK-14314-7 dma: pxp: add some new pixel formats definition.

Add several new pixel formats definition which are supported
by PXP V3 ip.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 5195602ac0225902bd416647fb9cd0636fa11e89)

7 years agoMLK-14314-6 dma: pxp: change some RGB formats definition
Fancy Fang [Thu, 2 Mar 2017 10:37:27 +0000 (18:37 +0800)]
MLK-14314-6 dma: pxp: change some RGB formats definition

Some RGB formats fourcc definition are not precise
according to its original meaning. So make some
changes for them.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit b0b4ad680e267bdf542d2c9a3202c0192bde9cb0)

7 years agoMLK-14314-5 dma: pxp-v3: divide whole pxp into four parts
Fancy Fang [Sat, 11 Mar 2017 09:08:42 +0000 (17:08 +0800)]
MLK-14314-5 dma: pxp-v3: divide whole pxp into four parts

According to the pxp high level architecture diagram,
it is better to divide the whole big pxp module into
four sub-modules:
   1. 2D operation module(legacy pxp and input fetch & store).
   2. Dithering module.
   3. WFE_A module.
   4. WFE_B module.
This division will simplify driver implementations and
management.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 5e57840b41adb195515bd652d9624feaadf3448e)

7 years agoMLK-14314-4 dma: pxp-v3: abstract ps and out fmts parse functions
Fancy Fang [Thu, 2 Mar 2017 08:16:18 +0000 (16:16 +0800)]
MLK-14314-4 dma: pxp-v3: abstract ps and out fmts parse functions

Abstract PS and OUT formats parsing jobs to seperate
functions 'pxp_parse_ps_fmt()' and 'pxp_parse_out_fmt()'
to make the code clean and easier to maintain.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 3e2cd1880fdf219c77f119fa5c9fb33e50e8654c)

7 years agoMLK-14314-3 pxp-v3: add 'need_yuv_swap' field
Fancy Fang [Thu, 2 Mar 2017 07:51:39 +0000 (15:51 +0800)]
MLK-14314-3 pxp-v3: add 'need_yuv_swap' field

Add 'need_yuv_swap' field to 'pxp_proc_data' structure to
record the yuv formats which needs byte swap.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 28ce43b27faad915e93f47b438d23f4ebfe020b5)

7 years agoMLK-14314-2 dma: pxp: refine is_yuv().
Fancy Fang [Thu, 2 Mar 2017 07:03:31 +0000 (15:03 +0800)]
MLK-14314-2 dma: pxp: refine is_yuv().

Use 'switch' statement to replace 'if' statement to
make logic more clear and easier to maintain.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit ca1b4393b86054a81bb40ad856af9c4f166841ea)

7 years agoMLK-14314-1 dma: pxp: remove unused multiple overlay layers support
Fancy Fang [Sat, 11 Mar 2017 07:48:27 +0000 (15:48 +0800)]
MLK-14314-1 dma: pxp: remove unused multiple overlay layers support

The multiple overlay layers are not used on pxp v2 and
v3 module, so remove this.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit c4fd8b36dbf9b53079d88d55ccfedde3a444ec29)

7 years agoMLK-14766: bcmdhd: Fix compile issue when building MMC subsystem as module
Dong Aisheng [Wed, 3 May 2017 14:17:11 +0000 (17:17 +0300)]
MLK-14766: bcmdhd: Fix compile issue when building MMC subsystem as module

Re-apply Dong Aisheng's patch for MLK-13190, as the issue
reappeared with bcmdhd update v1.141.100.6:

BCMDHD_SDIO needs to be tristate for the correct dependency
of MMC core subsystem.
And the old driver buildin mode is static defined by DRIVER_TYPE.
Fix it to depend on CONFIG_BCMDHD_SDIO.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
7 years agoarm64: defconfig: Enable ACM, ASRC, SAI, ESAI and I2S XTOR
Viorel Suman [Fri, 21 Apr 2017 11:33:11 +0000 (14:33 +0300)]
arm64: defconfig: Enable ACM, ASRC, SAI, ESAI and I2S XTOR

Enable FSL audio interfaces: ACM, ASRC, SAI,
ESAI and I2S XTOR.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoASoC: fsl: refine the asrc driver for imx8qm
Viorel Suman [Sun, 30 Apr 2017 15:11:00 +0000 (18:11 +0300)]
ASoC: fsl: refine the asrc driver for imx8qm

The clock source of ASRC in imx8qm is changed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoASoC: fsl: add imx-pcm-dma v2 platform driver
Viorel Suman [Mon, 1 May 2017 11:57:02 +0000 (14:57 +0300)]
ASoC: fsl: add imx-pcm-dma v2 platform driver

which don't request the dma channel in the probe, but request
dma channel when needed. for the dma channel of cpu dai in BE
can be reused by the FE.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-14805 Revert "MLK-14470 net: fec: let shared mii bus always be active"
Fugang Duan [Thu, 4 May 2017 10:20:23 +0000 (18:20 +0800)]
MLK-14805 Revert "MLK-14470 net: fec: let shared mii bus always be active"

This reverts commit a87bb06a0bc7 that breaks busfreq test case.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoASoC: fsl_sai: set specific fmt for I2S XTOR
Viorel Suman [Sun, 30 Apr 2017 14:05:52 +0000 (17:05 +0300)]
ASoC: fsl_sai: set specific fmt for I2S XTOR

Set specific fmt, for i2s xtor receiver is
in slave mode and i2s xtor transmitter is in master mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoASoC: fsl_sai: handle slave mode per TX/RX direction
Viorel Suman [Wed, 3 May 2017 07:16:02 +0000 (10:16 +0300)]
ASoC: fsl_sai: handle slave mode per TX/RX direction

The SAI interface can be a clock supplier or consummer
as function of stream direction, ie when interacting
with I2S XTOR. Removed FSL_SAI_RFR define as it is now
referred as FSL_SAI_RFR0.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-14470 net: fec: let shared mii bus always be active
Fugang Duan [Wed, 3 May 2017 09:41:52 +0000 (17:41 +0800)]
MLK-14470 net: fec: let shared mii bus always be active

Many boards installed with i.MX chip only use two pins for mii bus
in two NET MAC system to save two pins. Then one MAC need to share
the mii bus with the other one. Since two net interface operation
are parallel and separate, we should keep the shared mii bus always
be active. So it should keep MAC clocks on.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: d0f18f7633ed)

7 years agoMLK-14780 ARM: dtsi: imx6qdl-sabresd: Set HDMI's DI from 1 back to 0
Liu Ying [Wed, 3 May 2017 02:16:48 +0000 (10:16 +0800)]
MLK-14780 ARM: dtsi: imx6qdl-sabresd: Set HDMI's DI from 1 back to 0

To keep backward compatibility of the default device tree settings,
we should set HDMI's display interface to be DI0 of IPU0.
This makes HDMI and MIPI DSI be able to work simultaneously on the
i.MX6q/qp sabresd platform.  Also, LVDS1 and HDMI on the i.MX6sdl
sabresd platform.

So, let's revert "MLK-14678: dts: Fix lcd display id"
(commit 85073fc130e83a1cfba58f0f06d9d8cbbd8c88f4).

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-14770 net: fec: revert the patch "net: fec: avoid mac re-inited after system...
Fugang Duan [Wed, 3 May 2017 07:34:57 +0000 (15:34 +0800)]
MLK-14770 net: fec: revert the patch "net: fec: avoid mac re-inited after system resume back"

The patch commit:586fbe526860 introduce the issue that suspend/resume
is failed on i.MX6SX sabreauto/sdb board. Now revert it.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoASoC: fsl_sai: expand the channel_max to 32
Shengjiu Wang [Fri, 22 Jul 2016 10:39:38 +0000 (18:39 +0800)]
ASoC: fsl_sai: expand the channel_max to 32

sai can support 32 channel in maximum.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-14648: mxc: fix default modelist
Robert Chiras [Thu, 27 Apr 2017 10:07:21 +0000 (13:07 +0300)]
MLK-14648: mxc: fix default modelist

When EDID read fails, the mxc_hdmi driver creates a default modelist
using a hard-coded list with CEA modes.
Every time the HDMI cable is plugged-in, it will destroy the current
modelist and recreate the list. The problem comes from fbcon, which
holds reference to current mode used for each framebuffer console. When
we destroy the modelist and send the new one, if the memory for the old
mode is overwritten it will try to find another mode, close to the old
one. Since the mode could be overwritten by something else there is a
high chance that the new selected mode to be different from the old one.
If the HDMI sink does not support the selected mode, IPU will fail to
deliver frames.
Since it's wrong to advertise as supported modes the modes from a
hard-coded list, just use one mode, which comes from cmdline.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoASoC: fsl_(e)sai: introduce "shared-interrupt" DT flag
Viorel Suman [Sun, 30 Apr 2017 09:41:33 +0000 (12:41 +0300)]
ASoC: fsl_(e)sai: introduce "shared-interrupt" DT flag

SAI & ESAI interfaces may share the same interrupt with EDMA,
so that we need a flag to trigger proper shared interrupt
handling. For compatibility the same DT flag, "shared-interrupt",
is introduced as the one used in drivers/dma/fsl-edma-v3.c.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-14784: ASoC: fsl_esai: fix esai register setting issue in RIGHT_J mode
Shengjiu Wang [Fri, 28 Apr 2017 08:36:05 +0000 (16:36 +0800)]
MLK-14784: ASoC: fsl_esai: fix esai register setting issue in RIGHT_J mode

The ESAI_xCR_xWA is xCR's bit, not the xCCR's bit. driver set it to
wrong register, correct it in this patch.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14761: ASoC: fsl_esai: fix esai sync mode can't work
Shengjiu Wang [Fri, 28 Apr 2017 02:24:53 +0000 (10:24 +0800)]
MLK-14761: ASoC: fsl_esai: fix esai sync mode can't work

In ESAI synchronous mode, the clock is generated by Tx, So
we should always set registers of Tx which relate with the
bit clock and frame clock generation (TCCR, TCR, ECR), even
there is only Rx is working.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14781-2: ARM: dts: change audio pll frequency for ssi master mode
Shengjiu Wang [Wed, 3 May 2017 03:06:30 +0000 (11:06 +0800)]
MLK-14781-2: ARM: dts: change audio pll frequency for ssi master mode

Original frequency 786.432MHz can't be divide to frequency 2.304MHz
which is needed by 48kHz/24bit/2channel, So update the pll frequency
for 24bit case.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14781-1: ASoC: fsl_ssi: fix noise issue for master and mono mode
Shengjiu Wang [Wed, 3 May 2017 02:57:10 +0000 (10:57 +0800)]
MLK-14781-1: ASoC: fsl_ssi: fix noise issue for master and mono mode

The case is 32kHz/24bit/1channel bit stream, and ssi is in master mode.

The driver will switch to normal mode for 1 channel, so the slot width
is not fixed to 32 bit in this mode, and even in mono mode, the slot
number is 2, but the bit clock calulation still use the bit width=32,
and slot number=1, which cause the output frameclock is not correct.
So there will be noise in output sound.

This patch is to change the bit clock formula of mono mode, which is
2channels * params_width * sample rate.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMGS-2805 [#imx-526] Enable gcdENABLE_VG by default.
Marius Vlad [Mon, 24 Apr 2017 11:29:51 +0000 (14:29 +0300)]
MGS-2805 [#imx-526] Enable gcdENABLE_VG by default.

BUILD_OPTION_VIVANTE_ENABLE_VG=1 is always set in
driver_build_sample.sh, so we enable it in the headers by default as
well. The reason behind this is that applications that use
gc_hal_options.h like libGAL do not use the build system to determine if
the macro has been set or not, while the driver passes them on the fly
to the compiler. This fix is required as ioctl() is broken otherwise (
the macro is used inside gcsHAL_INTERFACE and application mistakenly
think that the macro is off while the driver always builds with on).

Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
7 years agoMGS-2857 [#imx-530] fix spinlock in gpu kernel driver
Xianzhong [Tue, 2 May 2017 07:41:18 +0000 (15:41 +0800)]
MGS-2857 [#imx-530] fix spinlock in gpu kernel driver

there are two critical problems with spinlock in gpu driver:
1. spin_unlock is missing when pte_offset_map_lock return invalid pte pointer,
this will cause dead lock in stress case.
2. pte_unmap is missing in spinlock debug build, this will cause kernel panic,
which can be reproduced when enable CONFIG_DEBUG_SPINLOCK in kernel build.

Date: May 02, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMXSCM-293-2 arm: dts: add oob and modem reset support for SCM devices
Juan Gutierrez [Mon, 24 Apr 2017 21:17:28 +0000 (16:17 -0500)]
MXSCM-293-2 arm: dts: add oob and modem reset support for SCM devices

- Add BT modem device reset node for SCM i.MX6 devices
- Add Wifi OOB support for QWKS rev3 and EVB

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
7 years agoMXSCM-293-1 arm: dts: fixes for MX6 SCM devices on L4.9
Juan Gutierrez [Mon, 24 Apr 2017 20:40:32 +0000 (15:40 -0500)]
MXSCM-293-1 arm: dts: fixes for MX6 SCM devices on L4.9

- replace legacy wakeup property with 'wakeup-source'
- add "jedec,spi-nor" flash compatible binding
- fix lcd display id
- fixig typo for gpios
- use external wdog_b reset instead of issuing a sw reset
- add off-on-delay for usdhc vmmc-supply regulator on mx6sxscm
- add missing sai1 and wdog1 configs for mx6sxscm
- fix vgen6 regulator maximum microvolt for mx6dqscm
- disable CAAM since cannot coexist with LCDIF for mx6sxscm
- add the reg into the rpmsg node for mx6sxscm

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
7 years agoMGS-2832: gpu: integrate partial changes for 6.2.2
Xianzhong [Thu, 27 Apr 2017 11:44:33 +0000 (19:44 +0800)]
MGS-2832: gpu: integrate partial changes for 6.2.2

- gpu hang when enable the vprofiler on imx6qp
- gpu axi bus error with user surface mapping
- OpenCL driver issue for initialier failure
- GL benchmark performance optimization
- X11 and Android critical bug-fixing

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoarm64: imx: Use dummy busfreq implementation
Viorel Suman [Wed, 19 Apr 2017 12:01:50 +0000 (15:01 +0300)]
arm64: imx: Use dummy busfreq implementation

There are no busfreq methods implemented for
ARM64, so use the dummy methods in this case.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-14611 Fix xcbc unkeyed registration
Radu Solea [Wed, 19 Apr 2017 15:19:14 +0000 (18:19 +0300)]
MLK-14611 Fix xcbc unkeyed registration

AES is a keyed algorithm, XCBC-AES needs a key for operation,
this patch prevents the registration of AES-based transforms
as unkeyed operations.

Signed-off-by: Radu Solea <radu.solea@nxp.com>
7 years agoMLK-14612 media: capture: fix VIDIOC_DQBUF issues
Laurentiu Palcu [Mon, 24 Apr 2017 13:34:28 +0000 (16:34 +0300)]
MLK-14612 media: capture: fix VIDIOC_DQBUF issues

The following commit, in 4.9 kernel:

commit 2d7007153f0c ("[media] media: videobuf2: Restructure vb2_buffer")

added some changes to the v4l2 structures that were not properly
included in the existing driver after the rebase from 4.1. Hence, when a
new buffer was filled by the v4l2 core, the flags field in
vb2_v4l2_buffer structure contained a pointer and, depending on the
pointer value, the v4l2 core considered that the buffer was already
dequeued, signaling the error to userspace. The issue appeared
intermittently, after multiple reboots.

This patch fixes it.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
7 years agoASoC: fsl: Add machine driver for i2s xtor
Viorel Suman [Thu, 20 Apr 2017 08:40:40 +0000 (11:40 +0300)]
ASoC: fsl: Add machine driver for i2s xtor

Add I2S XTOR machine driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoarm64: clk: imx8qm: Fix ESAI EXTAL clk parents
Viorel Suman [Thu, 20 Apr 2017 07:52:24 +0000 (10:52 +0300)]
arm64: clk: imx8qm: Fix ESAI EXTAL clk parents

Set the appropriate parents for ESAI EXTAL clocks.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoASoC: fsl_acm: add audio clock mux driver
Viorel Suman [Thu, 20 Apr 2017 08:26:22 +0000 (11:26 +0300)]
ASoC: fsl_acm: add audio clock mux driver

Add audio clock mux (ACM) driver. The Audio Clock Mux (ACM)
is a collection of control registers and multiplexers that are
used to route the audio source clocks to the audio peripherals.
Each audio peripheral has its dedicated audio clock mux and
control register.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agodts: arm64: imx8qm: Add ESAI node, fix SAI clocks
Viorel Suman [Wed, 19 Apr 2017 13:23:41 +0000 (16:23 +0300)]
dts: arm64: imx8qm: Add ESAI node, fix SAI clocks

Add ESAI node and the related EDMA configuration:
channels and interrupts. Use a proper index name
for SAI clocks. Add the missing compatible string
in the ESAI documentation.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14721 video: mxsfb: some random line display top after blank fb1 and then suspend...
Guoniu.Zhou [Fri, 21 Apr 2017 06:22:18 +0000 (14:22 +0800)]
MLK-14721 video: mxsfb: some random line display top after blank fb1 and then suspend/resume

After suspend and resume, the value of LCDIFx_AS_NEXT_BUF register losed, so when
we unblank fb1 again, the valule of LCDIFx_AS_NEXT_BUF is 0 and random lines dis-
played on the top.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMA-9483 [#imx-495] Refine android native fence code to match 4.9 kernel
Richard Liu [Thu, 20 Apr 2017 09:28:22 +0000 (17:28 +0800)]
MA-9483 [#imx-495] Refine android native fence code to match 4.9 kernel

Android native fence implement changed in 4.9 kernel, sync.* files
have been removed from drivers/staging/android in 4.9 kernel, do the
matched change to use sync_file/fence in GPU driver.

Date: Apr 20, 2017
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
7 years agoMGS-2734 [#imx-436] add gco3D_SetAlphaKill
Xianzhong [Fri, 21 Apr 2017 08:18:37 +0000 (16:18 +0800)]
MGS-2734 [#imx-436] add gco3D_SetAlphaKill

add gco3D_SetAlphaKill for gpu shader processing.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
7 years agoMLK-14688: bcmdhd: update to version 1.141.100.6
xlin [Thu, 23 Mar 2017 16:21:01 +0000 (11:21 -0500)]
MLK-14688: bcmdhd: update to version 1.141.100.6

Features:
- support for CYW43455 (Murata 1HK)
- support for simultaneous STA-AP operation
- Hostapd ACS support
- 4339 OOB enable based on DTS GPIO configuration
- 43340 packet filter timeout event

Bug Fixes:
- 4339 high current after wake up
- Vendor IE does not show up in SoftAP beacons
- mfgtest driver crash when wpa_supplicant is running
- Fix for PMF testcase 5.3.3.2 failing due to deauth packets not being sent

Known Issues:
 Kernel panic upon rmmod after insmod failure

Signed-off-by: xlin <xlin@murata.com>
Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
7 years agoMLK-14536: ASoC: wm8960: Fix playback in CPU DAI master mode
Daniel Baluta [Thu, 20 Apr 2017 15:27:42 +0000 (18:27 +0300)]
MLK-14536: ASoC: wm8960: Fix playback in CPU DAI master mode

With the current rates for MCLK is not possible to derive bitclk
for all files in S20_3LE format and also for files with S24_LE sampled
at 48000Hz.

In order to fix this, we need to find a better MCLK value. We did this
in two steps:
1) Use params_physical_width to get rid of S20_3LE burden.
2) Brute force into all available rates which can pass fsl_sai_set_bclk
   algorithm.

Thus we found 36864000 to be the smallest acceptable rate for MCLK.

Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
Suggested-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-14548: video: fb: hdmi: Allow Sil902 init regardless of fb registration time
Cristina Ciocan [Thu, 20 Apr 2017 10:48:50 +0000 (13:48 +0300)]
MLK-14548: video: fb: hdmi: Allow Sil902 init regardless of fb registration time

When a new fb is registered, a FB_EVENT_FB_REGISTERED event is sent to
any registered fb client. Upon event receipt, the Sil902 HDMI transmitter
saves the fb info structure address for future use and schedules a cable
state check in order to setup and power up/down the device.

The current Sil902 driver registers as fb client at the end of the probe
function, thus events from fb core will only be received after the probe()
call. If a framebuffer is registered before Sil902's probe() is called,
the HDMI transmitter will not have knowledge of the framebuffer.

This patch moves the Sil902 fb client registration step into an __init
function and saves the fb info in case any registration event is received
prior to the probe() call. When the probe() is called, check for any
registration event and act accordingly.

Sil902's init function class is called after the frame buffer core's init
function class.

Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
7 years agoMLK-14548: video: fb: hdmi: Allow reset pin deferral
Cristina Ciocan [Thu, 20 Apr 2017 10:32:43 +0000 (13:32 +0300)]
MLK-14548: video: fb: hdmi: Allow reset pin deferral

The HDMI transmitter Sil902x driver displays a warning when it cannot
reset the device before any other instruction, but carries on without
exiting the probe() function.

If the needed reset pin is not yet available because the pinctrl
controllers are not set up and the reset fails with deferral error, try
to acquire the pin later on in order to allow proper initialization of the
Sil902 HDMI transmitter.

Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
7 years agoMLK-14548: video: dts: Remove unused regulator
Cristina Ciocan [Thu, 20 Apr 2017 10:21:40 +0000 (13:21 +0300)]
MLK-14548: video: dts: Remove unused regulator

The reg_lcd_3v3 regulator is, theoretically, used by the display
controller eLCDIF as lcd supply.

When enabling the HDMI trasnmitter Sil902x, a gpio pin needed by the
regulator is taken by the HDMI TX as reset pin, so the regulator probe
fails and is never used.

The imx6sx-sdb-lcdif1.dts file is used for HDMI functionality, thus
enabling the HDMI transmitter invalidates any possible use of the
reg_lcd_3v3 regulator.

This patch removes the regulator enablement from the HDMI-specific dts.

Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
7 years agoMLK-14678: dts: Fix lcd display id
Robert Chiras [Thu, 13 Apr 2017 12:58:10 +0000 (15:58 +0300)]
MLK-14678: dts: Fix lcd display id

The default display engine used by lcd in imx6qdl-sabresd.dtsi is IPU:0
DI:0, the same used for hdmi. This is a conflict, and every time the
kernel boots, this error will be printed:
mxc_sdc_fb fb@2: ipu0-di0 already in use
mxc_sdc_fb: probe of fb@2 failed with error -16
And, of course, lcd cannot be used in parallel with hdmi.
In order to fix this, move hdmi to IPU:0 DI:1. I left lcd to IPU:0 DI:0
because it works only with that IPU core.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
7 years agoMLK-14650 mxc vadc: Add set_fmt function
Sandor Yu [Thu, 20 Apr 2017 07:23:09 +0000 (15:23 +0800)]
MLK-14650 mxc vadc: Add set_fmt function

Add set_fmt function to mxc vadc driver.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
7 years agoMLK-14609-2 ASoC: fsl: consolidate substream lock_stop/unlock_start
Octavian Purdila [Fri, 14 Apr 2017 13:18:46 +0000 (16:18 +0300)]
MLK-14609-2 ASoC: fsl: consolidate substream lock_stop/unlock_start

Add common imx_stop_lock_pcm_streams and imx_start_unlock_pcm_streams
functions to remove code duplication in fsl_asrc and fsl_esai.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-14718 video: fbdev: mxc: mipi dsi: Check device tree node in probe
Liu Ying [Thu, 20 Apr 2017 07:27:57 +0000 (15:27 +0800)]
MLK-14718 video: fbdev: mxc: mipi dsi: Check device tree node in probe

For the safe probing's sake, check valid device tree node in probe function.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-14665 video: fbdev: mxc: mipi dsi: Customize gpio reset function
Liu Ying [Thu, 20 Apr 2017 03:08:32 +0000 (11:08 +0800)]
MLK-14665 video: fbdev: mxc: mipi dsi: Customize gpio reset function

The mxc display driver framework doesn't support deferral probe.
The following initialization process may cause the mipi dsi driver
deferral probe, however.
pinctrl-imx6 - arch_initcall
gpio-mxc - subsys_initcall
gpio-reset - arch_initcall

This patch customizes gpio reset function so that we can remove
the code to use the reset logic provided by the gpio-reset driver.
Also, the gpio-reset driver is not in the upstreaming kernel,
so it would be good not to use it if possible.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-14662 mmc: debugfs: add runtime pm when cat ios or clock file node
Haibo Chen [Mon, 17 Apr 2017 09:43:00 +0000 (17:43 +0800)]
MLK-14662 mmc: debugfs: add runtime pm when cat ios or clock file node

MMC core code add 'MMC_CAP_RUNTIME_RESUME', postpone the real card
resume operation from bus_resume to bus_runtime_resume. So after
system resume, for non-removable-card, it still not really resume.
At this point, if user cat the ios or clock node, only get zero
data although the mmc/sd card is still present.

This patch add mmc_get_card() to make sure card really resume back
when user cat ios or clock debugfs file node, then user can get the
correct information.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>