23 Feb, 2017

40 commits

  • It's pretty common that on some reference design or validation boards,
    one pin could be used by two devices on board, and the pin route is
    controlled by a GPIO. So to assert the pin for given device, not only
    the pinmux controller in SoC needs to be set up properly but also the
    GPIO needs to be pulled up/down.

    The patch adds support of a device tree property "pinctrl-assert-gpios"
    under client device node. It plays pretty much like a board level pin
    multiplexer, and steers the pin route by controlling the GPIOs. When
    client device has the property represent in its node, pinctrl device
    tree mapping function will firstly pull up/down the GPIOs to assert the
    pins for the device at board level.

    [shawn.guo: cherry-pick commit e5a718edab82 from imx_3.10.y]
    Signed-off-by: Shawn Guo

    Shawn Guo
     
  • Flexcan2 on ddr3 arm2 board is conflict with uart2, thus a new dts
    imx6ul-14x14-ddr3-arm2-flexcan2.dts with uart2 disabled is introduced to
    resolve such confliction.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 14d7595a2f1622c72de1bc534cf18b9e828140ea)

    Conflicts:
    arch/arm/boot/dts/Makefile
    arch/arm/boot/dts/imx6ul-ddr3-arm2.dts

    Dong Aisheng
     
  • Add ultra high speed mode pinctrl states to support eMMC HS200.
    HW rework needed that changing both NVCC_SD and NVCC_NAND to 1.8v.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit f0f86b3bcd0ae1b1405f752862bde9745222372d)

    Dong Aisheng
     
  • The eMMC signals are reused from SD1 slot signals on MX6UL ARM2 board.
    Thus a new dts is introduced to avoid such pin confliction.
    Before using this dts, user has to do hw rework to connect eMMC IO
    signals and disconnect SD1 Slot signals.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit e46408ad15bed829e6f254ced16524fcfe99176f)

    Conflicts:
    arch/arm/boot/dts/Makefile
    arch/arm/boot/dts/imx6ul-14x14-ddr3-arm2.dts

    Dong Aisheng
     
  • As part of starting up IBSS, CFG80211 driver needs BSS information to be
    plumbed into it. Hence in DHD we call cfg80211_infrom_bss() and it needs whole
    frame consist of IEs contained in beacon frame. But FW was passing frame buffer
    with some extra bytes preceded and when same is plumbed into CFG80211 it was not
    able to decode the frame and it ignores the frame as result we get such warnings.
    Using latest FW delivered by Broadcom to fix the issue.

    As well as wl_cfg80211.c changes are essential. This change is actually fix certain
    warnings seen when moving between IBSS and BSS network mode.
    Changes must be done in wl_cfg80211_change_virtual_iface() which you can find at
    wl_cfg80211.c and this file is not specific wl tool.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit a6a35af7350b26c1e30cc14aa2ad6e117ab260dc)

    Dong Aisheng
     
  • Should call cfg80211_disconnected() when do rmmod if associcated with AP before..

    root@imx7d_all:~# modprobe -r bcmdhd
    dhd_prot_ioctl : bus is down. we have nothing to do
    dhd_wlfc_deinit():3268, ampdu_hostreorder get failed Err = -1
    dhd_prot_ioctl : bus is down. we have nothing to do
    dhd_wlfc_deinit():3291 failed to enable/disable bdcv2 tlv signaling Err = -1
    CFG80211-ERROR) wl_cfg80211_disconnect : Reason 3
    dhd_prot_ioctl : bus is down. we have nothing to do
    CFG80211-ERROR) wl_cfg80211_disconnect : error (-1)
    ------------[ cut here ]------------
    WARNING: CPU: 1 PID: 1057 at net/wireless/core.c:953 cfg80211_netdev_notifier_call+0x3f4/0x468()
    Modules linked in: bcmdhd(-) evbug
    CPU: 1 PID: 1057 Comm: modprobe Not tainted 3.14.38-02140-g3418ee9 #1074
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (dump_stack+0x7c/0xbc)
    [] (dump_stack) from [] (warn_slowpath_common+0x6c/0x88)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null) from [] (cfg80211_netdev_notifier_call+0x3f4/0x468)
    [] (cfg80211_netdev_notifier_call) from [] (notifier_call_chain+0x44/0x84)
    [] (notifier_call_chain) from [] (raw_notifier_call_chain+0x18/0x20)
    [] (raw_notifier_call_chain) from [] (rollback_registered_many+0x1dc/0x340)
    [] (rollback_registered_many) from [] (rollback_registered+0x28/0x3c)
    [] (rollback_registered) from [] (unregister_netdevice_queue+0x54/0xb0)
    [] (unregister_netdevice_queue) from [] (unregister_netdev+0x18/0x20)
    [] (unregister_netdev) from [] (dhd_detach+0x238/0x474 [bcmdhd])
    [] (dhd_detach [bcmdhd]) from [] (dhdsdio_release+0x40/0x1c0 [bcmdhd])
    [] (dhdsdio_release [bcmdhd]) from [] (dhdsdio_disconnect+0x3c/0x94 [bcmdhd])
    [] (dhdsdio_disconnect [bcmdhd]) from [] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
    [] (bcmsdh_remove [bcmdhd]) from [] (bcmsdh_sdmmc_remove+0x4c/0x64 [bcmdhd])
    [] (bcmsdh_sdmmc_remove [bcmdhd]) from [] (sdio_bus_remove+0x30/0xf8)
    [] (sdio_bus_remove) from [] (__device_release_driver+0x70/0xcc)
    [] (__device_release_driver) from [] (driver_detach+0xac/0xb0)
    [] (driver_detach) from [] (bus_remove_driver+0x4c/0xa0)
    [] (bus_remove_driver) from [] (dhd_module_cleanup+0x2c/0x3c [bcmdhd])
    [] (dhd_module_cleanup [bcmdhd]) from [] (SyS_delete_module+0x11c/0x17c)
    [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x30)
    ---[ end trace 89522c1a1370465d ]---
    dhd_detach(): thread:dhd_watchdog_thread:291 terminated OK
    dhd_dpc_thread: Unexpected up_cnt 0
    dhd_detach(): thread:dhd_dpc:292 terminated OK
    CFG80211-ERROR) wl_event_handler : was terminated
    wl_destroy_event_handler(): thread:wl_event_handler:290 terminated OK
    unregister wifi platform drivers
    wifi_platform_bus_enumerate device present 0
    mmc1: card 0001 removed

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 740bef7011441010f6183662d452304dca7c7adf)

    Dong Aisheng
     
  • CC [M] drivers/net/wireless/bcmdhd/dhd_ip.o
    LD [M] fs/udf/udf.o
    drivers/net/wireless/bcmdhd/dhd_common.c:108:22: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
    DHD_COMPILED " on " __DATE__ " at " __TIME__;
    ^
    drivers/net/wireless/bcmdhd/dhd_common.c:108:38: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
    DHD_COMPILED " on " __DATE__ " at " __TIME__;

    Drop debug version with build date/time.
    The kernel already has this information, and individual drivers
    shouldn't duplicate that. This also eliminates the use of __DATE__ and
    __TIME__, which make the build non-deterministic.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 3f47e9588c8acf5c4cc5079e746bc05e7d5c69ec)

    Dong Aisheng
     
  • Without this, WiFi can not work when re-insmod module because
    the card is not reset in rmmod.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 25ce53802b419f3b2002c5345abee1b85827c688)

    Dong Aisheng
     
  • root@imx7d_all:~# rmmod bcmdhd
    dhd_prot_ioctl : bus is down. we have nothing to do
    dhd_wlfc_deinit():3268, ampdu_hostreorder get failed Err = -1
    dhd_prot_ioctl : bus is down. we have nothing to do
    dhd_wlfc_deinit():3291 failed to enable/disable bdcv2 tlv signaling Err = -1
    dhd_detach(): thread:dhd_watchdog_thread:2d4 terminated OK
    dhd_dpc_thread: Unexpected up_cnt 0
    dhd_detach(): thread:dhd_dpc:2d5 terminated OK
    CFG80211-ERROR) wl_event_handler : was terminated
    wl_destroy_event_handler(): thread:wl_event_handler:2d3 terminated OK
    ------------[ cut here ]------------
    Kernel BUG at 800d12b0 [verbose debug info unavailable]
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    Modules linked in: bcmdhd(-) evbug
    CPU: 0 PID: 755 Comm: rmmod Not tainted 3.14.28-7D_alpha #1
    task: a8a31680 ti: a841a000 task.ti: a841a000
    PC is at kfree+0x17c/0x180
    LR is at wiphy_unregister+0x15c/0x1cc
    pc : [] lr : [] psr: 40070013
    sp : a841be28 ip : 00000000 fp : a901396c
    r10: 7f078dc0 r9 : a9240120 r8 : a9240380
    r7 : a9240000 r6 : a9010000 r5 : ab73af20 r4 : a9240120
    r3 : 00000000 r2 : ab75a000 r1 : 00000000 r0 : 7f079220
    Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 10c53c7d Table: a863406a DAC: 00000015
    Process rmmod (pid: 755, stack limit = 0xa841a238)
    Stack: (0xa841be28 to 0xa841c000)
    be20: 7f079220 a9240120 00000000 a9010000 a9240000 a9240380
    be40: a9240120 7f078dc0 a901396c 806b0cf8 00000000 7f078dc0 a901396c 805962b4
    be60: 7f07cea0 a8433800 a8ae3840 a9240380 a9010000 a9013000 a9240380 7f02b088
    be80: 00000000 00000000 a9010000 a9013000 a9010000 7f07cea0 7f078dc0 7f00f00c
    bea0: 00000001 a850f800 7f078dc0 a865b3c0 00000081 8000e5e4 a841a000 00000000
    bec0: 00000000 7f05588c 7f078dc0 a850f800 00000000 7f056080 7f056044 a865b180
    bee0: a865b340 7f048944 a8fe7800 a865b3c0 7f07acd4 7f04a37c 7f04a330 a8487408
    bf00: a8487400 804baf10 a8487408 7f07acd4 a848743c 803476b4 7f07acd4 a8487408
    bf20: 7f07acd4 80347dc4 7f07acd4 7f07ad38 00000800 803473b4 00000000 7f05f158
    bf40: 7f05f12c 80083be8 00000000 00000000 7f07ad38 00000800 a841bf4c 646d6362
    bf60: 00006468 00000000 8108f030 a8a31680 a8a31a30 00000000 00000000 8004605c
    bf80: a89c4d80 a841a018 8000e5e4 a841bfb0 a841a000 00011330 00000000 7ecc5e1c
    bfa0: 00000002 8000e460 00000000 7ecc5e1c 01b05d3c 00000800 76f26104 00002002
    bfc0: 00000000 7ecc5e1c 00000002 00000081 7ecc5f0a 00000001 01b05d08 00000000
    bfe0: 76eebeb0 7ecc5bfc 00016e3c 76eebebc 60080010 01b05d3c efdff749 faff7bf3
    [] (kfree) from [] (wiphy_unregister+0x15c/0x1cc)
    [] (wiphy_unregister) from [] (wl_free_wdev+0x2c/0xf8 [bcmdhd])
    [] (wl_free_wdev [bcmdhd]) from [] (dhd_detach+0x274/0x430 [bcmdhd])
    [] (dhd_detach [bcmdhd]) from [] (dhdsdio_release+0x40/0x1cc [bcmdhd])
    [] (dhdsdio_release [bcmdhd]) from [] (dhdsdio_disconnect+0x3c/0xa0 [bcmdhd])
    [] (dhdsdio_disconnect [bcmdhd]) from [] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
    [] (bcmsdh_remove [bcmdhd]) from [] (bcmsdh_sdmmc_remove+0x4c/0x64 [bcmdhd])
    [] (bcmsdh_sdmmc_remove [bcmdhd]) from [] (sdio_bus_remove+0x30/0xf8)
    [] (sdio_bus_remove) from [] (__device_release_driver+0x70/0xcc)
    [] (__device_release_driver) from [] (driver_detach+0xac/0xb0)
    [] (driver_detach) from [] (bus_remove_driver+0x4c/0xa0)
    [] (bus_remove_driver) from [] (dhd_module_cleanup+0x2c/0x3c [bcmdhd])
    [] (dhd_module_cleanup [bcmdhd]) from [] (SyS_delete_module+0x11c/0x17c)
    [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x30)
    Code: e1a01005 e1a02006 e8bd4ff8 eafffef1 (e7f001f2)
    ---[ end trace ca749705cd612037 ]---
    Segmentation fault

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 8d019afe680fd7f20e42159daf2da7d9bfc94577)

    Dong Aisheng
     
  • 1. Add dummy regulator in dts which is must required by bcmdhd driver
    2. Workaround to add dummy sdio_reset_comm as suggested by Broadcom guy
    because driver always failed in this function porting from Android kernel,
    root cause unknown.
    3. enable driver dts function, inband irq, built as module
    4. comment out the hard code in wifi_plat_dev_drv_probe which has to parse
    oob irq gpio properties and gpio regulators from device tree even the driver
    does not use it.
    5. warning fix

    Signed-off-by: Dong Aisheng
    (cherry picked from commit fb572304245ab19b79a101c66f0c658a555cc3fe)

    Dong Aisheng
     
  • Add missing file delivered by Broadcom to make driver work on L3.14.y kernel.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit b795547e37c3b68ed019e5d0b9daa3fc6474f623)

    Dong Aisheng
     
  • Add bcmdhd driver into compilation

    Signed-off-by: Dong Aisheng
    (cherry picked from commit ca87be10e248965ed724b2f28e76f78187c22161)

    Dong Aisheng
     
  • It's default driver delivered by Broadcom.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 5595dca69a1135dba8a1fbc9159d00cf31356c1a)

    Dong Aisheng
     
  • Currently the ramp up delay for VDD_SD1 regulator is 1s, the delay
    is added in the following patch:

    commit 558c8cde973b9b2abf9a69e3be5a887d38185da3
    MLK-11277 dts: imx7d-sdb: add ramp up delay for VDD_SD1 regulator

    Here we find this delay will also impact the sd1 resume time cost, and
    1s is too much for the sd1 resume, so we try to reduce the delay time
    of this VDD_SD1 regulator, finally 200ms pass our test.

    This patch change the ramp up delay for VDD_SD1 regulator from 1s to
    200ms.

    Signed-off-by: Haibo Chen
    (cherry picked from commit 16523e1bd8613c38b8182da36fdae99564980e24)

    Haibo Chen
     
  • The SD CLK signal measured by scope shows the signal rise/fall time
    does not meet the spec requirement, need increase the pad driver
    strength to meet the spec.
    The pad setting value is given by the HW team which has been verified
    from scope.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit e4944a51c4bb950a8f13e421eefc000a87350e23)
    (cherry picked from commit f491804bc93ebd15adb3222ff4774d14eb714491)

    Dong Aisheng
     
  • Add flexcan support.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 22f6dd8e62b3a1f0557201b046b8491eedb8a97f)

    Conflicts:
    arch/arm/boot/dts/imx7d-sdb.dts

    Dong Aisheng
     
  • New dts file imx7d-12x12-lpddr3-arm2-flexcan.dts introduced due to pin conflict
    with enet1 and sai1.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • We can observe the following error during system resume.
    dpm_run_callback(): platform_pm_resume+0x0/0x4c returns -110
    PM: Device 2090000.can failed to resume: error -110

    It is caused by the flexcan is in disable state and the clock is disabled
    by default while the CAN is not up. During resume, the calling of
    flexcan_chip_enable will obviously fail due to no clock.

    The issue only happened when CAN device is not up. If CAN is up, clock is there
    and no issue will happen.

    Because the CAN is always in disabled state by default if it's not up.
    We don't have to disable it again during suspend and enable it after resume.
    This patch simply the suspend/resume to only enter/exit disabled mode if CAN
    is up.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit d976d7c9d408c1275075d5870ccf6cb425720434)

    Dong Aisheng
     
  • Original code will always disable flexcan during suspend no matter whether
    wakeup feature is enabled.
    It's caused by merge issue when doing kernel upgrade.

    Fix it by removing that disable code.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 55c8670332973d3184816d3d16c2c3e07681c781)

    Dong Aisheng
     
  • Starting from IMX6, the flexcan stop mode control bits is SoC specific,
    move it out of IP driver and parse it from devicetree.
    It's good from maintain perspective and can avoid adding too many SoC
    specifi bits in driver but with no IP changes when the IMX SoC series
    keep growing.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 97b99b59c9f09d58ea35f3c0cf58665c20f2e292)
    (cherry picked from commit 6355208605715f7cb9ea8c37e29c577785f66898)

    Conflicts:
    arch/arm/boot/dts/imx6qdl.dtsi

    Dong Aisheng
     
  • If wakeup is enabled, enter stop mode, else enter disabled mode.
    Self wake can only work on stop mode.
    For imx6q, the stop request has to be mannually assert on
    IOMUX GPR13[28:29] register, we use syscon to control that bit.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 7f8ef8eeb2bd93d75eb4c970bcaabcfd499d348d)
    (cherry picked from commit 496fef522e515488147cce3adcc7f101bb532805)

    Dong Aisheng
     
  • It's used for transceiver_switch.

    NOTE: it's newly added since it's deleted by upstream before.
    However, the driver is still using it, so have to add it.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 53109634188e672b807a7256afbf10db0d9a6574)

    Dong Aisheng
     
  • Add Murata Type ZP module support for 9x9 evk.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 26e76b8d1fcae367e7a16ba5a4a399a8116f3d5e)

    Dong Aisheng
     
  • enable mqs sound card support in lpsr mode

    Signed-off-by: Zidan Wang

    Zidan Wang
     
  • …rd support in lpsr mode

    enable sai<->wm8958 sound card support in lpsr mode

    Signed-off-by: Zidan Wang <zidan.wang@freescale.com>

    Zidan Wang
     
  • For lpsr mode, the codec will be power down, the register value will be lost,
    so we should store the context at the end of codec suspend, and load the
    registers at the beginning of codec resume.

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

    Zidan Wang
     
  • The 'OR' operation should be '||', so fix it.

    Signed-off-by: Bai Ping

    Bai Ping
     
  • Change the cpufreq default governor to the ondemand governor.

    Signed-off-by: Bai Ping

    Bai Ping
     
  • In order to test the critical trip point funtion, the
    critical trip point temp should be writable from userspace.

    Signed-off-by: Bai Ping

    Bai Ping
     
  • GPC irq domain is child domain of GIC, all of platform
    irqs should be inside GPC domain.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • STOP_MODE_CONFIG field of PMU_MISC0 register are different
    on different i.MX6 SoC, weak2P5 can only be enabled when
    STOP_MODE_CONFIG is clear, need to read STOP_MODE_CONFIG
    setting before enabling weak2P5, so the register field
    must be correct, the definition are as below:

    i.MX6Q/DL: bit[12];
    i.MX6SL: bit[12:11], but only bit[11] is valid, so use bit[11];
    i.MX6SX/UL: bit[11:10].

    Signed-off-by: Anson Huang

    Anson Huang
     
  • To achieve lower power number in low power idle, on the boards
    which has higher vddhigh_in than vddsnvs_in, need to dis-connect
    vddhigh_in and vddsnvs_in internally to make vddhigh_in's power
    low enough to meet the design target.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Remove the non-existed dts file from Makefile.

    Signed-off-by: Fugang Duan

    Conflicts:
    arch/arm/boot/dts/Makefile

    Fugang Duan
     
  • The patch re-enable Murata BT as commit 117ba2ebb3fd define.
    Since commit:76946e805b5d don't set murata bt/wifi as default in dtb and
    add extra dts file to support Murata BT/WIFI, to align with this commit,
    move BT support in the extra dts file.

    Signed-off-by: Fugang Duan

    Conflicts:
    arch/arm/boot/dts/imx6q-sabresd-uart.dts

    Fugang Duan
     
  • Add Murata Type ZP (BCM4339) module support on below platforms:
    - i.MX6Q/DL/QP SabreSD(SD2 slot) + Murata adapter V2.0
    - i.MX6SX SDB (SD3+SD2 slot) + Murata adapter V1.0 & SD EXT card
    - i.MX6SL EVK (SD1+SD3 slot) + Murata adapter V1.0 & SD EXT card
    - i.MX6UL SDB RevC (SD1 slot) + Murata adapter V2.0

    Note: MX6Q/DL/QP SabreSD board requires HW rework.
    Please refer to rework guide specified in schematic.

    Signed-off-by: Dong Aisheng

    Conflicts:
    arch/arm/boot/dts/Makefile

    Dong Aisheng
     
  • The old driver strength of uSDHC clk pad of two slot can not work well
    on the new imx6qp sabresd board because we can easily meet CRC errors
    due to signal quality issue, especially with a SDIO card.
    Enhance the driver strength of the CLK pad from 0x10059 to 0x10071
    to avoid such issue

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 59a54039528cc2a7df30ee62e37bc47487c163e4)

    Dong Aisheng
     
  • DOVDD ( GEN_1V8 ) is supplied by SW4 on i.MX6dqp-sabresd board
    This patch corrects it.

    Signed-off-by: Robby Cai
    (cherry picked from commit 50f1b6782d3ee8644129f98caff12c183411230c)

    Robby Cai
     
  • DOVDD ( GEN_1V8 ) is supplied by SW4 on i.MX6dqp-sabresd board
    This patch corrects it.

    Signed-off-by: Robby Cai

    Robby Cai
     
  • enable pcie support on imx6qp sd board

    Signed-off-by: Richard Zhu

    Richard Zhu
     
  • This patch enables the prefetch feature for the four mxcfbs.

    Signed-off-by: Liu Ying

    Liu Ying