Commit Graph

641502 Commits

Author SHA1 Message Date
90dacd4050 MLK-14989: ASoC: fsl_rpmsg_i2s: enable pm_qos for audio
with "echo 1 > /sys/class/graphics/fb0/blank", and there is no
usb connected on board, the system may enter low power mode,
then audio playback will be failed. use pm_qos to prevent A7
core enter low power mode during audio playback and recording.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2017-10-05 14:50:51 +03:00
fbafe64f62 MLK-14874 ARM: imx7d: Ensure ARM clock only disabled if cpus in same state
GPC will stop ARM clock if both CPUs are in idle and CPU_CLK_ON_LPM is
set in GPC_LPCR_A7_BSC. Make sure that doesn't happen when cpu1 enters
state2 and cpu0 enters state0 because the default arm WFI state is not
marked with CPUIDLE_FLAG_TIMER_STOP and it can result in arch_sys_timer
being stopped unexpectedly.

It is possible to reproduce incorrect behavior by explicitly disabling
other idle states for cpu0/cpu1 and timing how much sleep calls take on
cpu0. Ocassionaly something like "sleep 1" will take 3-4 seconds to
complete.

Make sure that both CPUs are in the same idle state before entering
WAIT.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2017-10-05 14:50:51 +03:00
c3085f0fd9 ARM64: DMA: Export dma operation APIs for arm64 platform
Some DMA operation APIs are not exported, so when load driver as module,
there will error saying some APIs can not be found.
This patch exported these DMA related APIs.

Signed-off-by: Shawn Xiao <b49994@freescale.com>
2017-10-05 14:50:50 +03:00
086b5d4a27 MLK-14980 tty: serial: fsl_lpuart: remove unnecessary .async_tx_ack()
lpuart only use NXP/FSL eDMA dmaengine in i.MX/Vybrid/LS1021a platform,
and eDMA driver don't reuse descriptor then no need to check the
flag DMA_CTRL_ACK. And current eDMA driver use virt chan mechanism and
free tx_descriptor memory after .callback(), but .lpuart_timer_func()
first to terminate the chans that free the tx_descriptor memory, then
access the tx->flags, which cause kmem_cache_alloc() failed to allocate
the freed memory. So remove the unnecessary .async_tx_ack().

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2017-10-05 14:50:50 +03:00
b5673fd744 MLK-14978 irqchip: irqsteer: add NXP imx8 irq steer controller support
The IrqSteer module redirects/steers the incoming interrupts to output
interrupts of a selected/designated channel as specified by a set of
configuration registers.

NXP i.MX8x chips integrate IrqSteer controller for some DSC to share irq
line for all modules in the subsystem which can reduce the IRQ lines
connected to the parent interrupt controller GIC, so IrqSteer irqchip
acts as the second irq domain in the system.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2017-10-05 14:50:49 +03:00
e8e524156e PCI: imx6: Allow probe deferral by reset GPIO
Some designs implement reset GPIO via a GPIO expander connected to a
peripheral bus.  One such example would be i.MX7 Sabre board where said
GPIO is provided by SPI shift register connected to a bitbanged SPI bus.
To support such designs, allow reset GPIO request to defer probing of the
driver.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Cc: yurovsky@gmail.com
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Dong Aisheng <dongas86@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
(cherry picked from commit bde4a5a00e)
2017-10-05 14:50:49 +03:00
d4dc329153 MLK-14957 clk: imx8qm/qxp: delay the clk driver initialization
Using CLK_OF_DECLARE will register clks at very early stage
that AP-SC communication still not ready.

MU driver is registered by early_initcall, so using core_initcall
to delay the registeration of clk driver is ok.

Move channel open function into probe to avoid core_init sequence
not in our expected order. If MU not ready, return defer probe
for clk driver.

Later when we switch to use interrupt driver AP-SC communication,
we could also return defer probe in clk probe function to wait
until AP-SC communication ready.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-10-05 14:50:48 +03:00
e0e88f4f98 MLK-14963 PXP: enable pxp interrupt after soft reset
After soft reset, the irq register value will be zero, so we need set it to enable
all pxp interrupts.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
2017-10-05 14:50:48 +03:00
5cf350a8c6 MLK-14977: ARM: dts: imx7: Use IMX7D_GPT_3M_CLK for GPT1
On most imx SOCs GPT1 takes it's clock from the oscillater because
otherwise it might get confusing when bus frequency is decreased.

Right now imx7 is an exception because imx7s.dtsi comes from upstream
rather than a port of imx_4.1.y.

On the imx_4.1.y branch imx7 uses GPT_3M as well, adopt that approach.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2017-10-05 14:50:47 +03:00
9e0b015845 MLK-14960-3: ARM: dts: imx6: remove 'fsl,wdog-reset'
Remove usless 'fsl,wdog-reset' property in dts on v4.9

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2017-10-05 14:50:46 +03:00
bc5afd9f1b MLK-14960-2: ARM: dts: imx6/imx7: correct to "fsl,ext-reset-output"
align watchdog external reset output property with community
instead of "fsl,wdog_b".

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2017-10-05 14:50:45 +03:00
be7d05a2ab MLK-14960-1: watchdog: imx2_wdt: remove wdog_b
ext_reset used instead of wdog_b on v4.9, no need wdog_b anymore.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2017-10-05 14:50:44 +03:00
97aefdca6c MLK-14975-2 ARM64: dts: freescale: imx8qxp: increase DDR space for M4
M4 has use case of video and need more DDR space
for video buffer, reserve more DDR space for it.

0x80000000 - 0x800fffff: ARM Trusted Firmware;
0x80100000 - 0x87ffffff: M4/RPMSG;

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:43 +03:00
beaf8f54ab MLK-14975-1 ARM64: dts: freescale: imx8qm: increase DDR space for M4
M4 has use case of video and need more DDR space
for video buffer, reserve more DDR space for it.

0x80000000 - 0x800fffff: ARM Trusted Firmware;
0x80100000 - 0x87ffffff: M4/RPMSG;

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:43 +03:00
c7b29f5daa MLK-14785 CAAM: Fix gcm.c to work correctly with CAAM
CAAM uses DMA to transfer data to and from memory, if
DMA and CPU accessed data share the same cacheline cache
pollution will occur. Marking the result as cacheline aligned
moves it to a separate cache line.

Signed-off-by: Radu Solea <radu.solea@nxp.com>
2017-10-05 14:50:42 +03:00
d47c175bee MLK-14976: dma: virt-dma: free description after callback
Some drivers may access dma_async_tx_descriptor in callback such as
tty/serial/fsl_lpuart.c, but the description has already been freed
before callback, memory corrupt here. Move the free description
behind of callback.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2017-10-05 14:50:41 +03:00
70a6c19e7b MLK-14973 arm64: dts: imx8qm: add DMA subsystem UART ports and DMA chans
Add DMA subsystem UART ports and related DMA channels for i.MX8QM
lpddr4 arm2 board.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2017-10-05 14:50:40 +03:00
fd96fc6430 MLK-14947-6 arm64: defconfig: enable chipidea controller driver and mxs phy driver
Enable chipidea usb controller driver and mxs usb phy driver for imx8.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2017-10-05 14:50:39 +03:00
90e1c89eae MLK-14947-5 chipidea: imx: add usb vbus power polarity setting
If the vbus is controlled by ehci port power bit, we need set power
polarity of vbus enable signal according to the vbus power supply
chip on board.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2017-10-05 14:50:38 +03:00
0057b888e8 MLK-14947-4 ARM: dts: set usb1 vbus power polarity for imx8qm arm2
Set the OTG1 vbus power polarity to be active high on
fsl-imx8qm-lpddr4-arm2.dts.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2017-10-05 14:50:37 +03:00
917a4d7a21 MLK-14947-3 usb: doc: chipidea: imx: add power-polarity-active-high property
USB host vbus control can be via port power(PP) bit of ehci, there
is a polarity setting in controller register for this signal, if
power supply chip use active high, add this property.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2017-10-05 14:50:36 +03:00
a9be675fbe MLK-14947-2 usb: phy: add mxs phy driver dependency for ARM64
Add mxs phy driver dependency on ARCH_MXC_ARM64.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2017-10-05 14:50:35 +03:00
d78859e3c5 MLK-14947-1 gpc: imx: empty imx_gpc_mf_request_on if imx gpc is not used
Empty imx_gpc_mf_request_on() if imx gpc is not available to pass compile
on i.mx8x.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2017-10-05 14:50:34 +03:00
f64436c83a usb: hcd: use correct device pointer for dma ops
commit a8c06e407e ("usb: separate out sysdev pointer from
usb_bus") converted to use hcd->self.sysdev for DMA
operations instead of hcd->self.controller but forgot to do
it for one instance.

This gets caught when DMA debugging is enabled since dma map
and unmap end up using different device pointers.

Fix it.

Fixes: a8c06e407e ("usb: separate out sysdev pointer from usb_bus")
Reported-by: Carlos Hernandez <ceh@ti.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bde654a55a)
2017-10-05 14:50:33 +03:00
9033d5f7af usb: ehci: use bus->sysdev for DMA configuration
Set the dma for ehci from sysdev. The sysdev is pointing to device that
is known to the system firmware or hardware.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8b373ffc79)
2017-10-05 14:50:33 +03:00
dbf2b53492 usb: xhci: use bus->sysdev for DMA configuration
For xhci-hcd platform device, all the DMA parameters are not
configured properly, notably dma ops for dwc3 devices. So, set
the dma for xhci from sysdev. sysdev is pointing to device that
is known to the system firmware or hardware.

Cc: Baolin Wang <baolin.wang@linaro.org>

Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Tested-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4c39d4b949)
2017-10-05 14:50:32 +03:00
76b104dc41 usb: chipidea: use bus->sysdev for DMA configuration
Set the dma for chipidea from sysdev. This is inherited from its
parent node. Also, do not set dma mask for child as it is not required
now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit aeb78cda51)
2017-10-05 14:50:31 +03:00
a208d9ae43 usb: separate out sysdev pointer from usb_bus
For xhci-hcd platform device, all the DMA parameters are not
configured properly, notably dma ops for dwc3 devices.

The idea here is that you pass in the parent of_node along with
the child device pointer, so it would behave exactly like the
parent already does. The difference is that it also handles all
the other attributes besides the mask.

sysdev will represent the physical device, as seen from firmware
or bus.Splitting the usb_bus->controller field into the
Linux-internal device (used for the sysfs hierarchy, for printks
and for power management) and a new pointer (used for DMA,
DT enumeration and phy lookup) probably covers all that we really
need.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Tested-by: Baolin Wang <baolin.wang@linaro.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Tested-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sinjan Kumar <sinjank@codeaurora.org>
Cc: David Fisher <david.fisher1@synopsys.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Thang Q. Nguyen" <tqnguyen@apm.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Jon Masters <jcm@redhat.com>
Cc: Dann Frazier <dann.frazier@canonical.com>
Cc: Peter Chen <peter.chen@nxp.com>
Cc: Leo Li <pku.leo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a8c06e407e)
2017-10-05 14:50:30 +03:00
1882556c57 MLK-14935: ASoC: fsl_sai: Fix mixing initialization data with actual audio samples
When starting a playback the initialization data used to reduce underruns
was send to the transmit data register after the DMA requests were enabled.
This patch moves the initialization phase before enabling the DMA so the
data is transmitted in correct order.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
2017-10-05 14:50:29 +03:00
937411b1d7 MLK-14955-2 arm64: defconfig: remove COMPILE_TEST
Auto Enable LOCALVERSION_AUTO
so show git commit hash value in boot log

Linux version 4.9.11-02242-gf4b0aff-dirty

Signed-off-by: Frank Li <Frank.Li@nxp.com>
2017-10-05 14:50:28 +03:00
648df06d42 MLK-14955-1 imx8: Added MXC_ARM64 into dependent
Otherwise there are warning when remove COMPILE_TEST

Signed-off-by: Frank Li <Frank.Li@nxp.com>
2017-10-05 14:50:27 +03:00
160e2d28db MLK-14778: ASoC: fsl: imx-cs42888: Improve support for odd number of channels
For samples with more than 2 and odd number of channels the I2S mode
does not work correctly. In I2S mode we are required to activate an even
number of channels (possibly on multiple datalines) and thus configure
the BCLK for even channels. In this case samples with odd (smaller) number
of channels are played faster and the sound is distorted.

To fix this behavior we can enable TDM mode for the special cases of
samples with 3, 5 or 7 channels. But even TDM has some restrictions that
prevent us from having full support for the special cases:
1. TDM is not supported by codec in master mode so 3, 5 and 7 channels
usage is denied.
2. In codec slave mode TDM works only with 8 slots and slot width of 32
bits. For an often used MCLK frequency of 24MHz and the above restrictions
the maximum sample rate is limited to 48KHz = 24576000/(2*8*32).
The 2 denominator is required by ESAI BCLK divisors.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
2017-10-05 14:50:26 +03:00
c40a68f27a MLK-14967-2 ARM64: dts: freescale: imx8qxp: reserve DDR for M4
Reserve first 4M memory for below usage:

0x80000000 - 0x800fffff: ARM Trusted Firmware;
0x80100000 - 0x803fffff: M4/RPMSG;

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:26 +03:00
08e42f6623 MLK-14967-1 ARM64: dts: freescale: imx8qm: reserve DDR space for M4
Reserve first 4M memory for below usage:

0x80000000 - 0x800fffff: ARM Trusted Firmware;
0x80100000 - 0x803fffff: M4/RPMSG;

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:25 +03:00
23280ef062 MLK-14966-6 mxc: Kconfig: improve build dependency
Use ARCH_MXC_ARM64 instead of ARCH_FSL_IMX8QM
to improve MXC build dependency.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:24 +03:00
bde061c9ef MLK-14966-5 mmc: imx: add ARCH_MXC_ARM64 into build dependency
Add ARCH_MXC_ARM64 for i.MX mmc driver to support
ARM64 platforms.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:23 +03:00
f7f8d71aae MLK-14966-4 gpio: imx: add build dependency
Add build dependency for i.MX gpio driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:22 +03:00
89a2a1148c MLK-14966-3 clk: makefile: use ARCH_MXC_ARM64 for imx dependency
Use ARCH_MXC_ARM64 instead of ARCH_FSL_IMX8QM for i.MX
ARM64 platforms build dependency.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:21 +03:00
6c8ae054b5 MLK-14966-2 ARM64: configs: select ARCH_MXC_ARM64 by default
Enable ARCH_MXC_ARM64 by default for i.MX ARM64 platforms.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:20 +03:00
758592e89c MLK-14966-1 soc: imx: add ARCH_MXC_ARM64 menuconfig
Add ARCH_MXC_ARM64 for i.MX ARM64 platforms, this
can improve the modules dependency logic.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2017-10-05 14:50:19 +03:00
135d478ec5 MLK-14952 arm64: dts: imx8qm/qxp: add enet support
Add enet support for i.MX8QM and i.MX8QXP lpddr4 arm2 board.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2017-10-05 14:50:18 +03:00
2aa988e96c MLK-14951 clk: imx8: correct enet txclk clock tree for i.MX8qm and i.MX8qxp
Correct enet txclk clock tree for i.MX8qm and i.MX8qxp.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2017-10-05 14:50:17 +03:00
81646da72d MLK-14946-2: pinctrl: imx8qm/qxp: switch to use new format
switch to use new format. Split mux out from pad config.
Change the high two bits in pad config to 0, because driver
will automatically set that two bits to 1.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-10-05 14:50:16 +03:00
ab63320bc1 MLK-14946-1: dt-bindings: pinctrl: imx8qm/qxp: add new format define
Add new format definition.
The new format is #define [name] [pinid] [muxvalue]

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-10-05 14:50:15 +03:00
d5e7f3c3ca MLK-14949 arm64: dts: imx8qm/qxp add usdhc alias node
Add usdhc alias node. To i.MX8QXP ARM2 board,
kernel will panic if no alias node provided.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-10-05 14:50:14 +03:00
cdc62d3e14 MLK-14948 arm64: dts: imx8qxp: fix usdhc power domain name
Fix usdhc power domain name.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-10-05 14:50:13 +03:00
dd875fc8a5 MLK-14706 clk: imx7d: fix whitespace
Remove whitespace.

Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2017-10-05 14:50:13 +03:00
3412a00e1a MLK-14706 clk: imx7d: remove duplicate empty line
Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2017-10-05 14:50:12 +03:00
cf29edadf9 MLK-14706 clk: imx7d: align with upstream: update arm a7 root clock init
In upstream, IMX7D_ARM_A7_ROOT_SRC uses imx_clk_mux2 for initialization,
while our code uses imx_clk_mux_flags_bus with additional flags
CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE. In the end, both calls
set the flags of IMX7D_ARM_A7_ROOT_SRC clock to
CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE.

To align our code to upstream, we can safely use imx_clk_mux2.

Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2017-10-05 14:50:11 +03:00
bc73c75e89 MLK-14706 clk: imx7d: align with upstream: ipg_root_clk
Update imx7d clk platform code according to upstream commit
40e00ef ("clk: imx7d: add the missing ipg_root_clk").

Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2017-10-05 14:50:10 +03:00