linux.git
7 years agoMLK-11431-3: ARM: DTS: imx6 Add IPU and display support
Sandor Yu [Fri, 28 Aug 2015 10:04:46 +0000 (18:04 +0800)]
MLK-11431-3: ARM: DTS: imx6 Add IPU and display support

Add IPU, HDMI and LDB support.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-11431-2: ARM: defconfig: enable IPU and display
Sandor Yu [Fri, 28 Aug 2015 10:38:49 +0000 (18:38 +0800)]
MLK-11431-2: ARM: defconfig: enable IPU and display

Enable IPU, HDMI and LDB.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-11431-1: IPU: forward IPU display drivers to 4.1.y kernel
Sandor Yu [Wed, 26 Aug 2015 08:42:02 +0000 (16:42 +0800)]
MLK-11431-1: IPU: forward IPU display drivers to 4.1.y kernel

Forward imx_3.14.y IPU and display drivers to 4.1 kernel.
This includes IPU core driver, display driver, LDB and HDMI driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7 years agoMLK-10103-2 cpufreq: imx6: increase SOC/PU voltage for vpu 352M
Anson Huang [Fri, 16 Jan 2015 10:47:42 +0000 (18:47 +0800)]
MLK-10103-2 cpufreq: imx6: increase SOC/PU voltage for vpu 352M

When VPU is running at 352MHz, SOC/PU voltage need to be
at 1.25V for 396/792MHz setpoint, as 396M setpoint is
removed, so only increase 792M setpoint's voltage.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-10103-1 ARM: imx: add VPU 352M for i.mx6q
Anson Huang [Fri, 16 Jan 2015 10:42:08 +0000 (18:42 +0800)]
MLK-10103-1 ARM: imx: add VPU 352M for i.mx6q

When VPU freq is set to 352MHz, it needs to source clk
from PLL2_PFD2_396M, and PLL2_PFD2_396M need to change
freq to 352M, cpufreq's 396M setpoint will be removed.

Busfreq will be disabled as it needs PLL2_PFD2 to be
as 396MHz to achieve low power audio freq setpoint.

To enable VPU 352MHz feature, select it in menuconfig,
it is disabled by default.

Signed-off-by: Anson Huang <b20788@freescale.com>
Conflicts:
arch/arm/mach-imx/clk-imx6q.c
arch/arm/mach-imx/mach-imx6q.c

7 years agoMLK-11497-2 ARM: imx: add busfreq support for imx6q/dl
Anson Huang [Sun, 6 Sep 2015 05:36:55 +0000 (13:36 +0800)]
MLK-11497-2 ARM: imx: add busfreq support for imx6q/dl

Add busfreq support for i.MX6Q/DL, 3 setpoints supported:

HIGH: MMDC = 528MHz on i.MX6Q, = 396MHz on i.MX6DL; AHB = AXI = 24MHz;
AUDIO: MMDC = 50MHz, AXI = 50MHz, AHB = 25MHz;
LOW: MMDC = AXI = AHB = 24MHz.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11497-1 ARM: dts: add busfreq support for imx6q/dl
Anson Huang [Sun, 6 Sep 2015 05:35:55 +0000 (13:35 +0800)]
MLK-11497-1 ARM: dts: add busfreq support for imx6q/dl

Add busfreq support for i.MX6Q/DL.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-10 arm: imx: add A9-M4 power management
Anson Huang [Thu, 4 Dec 2014 04:24:49 +0000 (12:24 +0800)]
MLK-11488-10 arm: imx: add A9-M4 power management

this patch adds A9-M4 power management, including
below features:

1. busfreq: M4 is registered as a high speed device
   of A9, when M4 is running at high speed, busfreq
   will NOT enter low bus mode, when M4 is entering
   its low power idle, A9 will be able to enter low
   bus mode according to its state machine;
2. low power idle: only when M4 is in its low power
   idle, busfreq is staying at low bus mode, low
   power idle is available for kernel;
3. suspend: when M4 is NOT in its low power idle,
   when linux is about to suspend, it will only
   force SOC enter WAIT mode, only when M4 is in
   its low power idle in TCM, linux suspend can
   enter DSM mode. M4 can request/release wakeup
   source via MU to A9.

as M4 can NOT switch its clk parent due to glitch MUX,
to handle this case, A9 will help switch M4's clk
parent, the flow is as below:

M4:
1. enter low power idle, send bus use count-- to A9;
2. enter wfi and only wait for MU interrupt;
3. receive A9's clk switch ready message, go into low
   power idle;
4. receive interrupt to exit low power idle, send request
   to A9 for increase busfreq and M4 freq, enter wfi
   and only wait for MU interrupt;
5. receive A9 ready message, go out of low power idle.

A9:
1. when receive M4's message of entering low power idle,
   wait M4 into wfi, hold M4 in wfi by hardware, gate
   M4 clk, then switch M4's clk to OSC, ungate M4 clk,
   send ready command to wake up M4 into low power idle;
2. when receive M4's message of exiting low power idle,
   wait M4 into wfi, hold M4 in wfi by hardware, gate
   M4 clk, then switch M4's clk to origin high clk,
   ungate M4 clk, send ready command to wake up M4
   to exit low power idle;

Signed-off-by: Anson Huang <b20788@freescale.com>
Conflicts:
arch/arm/mach-imx/busfreq-imx6.c
arch/arm/mach-imx/pm-imx6.c

7 years agoMLK-11488-9 arm: imx: add A9-M4 clk shared management
Anson Huang [Thu, 4 Dec 2014 04:22:20 +0000 (12:22 +0800)]
MLK-11488-9 arm: imx: add A9-M4 clk shared management

As A9 and M4 share many resources on i.MX6SX, especially for
clk and power related resource, so we need to handle the hardware
conflict between these two cores, there are two cases that we
need to consider currently:

clk management: for every clk node, only when both A9 and
M4 do NOT need it, then we can disable it from hardware;

Here we use MU and hardware SEMA4 to achieve our goal, MU is
for communiation between A9 and M4, SEMA4 is to protect the
shared memory.

For clk management, we use shared memory to maintain the clk
status for both A9 and M4 side, and this shared memory is
protected by hardware SEMA4, A9 and M4 will maintain their
own clk tree info in their SW environment, and get other
CORE's clk tree info from shared memory to decide whether
to perform a hardware setting change when they plan to.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-8 arm: imx: adjust qspi device index according to dtb setting
Anson Huang [Wed, 19 Nov 2014 06:24:16 +0000 (14:24 +0800)]
MLK-11488-8 arm: imx: adjust qspi device index according to dtb setting

When resume from DSM with Mega/Fast off, we need to restore
the right QSPI module for M4, so get the qspi index from dtb file.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-7 arm: imx: add QSPI save/restore when M4 is enabled
Allen Xu [Mon, 13 Oct 2014 23:15:35 +0000 (18:15 -0500)]
MLK-11488-7 arm: imx: add QSPI save/restore when M4 is enabled

As M4 is executing on QSPI2 flash, and QSPI is inside Mega/Fast
domain which may lost power in DSM, so we need to do save/restore
of QSPI2 controller to make sure QSPI flash can be accessed before
waking up M4 after exiting from DSM.

Signed-off-by: Allen Xu <b45815@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-6 arm: dts: imx6sx: add mu support
Anson Huang [Thu, 4 Dec 2014 02:06:52 +0000 (10:06 +0800)]
MLK-11488-6 arm: dts: imx6sx: add mu support

add MU support for i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-5 arm: dts: imx6sx: add m4 dts support
Anson Huang [Thu, 4 Dec 2014 01:58:27 +0000 (09:58 +0800)]
MLK-11488-5 arm: dts: imx6sx: add m4 dts support

1. add i.MX6SX SabreAuto board M4 dts support;
2. add shared memory node support for AMP clk/power management;
3. add qspi restore node for suspend/resume with Mega/Fast off
   when M4 is enabled and running on QSPI flash.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-4 arm: dts: imx6sx: add sema4 support
Anson Huang [Thu, 4 Dec 2014 02:05:38 +0000 (10:05 +0800)]
MLK-11488-4 arm: dts: imx6sx: add sema4 support

add SEMA4 support for i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-3 arm: imx: enable CONFIG_IMX_SEMA4 by default
Anson Huang [Wed, 3 Dec 2014 07:13:56 +0000 (15:13 +0800)]
MLK-11488-3 arm: imx: enable CONFIG_IMX_SEMA4 by default

enable CONFIG_IMX_SEMA4 by default.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-2 arm: imx: add HAVE_IMX_AMP for imx6sx
Anson Huang [Thu, 4 Dec 2014 01:51:27 +0000 (09:51 +0800)]
MLK-11488-2 arm: imx: add HAVE_IMX_AMP for imx6sx

add HAVE_IMX_AMP and select by default for i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11488-1 driver: char: sema4: add sema4 support
Anson Huang [Wed, 2 Sep 2015 05:03:59 +0000 (13:03 +0800)]
MLK-11488-1 driver: char: sema4: add sema4 support

- add linux sema4 driver.
- use volatile types in sema4 structure.
- align the port definiton a9 is 1, m4 is 2.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Richard Zhu <r65037@freescale.com>
7 years agoMLK-11414-1 ARM: imx: add clk return check for imx6sx
Anson Huang [Tue, 25 Aug 2015 08:13:27 +0000 (16:13 +0800)]
MLK-11414-1 ARM: imx: add clk return check for imx6sx

This patch adds clk API return check for imx6sx.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11487 ARM: dts: add sound card support for imx6ul-14x14-ddr3-arm2 board
Zidan Wang [Wed, 2 Sep 2015 06:02:37 +0000 (14:02 +0800)]
MLK-11487 ARM: dts: add sound card support for imx6ul-14x14-ddr3-arm2 board

add mqs, spdif and wm8958 sound card support for imx6ul-14x14-ddr3-arm2
board.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
7 years agoMLK-11444 ata: imx: cmd buf corruption errata bug fix
Richard Zhu [Tue, 7 Jul 2015 07:29:01 +0000 (15:29 +0800)]
MLK-11444 ata: imx: cmd buf corruption errata bug fix

errata:
When a read command returns less data than specified in the PRDs (for
example, there are two PRDs for this command, but the device returns a
number of bytes which is less than in the first PRD), the second PRD of
this command is  not read out of the PRD FIFO, causing the next command
to use this PRD erroneously.

workaround
- forces sg_tablesize = 1
- modified the sg_io function in block/scsi_ioctl.c to use a 64k buffer
  allocated with dma_alloc_coherent during the probe in ahci_imx
- In order to fix the scsi/sata hang, when CD_ROM and HDD are
  accessed simultaneously after the workaround is applied.
  Do not go to sleep in scsi_eh_handler, when there is host failed.

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
7 years agoMLK-11251 video: mxsfb: fix an auto reboot hang issue on imx7d-sdb board
Fancy Fang [Tue, 1 Sep 2015 05:03:01 +0000 (13:03 +0800)]
MLK-11251 video: mxsfb: fix an auto reboot hang issue on imx7d-sdb board

The hang issue is caused by the driver pan display function.
In the mxsfb, the pan display didn't wait the address flip
done before it exits. So this may cause the irq handler
running at the blank state which will cause system hang.
Two things are done in this patch:
1. Remove the 'flip_sem', since the pan_display is always
   called under the console lock hold.
2. Add a new completion 'flip_complete" to wait for the
   address flip done.

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

Conflicts:
drivers/video/mxsfb.c

7 years agoMLK-11485 thermal: add device cooling for thermal driver
Anson Huang [Thu, 8 Aug 2013 17:20:40 +0000 (13:20 -0400)]
MLK-11485 thermal: add device cooling for thermal driver

this patch is chery-picked from imx_3.14.y
(cherry picked from commit 51e376b469c)
ENGR00274056-1 thermal: add device cooling for thermal driver

cpu cooling is not enough when temperature is
too hot, as some devices may contribute a lot of heat
to SOC, such as GPU, so we need to add device cooling
as well, when system is too hot, devices can also take
their actions to lower SOC temperature.

when temperature cross the passive trip, device cooling
driver will send out notification, those devices who
register this devfreq_cooling notification will take
actions to lower SOC temperature.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11480-03 ARM: dts: add spdif sound card support for imx6sx-sdb board
Zidan Wang [Tue, 1 Sep 2015 11:11:50 +0000 (19:11 +0800)]
MLK-11480-03 ARM: dts: add spdif sound card support for imx6sx-sdb board

add spdif sound card support for imx6sx-sdb board

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
7 years agoMLK-11480-02 ARM: dts: add sai<->wm8962 sound card support for imx6sx-sdb board
Zidan Wang [Tue, 1 Sep 2015 07:34:38 +0000 (15:34 +0800)]
MLK-11480-02 ARM: dts: add sai<->wm8962 sound card support for imx6sx-sdb board

add sai<->wm8962 sound card support for imx6sx-sdb board

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
7 years agoMLK-11480-01 ARM: dts: add ssi<->wm8962 sound card support for imx6sx-sdb board
Zidan Wang [Tue, 1 Sep 2015 05:27:30 +0000 (13:27 +0800)]
MLK-11480-01 ARM: dts: add ssi<->wm8962 sound card support for imx6sx-sdb board

add ssi<->wm8962 sound card support for imx6sx-sdb board

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
7 years agoMLK-11259-2: ASoC: fsl: enable ASRC p2p for ssi->wm8962
Shengjiu Wang [Fri, 17 Jul 2015 06:18:21 +0000 (14:18 +0800)]
MLK-11259-2: ASoC: fsl: enable ASRC p2p for ssi->wm8962

Enable ASRC p2p for ssi->wm8962, base on the new p2p script,
which support to select dualfifo for source/destination device.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-11479-11 ASoC: imx-wm8962: Add non-SSI cpu dai support
Nicolin Chen [Tue, 8 Apr 2014 11:13:15 +0000 (19:13 +0800)]
MLK-11479-11 ASoC: imx-wm8962: Add non-SSI cpu dai support

cherry-pick below patch from v3.14.y:
ENGR00307635-5 ASoC: imx-wm8962: Add non-SSI cpu dai support

The current imx-wm8962 machine driver is designed for SSI as CPU DAI only
while as its name we should make the driver more generic to any other CPU
DAI on i.MX serires -- ESAI, SAI for example.

So this patch makes the driver more general so as to support those non-SSI
cases.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit b6fca438dde1b4c0bbdee31729871d601f287dc9)

7 years agoMLK-11479-10 ASoC: fsl: pop noise with wm8962
Shengjiu Wang [Wed, 7 May 2014 10:02:15 +0000 (18:02 +0800)]
MLK-11479-10 ASoC: fsl: pop noise with wm8962

cherry-pick below patch from v3.14.y:
ENGR00312217-1 ASoC: fsl: pop noise with wm8962

The reason of pop noise is that we change the sysclk in hw_free, which is
for another wm8962 issue. So in currently the pop noise can't be resolved
with no confliction. So for Android, because the samplerate is fixed. we can
use other workaround for this issue: change the sysclk in the set_bias().

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
(cherry picked from commit 84babc7fa0a56f6620f8b04a86baece620297dda)

7 years agoMLK-11479-09 pulseaudio5.0 mute Headphone volume when Headphone plugged
Shengjiu Wang [Thu, 3 Apr 2014 08:05:40 +0000 (16:05 +0800)]
MLK-11479-09 pulseaudio5.0 mute Headphone volume when Headphone plugged

cherry-pick below patch from v3.14.y:
ENGR00306857 pulseaudio5.0 mute Headphone volume when Headphone plugged

Pulseaudio will detect the Headphone Jack, then swith to Headphone.
So register new Jack for Headphone, the iface=CARD.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
(cherry picked from commit 6a715373c43f16e48883061049e67919281878d1)

7 years agoMLK-11479-08 ASoC: fsl: Drop snd_soc_dapm_sync() in imx-wm8962
Nicolin Chen [Fri, 29 Nov 2013 09:44:39 +0000 (17:44 +0800)]
MLK-11479-08 ASoC: fsl: Drop snd_soc_dapm_sync() in imx-wm8962

cherry-pick below patch from v3.14.y:
ENGR00290229 ASoC: fsl: Drop snd_soc_dapm_sync() in imx-wm8962

As DAPM would do the sync() for us, we don't need to handle it by ourselves.
And leaving snd_soc_dapm_sync() here is dangerous because it would disable
the clock from WM8962 during the short period of the output route changing
since we don't leave the alternative route's enanbling to this machine driver
but to DAPM core.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit c4dcde0b5119262cbb75c5136422af2071bffbda)

7 years agoMLK-11479-07 ASoC: fsl: Drop useless resume function in WM8962 machine driver
Nicolin Chen [Thu, 12 Sep 2013 06:24:20 +0000 (14:24 +0800)]
MLK-11479-07 ASoC: fsl: Drop useless resume function in WM8962 machine driver

cherry-pick below patch from v3.14.y:
ENGR00279368-1 ASoC: fsl: Drop useless resume function in WM8962 machine driver

The resume function is useless for the driver because registered jack pin has
already handled suspend/resume cases, thus drop it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit d9357cae4492abd5bca41515793ab6fe461717b2)

7 years agoMLK-11479-06 ASoC: fsl: Add WM8962 jack detecting support
Nicolin Chen [Tue, 3 Sep 2013 04:45:05 +0000 (12:45 +0800)]
MLK-11479-06 ASoC: fsl: Add WM8962 jack detecting support

cherry-pick below patch from v3.14.y:
ENGR00277715-3 ASoC: fsl: Add WM8962 jack detecting support

There're two GPIOs connected to the headphone jack and microphone jack,
thus add the states detection.

Reviewed-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit f85ca1dd664178328bd813651e91d612787b6926)

7 years agoMLK-11479-05 ASoC: fsl: Fix set-mute-failed issue after WM8962 capture
Nicolin Chen [Fri, 30 Aug 2013 08:02:35 +0000 (16:02 +0800)]
MLK-11479-05 ASoC: fsl: Fix set-mute-failed issue after WM8962 capture

cherry-pick below patch from v3.14.y:
ENGR00277471 ASoC: fsl: Fix set-mute-failed issue after WM8962 capture

We only need to mute WM8962 after playback, so add direction check
before doing mute.

And a mute failure would cause hw_free() abruptly return after it,
which might drop the essential procedure code for FLL controlling.
Thus put mute before FLL controlling code and drop its return check.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 3133b6cfb31b202805d31d449bfa70383e5e1c75)

7 years agoMLK-11479-04 ASoC: imx-wm8962: Set MCLK source clock to 0Hz in hw_free()
Nicolin Chen [Tue, 13 Aug 2013 03:37:54 +0000 (11:37 +0800)]
MLK-11479-04 ASoC: imx-wm8962: Set MCLK source clock to 0Hz in hw_free()

cherry-pick below patch from v3.14.y:
ENGR00274386-2 ASoC: imx-wm8962: Set MCLK source clock to 0Hz in hw_free()

When DAPM closed WM8962 after playback, its driver would prompt
'wm8962 0-001a: Unsupported sysclk ratio 500' due to the invalid
divisor calculated by WM8962 codec driver.

To fix it, we can work around by setting its MCLK source to 0Hz,
so the codec driver would never get an invalid divisor any more.
Since hw_params() would re-set the MCLK source, no need to worry
about any side-effect.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit a935f7680ac3958ce72cf7413cac278c0683d4c0)

7 years agoMLK-11479-02 ASoC: WM8962: Let codec driver enable/disable its MCLK
Nicolin Chen [Mon, 5 Aug 2013 08:26:16 +0000 (16:26 +0800)]
MLK-11479-02 ASoC: WM8962: Let codec driver enable/disable its MCLK

cherry-pick below patch from v3.14.y:
ENGR00273838-8 ASoC: WM8962: Let codec driver enable/disable its MCLK

WM8962 needs its MCLK when powerup -- wm8962_resume(). Thus it's better
to control the MCLK in codec driver. Thus remove the clock enable in
machine dirver accordingly.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 007d3504914096760124f2ef13d52da206341a66)

7 years agoMLK-11479-01 ASoC: fsl: Use hw_params() and hw_free() to set FLL
Nicolin Chen [Mon, 5 Aug 2013 07:34:05 +0000 (15:34 +0800)]
MLK-11479-01 ASoC: fsl: Use hw_params() and hw_free() to set FLL

cherry-pick below patch from v3.14.y:
ENGR00273838-7 ASoC: fsl: Use hw_params() and hw_free() to set FLL

We followed community way by using set_bias() to set FLL of WM8962.
But this can't meet our requirement: aplay -Dhw: 16khz.wav 24khz.wav.
Thus use hw_params() and hw_free() instead.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 8db9a2f44a5eecd02be2259a3783178a521ef2d2)

7 years agoMLK-11483-5 Add config for mfgtools
Frank Li [Thu, 3 Oct 2013 19:51:58 +0000 (14:51 -0500)]
MLK-11483-5 Add config for mfgtools

Build in USB Mass storage
Enable CONFIG_FSL_UTP

Signed-off-by: Frank Li <Frank.li@freescale.com>
7 years agoMLK-11483-4 UTP : replace kzalloc() with vmalloc()
Huang Shijie [Wed, 26 Oct 2011 09:31:25 +0000 (17:31 +0800)]
MLK-11483-4 UTP : replace kzalloc() with vmalloc()

When allocating large memory, such as 128K,
vmalloc() uses single page for the allocation process,
while kzalloc() has to consume a continuous pages for the allocation.

In low memory case, the kzalloc() may fails.
So use the vmalloc() instead.

Also add some sanity check for the NULL pointer.

Add missed line for ENGR00161643-3 UTP : bugfix

Signed-off-by: Huang Shijie <b32955@freescale.com>
7 years agoMLK-11483-3 mfg: fix the bug that ubiformat utility breaks utp protocol
Peter Chen [Tue, 22 Mar 2011 09:27:17 +0000 (17:27 +0800)]
MLK-11483-3 mfg: fix the bug that ubiformat utility breaks utp protocol

ubiformat includes command, data, command periods,
it breaks utp protocol for PUT commands. So we add two operations to fix it.
One is sending busy to host before the data periods begins.
The second is adding a new command to waiting ubiformat's command period.

Signed-off-by: Li Xingyu <b02754@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agoMLK-11483-2 mfgtool firmware will crash during mfgtool running
Tony LIU [Fri, 20 Jul 2012 02:11:06 +0000 (10:11 +0800)]
MLK-11483-2 mfgtool firmware will crash during mfgtool running

- the root cause of this issue is there is no protection for
  the resource which will be accessed by multiple thread

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
7 years agoMLK-11483-1 make the kernel image for mfgtool
Frank Li [Wed, 28 Aug 2013 21:02:06 +0000 (16:02 -0500)]
MLK-11483-1 make the kernel image for mfgtool

uboot needs pass down below parameters
removable = 1
stall = 0
idVendor = 0x066F
idProduct = 0x37FF
iSerialNumber = ""

sleep_thread add new parameter

Signed-off-by: Lu Lin <b37454@freescale.com>
Signed-off-by: Frank Li<frank.li@freescale.com>
7 years agoMLK-11477 ARM: dts: imx6ul-14x14-evk.dts: move fxls8471 interrupt pin to iomux hoggrp
Fugang Duan [Tue, 1 Sep 2015 08:49:39 +0000 (16:49 +0800)]
MLK-11477 ARM: dts: imx6ul-14x14-evk.dts: move fxls8471 interrupt pin to iomux hoggrp

Commit cb75ac1d83e interduces one issue that add fxls8471 interrupt pin into
other module pin function. The patch move the pin to iomux hoggrp pin group.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-10105 ARM: dtsi: Add MLB50 support for the i.MX6SX
Luwei Zhou [Fri, 16 Jan 2015 04:37:41 +0000 (12:37 +0800)]
MLK-10105 ARM: dtsi: Add MLB50 support for the i.MX6SX

Add MLB50 support on the i.MX6SX-ARD platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
7 years agoMLK-11475 ARM: dts: i.mx6sx: Add ADC device tree support on i.MX6SX-SDB
Fugang Duan [Tue, 1 Sep 2015 05:38:58 +0000 (13:38 +0800)]
MLK-11475 ARM: dts: i.mx6sx: Add ADC device tree support on i.MX6SX-SDB

Add ADC dts support on i.MX6SX-SDB platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11474 ARM: dts: i.mx6sl-evk: Add mma8450 sensor dts support on i.MX6SL-EVK platform.
Luwei Zhou [Thu, 18 Sep 2014 05:15:43 +0000 (13:15 +0800)]
MLK-11474 ARM: dts: i.mx6sl-evk: Add mma8450 sensor dts support on i.MX6SL-EVK platform.

Support MMA8450 sensor on i.MX6SL-EVK

Signed-off-by: Luwei Zhou <b45643@freescale.com>
7 years agoMLK-11471-03 imx_v7_defconfig: enable isl29023 by default
Fugang Duan [Tue, 1 Sep 2015 05:31:31 +0000 (13:31 +0800)]
MLK-11471-03 imx_v7_defconfig: enable isl29023 by default

Enable isl29023 driver in default config.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11471-02 ARM: dts: i.mx6q/dl/sx: Add isl29023 device tree support.
Fugang Duan [Tue, 1 Sep 2015 05:29:18 +0000 (13:29 +0800)]
MLK-11471-02 ARM: dts: i.mx6q/dl/sx: Add isl29023 device tree support.

Add isl29023 sensor device tree support on i.MX6Q/DL/SX platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11471-01 input: misc: isl29023: Add isl29023 driver support on i.MX6Q/DL/SX platform.
Luwei Zhou [Wed, 17 Sep 2014 02:50:08 +0000 (10:50 +0800)]
MLK-11471-01 input: misc: isl29023: Add isl29023 driver support on i.MX6Q/DL/SX platform.

Add isl29023 driver support for i.MX6Q/DL/SX platform. The code derives from 3.10.y branch.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: b0134420bba0022151499f1bb15e0d5daba970fa)

7 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)

7 years agoMLK-11470 ARM: dts: i.mx6q/dl/sx: Add mag3110 device tree support.
Fugang Duan [Tue, 1 Sep 2015 05:02:49 +0000 (13:02 +0800)]
MLK-11470 ARM: dts: i.mx6q/dl/sx: Add mag3110 device tree support.

Add mag3110 sensor device tree support on i.MX6Q/DL/SX platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11469-02 ARM: dts: i.mx6q/dl/sx: Add mma8451 device tree support.
Fugang Duan [Tue, 1 Sep 2015 03:31:14 +0000 (11:31 +0800)]
MLK-11469-02 ARM: dts: i.mx6q/dl/sx: Add mma8451 device tree support.

Add mma8451 sensor device tree support on i.MX6Q/DL/SX platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11469-01 hwmon: mma8451: Add mma8451 driver support on i.MX6Q/DL/SX platform.
luweizhou [Mon, 15 Sep 2014 08:20:10 +0000 (16:20 +0800)]
MLK-11469-01 hwmon: mma8451: Add mma8451 driver support on i.MX6Q/DL/SX platform.

Add mma8451 driver support for i.MX6Q/DL/SX platform. The code derives from 3.10.y branch.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 69e1811b92ed7b3dc2f1db0a9447a8570dd16231)

7 years agoMLK-11468 input: mma8450: evbug module will keep print message.
Fugang Duan [Tue, 1 Sep 2015 03:11:27 +0000 (11:11 +0800)]
MLK-11468 input: mma8450: evbug module will keep print message.

evbug will open the mma8450 on i.MX6SL_EVK and mma8450 will work in 2G mode by default.
That is the reason why mma8450 logs will be printed out. The main changes is below:

 * Remove the open(), close() hook out of the drivers. The open() and close()
   hook in input framwork is defined as void type. It isn't strictly safe in
   logic when some error happends. So remove them out.
 * Modify the mma8450 to standby mode by default. It will be more power saving
   and there would be no log printing out after booting up.
 * Provide the sys interface to modify the mma8450 work modes. Then the higher
   layer can modify the the mma8450 work mode via the interface. It would be
   much safer.There would be a sclaemode interface in the folder of
   /sys/devices/soc0/soc.1/2100000.aips-bus/21a0000.i2c/i2c-0/0-001c/scalemode
   User can use cat to read the current scalemode and echo to write. The mode
   is defined as: MODE_STANDBY: 0  MODE_2G:1  MODE_4G:2  MODE_8G:3
 * Add mutex to protect and some error handling.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit c51a786078fd569ce95eb6dcf09c76d1b3c0f172)

7 years agoMLK-11467 input: mma8450: Add chip id check in probe
Luwei Zhou [Tue, 3 Sep 2013 09:32:55 +0000 (17:32 +0800)]
MLK-11467 input: mma8450: Add chip id check in probe

Add chip ID check in probe function. The mma8450 is
on the E-INK daughter board. When the daughter board
is not pluged, there would be polling error log
continuously. Add the check to avoid this.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit e9f2c4cf673dee1527925f30a9f3fd137d9799ad)

7 years agoMLK-11466 ARM: imx_v7_defconfig: Compile MLB to module
Fugang Duan [Tue, 1 Sep 2015 02:42:17 +0000 (10:42 +0800)]
MLK-11466 ARM: imx_v7_defconfig: Compile MLB to module

Modify the compile MLB driver as a module.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 9fc5d78ac840d585ccea7cd5f6970aee8cc6e954)

7 years agoMLK-11456-02 ARM: dts: imx7d-12x12-lpddr3-arm2: enable uart3 for bt in lpsr mode
Fugang Duan [Tue, 1 Sep 2015 02:31:35 +0000 (10:31 +0800)]
MLK-11456-02 ARM: dts: imx7d-12x12-lpddr3-arm2: enable uart3 for bt in lpsr mode

Enable uart3 for bt in lpsr mode.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11456-01 tty: serial: imx: add pinctrl sleep mode support
Fugang Duan [Mon, 31 Aug 2015 03:39:15 +0000 (11:39 +0800)]
MLK-11456-01 tty: serial: imx: add pinctrl sleep mode support

For LPSR mode, UART iomux settings will be lost after resume,
so add pinctrl sleep mode support.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-10096 ARM: dts: imx6qdl: add enet ENET_REF_CLK pin set for sabreauto board
Fugang Duan [Mon, 31 Aug 2015 10:32:00 +0000 (18:32 +0800)]
MLK-10096 ARM: dts: imx6qdl: add enet ENET_REF_CLK pin set for sabreauto board

Add enet RGMII ENET_REF_CLK pin set for sabreauto board.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 3e4c0a2aec2473f577f807786f21e7641df16d61)

7 years agoMLK-10094 ARM: dts: imx6sx: correct the uart compatible string
Fugang Duan [Wed, 14 Jan 2015 07:10:56 +0000 (15:10 +0800)]
MLK-10094 ARM: dts: imx6sx: correct the uart compatible string

Correct the uart compatible string.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 1fc2d4c41ffbd00ba3d10038a321983879741df3)

7 years agoMLK-10072 ARM: dts: imx6sx: add uart2/5 support for imx6sx-sabreauto board
Fugang Duan [Mon, 31 Aug 2015 10:24:55 +0000 (18:24 +0800)]
MLK-10072 ARM: dts: imx6sx: add uart2/5 support for imx6sx-sabreauto board

Add uart2 and uart5 support for imx6sx-sabreauto board.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11462 ARM: dts: imx6sx: add fec support for i.MX6SX arm2 and auto boards
Fugang Duan [Mon, 31 Aug 2015 10:01:54 +0000 (18:01 +0800)]
MLK-11462 ARM: dts: imx6sx: add fec support for i.MX6SX arm2 and auto boards

Add fec support for i.MX6SX arm2 and auto boards.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11460 ARM: dts: imx6sx: enet RGMII TXCLK output drive strength is weak
Fugang Duan [Mon, 31 Aug 2015 08:22:19 +0000 (16:22 +0800)]
MLK-11460 ARM: dts: imx6sx: enet RGMII TXCLK output drive strength is weak

The current enet RGMII TXCLK rise/fall time which could be observed(~0.85ns)
is longer than requirement (<=0.75ns).

The current setting, SPEED/DSE/SRE=10/110/1 is used, and then it needs to
increase DSE to 111 "37 Ohm @ 3.3V, 21 Ohm@1.8V, 34 Ohm for DDR". After the
change RGMII TXCLK match the spec requirement.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11459 ARM: imx: add uart clk parent from OSC support
Fugang Duan [Mon, 31 Aug 2015 08:10:48 +0000 (16:10 +0800)]
MLK-11459 ARM: imx: add uart clk parent from OSC support

when kernel command line has "uart_from_osc" defined, set uart1
parent clock to OSC for low power case.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11458 ARM: dts: imx6sx: enable fec2 MAC multiqueue
Fugang Duan [Mon, 31 Aug 2015 07:37:36 +0000 (15:37 +0800)]
MLK-11458 ARM: dts: imx6sx: enable fec2 MAC multiqueue

Enable fec2 MAC multiqueue.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11457-04 ARM: dts: imx6qdl: add uart3 pad set for sabreauto board
Fugang Duan [Tue, 9 Sep 2014 06:53:13 +0000 (14:53 +0800)]
MLK-11457-04 ARM: dts: imx6qdl: add uart3 pad set for sabreauto board

Add imx6qdl-sabreauto board uart3 DTE pad set. To avoid a flood of
dts files, there comment out DTE pinctrl set. If user want to test
DTE mode, it needs to rebuild the DTB file.

(cherry picked from commit dc6028b08c6bd718d57866a1714f3977ba7820d3)

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11457-03 ARM: dts: imx6sl-evk: add uart4 support
Fugang Duan [Tue, 9 Sep 2014 06:43:21 +0000 (14:43 +0800)]
MLK-11457-03 ARM: dts: imx6sl-evk: add uart4 support

Add uart4 DCE and DTE pinctrl set. Since there have pin confliction,
so add new dts file. To avoid a flood of dts files, there comment out
DTE pinctrl set. If user want to test DTE mode, it needs to rebuild
the DTB file.

(cherry picked from commit a3602fa5796bb86ba432474220389ec712bde92a)

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11457-02 ARM: dts: imx6q: add uart5 dte set for sabresd board
Fugang Duan [Tue, 9 Sep 2014 06:36:12 +0000 (14:36 +0800)]
MLK-11457-02 ARM: dts: imx6q: add uart5 dte set for sabresd board

Add uart5 DTE mode pinctrl set for imx6q-sabresd board. Since there
have pin confliction, so add new dts file.

(cherry picked from commit d63b40d5b1b05992d2328ef0bdc80ec5d96f2dce)

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11457-01 ARM: dts: imx6sx: add uart5 dte pad set for imx6sx-sdb board
Fugang Duan [Mon, 31 Aug 2015 06:51:03 +0000 (14:51 +0800)]
MLK-11457-01 ARM: dts: imx6sx: add uart5 dte pad set for imx6sx-sdb board

Add imx6sx-sdb baord uart5 DTE pad set. To avoid a flood of dts files,
there only comment out DTE pinctrl set. If user want to test DTE mode,
it needs to rebuild the DTB file.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11442 mlb: imx: add mlb support on imx_4.1.y
Gao Pan [Thu, 13 Aug 2015 09:32:47 +0000 (17:32 +0800)]
MLK-11442 mlb: imx: add mlb support on imx_4.1.y

Add mlb support on imx_4.1.y. The files are copied from imx_3.14.y.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11441 ARM: dts: add mlb support
Gao Pan [Fri, 14 Aug 2015 06:06:52 +0000 (14:06 +0800)]
MLK-11441 ARM: dts: add mlb support

Add mlb in imx6qdl-sabreauto.dtsi and imx6qdl.dtsi
on branch imx_4.1.y

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11440-2 Integrate VPU driver to kernel 4.1
Hongzhang Yang [Tue, 25 Aug 2015 09:10:03 +0000 (17:10 +0800)]
MLK-11440-2 Integrate VPU driver to kernel 4.1

Include 3.14 VPU driver with no change

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
7 years agoMLK-11440-1 Integrate VPU driver to kernel 4.1
Hongzhang Yang [Tue, 25 Aug 2015 09:10:42 +0000 (17:10 +0800)]
MLK-11440-1 Integrate VPU driver to kernel 4.1

- Include 3.14 VPU node with no change
- Disable coda960 VPU node to avoid conflict

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
7 years agoMLK-11435 ASoC: fsl_mqs: add snd_soc_pm_ops for mqs machine driver
Zidan Wang [Thu, 27 Aug 2015 08:49:07 +0000 (16:49 +0800)]
MLK-11435 ASoC: fsl_mqs: add snd_soc_pm_ops for mqs machine driver

add snd_soc_pm_ops for mqs machine driver to make the trigger
suspend/resume be called in suspend/resume.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit 7887d4d9ab461f8d1d67f62c6cbc032e082193c2)

7 years agoMLK-11429-28: ARM: imx_v7_defconfig: build in cs42888 and si476x
Shengjiu Wang [Thu, 27 Aug 2015 03:32:58 +0000 (11:32 +0800)]
MLK-11429-28: ARM: imx_v7_defconfig: build in cs42888 and si476x

enable cs42888 and si476x sound card

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-11429-26: ASoC: fsl: imx-si476x: tdm_slot is changed in fsl_ssi
Shengjiu Wang [Thu, 27 Aug 2015 05:59:10 +0000 (13:59 +0800)]
MLK-11429-26: ASoC: fsl: imx-si476x: tdm_slot is changed in fsl_ssi

The fsl_ssi revert the mask in tdm_slot, so machine use 1 present enable
not 0.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-11429-25: ARM: dts: enable fm for imx6qdl-sabreauto
Shengjiu Wang [Thu, 11 Sep 2014 02:57:18 +0000 (10:57 +0800)]
MLK-11429-25: ARM: dts: enable fm for imx6qdl-sabreauto

enable fm for imx6qdl-sabreauto

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-11429-24: ARM: dts: use imx-cs42888 to enable cs42888-audio
Shengjiu Wang [Wed, 26 Aug 2015 10:47:42 +0000 (18:47 +0800)]
MLK-11429-24: ARM: dts: use imx-cs42888 to enable cs42888-audio

enable cs42888-audio for imx6qdl-sabreauto

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-10375: ARM: dts: Enable dual fifo for ssi in imx6
Shengjiu Wang [Thu, 5 Mar 2015 08:52:41 +0000 (16:52 +0800)]
MLK-10375: ARM: dts: Enable dual fifo for ssi in imx6

There is a specific DMATYPE (IMX_DMATYPE_SSI_DUAL) for ssi
dual fifo mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 26fbde0839ec018d02fdb9c5b7c10808a583596a)

7 years agoMLK-11305 radio-si476x: support set V4L2_CID_AUDIO_MUTE CTRL
Zidan Wang [Fri, 31 Jul 2015 09:02:48 +0000 (17:02 +0800)]
MLK-11305 radio-si476x: support set V4L2_CID_AUDIO_MUTE CTRL

By using gstreamer plugin v4l2radio, it will call VIDIOC_S_CTRL with
V4L2_CID_AUDIO_MUTE, but return failed.

So add V4L2_CID_AUDIO_MUTE CTRL support for radio-si476x.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit c18520adfd6de40dcc0659ddd778b0a2bd383cd4)

7 years agoMLK-11291 radio-si476x: initialize local variable rangelow and rangehigh before using...
Zidan Wang [Tue, 28 Jul 2015 01:48:43 +0000 (09:48 +0800)]
MLK-11291 radio-si476x: initialize local variable rangelow and rangehigh before using them

When transfer rangelow and rangehigh from user space, the local variable
rangelow and rangehigh will not be initialized before using them.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit c326f56005f0ee3d0c1fd6ebdebabda919c278dd)

7 years agoMLK-10899: ASoC: si476x: add startup/shutdown to powerup/down FM
Shengjiu Wang [Thu, 28 May 2015 06:57:33 +0000 (14:57 +0800)]
MLK-10899: ASoC: si476x: add startup/shutdown to powerup/down FM

The hw parameter is set failed for si476x if si476x is not powerup,
the codec use the default value of this module. So add startup/shutdown
to powerup/powerdown FM, then we can set parameter successfully.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 796665760605e020e6835f13db6ce49e0a0e03f5)

7 years agoMLK-10055-2: mfd: si476x-i2c: sound is registered when no FM module attached
Shengjiu Wang [Wed, 24 Dec 2014 08:51:22 +0000 (16:51 +0800)]
MLK-10055-2: mfd: si476x-i2c: sound is registered when no FM module attached

The si476x_core_get_revision_info will send i2c command to FM module, if it
return error, there is no FM modules attached, so we need't to register the
sound card. otherwise, the pulseaudio will access this sound card, but return
a lot of i2c error.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 4c8e9916128f05f9b4115e1ee1af4a1e7d800c4a)

7 years agoMLK-10055-1: ASoC: imx-cs42888: when codec probe failed, alsa return RETRY error.
Shengjiu Wang [Wed, 24 Dec 2014 08:08:45 +0000 (16:08 +0800)]
MLK-10055-1: ASoC: imx-cs42888: when codec probe failed, alsa return RETRY error.

If there is no codec device, the machine driver will not register the
card. then alsa will not return RETRY error. update the error handling
for machine driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 01ffd8e5e828d20214a196e64b981c9fd94c913e)

7 years agoMLK-10038-1: mfd: si476x-i2c: Add support of si476x-rev4.0 board
Zidan Wang [Fri, 19 Dec 2014 03:13:01 +0000 (11:13 +0800)]
MLK-10038-1: mfd: si476x-i2c: Add support of si476x-rev4.0 board

Currently, si476x-rev1.0 and si476x-rev4.0 board just support A10 compatible
command set. For si476x-rev1.0 board, its firmware revision is unsupported and
will revert to A10 compatible function. For si476x-rev4.0 board, its firmware
revision is two and will use A30 function, but A30 command set function can't
work for the rev4.0 board.
So make the command set configurable in dts. If "revision-a10" is present,
set the revision to SI476X_REVISION_A10 to use A10 compatible commit set.
Otherwise, get the revision from si476x register.

Signed-off-by: Zidan Wang <b50113@freescale.com>
(cherry picked from commit b648714c3b71ee084188ae04b1e6a6f2554fe2cb)

7 years agoMLK-9684-3: ASoC: imx-si476x: SRCK and SRFS is used for fm in imx6sx
Shengjiu Wang [Mon, 13 Oct 2014 03:27:12 +0000 (11:27 +0800)]
MLK-9684-3: ASoC: imx-si476x: SRCK and SRFS is used for fm in imx6sx

Configure the aumux port to output SRCK and SRFS from STCK and STFS
of internal port when use the SYN mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit f4428f5617916863b5410afea5614cc52190f1a8)
(cherry picked from commit 5335e2a2d5f0f2e1b96aa920425203912b1e34d9)

7 years agoMLK-9684-2: ASoC: imx-si476x: remove the codec_name, use the codec_of_node
Shengjiu Wang [Mon, 13 Oct 2014 03:26:02 +0000 (11:26 +0800)]
MLK-9684-2: ASoC: imx-si476x: remove the codec_name, use the codec_of_node

As the codec_name has a suffix, which is a index and is different
for different platform or different kernel. So here change machine driver
to use codec_of_node, which can be same for different platform/kernel,
then we can maintain a same machine driver for fm.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e87b135f34cba5cfcd0614b045d4035118fb6d77)
(cherry picked from commit b1dc86a327d96e431c2a55cc6744c6c3bc6b84af)

7 years agoMLK-9684-1: mfd: si476x-i2c: add of_compatible for si476x-codec
Shengjiu Wang [Mon, 13 Oct 2014 03:10:27 +0000 (11:10 +0800)]
MLK-9684-1: mfd: si476x-i2c: add of_compatible for si476x-codec

Add of_compatible for si476x-codec, then si476x-codec driver will have
codec_of_node, So machine driver can use the codec_of_node.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e2ec44f91a21b127e155e8317d06e8ead7fd2678)
(cherry picked from commit ac6decaf5414e784ae81a524edc2f32060061b59)

7 years agoMLK-9866: mfd: si476x: FM will fail to open sometimes.
Shengjiu Wang [Tue, 18 Nov 2014 06:20:55 +0000 (14:20 +0800)]
MLK-9866: mfd: si476x: FM will fail to open sometimes.

In commit e856a0ebc23dcd2c933e3f902317652cc50f0067, we disabled
wait_event_timeout for CMD_POWER_DOWN, which will cause power down
failed sometimes, then FM will fail to reopen.
In this patch enable the wait_event_timeout for power down.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 30aa7f1a3580d0a5bc866c624d1da441fd5502c1)
(cherry picked from commit 2b1990fee264d805fcdc0005dcf8b5b63b261d51)

7 years agoMLK-11429-23: mfd: si476x: Use default configuration when no platform data
Nicolin Chen [Thu, 29 Aug 2013 06:35:44 +0000 (14:35 +0800)]
MLK-11429-23: mfd: si476x: Use default configuration when no platform data

cherry-pick below patch from imx_3.14.y
ENGR00276567-6 mfd: si476x: Use default configuration when no platform data

This would allow the driver to work normally without specific platform data,
when using devicetree for example.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 23e369b88b546d7b699ca9ec46e195a05c61b717)
(cherry picked from commit a2449e1d303e341f32556fb7f4ebc7dcbdd9ead1)

7 years agoMLK-11429-22: mfd: si476x: Fix power up failure
Nicolin Chen [Thu, 29 Aug 2013 06:25:22 +0000 (14:25 +0800)]
MLK-11429-22: mfd: si476x: Fix power up failure

cherry-pick below patch from imx_3.14.y
ENGR00276567-4 mfd: si476x: Fix power up failure

This's some logical error in power-up code, thus fix it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 77d97ad1bb77c0e3c60b9781a06b61d4b4667de1)
(cherry picked from commit b656522da2685ef9a4da2229b6786d5cd0c12189)

7 years agoMLK-11429-21: ASoC: fsl: port si476x machine driver from imx_3.10.y
Shengjiu Wang [Fri, 5 Sep 2014 06:55:04 +0000 (14:55 +0800)]
MLK-11429-21: ASoC: fsl: port si476x machine driver from imx_3.10.y

cherry-pick below patch from imx_3.14.y
ENGR00330403-3: ASoC: fsl: port si476x machine driver from imx_3.10.y

Port si476x machine dirver for i.MX series SoC and binding doc from imx_3.10.y

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 05a68db09806fe5b0aa927dd94cf69b1b0c0fa5a)

7 years agoMLK-10161-3: ARM: imx6sx: Add SPDIF_GCLK clock in clock tree
Shengjiu Wang [Tue, 27 Jan 2015 08:44:34 +0000 (16:44 +0800)]
MLK-10161-3: ARM: imx6sx: Add SPDIF_GCLK clock in clock tree

As spdif driver will register SPDIF clock to regmap, regmap will do
clk_prepare in init function, so SPDIF clock is prepared in probe, then its
root clock (pll clock) is prepared also, which cause the arm can't enter
low power mode.
Add SPDIF_GCLK in clock tree which share same gate bits with SPDIF clock.
Its root clock is ipg clock, and register it to regmap, then the issue can be
fixed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 3f8999cdb4fabed4f720c6ee23947e19c8fff83f)

7 years agoMLK-10161-1: ARM: imx6q: Add SPDIF_GCLK clock in clock tree
Shengjiu Wang [Tue, 27 Jan 2015 08:24:53 +0000 (16:24 +0800)]
MLK-10161-1: ARM: imx6q: Add SPDIF_GCLK clock in clock tree

As spdif driver will register SPDIF clock to regmap, regmap will do
clk_prepare in init function, so SPDIF clock is prepared in probe, then its
root clock (pll clock) is prepared also, which cause the arm can't enter
low power mode.
Add SPDIF_GCLK in clock tree which share same gate bits with SPDIF clock.
Its root clock is ipg clock, and register it to regmap, then the issue can be
fixed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 90d3a7c5da7b17f5bd88a906b54473468fa08991)

7 years agoMLK-11429-21: ASoC: imx-cs42888: port cs42888 machine driver from imx_3.10.y
Shengjiu Wang [Mon, 4 Aug 2014 08:46:01 +0000 (16:46 +0800)]
MLK-11429-21: ASoC: imx-cs42888: port cs42888 machine driver from imx_3.10.y

cherry-pick below patch from imx_3.14.y
ENGR00330403-1: ASoC: imx-cs42888: port cs42888 machine driver from imx_3.10.y

Port the cs42888 machine driver from imx_3.10.y and do update according to
new esai driver and asrc driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 7ed3aac83630a38eb397ed92f815a28e07198748)

7 years agoMLK-11301: ASoC: cs42xx8: can't set volume 255 in idle mode
Shengjiu Wang [Fri, 31 Jul 2015 09:48:53 +0000 (17:48 +0800)]
MLK-11301: ASoC: cs42xx8: can't set volume 255 in idle mode

Volume 255 corresponding to register value 0, the value 0 is default
value. In regcache_sync(), when the cache value is equal to default
value, this register will be skipped. So volume 255 isn't set to
register successfully.

The correct fix is to add software reset in runtime_resume, but cs42xx8
has no software reset, the hardware reset gpio pin is used by all the
perpherial device in ARD base board. So need to use another method.

In order to fix it, need to cherry-pick two patch from master branch.
Which will sync all the registers include the register which cache value
equal the default value, And remove regcache_mark_dirty().

Add update value of one register to make the cache_dirty if user press
the hardware reset pin on the board, then need to regcache_sync.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 5c0cae19928f99ebc8adf0013df850ba5b41d6a8)

7 years agoMLK-11004-3: ASoC: cs42888: enable PWR in probe for fix pop noise
Shengjiu Wang [Wed, 27 May 2015 09:13:54 +0000 (17:13 +0800)]
MLK-11004-3: ASoC: cs42888: enable PWR in probe for fix pop noise

Delete PWR widget, enable it in probe to fix pop noise

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 4fdb40165706bba3de6aa47e6328136d1eb597fc)

7 years agoMLK-11004-1: ASoC: cs42888: Add regcache mask dirty in suspend
Shengjiu Wang [Wed, 20 May 2015 10:01:00 +0000 (18:01 +0800)]
MLK-11004-1: ASoC: cs42888: Add regcache mask dirty in suspend

Add regcache mask dirty in suspend, otherwise the register is not
synced with cache in resume.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 9687aa5bbf5dd91b57f6e8b4b8ce69bf20e29c43)

7 years agoMLK-11429-20: ASoC: cs4xx8: fix the setting of Functional mode
Shengjiu Wang [Wed, 2 Jul 2014 09:24:45 +0000 (17:24 +0800)]
MLK-11429-20: ASoC: cs4xx8: fix the setting of Functional mode

cherry-pick below patch from imx_3.14.y
ENGR00320849-1 ASoC: cs4xx8: fix the setting of Functional mode

Failed case:
arecord -Dhw:0,1 -f S16_LE -r 96000 -c 2 -traw | aplay -Dhw:0,0 -f
S16_LE -r 96000 -c 2 -traw.
There is no sound when use this case.The reason is that the setting
of Functional mode is not correct.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
(cherry picked from commit be1ef3bb8da5c263345ebdad4a7c218a095d0f48)
(cherry picked from commit c2dfac6c09bc1fcb044022bcdaea450707feda4c)

7 years agoMLK-11429-19: ARM: dts: imx6qdl: refine spdif support in devicetree
Shengjiu Wang [Mon, 22 Sep 2014 08:54:45 +0000 (16:54 +0800)]
MLK-11429-19: ARM: dts: imx6qdl: refine spdif support in devicetree

cherry-pick below patch from imx_3.14.y
ENGR00332688: ARM: dts: imx6qdl: refine spdif support in devicetree

Add sysclk and spba clock, and assigned-clocks

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
7 years agoMLK-10903-2: ASoC: imx_spdif: add snd_soc_pm_ops
Shengjiu Wang [Tue, 19 May 2015 05:34:51 +0000 (13:34 +0800)]
MLK-10903-2: ASoC: imx_spdif: add snd_soc_pm_ops

Add snd_soc_pm_ops in machine driver to make the trigger suspend/resume
be called in suspend/resume. Remove platform_set_drvdata for redundance,
When register card, it has been called.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit fe21119eed18804b2bc7c47216b6f4478de0268d)