23 Feb, 2017

40 commits

  • 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

    Sandor Yu
     
  • 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

    Anson Huang
     
  • 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

    Conflicts:
    arch/arm/mach-imx/clk-imx6q.c
    arch/arm/mach-imx/mach-imx6q.c

    Anson Huang
     
  • 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

    Anson Huang
     
  • Add busfreq support for i.MX6Q/DL.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • 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

    Conflicts:
    arch/arm/mach-imx/busfreq-imx6.c
    arch/arm/mach-imx/pm-imx6.c

    Anson Huang
     
  • 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

    Anson Huang
     
  • 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

    Anson Huang
     
  • 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
    Signed-off-by: Anson Huang

    Allen Xu
     
  • add MU support for i.MX6SX.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • 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

    Anson Huang
     
  • add SEMA4 support for i.MX6SX.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • enable CONFIG_IMX_SEMA4 by default.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • add HAVE_IMX_AMP and select by default for i.MX6SX.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • - 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
    Signed-off-by: Richard Zhu

    Anson Huang
     
  • This patch adds clk API return check for imx6sx.

    Signed-off-by: Anson Huang

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

    Signed-off-by: Zidan Wang

    Zidan Wang
     
  • 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
     
  • 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
    (cherry picked from commit 7cb41403cb7cf1e977536af2a0422a214382c9f5)

    Conflicts:
    drivers/video/mxsfb.c

    Fancy Fang
     
  • 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
    Signed-off-by: Shawn Guo
    Signed-off-by: Bai Ping

    Anson Huang
     
  • add spdif sound card support for imx6sx-sdb board

    Signed-off-by: Zidan Wang

    Zidan Wang
     
  • add saiwm8962 sound card support for imx6sx-sdb board

    Signed-off-by: Zidan Wang

    Zidan Wang
     
  • add ssiwm8962 sound card support for imx6sx-sdb board

    Signed-off-by: Zidan Wang

    Zidan Wang
     
  • 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
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit b6fca438dde1b4c0bbdee31729871d601f287dc9)

    Nicolin Chen
     
  • 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
    (cherry picked from commit 84babc7fa0a56f6620f8b04a86baece620297dda)

    Shengjiu Wang
     
  • 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
    (cherry picked from commit 6a715373c43f16e48883061049e67919281878d1)

    Shengjiu Wang
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit c4dcde0b5119262cbb75c5136422af2071bffbda)

    Nicolin Chen
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit d9357cae4492abd5bca41515793ab6fe461717b2)

    Nicolin Chen
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit f85ca1dd664178328bd813651e91d612787b6926)

    Nicolin Chen
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit 3133b6cfb31b202805d31d449bfa70383e5e1c75)

    Nicolin Chen
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit a935f7680ac3958ce72cf7413cac278c0683d4c0)

    Nicolin Chen
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit 007d3504914096760124f2ef13d52da206341a66)

    Nicolin Chen
     
  • 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
    Signed-off-by: Nicolin Chen
    (cherry picked from commit 8db9a2f44a5eecd02be2259a3783178a521ef2d2)

    Nicolin Chen
     
  • Build in USB Mass storage
    Enable CONFIG_FSL_UTP

    Signed-off-by: Frank Li

    Frank Li
     
  • 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

    Huang Shijie
     
  • 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
    Signed-off-by: Peter Chen

    Peter Chen
     
  • - 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

    Tony LIU
     
  • 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
    Signed-off-by: Frank Li

    Frank Li
     
  • 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

    Fugang Duan