23 Feb, 2017

40 commits

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

    Signed-off-by: Richard Zhu
    (cherry picked from commit 31a7eab5be9843263535306dbaa08592b66714e5)

    Richard Zhu
     
  • enable sata support on imx6qp sdb board.

    Signed-off-by: Richard Zhu
    (cherry picked from commit 8b08d0e657a121136eebe5bb6a998b7c9a6bff25)

    Richard Zhu
     
  • Add dual-role support for imx6ul-9x9 evk board, the full otg function
    is not supported at this board due to the vbus can't be controlled
    by software.

    Signed-off-by: Peter Chen

    Peter Chen
     
  • System will hang when calling fb_new_modelist() function from hdmi driver.

    Hang logs:
    Unable to handle kernel NULL pointer dereference at virtual address 000000e0
    pgd = 80004000
    [000000e0] *pgd=00000000
    Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 90 Comm: kworker/0:3 Not tainted 4.1.8-01364-gd02137c #6
    CPU: 0 PID: 90 Comm: kworker/0:3 Not tainted 4.1.8-01364-gd02137c #6
    00000e0
    mmended
    se run fsck.
    42.254
    irq=-1)
    omuxc
    (307Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) l
    Workqueue: events hotplug_worker
    task: a8381c80 ti: a8512000 task.ti: a8512000
    PC is at fbcon_new_modelist+0xcc/0xe8
    LR is at fbcon_new_modelist+0xcc/0xe8
    pc : [] lr : [] psr: 600b0013
    sp : a8513c60 ip : a829122c fp : 80ac6e6c
    pc : [] lr : [] psr: 600b0013
    sp : a8513c60 ip : a829122c fp : 80ac6e6c
    .254
    irq=-1)
    omuxc
    (307r10: 00000000 r9 : 80ade1f8 r8 : a8291000
    r7 : 80b80b75 r6 : 80b85080 r5 : 80b80c2c r4 : 00000002
    r7 : 80b80b75 r6 : 80b85080 r5 : 80b80c2c r4 : 00000002
    : a8513c60 ip : a829122c fp : 80ac6e6c
    .254

    .......

    irq=-1)
    omuxc
    (3073f00: 00000000 80046328 a8512000 ab707380 ab707394 ab707380 a8497198 ab707394
    3f20: a8512000 00000008 80b2b2b9 a8497180 ab707380 80046640 80ac6100 ab7074e4
    3f40: a8497180 00000000 a84bef00 a8497180 800465f4 00000000 00000000 00000000
    3f60: 00000000 8004b588 6d6ddb89 00000000 75cfbfda a8497180 00000000 00000000
    3f80: a8513f80 a8513f80 00000000 00000000 a8513f90 a8513f90 a8513fac a84bef00
    3fa0: 8004b4ac 00000000 00000000 8000f528 00000000 00000000 00000000 00000000
    3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    29122c fp : 80ac6e6c
    .254
    irq=-1)
    omuxc
    (3073fe0: 00000000 00000000 00000000 00000000 00000013 00000000 68f31fff f537ef6b
    [] (fbcon_new_modelist) from [] (fbcon_event_notify+0x16c/0x958)
    [] (fbcon_event_notify) from [] (notifier_call_chain+0x44/0x84)
    [] (notifier_call_chain) from [] (__blocking_notifier_call_chain+0x48/0x60)
    [] (__blocking_notifier_call_chain) from [] (blocking_notifier_call_chain+0x18/0x20)
    [] (blocking_notifier_call_chain) from [] (fb_new_modelist+0xe4/0xf8)
    [] (fb_new_modelist) from [] (hotplug_worker+0x1cc/0x2f4)
    [] (hotplug_worker) from [] (process_one_work+0x118/0x3e4)
    [] (process_one_work) from [] (worker_thread+0x4c/0x4f4)
    [] (worker_thread) from [] (kthread+0xdc/0xf4)
    [] (kthread) from [] (ret_from_fork+0x14/0x2c)
    Code: eb003570 e1a01000 e28d0008 eb0034f7 (e1da2eb0)

    The root cuase is fbcon driver access null pointer vc in the function of
    fbcon_new_modelist().
    Add null pointer check vc to fix the issue.

    Signed-off-by: Sandor Yu
    (cherry picked from commit 3bea30ff471c8fc1e546be26a8625e6aa425d5aa)
    (cherry picked from commit ddfd6b989071e38955855351556f518b1600944d)
    (cherry picked from commit 608a206caffa8abbd6bd099b9bd592cc227116c1)

    Sandor Yu
     
  • When only single core online for i.MX7D, the secondary core wfi
    flag should be set to make sure low power idle can be entered when
    last core enters wfi. Otherwise, DDR/CCM/ANATOP will NOT enter
    low power mode as the secondary core wfi flag is always clear;

    Make sure the last power up slot do the ack for single core case.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Free mode buffer before function return to avoid memory leak.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Enable the sdio wakeup capability for SDIO cards.
    Note: we do not enable it for sabresd usdhc4 since it has a solid
    eMMC card on it.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 9ea7e84fe686a5c959aebbbf4a1b81dcb1c3e3fd)
    (cherry picked from commit 58a5347a1b3a6b8970ac7ddc8e336c5d9adf4ddb)
    Signed-off-by: Haibo Chen

    Dong Aisheng
     
  • All i.MX6 SabreAuto/SabreSD/EVK has the ability to keep card power
    during suspend. So add this capability for them.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 3f18df4746eb33e934c55de23d6496bb4adad33b)
    (cherry picked from commit 55553b7300fb3d0e3a7961f569a42bd689b3670f)
    Signed-off-by: Haibo Chen

    Dong Aisheng
     
  • SD3.0 cards require power cycle the card during suspend/resume,
    or the card re-enumeration after resume will fail to be identified
    as UHS card since the card is already working on 1.8v mode and refuse
    to ack the S18R request, thus, it will then work on normal high speed
    mode instead.

    We have to use external vmmc regulator to power cycle the card during
    suspend/resume to reset card signal voltage to 3.3v frist for the later
    1.8v voltage switch.

    However, due to the sabreauto board limitation, we can not use external
    regulator to powere off card by default since the card power is shared
    with card detect pullup. Disabling the vmmc regulator will also shutdown
    the cd pullup which causes incorrect illusion of card exist.
    (e.g. plug out the card, mmc core wll think the card is exist since cd pin
    is low but it never can find the card)
    HW rework removing R695 and enable PAD internal pullup is needed to
    fix this isssue.

    User can manually open the mask of vmmc in dts to enable using external
    regulator if your board has done the rework as said above.
    Or by default we still do not power off card during suspend.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 2fd1bf9320bce1c22f2406c74277b7422653511e)
    (cherry picked from commit 0804d85c137129db17766c3f4e236ae722d9b7db)

    Dong Aisheng
     
  • Enable the interactive governor in defconfig to be compiled into the kernel.
    The default cpufreq governor is still ondemand governor.

    Signed-off-by: Bai Ping

    Bai Ping
     
  • Move the x86_64 idle notifiers originally by Andi Kleen and Venkatesh
    Pallipadi to generic.

    Change-Id: Idf29cda15be151f494ff245933c12462643388d5
    Acked-by: Nicolas Pitre
    Signed-off-by: Todd Poynor

    Todd Poynor
     
  • Interactive governor has lived in Android sources for a very long time
    and this commit is based on the code present in following branch:

    https://android.googlesource.com/kernel/common android-4.4

    The Interactive governor is designed for latency-sensitive workloads,
    such as interactive user interfaces like the mobile phones and tablets.
    The interactive governor aims to be significantly more responsive to
    ramp CPU quickly up when CPU-intensive activity begins.

    Existing governors sample CPU load at a particular rate, typically every
    X ms and then update the frequency from a work-handler. This can lead
    to under-powering UI threads for the period of time during which the
    user begins interacting with a previously-idle system until the next
    sample period happens.

    The 'interactive' governor uses a different approach.

    A real-time thread is used for scaling up, giving the remaining tasks
    the CPU performance benefit, unlike existing governors which are more
    likely to schedule ramp-up work to occur after your performance starved
    tasks have completed.

    The Android version of interactive governor also checks whether to scale
    the CPU frequency up soon after coming out of idle. When the CPU comes
    out of idle, the governor check if the CPU sampling is overdue or not.
    If yes, it immediately starts the sampling. Otherwise, the utilization
    hooks from the scheduler handle the sampling later. If the CPU is very
    busy from exiting idle to when the evaluation happens, then it assumes
    that the CPU is under-powered and ramps it to MAX speed.

    If the CPU was not sufficiently busy to immediately ramp to MAX speed,
    then the governor evaluates the CPU load since the last speed
    adjustment, choosing the highest value between that longer-term load or
    the short-term load since idle exit to determine the CPU speed to ramp
    to.

    Idle notifiers will be be handled later and are not included for now.

    The core of this code is written and maintained (in Android
    repositories) by Mike Chan and Todd Poyner over a long period of time.

    Vireshk has made changes to to the governor to align it with the current
    practices followed with mainline governors, like using utilization hooks
    from the scheduler and handling kobject (for governor's sysfs directory)
    in a race free manner. And of course this included general cleanup of
    the governor as well.

    Signed-off-by: Mike Chan
    Signed-off-by: Todd Poynor
    Signed-off-by: Viresh Kumar

    ---
    V1->V2:
    - Changes to fix compilation issues with updated mainline
    - Timer APIs got updated
    - s/mod_timer_pinned/mod_timer
    - s/init_timer/init_timer_pinned
    - Updated prototypes of cpufreq_frequency_table_target() and
    update_util_handler()

    Viresh Kumar
     
  • These macros can be reused by governors which don't use the common
    governor code present in cpufreq_governor.c and should be moved to the
    relevant header.

    Now that they are getting moved to the right header file, reuse them in
    schedutil governor as well (that required rename of show/store
    routines).

    Also create gov_attr_wo() macro for write-only sysfs files, this will be
    used by Interactive governor in a later patch.

    Signed-off-by: Viresh Kumar

    Viresh Kumar
     
  • On i.MX7D TO1.0, the finish bit in tempmon module used for verify
    the temp value is broken, so it can NOT be used for checking the temp
    value. On TO1.1, this issue has been fixed, so we can use this bit
    to verify if the temp value is valid.

    Signed-off-by: Bai Ping

    Bai Ping
     
  • Add imx6ul device type to enable the ERR008517 workaround or not by dts.

    Signed-off-by: Robin Gong
    (cherry picked from commit 17d6a090b7a39bfd7836a3685d20201dcb0fa25e)

    Robin Gong
     
  • Since ERR008517(TKT238285) fixed on i.mx6ul, we need change script to
    compatible all i.mx6 chips.

    Signed-off-by: Robin Gong
    (cherry picked from commit 6970e2b497621e3f2fc4005d06bb8ca76d234074)

    Robin Gong
     
  • Without the filter function, the dma_request_channel() API could possibly get
    a sdma channel. The dma_request_channel() API does not return error but the
    consequent operations on that channel will be invalid then the upper level
    application expects to be stuck.

    The patch added the filter functions to get right dma channel for the fix.

    Signed-off-by: Robby Cai

    Robby Cai
     
  • For imx7d-sdb TO1.1 board, the touch interrupt pin no
    longer conflict with HDMI, so move touch support to
    imx7d-sdb.dts. To compatible with TO1.0 board, still
    use imx7d-sdb-reva-touch.dts to support touch.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • add audio support for imx7d-sdb revb board.

    Signed-off-by: Zidan Wang
    (cherry picked from commit e92712590a3572264283a4af90b54d3f195d3b4e)

    Zidan Wang
     
  • Add headphone/micphone/headset jack support for different board.

    There are headphone detect gpio and microphone detect gpio which
    can be configured from device tree.
    If headphone and microphone using the same gpio for jack detect,
    it suppose to be a headset and will register a headphone jack for it.
    If headphone and microphone using different gpio for jack detect,
    it suppose not to be a headset, and will register headphone jack
    and microphone jack respectively.

    Is't not appropriate to set the adc data output in machine driver.
    It will not be compatibly when we change hardware connection.
    wm8960 codec driver has added "ADC Data Output Select" kcontrol,
    so that we can set the ADC data output from user space.

    Signed-off-by: Zidan Wang
    (cherry picked from commit 92f65b4bee51fabdfa3a3c191f511c2ec7cb18a1)

    Zidan Wang
     
  • The patch is to fix the issue,
    mipi csi unit test mx6s_v4l2_capture.out can not work in 2nd time.

    In ov5647 driver, clock and data lane will been setting to LP11 mode
    when stream off. And the mode will been changed to LP00 mode
    at the begin of ov5647 initialization.
    If MIPI CSI DPHY in power on state, it will begin to work after
    clock and data lane level changed, even ov5647 is not ready.
    MIPI PHY may lose ov5647 signal.

    Fixed the issue with:
    i. Stream off ov5647 when ov5647 driver probe.
    ii. Add 5ms delay after software reset bit set.
    iii.Setting both clock and data lane in LP00 when stream off.

    Signed-off-by: Sandor Yu
    (cherry picked from commit d351a9b3ad46309354a30b256be1a39c339effcd)

    Sandor Yu
     
  • The management data input/output (MDIO) bus where often high-speed,
    open-drain operation is required. i.MX7D TO1.0 ENET MDIO pin has no
    open drain as IC ticket number: TKT252980, i.MX7D TO1.1 fix the issue.

    Signed-off-by: Fugang Duan
    (cherry picked from commit: a747abd5f01d278b91d1b6ee6628e1935cb7b23c)

    Conflicts:
    arch/arm/mach-imx/mach-imx7d.c

    Fugang Duan
     
  • Add elan touch screen support on imx6sl-evk board.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • Currently, we just use driver elan_ts.c, not elants_i2c.c. So this
    patch change this.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • Add elan touch screen driver in linux kernel.

    Signed-off-by: Haibo Chen
    (cherry picked from commit 20180719c54760359d78544d55e4ac1fabaf6e8b)

    Haibo Chen
     
  • Add imx7d_adc, default build into kernel

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • Report by coverity (CID 18428). The return value need be checked
    for snd_soc_dai_set_sysclk().

    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • Add ADC support for imx6sx-sabreauto board.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • This patch add mmc aliase support, to make every sd slot index
    fixed.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • Add usdhc1 support for the baseboard.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • Base on i.MX7d sdb revb board change list, below modules has changed:
    - enet2 and epdc enable pin
    - usb_otg2 pwr enable pin
    - ov5647_mipi pwr pin
    - tsc2046 touch pendown pin
    - uart5 tx/rx pins
    - sensor INT pin
    - pcie power is controlled by por_b, not gpio_spi pin6
    - hdmi audio change to SAI3 from SAI1

    The patch add the changes for revb, and keep the original functions for
    reva board. Remove redundancy sim and enet dts files to avoid excessive
    dts file for reva and revb.

    After the patch, there have below diff:
    - default dts file: imx7d-sdb.dts for revb board, imx7d-sdb-reva.dts for reva board
    - remove enet, sim extended dts files, so these modules are enabled in default dts
    file for reva and revb board.

    The change of expanded dts due to pin confliction:
    - Keep the original expanded name of dts file for revb board, add suffix "-reva" in dts
    file name for reva board.
    - Like:
    hdmi/codec audio:
    hdmi audio and wm8960 codec are enabled in default dts file for revb board,
    no extended dts files to separate them.
    Keep original extended dts files for reva board:
    imx7d-sdb-reva-hdmi-audio.dts
    imx7d-sdb-reva-wm8960.dts
    epdc:
    imx7d-sdb-epdc.dts is for revb board, imx7d-sdb-reva-epdc.dts is for reva board.
    gpmi-weim:
    imx7d-sdb-gpmi-weim.dtsi for revb, imx7d-sdb-reva-gpmi-weim.dtsi for reva.
    m4:
    imx7d-sdb-m4.dts for revb, imx7d-sdb-reva-m4.dts for reva.
    qspi:
    imx7d-sdb-qspi.dts for revb, imx7d-sdb-reva-qspi.dts for reva.
    touchscreen:
    imx7d-sdb-touch.dts for revb, imx7d-sdb-reva-touch.dts for reva.

    Cherry picked from commit: 2be1a236696d, and disable sai3 since there have many
    Transmit underrun on kernel 4.1.

    Signed-off-by: Fugang Duan
    Acked-by: Robby Cai
    Acked-by: Gao Pan
    Acked-by: Peter Chen
    Acked-by: Chen Bough

    Conflicts:
    arch/arm/boot/dts/Makefile
    arch/arm/boot/dts/imx7d-sdb-epdc.dts
    arch/arm/boot/dts/imx7d-sdb-gpmi-weim.dtsi
    arch/arm/boot/dts/imx7d-sdb-m4.dts
    arch/arm/boot/dts/imx7d-sdb-reva-epdc.dts
    arch/arm/boot/dts/imx7d-sdb-touch.dts
    arch/arm/boot/dts/imx7d-sdb.dts

    Fugang Duan
     
  • The resolution of an overlay framebuffer could be at most the same to the
    one of the relevant background framebuffer. However, the resolution of a
    HDMI monitor could be changed at runtime. Thus, when we unblank the overlay
    framebuffer, we should check it's resolution and start position in case it
    exceeds the boundary of the background framebuffer. This patch replaces
    mxcfb_set_par() with fb_set_var() to implement the unblank operation so that
    the logic contains the ->fb_check_var() path.

    Signed-off-by: Liu Ying

    Liu Ying
     
  • i.MX6UL config was missed in the imx_v7_mfg_defconfig, add it for
    mfgtool.

    Signed-off-by: Han Xu

    Han Xu
     
  • ENET gpio irq pin conlict with MLB on i.MX6qdl sabreauto board, since enet
    gpio irq is extended feature for performance improvement, so let MLB enable
    in default dts file and newly create sabreauto enet irq dts files.

    Signed-off-by: Fugang Duan

    Fugang Duan
     
  • Clock of spdif tx is derived from clk_ipg and clk_osc, which is not the
    integer multiple size of sample rate, can't generate accurate clock for
    each sample rate. Use pll4 as the clk_spdif's parent, because the clk_spdif
    is the one of source clock of tx, use a proper frequency for pll4, then it
    can generate more accurate clock for sample rate (32k,48k,96k,192k).

    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • Add LDO enable mode support for i.MX6QP SabreSD board.

    Signed-off-by: Anson Huang
    Signed-off-by: Robin Gong
    (cherry picked from commit 4107e9c4f3d8f654e75770da0a8ed7f158c3e468)

    Anson Huang
     
  • The CAN transceiver on MX6SX Sabreauto board seems in sleep mode
    by default after power up the board. User has to press the wakeup
    key on ARD baseboard before using the transceiver, or it may not
    work properly when power up the board at the first time(warm reset
    does not have such issue).

    This patch operates the wake pin too besides stby/en pins by chaining
    them together in regulator mode.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • Removing flexcan for pin conflict devices such as ecspi/gpmi.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • The flexcan1 is pin conflict with fec. So we add a new dts file with
    flexcan1 enabled with fec disabled for user to use.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • Add flexcan stop mode support.

    Signed-off-by: Dong Aisheng

    Dong Aisheng