08 Jun, 2017

40 commits

  • Initialize ret to avoid an infinite loop in mmc_blk_alloc_req which may
    happen if the uninitialize ret value is -EAGAIN.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • This reverts commit 322503a15740bd9383bb4ed452e5dd5a40598170.
    The driver for clk-pllv3 has moved from arch/arm/mach-imx/clk-pllv3.c
    to drivers/clk/imx/clk-pllv3.c since the orginal change was made,
    so the revert is done to the new file instead.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • The nand_usdhc_root_clk and ahb_root_clk clocks need to be initialized
    earlier so the board can boot, since there are other clocks that
    depend on them.

    This is a leftover from rebasing patch a06eafc305c4c2db6dfc3de372f667af0135fa9e
    (MLK-11349-3 ARM: imx: update clk driver for imx7d), that has the clocks
    initialized in the correct order.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • Use the new ASoC hdmi-codec infrastructure.

    Signed-off-by: Mihai Serban

    Mihai Serban
     
  • Add FSL LPUART earlycon support.

    Signed-off-by: Anson Huang
    Signed-off-by: Robin Gong
    Signed-off-by: Ranjani Vaidyanathan
    Signed-off-by: Fugang Duan

    Anson Huang
     
  • arch/arm/mach-imx/time.c has been moved to a new location upstream but
    during the rebase process from 4.1 to 4.9 it was reintroduced in
    error.

    This patch removes the old file and updates the new file with changes
    from commit 67000df ("MLK-13303-7 ARM: imx: add gpt timer support for
    i.mx6sll").

    Note that commit 4c4769ba1cb5c0f1 ("MLK-12627-01 ARM: imx: add
    i.mx6ull msl support") does not introduce changes to the new
    implementation since imx6ull DTSs use "fsl,imx6ul-gpt" for compatible
    properties.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Change i.MX6SL CSI module compatible string from "fsl,imx6s-csi"
    to "fsl,imx6sl-csi".

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Except i.MX6SL, all other i.MX6S serial SOC CSI module will been reset
    to recovery from RX FIFO overflow error.
    So add xx_fifo_rst flag in driver to distinguish i.MX6SL and other
    i.MX6S SOC.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Also, enable the mxcfb* entries.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • In bypass mode, the anatop digital regulators do not have any minimum
    dropout value (the input voltage is equal to the output voltage according
    to documentation).

    Having a min dropout value of 125mV will lead to an increased voltage
    for PMIC supplies.

    Only set minimum dropout value for ldo enabled mode.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • In cyclic/loop mode, DMA call shouldn't touch dma cookie, since only one
    time need to be submitted, otherwise, below kernel bug will be triggered:

    Playing WAVE '/unit_tests/audio8k16S.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
    ------------[ cut here ]------------
    Kernel BUG at 8043d030 [verbose debug info unavailable]
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    Modules linked in: ov5642_camera mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc ov5640_camera_mipi_int ov5640_camera_int v4l2_int_device mxc_dcic
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.5-01681-g6dbd27b #7
    Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
    task: 80f06600 task.stack: 80f00000
    PC is at mxc_sdma_handle_channel_normal+0xc0/0xd8
    LR is at tasklet_action+0x94/0x14c

    Signed-off-by: Robin Gong
    Signed-off-by: Mihai Serban

    Robin Gong
     
  • Upstream commit bf3251e ("ARM: dts: imx6ul-14x14-evk: Add audio
    support") switched to using the simple sound card driver.

    This does not seem to work anymore on vanilla 4.9.5 (aplay gets stuck
    with no sound output). Adding the rest of our out internal patches
    from 4.1 causes even greater issues, the card does not even enumerate.

    While we eventually want to switch to using simple sound card, lets
    revert to using the fsl,imx-audio-wm8960 driver for the time being,
    while investigating what it takes to switch to the simple sound card
    driver.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream is using "spba" clock name in the various sound drivers as
    opposed to our internal tree where we have used "dma". Update all of
    the dtsi files to use the new name.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream is using "spba" clock name in the various sound drivers as
    opposed to our internal tree where we have used "dma". Update all of
    the dtsi files to use the new name.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream is using "spba" clock name in the various sound drivers as
    opposed to our internal tree where we have used "dma". Update all of
    the dtsi files to use the new name.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream is using "spba" clock name in the various sound drivers as
    opposed to our internal tree where we have used "dma". Update all of
    the dtsi files to use the new name.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream is using "spba" clock name in the various sound drivers as
    opposed to our internal tree where we have used "dma". Update all of
    the dtsi files to use the new name.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • They belong in the usdhc1 group, where they were already present and
    which causes the usdhc1 device to fail probe:

    [ 1.484978] imx6ul-pinctrl 20e0000.iomuxc: pin MX6UL_PAD_UART1_RTS_B already requested by 20e0000.iomuxc; cannot claim for 2190000.usdhc
    [ 1.496166] imx6ul-pinctrl 20e0000.iomuxc: pin-36 (2190000.usdhc) status -22
    [ 1.501959] imx6ul-pinctrl 20e0000.iomuxc: could not request pin 36 (MX6UL_PAD_UART1_RTS_B) from group usdhc1grp on device 20e0000.iomuxc
    [ 1.513186] sdhci-esdhc-imx 2190000.usdhc: Error applying setting, reverse things back

    Note that out internal commit cf65c8d ("MLK-11300-02 ARM: dts: imx:
    add imx6ul board dts support") is similar with the upstream commit
    a5fcccb ("ARM: dts: imx: add imx6ul and imx6ul evk board support") but
    since it has more nodes defined we had to integrate parts of it
    nonetheless.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream commit 24821c4 ("crypto: caam - Enable and disable clocks on
    Freescale i.MX platforms") added the imx caam clock support with
    different names then what we used internally. Update the dts names to
    sync with upstream.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Upstream commit 24821c4 ("crypto: caam - Enable and disable clocks on
    Freescale i.MX platforms") added the imx caam clock support with
    different names then what we used internally. Update the dts names to
    sync with upstream.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • This patches adds two new device nodes and carves out space used by
    the low power mode code.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Also, enable the mxcfb* entries.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • The pu regulator request will return -EPROBE_DEFER if it has a supply
    from PMIC and this supply is not yet registered. This does not represent
    an error since the driver will call probe again later, so only print a
    warning message in this case.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • The device may fail to reset with EPROBE_DEFER because of the
    initialization order between the mipi and the mipi gpio reset
    drivers. This is not an error, since the probe will be later retried
    and eventually will succeed.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Regulator supplies for cpu0 are already defined in imx6q.dtsi/imx6dl.dtsi
    as reg_arm, reg_pu, reg_soc. The same supplies are also defined in
    imx6qdl-sabresd.dtsi (by connecting the CPU directly to PMIC and skipping
    the SoC LDOs).

    Keep the correct supplies from imx6q.dtsi/imx6dl.dtsi and remove the duplicate
    ones.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • The following errors are shown at boot:
    vddarm: bypassed regulator has no supply!
    vddarm: failed to get the current voltage(-517)
    anatop_regulator 20c8000.anatop:regulator-vddcore: failed to register vddarm
    vddsoc: bypassed regulator has no supply!
    vddsoc: failed to get the current voltage(-517)
    anatop_regulator 20c8000.anatop:regulator-vddsoc: failed to register vddsoc
    vddpu: bypassed regulator has no supply!

    The SoC internal regulators come from the Freescale PFUZE100 PMIC:
    - SW1AB is connected through VDDARM_IN to LDO_ARM (vddarm)
    - SW1C is connected through VDDSOC_IN to LDO_PU (vddpu) and LDO_SOC (vddsoc)

    Add this relationship to the device tree so these regulators have a supply
    specified and can be registered properly.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • Enabling the vddpu regulator at boot has no efect, since the enable call in
    anatop will set it to power gated off. This leads to a hang in the VPU driver
    if cpufreq does not get initialized before.

    The anatop on i.MX6 requires that vddpu uses the same voltage level as vddsoc.
    When it is initialized, vddsoc will have a default selector of 0
    (Power gated off), but will use LDO_FET_FULL_ON since it is in bypass mode.
    However, the local value saved for the vddsoc selector will remain 0.
    When vddpu is enabled, it will use the local selector 0 from vddsoc and
    will remain disabled.

    Take into consideration the bypass mode when using the vddsoc selector for
    vddpu.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • An anatop regulator will return -EPROBE_DEFER when trying to register,
    if it has a supply from PMIC and this supply is not yet registered.
    This does not represent an error since the driver will call probe again later,
    so skip the error message in this case.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • If there are any errors in getting the cpu0 regulators, the driver returns
    -ENOENT. In case the regulators are not yet available, the devm_regulator_get
    calls will return -EPROBE_DEFER, so that the driver can be probed later.
    If we return -ENOENT, the driver will fail its initialization and will
    not try to probe again (when the regulators become available).

    Return the actual error received from regulator_get in probe. Print a
    differentiated message in case we need to probe the device later and
    in case we actually failed. Also add a message to inform when the
    driver has been successfully registered.

    Signed-off-by: Irina Tirdea

    Irina Tirdea
     
  • Enable mxc ion driver. ion driver can allocate physical continuous
    memory and can convert to physical address from DMA FD and virtual
    address if the memory is physical continuous.

    Signed-off-by: Song Bing bing.song@nxp.com

    Song Bing
     
  • This patch fixes crackling sound reported when running autorun-asrc.sh
    and it is a backport of 85f57752b3 ("dmaengine: imx-sdma - correct
    the dma transfer residue calculation") from v10-rc6.

    Original commit message:

    From: Nandor Han
    Date: Tue, 11 Oct 2016 14:13:41 +0300
    Subject: [PATCH] dmaengine: imx-sdma - correct the dma transfer residue
    calculation

    The residue calculation was taking in consideration that dma
    transaction status will be always retrieved in the dma callback
    used to inform that dma transfer is complete. However this is not
    the case for all subsystems that use dma. Some subsystems use a
    timer to check the dma status periodically.

    Therefore the calculation was updated and residue is calculated
    accordingly by a) update the residue calculation taking in
    consideration the last used buffer index by using *buf_ptail* variable
    and b) chn_real_count (number of bytes transferred) is initialized to
    zero, when dma channel is created, to avoid using an uninitialized
    value in residue calculation when dma status is checked without
    waiting dma complete event.

    Signed-off-by: Nandor Han
    Acked-by: Peter Senna Tschudin
    Tested-by: Peter Senna Tschudin
    Tested-by: Marek Vasut
    Signed-off-by: Vinod Koul
    Signed-off-by: Daniel Baluta

    Nandor Han
     
  • This is a missing piece of 99a978fbde34227a2ab2a3595446b757b5d7c3ab from
    linux-imx/imx_4.1.y.

    This fixes a hang on imx6sl when attempting to decrease cpufreq
    during late boot. This was found through tracing and comparing code with
    the imx_4.1.y branch

    Leonard Crestez
     
  • Should probably squash into commit 4349481 ("MLK-13303-2 ARM: dts:
    imx6sll: add dtsi file")

    Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • Should probably squash into commit d1f2e882c28 ("MLK-12627-03 ARM:
    dts: imx: Add dtsi file for imx6ull").

    Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • This prevents unwanted interrupts coming in early suspend.

    Loosely based on 81e8e7d91d81351d9fea4ad7c289b122706640fd from imx_4.1.y:

    MLK-11382 tty: serial: imx: disable irq after suspend

    Disable rx irq after suspend to avoid interrupt coming in early
    resume.

    Signed-off-by: Fugang Duan

    Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • Since commit ba3002045f8022f3a7e88511c4ebd9876a467ac8 the v4l2 core now
    sets the v4l2_fmtdesc->description string based on numeric pixelformat
    so that drivers no longer have to contain description strings.

    This happens even if the driver already filled the description and
    prints an ugly warning if the pixelformat is unknown. Reduce this to
    pr_debug if the driver provided a description string.

    Fixes https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsw-jira.freescale.net%2Fbrowse%2FMLK-13797&data=01%7C01%7Coctavian.purdila%40nxp.com%7C739251a045b045cfee0f08d4414a2972%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=cUsGBObv2wvVfE59KgLujwhlBeRdpR501GplYrYqVrk%3D&reserved=0

    Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • The Vivante GPU driver directly accesses userspace memory (coupled
    with access_ok checks before) instead of using get/put_user or
    copy_to/from_user. This triggers page domain faults such as the one
    bellow. While the correct fix would be to fix the driver, this would
    cause divergence between our version and Vivante's so until they fix
    the driver (if ever) we disable CPU_SW_DOMAIN_PA as a workaround which
    introduced this extra checks.

    Note: we could have make CPU_SW_DOMAIN_PAN depend on !MXC_GPU_VIV but
    there are cases where the vivante driver is built out of tree and
    hence we must forcefully disabled it so that out the tree built
    drivers don't run into this issue.

    Unhandled fault: page domain fault (0x81b) at 0x00a76368
    pgd = a8d60000
    [00a76368] *pgd=38eb7831, *pte=3b13175f, *ppte=3b131c7f
    Internal error: : 81b 1 PREEMPT SMP ARM
    Modules linked in: ov5642_camera mxc_v4l2_capture ipu_bg_overlay_sdc
    ov5640_camera_mipi_int ipu_still ipu_prp_enc ipu_csi_enc
    ov5640_camera_int ipu_fg_overlay_sdc v4l2_int_device mxc_dcic
    CPU: 3 PID: 2153 Comm: tiger Tainted: G W 4.9.4-01661-g9190652 #16
    Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
    task: a8ac3700 task.stack: a8db4000
    PC is at _RemoveRecordFromProcesDB+0x154/0x17c
    LR is at gckOS_ReleaseMutex+0x14/0x24
    pc : [] lr : [] psr: 20030013
    sp : a8db5ba8 ip : 00000000 fp : a83c5aa8
    r10: a83c6000 r9 : 00000000 r8 : 00a7635c
    r7 : 00000006 r6 : a889da00 r5 : a83c6000 r4 : 00a7636c
    r3 : 00000002 r2 : 00000001 r1 : 00000000 r0 : 00000000
    Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    Control: 10c53c7d Table: 38d6004a DAC: 00000051
    vddpu: bypassed regulator has no supply!
    vddpu: bypassed regulator has no supply!
    Process tiger (pid: 2153, stack limit = 0xa8db4210)
    Stack: (0xa8db5ba8 to 0xa8db6000)
    5ba0: 00000869 00000018 00000006 0000000a a85e1580 00000000
    5bc0: 00000008 a8db5c3c c104e024 a83c6000 a8db5ca0 8072cbec 00000187 00000000
    5be0: 00000000 c104e004 00000001 ac801d48 00000002 00000001 3c801d40 00000000
    5c00: 3c800280 00a78358 4d454d56 00000000 00000000 00000010 00000001 a91d9dc0
    5c20: a83c6f40 0000001a 00000869 a8db5c3c 00000869 00000001 00000869 00a76374
    5c40: 00000018 3c801d40 00000058 00000000 00000000 00000002 6da83d90 00000000
    5c60: 000001fb 00000000 00000000 00000002 00000a00 00000a78 00a75698 00a75c44
    5c80: 00a75698 ffffffff ffffffff 6da82000 6da82040 00000869 000000de 00000000
    5ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    5cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    5ce0: 00a76344 00a76408 0000000c 000000a4 a868e02c a8db5d78 00000000 a889da00
    5d00: 00000001 00000005 a8db4000 a8bf9180 00000000 8072aba0 a8db5ca0 00000000
    5d20: 00000000 80f02d00 00000869 00000000 00000000 00000000 00000005 a8db7200
    5d40: a810e000 00000051 00007530 8070647c 00000000 a803cb80 7e943848 00000000
    5d60: 00000190 00000000 7e943848 00000000 00000190 00000000 00000013 00000003
    5d80: 00000000 009f64e0 00000000 76e6f6a8 7e943868 00000190 00000000 00000003
    5da0: 00a75640 00000000 00a78358 00000000 00000002 76d7e858 00a76294 00000000
    5dc0: 00000001 000000d9 7e9438e8 9ddc4ccf 04eee266 76fc3cf0 76d7ab38 6a0e53e7
    5de0: 0350729f 76d7e968 76ec14de 76ec0ba8 76fc3cf0 76fb1dac 7e943958 76fc4884
    5e00: 76fb05f0 76fc4000 aaaaaaab 76fb9728 00000000 0000000d 00000000 00000000
    5e20: 7e943948 6a0e53e7 76fba460 00000000 7e943958 76ec14de 7e943960 7e9439cc
    5e40: 7e9439b4 76f9e494 7e943960 76fc4ab4 00000007 00000000 00000005 00000000
    5e60: 00000001 76fba2a8 76b6e828 00000000 76fba460 76fba2a8 ffffffff 00000000
    5e80: 76fba460 76fba2a8 ffffffff 00016040 76d7e858 76fba7f8 00a76208 00000008
    5ea0: 00000018 7e9439d8 00a7634c 76db1130 7e94398c 009f54c8 00a76344 00a763d4
    5ec0: 00000002 76ec0000 00064554 76fb8870 00000000 76b8a000 00000001 76fc4000
    5ee0: 00000000 76fa37ac 00000000 009f54c8 00000005 009f54c8 7e943a04 00000000
    5f00: 00000000 76e95428 7e943800 a865d108 a8bf9180 8020ee90 00000100 80131cc8
    5f20: 00000002 00000001 a8db5f20 80f86340 00000000 00000000 763ac340 0000001c
    5f40: a8ccd540 00000000 a82bd290 00000002 a8ccd548 00000000 7e943a3c 801fe010
    5f60: 00000000 00000000 a8bf9180 a8bf9181 7e943800 a8bf9180 00007530 00000005
    5f80: a8db4000 00000000 00000000 8020f74c 00002710 00007530 76e953b0 00000036
    5fa0: 80107a04 80107840 00002710 00007530 00000005 00007530 7e943800 009f5228
    5fc0: 00002710 00007530 76e953b0 00000036 00a78358 00000000 76fc4000 00000000
    5fe0: 76e8541c 7e9437ec 76e6e108 76b1b2bc 20030010 00000005 00000000 00000000
    [] (_RemoveRecordFromProcesDB) from [] (gckVGCOMMAND_Commit+0x774/0x954)
    [] (gckVGCOMMAND_Commit) from [] (gckVGKERNEL_Dispatch+0x33c/0x4d0)
    [] (gckVGKERNEL_Dispatch) from [] (drv_ioctl+0x11c/0x29c)
    [] (drv_ioctl) from [] (do_vfs_ioctl+0x98/0x920)
    [] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
    [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
    Code: e2844010 e59d200c ebffad92 e3a01000 (e5041004)

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • This reverts commit e0884948a48013bb2097f3e61c4f2122b22f6eb1.

    The internal fbdev driver does not use the DRM infrastructure hence we
    can't use the DRM simple panel driver, we have to stich with display
    timings from device tree.

    Signed-off-by: Octavian Purdila

    Octavian Purdila
     
  • Add 'vdev-nums' to imply how many rpmsg instances used in kernel. If
    it beyond the 5, please enlarge the 'MAX_VDEV_NUMS' in imx_rpmsg.c

    Signed-off-by: Robin Gong
    (cherry picked from commit 0cbc0fdc4cce2c292aded56619d1001f7c936a6f)

    Robin Gong