linux.git
7 years agoMLK-15938-2 arm64: defconfig: add imx pwm led support
Anson Huang [Mon, 10 Jul 2017 16:23:05 +0000 (00:23 +0800)]
MLK-15938-2 arm64: defconfig: add imx pwm led support

Add CONFIG_LEDS_PWM and CONFIG_PWM_IMX support for
i.MX8MQ which has a PWM LED on EVK board.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15938-1 pwm: Kconfig: add imx pwm support for arm64 platform
Anson Huang [Mon, 10 Jul 2017 16:21:13 +0000 (00:21 +0800)]
MLK-15938-1 pwm: Kconfig: add imx pwm support for arm64 platform

Add ARM64 platform support for i.MX PWM driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15934-3: ASoc: fsl: add hifi4 firmware's status transfer support
Weiguang Kong [Fri, 7 Jul 2017 04:38:09 +0000 (12:38 +0800)]
MLK-15934-3: ASoc: fsl: add hifi4 firmware's status transfer support

1. add cases to receive error value from hifi4 firmware and
   return this error to hifi4 driver's caller.
2. add cases to receive input over indicator variable from
   hifi4 dirver's caller and pass this value to hifi4 firmware

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-15934-2: ASoc: fsl: different pointer length issue for hifi4
Weiguang Kong [Mon, 10 Jul 2017 04:03:53 +0000 (12:03 +0800)]
MLK-15934-2: ASoc: fsl: different pointer length issue for hifi4

when transferring struct icm_open_resp_info_t type
between hifi4 framework and hifi4 driver, because this
struct has an element "*dtstamp" which is a pointer,
but for hifi4 firmware, this pointer occupies 4 bytes,
for hifi4 driver, this pointer occupies 8 bytes.
different pointer length will cause issue when reading
this structure's content in hifi4 driver.

By changing the pointer type to unsigned int type to
fix this issue.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-15317: ARM64: dts: Fix SAI1 IPG clock
Daniel Baluta [Mon, 10 Jul 2017 11:54:24 +0000 (14:54 +0300)]
MLK-15317: ARM64: dts: Fix SAI1 IPG clock

Fixes: 293f390e81 ("ARM64: dts: Add SAI1 definition")
Reported-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
7 years agoMLK-15935-02 ARM64: configs: Enable trip point writable config for debug purpose
Bai Ping [Mon, 10 Jul 2017 07:19:26 +0000 (15:19 +0800)]
MLK-15935-02 ARM64: configs: Enable trip point writable config for debug purpose

We may need to dynamically change the trip point temp for thermal driver validation,
so enable the trip point writable config in defconfig.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15935-01 ARM64: dts: update the critical trip point temp for 8qm/qxp
Bai Ping [Mon, 10 Jul 2017 07:15:26 +0000 (15:15 +0800)]
MLK-15935-01 ARM64: dts: update the critical trip point temp for 8qm/qxp

Update the default critical trip point temp to 127C to align with the
SCFW's panic alarm temp.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15940 video: fbdev: imx_northwest_dsi: refine the horizontal blanking periods.
Fancy Fang [Mon, 10 Jul 2017 09:06:58 +0000 (17:06 +0800)]
MLK-15940 video: fbdev: imx_northwest_dsi: refine the horizontal blanking periods.

The horizontal blanking periods should have bytes unit
instead of pixels.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15936 clk: imx7d: Fix OCRAM_CLK parent clock
Adriana Reus [Fri, 7 Jul 2017 08:47:25 +0000 (11:47 +0300)]
MLK-15936 clk: imx7d: Fix OCRAM_CLK parent clock

The parent of OCRAM_CLK should be axi_main_root_clk
and not axi_post_div.

before:

axi_src                         1       1       332307692       0 0
  axi_cg                        1       1       332307692       0 0
    axi_pre_div                 1       1       332307692       0 0
      axi_post_div              2       2       332307692       0 0
        ocram_clk               1       1       332307692       0 0
        main_axi_root_clk       1       1       332307692       0 0
          pxp_axi_clk           0       0       332307692       0 0

after:

axi_src                         1       1       332307692       0 0
  axi_cg                        1       1       332307692       0 0
    axi_pre_div                 1       1       332307692       0 0
      axi_post_div              1       1       332307692       0 0
        main_axi_root_clk       2       2       332307692       0 0
          pxp_axi_clk           0       0       332307692       0 0
          ocram_clk             1       1       332307692       0 0

Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
7 years agoMLK-15335 clk: imx7d-ccm: Remove ARM_M0 clock
Adriana Reus [Thu, 6 Jul 2017 10:32:12 +0000 (13:32 +0300)]
MLK-15335 clk: imx7d-ccm: Remove ARM_M0 clock

IMX7d does not contain an M0 Core and this particular
clock doesn't seem connected to anything else.
Remove this entry from the CCM driver.

Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
7 years agoMLK-15927-2: ARM64: dts: iMX8QM and iMX8QXP use specific SAI compatibility string
Mihai Serban [Fri, 7 Jul 2017 13:13:48 +0000 (16:13 +0300)]
MLK-15927-2: ARM64: dts: iMX8QM and iMX8QXP use specific SAI compatibility string

For iMX8QM and iMX8QXP the SAI device driver must to add a constraint
on the period size because of EDMA requirements.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15927-1: ASoC: fsl_sai: Fix noise when using EDMA
Mihai Serban [Fri, 7 Jul 2017 12:09:51 +0000 (15:09 +0300)]
MLK-15927-1: ASoC: fsl_sai: Fix noise when using EDMA

EDMA requires the period size to be multiple of maxburst. Otherwise the
remaining bytes are not transferred and thus noise is produced.

We can handle this issue by adding a constraint on
SNDRV_PCM_HW_PARAM_PERIOD_SIZE to be multiple of tx/rx maxburst value.

This is based on a similar patch we have for ESAI:
commit bd3f3eb2a37c
("MLK-15109-2: ASoC: fsl_esai: add constrain_period_size")

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15933 arm64: dts: freescale: imx8qm: update A72 cpu freq table
Anson Huang [Mon, 10 Jul 2017 14:09:07 +0000 (22:09 +0800)]
MLK-15933 arm64: dts: freescale: imx8qm: update A72 cpu freq table

i.MX8QM SCFW fixes the HP PLL rate calculation, A72 cluster
CPU frequency has been changed from 1584MHz to 1596MHz,
change the CPU OPP table accordingly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15925-3 drm/imx: dpu: kms: Avoid plane src hot migration between 2 disps
Liu Ying [Fri, 7 Jul 2017 09:41:34 +0000 (17:41 +0800)]
MLK-15925-3 drm/imx: dpu: kms: Avoid plane src hot migration between 2 disps

The DPU fetch units(backing DRM planes) are shared by two displays(a.k.a,
CRTCs).  Since the shadow trigger/load mechanism of each display(CRTC)
is independent from each other, on-the-fly/hot migration of plane source
is likely to cause resouce conflict issue when the shadow registers are
loaded.  This patch changes the way we assign fetch units for each DRM
planes so that we may avoid the migrations from happening.  Thanks to
the DRM atomic check nature, cold migrations still can be supported.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-15925-2 gpu: imx: dpu: fetchdecode: Add a helper to report if fd is enabled
Liu Ying [Fri, 7 Jul 2017 09:40:51 +0000 (17:40 +0800)]
MLK-15925-2 gpu: imx: dpu: fetchdecode: Add a helper to report if fd is enabled

This patch adds a helper so that users may know if the fetchdecode is enabled
or not.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-15925-1 gpu: imx: dpu: fetchdecode: Add get/set display stream id support
Liu Ying [Fri, 7 Jul 2017 09:32:43 +0000 (17:32 +0800)]
MLK-15925-1 gpu: imx: dpu: fetchdecode: Add get/set display stream id support

This patch adds two helpers so that users may get or set the display
stream id of fetchdecode.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-15354 clk: imx: imx8mq: add video_pll2 clock
Fancy Fang [Fri, 7 Jul 2017 06:07:06 +0000 (14:07 +0800)]
MLK-15354 clk: imx: imx8mq: add video_pll2 clock

Add video_pll2 SSCG PLL clock in anamix which can
be used by HDMI and DCSS.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15356-1:[i.MX8MQ/Hantro] Add support for android platform
Zhou Peng-B04994 [Fri, 7 Jul 2017 10:15:25 +0000 (18:15 +0800)]
MLK-15356-1:[i.MX8MQ/Hantro] Add support for android platform

Add hantro register mmap feature

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
7 years agoMLK-15316: ARM64: dts: fsl-imx8qxp-lpddr4-arm2-wm8962: enable WM8962 codec
Mihai Serban [Wed, 5 Jul 2017 16:43:42 +0000 (19:43 +0300)]
MLK-15316: ARM64: dts: fsl-imx8qxp-lpddr4-arm2-wm8962: enable WM8962 codec

Add DTS configuration for enabling WM8962 codec with iMX8QXP validation
board and the iMX8 debug board V2.

The connection in debug base board v2 is:
CODEC_PWR_EN:    SEAF_B_A18
CODEC_I2C_CLK:   SEAF_B_J32
CODEC_I2C_DAT:   SEAF_B_J31
AUD_MCLK:        SEAF_B_H24
AUD_TXC:         SEAF_B_B35
AUD_TXFS:        SEAF_B_B36
AUD_TXD:         SEAF_B_B37
AUD_RXD:         SEAF_B_A36
HEADPHONE_DET:   SEAF_B_A19
MICROPHONE_DET:  SEAF_B_A20

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15748 drm/imx: dpu: plane: Correct the way we do framebuffer cropping
Liu Ying [Fri, 7 Jul 2017 08:39:59 +0000 (16:39 +0800)]
MLK-15748 drm/imx: dpu: plane: Correct the way we do framebuffer cropping

We should not use fetchdecode clip feature to do framebuffer cropping
since the hardware hehavior differs from what we expected.
According to the spec, it seems that the clip feature will keep the
source frame resolution and fill pixels in the clipped area.  So, let's
take the usual way to do the cropping and just simply tweak the buffer
start address.

Reported-by: Jared Hu <jared.hu@nxp.com>
Tested-by: Jared Hu <jared.hu@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-15317-6: ARM64: dts: Add support for MQS in im8xp
Daniel Baluta [Wed, 5 Jul 2017 15:52:51 +0000 (18:52 +0300)]
MLK-15317-6: ARM64: dts: Add support for MQS in im8xp

We introduce a new dts for MQS which is supported by
imx8qxp with debug base board v2.

Connection in debug board is:
MQS_LEFT: SEAF_B_G39
MQS_RIGHT: SEAF_B_G38

This is similar with imx8qm. Note that these pins are shared with SPDIF.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15317-5: ARM64: dts: Add asrc1 node definition
Daniel Baluta [Fri, 7 Jul 2017 06:14:26 +0000 (09:14 +0300)]
MLK-15317-5: ARM64: dts: Add asrc1 node definition

This specifies:
* EDMA controller
* ASRC controller
* register address
* interrupts
* clocks
* dmas

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15317-4: ARM64: dts: Add SAI1 definition
Daniel Baluta [Wed, 5 Jul 2017 15:40:28 +0000 (18:40 +0300)]
MLK-15317-4: ARM64: dts: Add SAI1 definition

This specifies:
* EDMA - SAI1 channels mapping
* SAI1 TX/RX interrupts
* SAI1 controller node definition
* register address
* interrupts
* clocks

This is based on Audio_QM_v0.1.07.pdf document.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15317-3: ASoC: fsl_mqs: Add support for MQS dummy codec in imx8qxp
Daniel Baluta [Wed, 5 Jul 2017 12:59:59 +0000 (15:59 +0300)]
MLK-15317-3: ASoC: fsl_mqs: Add support for MQS dummy codec in imx8qxp

MQS on i.mx8 QXP uses the same register as i.mx8 QM
so we only need to add compatible string here.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15317-2: ARM64: dts: Move AUD clocks under acm node
Daniel Baluta [Wed, 5 Jul 2017 15:49:29 +0000 (18:49 +0300)]
MLK-15317-2: ARM64: dts: Move AUD clocks under acm node

This mirrors change done for 8qm in commit c7c63a5d241b ("MLK-15340-4: ARM64: dts:
support SPDIF, MQS, SAI in imx8qm").

This needs to be moved out of esai node because esai node
might not be active all the time.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
7 years agoMLK-15317-1: clk: imx8qxp: Fix AID_MQS_HMCLK parent clock
Daniel Baluta [Wed, 5 Jul 2017 14:57:05 +0000 (17:57 +0300)]
MLK-15317-1: clk: imx8qxp: Fix AID_MQS_HMCLK parent clock

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7 years agoMLK-15351: PCI: imx: Only use pcie_bus_regulator for iMX6QP
Tiberiu Breana [Fri, 23 Jun 2017 14:15:24 +0000 (17:15 +0300)]
MLK-15351: PCI: imx: Only use pcie_bus_regulator for iMX6QP

The pcie_bus_regulator is only used by the iMX6QP board,
so only request the regulator for this variant.

Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
7 years agoMLK-15079 video: mipi_dsi_samsung: fix reset failure for mipi dsi
Robby Cai [Thu, 6 Jul 2017 12:36:44 +0000 (20:36 +0800)]
MLK-15079 video: mipi_dsi_samsung: fix reset failure for mipi dsi

mxc_mipi_dsi_samsung 30760000.mipi-dsi: MIPI DSI dispdrv inited!
mxsfb 30730000.lcdif: registered mxc display driver mipi_dsi_samsung
mxc_mipi_dsi_samsung 30760000.mipi-dsi: failed to reset device: -517
mxsfb 30730000.lcdif: failed to enable dispdrv:mipi_dsi_samsung

due to the commit  e188cbf7564fba80e8339b9406e8740f3e495c63
"gpio: mxc: shift gpio_mxc_init() to subsys_initcall level", and
gpio_reset uses arch_initcall level, the gpio driver is not yet
ready when call device_reset() thus return -EPROBE_DEFER. But the caller
of device_reset(), mipi_dsi_enable() has no defer strategy.
use of_reset_control_get() function in init() function, which will be called
in probe function in mxsfb driver, to workaround the defer case.

Acked-by: Fang Chen <chen.fang@nxp.com>
Acked-by: Cristina-mihaela Ciocan <cristina-mihaela.ciocan@nxp.com>
Signed-off-by: Robby Cai <robby.cai@nxp.com>
7 years agoMLK15034: ARM: cpuidle imx7d: Declare longer exit_latency/target_residency
Leonard Crestez [Wed, 5 Jul 2017 16:20:04 +0000 (19:20 +0300)]
MLK15034: ARM: cpuidle imx7d: Declare longer exit_latency/target_residency

Low power idle exit latency is much longer than declared, in the
milisecond range.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK15034: ARM: cpuidle imx7d: Use a single counter for lpi flow
Leonard Crestez [Wed, 5 Jul 2017 17:34:01 +0000 (20:34 +0300)]
MLK15034: ARM: cpuidle imx7d: Use a single counter for lpi flow

The current code for deciding which CPU runs the complete lpi flow is
too complicated. Since all enter/exit code now runs under the same lock
we can just use a single non-atomic counter of cpus inside lpi.

Another variable is used to make num_online_cpus() available to ASM code
but idle code can treat it as a constant.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK15034: ARM: cpuidle imx7d: Check IPIs manually before LPI
Leonard Crestez [Tue, 4 Jul 2017 17:52:26 +0000 (20:52 +0300)]
MLK15034: ARM: cpuidle imx7d: Check IPIs manually before LPI

The GPC will wake us on peripheral interrupts but not IPIs. So check
them manually by reading the GIC's GICD_SPENDSGIR* registers and
aborting idle if something is pending.

We do this only for the last cpu and after taking the required locks.
We know that at this stage the other cpu is in WFI itself or waiting for
the imx_pen_lock and can't trigger any additional IPIs. This means that
the check is not racy.

This fixes occasional lost IPIs causing tasks to get stuck in the
TASK_WAKING 'W' state for long periods. This eventually manifested as
rcu stalls.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
7 years agoMLK15034: ARM: cpuidle imx7d: Extend imx_pen lock to cover entire flow
Leonard Crestez [Wed, 5 Jul 2017 16:55:39 +0000 (19:55 +0300)]
MLK15034: ARM: cpuidle imx7d: Extend imx_pen lock to cover entire flow

This makes the code much easier to reason about. In particular it o
makes sure the imx7d cpuidle driver respects the requirements for
cpu_cluster_pm_enter/exit:

* cpu_cluster_pm_enter must be called after cpu_pm_enter has been called
on all cpus in the power domain, and before cpu_pm_exit has been called
on any cpu in the power domain.
* cpu_cluster_pm_exit must be called after cpu_pm_enter has been called
on all cpus in the power domain, and before cpu_pm_exit has been called
on any cpu in the power domain.

This fixes interrupts sometimes getting "stuck" because of improper
save/restore of GIC DIST registers.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15347 clk: imx: correct sccg and frac pll rate calculation error
Anson Huang [Thu, 6 Jul 2017 05:37:14 +0000 (13:37 +0800)]
MLK-15347 clk: imx: correct sccg and frac pll rate calculation error

- For SCCG SCCG_PLL2 type, its parent rate is with round-up,
  using parent rate to calculate its rate will introduce
  some error, like below sys1_pll2, its rate is actually 800M,
  but we got 800000004:

sys1_pll1_ref_sel          1      1    25000000    0 0
  sys1_pll1_ref_div        1      1    25000000    0 0
    sys1_pll1              1      1  1600000000    0 0
      sys1_pll1_out        1      1  1600000000    0 0
        sys1_pll1_out_div  1      1    66666667    0 0
          sys1_pll2        1      1   800000004    0 0

  here we redo the calculation from top reference clk to
  avoid the error, the result will be as below:

sys1_pll1_ref_sel          1      1    25000000    0 0
  sys1_pll1_ref_div        1      1    25000000    0 0
    sys1_pll1              1      1  1600000000    0 0
      sys1_pll1_out        1      1  1600000000    0 0
        sys1_pll1_out_div  1      1    66666667    0 0
          sys1_pll2        1      1   800000000    0 0

- For FRAC PLL, the calculation formula is incorrect, the
  divff should NOT add 1, fix it to get correct rate:

before fix:
arm_pll_ref_sel         1       1    25000000   0 0
  arm_pll_ref_div       1       1     5000000   0 0
    arm_pll             1       1  1200000001   0 0

after fix:
arm_pll_ref_sel         1       1    25000000   0 0
  arm_pll_ref_div       1       1     5000000   0 0
    arm_pll             1       1  1200000000   0 0

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMGS-3021-2 [#imx-622] Disable GPU security feature to align VSI
Chenyan Feng [Mon, 3 Jul 2017 08:00:23 +0000 (16:00 +0800)]
MGS-3021-2 [#imx-622] Disable GPU security feature to align VSI

revert the former patch which disabled GPU security feature.

revert the former patch which disabled GPU security feature.
rework on this patch as VSI suggested.
GPU security feature is only for mscale, but driver is not ready,
need disable this feature to avoid gpu kernel panic temporally,

will drop this patch when gpu security driver is ready later.

Date: 30th June, 2017
Signed-off-by: Chenyan Feng <ella.feng@nxp.com>
7 years agoMLK-15319 imx8qm/imx8qx: Update to SCFW API based on commit:
Ranjani Vaidyanathan [Fri, 30 Jun 2017 19:23:24 +0000 (14:23 -0500)]
MLK-15319 imx8qm/imx8qx: Update to SCFW API based on commit:
"
commit a645f3c4c529e1f8cc5a624a047a3af56cfd39e1
Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Date:   Thu Jun 29 15:21:53 2017 -0500

    Turn off all HDMI-TX clocks by default. This is required for setting
    the rate of the DIG PLL.
    Add code to enable/disable the correct clocks before SECO accesses the HDMI SS.

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
"

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
7 years agoMLK-15322-11: video: fbdev: adv7535: enable adv7535 driver
Fancy Fang [Mon, 3 Jul 2017 07:21:38 +0000 (15:21 +0800)]
MLK-15322-11: video: fbdev: adv7535: enable adv7535 driver

Add adv7535 driver which support dsi to hdmi conversion.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-10 ARM64: dts: imx8mq-evk: connect mipi dsi to adv7535
Fancy Fang [Mon, 3 Jul 2017 07:06:32 +0000 (15:06 +0800)]
MLK-15322-10 ARM64: dts: imx8mq-evk: connect mipi dsi to adv7535

Add port in dsi and adv7535 to connect them.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-9 ARM64: dts: imx8mq-evk: add adv7535 node under i2c1
Fancy Fang [Mon, 3 Jul 2017 06:58:46 +0000 (14:58 +0800)]
MLK-15322-9 ARM64: dts: imx8mq-evk: add adv7535 node under i2c1

Add adv7535 device node under i2c1 on imx8mq evk board.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-8 video: fbdev: imx_northwest_dsi: enable Northwest mipi dsi driver
Fancy Fang [Mon, 3 Jul 2017 06:28:11 +0000 (14:28 +0800)]
MLK-15322-8 video: fbdev: imx_northwest_dsi: enable Northwest mipi dsi driver

Add the Northwest mipi dsi driver. It supports hdmi encoder.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-7 ARM64: dts: imx8mq-evk: enable mipi dsi on evk board
Fancy Fang [Mon, 3 Jul 2017 06:21:59 +0000 (14:21 +0800)]
MLK-15322-7 ARM64: dts: imx8mq-evk: enable mipi dsi on evk board

Enable mipi dsi on imx8mq evk board by default.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-6 ARM64: dts: imx8mq: add mipi dsi node
Fancy Fang [Mon, 3 Jul 2017 05:59:12 +0000 (13:59 +0800)]
MLK-15322-6 ARM64: dts: imx8mq: add mipi dsi node

Add mipi dsi device node with the required properties.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-5 clk: imx: imx8mq: add ahb/ipg clocks for dsi
Fancy Fang [Mon, 3 Jul 2017 06:16:24 +0000 (14:16 +0800)]
MLK-15322-5 clk: imx: imx8mq: add ahb/ipg clocks for dsi

Add the ahb and ipg clocks for mipi dsi rxesc and txesc.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-4 video: fbdev: imx: lcdif: enable lcdif driver for imx8mq
Fancy Fang [Mon, 3 Jul 2017 04:36:15 +0000 (12:36 +0800)]
MLK-15322-4 video: fbdev: imx: lcdif: enable lcdif driver for imx8mq

Add the lcdif driver and related dispdrv framework driver.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-3 ARM64: dts: imx8mq-evk: enable lcdif on imx8mq evk board
Fancy Fang [Mon, 3 Jul 2017 04:19:32 +0000 (12:19 +0800)]
MLK-15322-3 ARM64: dts: imx8mq-evk: enable lcdif on imx8mq evk board

Enable lcdif on imx8mq evk board by default.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-2 clk: imx: imx8mq: configure video_pll1 clock
Fancy Fang [Mon, 3 Jul 2017 04:03:08 +0000 (12:03 +0800)]
MLK-15322-2 clk: imx: imx8mq: configure video_pll1 clock

Set the video_pll1 clock's source and rate which are
used for pixel clock and mipi dphy reference clock
source.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMLK-15322-1 ARM64: dts: imx8mq: add required clocks for lcdif
Fancy Fang [Mon, 3 Jul 2017 02:49:55 +0000 (10:49 +0800)]
MLK-15322-1 ARM64: dts: imx8mq: add required clocks for lcdif

Add the required clocks for lcdif in device node.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
7 years agoMA-9807: Fix ecb(aes) use without an IV
Radu Solea [Wed, 5 Jul 2017 12:30:44 +0000 (15:30 +0300)]
MA-9807: Fix ecb(aes) use without an IV

CAAM aes modes share descriptors, because of this CAAM requires an IV
for ECB. ECB does not need an IV and users do not have to pass valid
IV vectors. To allow correct usage with minimum impact to the driver a
zero IV is provided by the driver for ECB operations that need it.

Signed-off-by: Radu Solea <radu.solea@nxp.com>
7 years agoMLK-15340-4: ARM64: dts: support SPDIF, MQS, SAI in imx8qm
Shengjiu Wang [Wed, 5 Jul 2017 07:31:02 +0000 (15:31 +0800)]
MLK-15340-4: ARM64: dts: support SPDIF, MQS, SAI in imx8qm

Add two new dts for spdif and mqs, which are supported by
imx8qm validation board with debug base board. The spdif and
mqs use same output pin.

The connection in debug base board is:
WM8962:
CODEC_PWR_EN :   SEAF_B_B7
CODEC_I2C_CLK:   SEAF_B_J32
CODEC_I2C_DAT:   SEAF_B_J31
AUD_MCLK  :      SEAF_B_H24
AUD_TXC   :      SEAF_B_B35
AUD_TXFS  :      SEAF_B_B36
AUD_TXD   :      SEAF_B_B37
AUD_RXD   :      SEAF_B_A36
HEADPHONE_DET:   SEAF_B_A4
MICROPHONE_DET:  SEAF_B_C4
SEAF_B_G46:  GND
SPDIF:
SPDIF_OUT:   SEAF_B_G39
SPDIF_RX:    SEAF_B_G38
MQS:
MQS_LEFT:     SEAF_B_G39
MQS_RIGHT:    SEAF_B_G38

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
7 years agoMLK-15340-3: ARM64: defconfig: built-in wm8962 sound card
Shengjiu Wang [Wed, 5 Jul 2017 07:30:49 +0000 (15:30 +0800)]
MLK-15340-3: ARM64: defconfig: built-in wm8962 sound card

built-in wm8962 sound card.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
7 years agoMLK-15340-2: clk: imx8qm: correct some audio clock's parent.
Shengjiu Wang [Wed, 5 Jul 2017 07:30:27 +0000 (15:30 +0800)]
MLK-15340-2: clk: imx8qm: correct some audio clock's parent.

Correct some audio clock's parents

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
7 years agoMLK-15340-1: ASoC: wm8962: fix lambda value
Shengjiu Wang [Wed, 5 Jul 2017 07:29:52 +0000 (15:29 +0800)]
MLK-15340-1: ASoC: wm8962: fix lambda value

According RM, the FLL_LAMBDA must be set to non-zero value in
integer and Franctional modes.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
7 years agoMLK-13945-3: ASoC: fsl_asrc: support two asrc devices
Shengjiu Wang [Wed, 5 Jul 2017 07:29:40 +0000 (15:29 +0800)]
MLK-13945-3: ASoC: fsl_asrc: support two asrc devices

In imx8qm, there is two asrc devices, so using global structure
"miscdevice" will cause error. Each instance should have their
own structure.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-13945-2: ASoC: imx_mqs: specify clock name in machine driver
Shengjiu Wang [Wed, 5 Jul 2017 07:29:13 +0000 (15:29 +0800)]
MLK-13945-2: ASoC: imx_mqs: specify clock name in machine driver

specify clock name in machine driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-13945-1: ASoC: fsl_mqs: refine the mqs driver for support imx8qm
Shengjiu Wang [Wed, 5 Jul 2017 07:29:00 +0000 (15:29 +0800)]
MLK-13945-1: ASoC: fsl_mqs: refine the mqs driver for support imx8qm

IOMUXC_GPR2 register is not used for imx8, there is a new register
designed for this usage in imx8, so it also need the ipg clock.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-13947: ASoC: fsl_spdif: introduce SoC specific data
Shengjiu Wang [Wed, 5 Jul 2017 07:28:33 +0000 (15:28 +0800)]
MLK-13947: ASoC: fsl_spdif: introduce SoC specific data

Introduce a SoC data struct which contains the differences between
the different SoCs this driver supports. This makes it easy to support
more differences without having to introduce a new switch/case each
time.
And in imx8qm, the spdif has two interrupt numbers and the burst size
should be 2 for EDMA limitation to support dual FIFO.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-15342-5 arm64: defconfig: enable more cpufreq governors
Anson Huang [Wed, 5 Jul 2017 08:07:05 +0000 (16:07 +0800)]
MLK-15342-5 arm64: defconfig: enable more cpufreq governors

Enable powersave, userspace, ondemand, conservative
and interactive governor for cpufreq driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15342-4 arm64: defconfig: enable i.mx8mq cpufreq support
Anson Huang [Wed, 5 Jul 2017 08:05:33 +0000 (16:05 +0800)]
MLK-15342-4 arm64: defconfig: enable i.mx8mq cpufreq support

Enable CONFIG_ARM_IMX8MQ_CPUFREQ by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15342-3 cpufreq: add i.mx8mq support
Anson Huang [Wed, 5 Jul 2017 08:00:22 +0000 (16:00 +0800)]
MLK-15342-3 cpufreq: add i.mx8mq support

Add i.MX8MQ cpufreq support, current version of
EVK board does NOT support voltage scale, but next
version will add this support, so this driver only
supports cpu frequency scale, voltage scale will
be added later once new board available.

A53 CPU clock normally is from ARM_PLL, but during
ARM_PLL relock window, it will be switched to
SYS1_PLL_800M to avoid clock missing, and after
arm pll relock done, it will be switched back.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15342-2 arm64: dts: freescale: imx8mq: add cpu opp table
Anson Huang [Wed, 5 Jul 2017 07:47:15 +0000 (15:47 +0800)]
MLK-15342-2 arm64: dts: freescale: imx8mq: add cpu opp table

Add i.MX8MQ cpu OPP table info for cpu-freq driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15342-1 soc: imx: i.mx8mq uses its own cpu-freq driver
Anson Huang [Wed, 5 Jul 2017 07:44:11 +0000 (15:44 +0800)]
MLK-15342-1 soc: imx: i.mx8mq uses its own cpu-freq driver

i.MX8MQ is a SMP SoC without system controller, so
it will has its own cpu-freq driver, add machine
check for different platforms.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15338-2: ARM64: defconfig: add pfuze100 driver
Robin Gong [Wed, 5 Jul 2017 07:17:54 +0000 (15:17 +0800)]
MLK-15338-2: ARM64: defconfig: add pfuze100 driver

Add pfuze100 driver for i.mx8mq.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15338-1: ARM64: dts: fsl-imx8mq-evk: add pfuze100 device node
Robin Gong [Wed, 5 Jul 2017 07:16:45 +0000 (15:16 +0800)]
MLK-15338-1: ARM64: dts: fsl-imx8mq-evk: add pfuze100 device node

Add pfuze100 device node.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15330-4: ARM64: dts: fsl-imx8qm: correct edma0 base address
Robin Gong [Wed, 5 Jul 2017 01:56:21 +0000 (09:56 +0800)]
MLK-15330-4: ARM64: dts: fsl-imx8qm: correct edma0 base address

Correct edma0 base address in dts.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15330-3 dma: fsl-edma-v3: add dual fifo support
Robin Gong [Tue, 4 Jul 2017 08:04:36 +0000 (16:04 +0800)]
MLK-15330-3 dma: fsl-edma-v3: add dual fifo support

There is Audio dual fifo cause that fill fifo one by one and
loop back after every minor loop:
  -- fill the first 32bit width fifo
  -- fill the next 32bit width fifo
  -- +MLOFF signed offset after the above two FIFOs filled
  -- loop back to the first step to handle the next minor loop.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15330-2: ARM64: imx8qm/qxp: modify all device nodes using edmav3
Robin Gong [Tue, 4 Jul 2017 06:52:12 +0000 (14:52 +0800)]
MLK-15330-2: ARM64: imx8qm/qxp: modify all device nodes using edmav3

Modify all device nodes which use edmav3,since dma-cell down from 4 to
3.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15330-1: dma: fsl-edma-v3: combine two cells into one
Robin Gong [Tue, 4 Jul 2017 06:45:25 +0000 (14:45 +0800)]
MLK-15330-1: dma: fsl-edma-v3: combine two cells into one

For dual fifo case, fsl-edma-v3 need add another cell. It's not friendly
for user and it's possible other cells maybe added to other use cases,
so combine two cells into one now, and for some special use cases such as
dual fifo property can directly be passed by one bit of cell3 rather than
another cell.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15333-02 driver: clk: need to check the ack bit of frac pll on imx8mq
Bai Ping [Tue, 4 Jul 2017 08:35:13 +0000 (16:35 +0800)]
MLK-15333-02 driver: clk: need to check the ack bit of frac pll on imx8mq

On i.MX8MQ, when do frac pll's frequency, if the PLL is not powerdown & bypass,
we must do new_div_ack check after we reload the divff and divfi value,
otherwise, the frac pll will lock to a wrong freqeuncy sometimes.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15333-01 driver: clk: Fix clock round to a wrong rate issue
Bai Ping [Tue, 4 Jul 2017 08:31:56 +0000 (16:31 +0800)]
MLK-15333-01 driver: clk: Fix clock round to a wrong rate issue

The divider 'CLK_DIVIDER_ROUND_CLOSEST' flag should be enabled,
otherwise, the round clock will return a wrong clock rate.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15149-02 ARM64: dts: Add power domain node in dts for i.mx8mq
Bai Ping [Fri, 23 Jun 2017 08:23:41 +0000 (16:23 +0800)]
MLK-15149-02 ARM64: dts: Add power domain node in dts for i.mx8mq

Add power domain node on i.MX8MQ.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15149-01 driver: soc: add gpc power domain support on i.mx8mq
Bai Ping [Fri, 23 Jun 2017 08:22:40 +0000 (16:22 +0800)]
MLK-15149-01 driver: soc: add gpc power domain support on i.mx8mq

Add generic power domain driver support on i.mx8mq. The power
domain on/off operations need to use the SIP service call to
trap into secure monitor to handle it.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15313-2 ARM64: dts: imx8qm-lpddr4-arm2: add SD3.0 support
Haibo Chen [Mon, 3 Jul 2017 10:09:19 +0000 (18:09 +0800)]
MLK-15313-2 ARM64: dts: imx8qm-lpddr4-arm2: add SD3.0 support

Add SD3.0 support for USDHC2.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-15313-1 ARM64: dts: imx8qxp-lpddr4-arm2: add SD3.0 support
Haibo Chen [Fri, 30 Jun 2017 06:24:40 +0000 (14:24 +0800)]
MLK-15313-1 ARM64: dts: imx8qxp-lpddr4-arm2: add SD3.0 support

Add SD3.0 support for USDHC2.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
7 years agoMLK-15328-3 arm64: dts: freescale: imx8mq: add snvs onoff button
Anson Huang [Tue, 4 Jul 2017 03:24:17 +0000 (11:24 +0800)]
MLK-15328-3 arm64: dts: freescale: imx8mq: add snvs onoff button

Add i.MX8MQ ONOFF button support.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15328-2 arm64: Kconfig: select KEYBOARD_SNVS_PWRKEY for i.mx8mq
Anson Huang [Tue, 4 Jul 2017 03:23:03 +0000 (11:23 +0800)]
MLK-15328-2 arm64: Kconfig: select KEYBOARD_SNVS_PWRKEY for i.mx8mq

Select KEYBOARD_SNVS_PWRKEY for i.MX8MQ by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15328-1 input: keyboard: add i.mx8mq snvs onoff button support
Anson Huang [Tue, 4 Jul 2017 03:22:15 +0000 (11:22 +0800)]
MLK-15328-1 input: keyboard: add i.mx8mq snvs onoff button support

i.MX8MQ use SNVS ONOFF button, add support for it.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15296-3: ASoc: fsl: remap the dsp firmware
Weiguang Kong [Wed, 28 Jun 2017 05:06:19 +0000 (13:06 +0800)]
MLK-15296-3: ASoc: fsl: remap the dsp firmware

In order to use the hifi4's Cache to cache the firmware's
.rodata, .text, .data, .bss section and hifi4 core lib's
.text section, the firmware's .rodata, .text, .data and
.bss section should be remaped to 0x20700000 - 0x20FFFFFF
address range. This patch is used to parse the firmware
and load each section to corresponding address range.

This patch also set csr_gpr_control to 0x515A2080 to
remap the hifi4's address range in SCFW.

In addtion, add cases to support hifi4 framework's
performance test.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-15296-2: include: uapi: add consumed cycles
Weiguang Kong [Wed, 28 Jun 2017 05:02:16 +0000 (13:02 +0800)]
MLK-15296-2: include: uapi: add consumed cycles

add a new structure element(cycles) to save the
consumed cycles that returned from dsp framework

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
7 years agoMLK-15307-3 PCI: imx: add the imx8mq pcie
Richard Zhu [Wed, 21 Jun 2017 02:25:08 +0000 (10:25 +0800)]
MLK-15307-3 PCI: imx: add the imx8mq pcie

Add the imx8mq pcie support

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-15307-2 clk: imx8mq: set the parent clocks of PCIE
Richard Zhu [Wed, 21 Jun 2017 02:23:00 +0000 (10:23 +0800)]
MLK-15307-2 clk: imx8mq: set the parent clocks of PCIE

Configure the parent clocks of PCIE.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMLK-15307-1 ARM64: dts: imx: enable pcie on mscale
Richard Zhu [Wed, 21 Jun 2017 02:21:27 +0000 (10:21 +0800)]
MLK-15307-1 ARM64: dts: imx: enable pcie on mscale

There are two PCIE ports on mscale.
This commit enable the pcie support on the mcsale
EVK board.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
7 years agoMGS-3054 dts: update gpu shader clock to meet design
Chenyan Feng [Mon, 3 Jul 2017 03:32:18 +0000 (11:32 +0800)]
MGS-3054 dts: update gpu shader clock to meet design

changed gpu shader clock from 1G to 800Mhz per design
also updated gpu shader parent from SYS2_PLL to SYS1_PLL.

7 years agoMLK-15101: ASoC: imx-wm8962: Use a lower FLL output rate for S20_3LE and S24_LE formats
Mihai Serban [Thu, 29 Jun 2017 11:42:03 +0000 (14:42 +0300)]
MLK-15101: ASoC: imx-wm8962: Use a lower FLL output rate for S20_3LE and S24_LE formats

Using a lower FLL out frequency seems to fix the sound distortion we hear
during playback of the second audio file from the command:
aplay -Dhw:0 -d 1 audio96k16b2c.wav audio96k24b2c.wav

Because the new frequency is half of the old one the existing BLCK compute
formula from wm8962 codec driver is still correct, it can derive the new
FLL output frequency.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
7 years agoMLK-15314 driver: clk: Change the audio ahb clock to sys2_pll_500m
Bai Ping [Fri, 30 Jun 2017 07:11:03 +0000 (15:11 +0800)]
MLK-15314 driver: clk: Change the audio ahb clock to sys2_pll_500m

Change the audio ahb clock source to sys2_pll_500m clock.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15310 driver: clk: Correct post divider width of ip clock on i.mx8mq
Bai Ping [Fri, 30 Jun 2017 05:28:44 +0000 (13:28 +0800)]
MLK-15310 driver: clk: Correct post divider width of ip clock on i.mx8mq

The post divider bits width of IP clock root should be 6, not 3 on i.MX8MQ,
so correct this.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-15312 arm64: defconfig: enable 802.2 LLC
Fugang Duan [Fri, 30 Jun 2017 05:56:48 +0000 (13:56 +0800)]
MLK-15312 arm64: defconfig: enable 802.2 LLC

Enable IEEE 802.2 LLC protocol.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
7 years agoMLK-15311 net: fec: change the default rx copybreak value to maximum
Fugang Duan [Fri, 30 Jun 2017 05:41:17 +0000 (13:41 +0800)]
MLK-15311 net: fec: change the default rx copybreak value to maximum

Set the default rx copybreak value to maximum that can improve
the performance when SMMU is enabled. User can change the copybreak
vaule in dynamically by ethtool.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
7 years agoMLK-15309-03 arm64: defconfig: enable PHY AT803X
Fugang Duan [Fri, 30 Jun 2017 05:05:24 +0000 (13:05 +0800)]
MLK-15309-03 arm64: defconfig: enable PHY AT803X

Add PHY AT803X support.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
7 years agoMLK-15309-02 arm64: dts: imx8mq-evk: add the enet PHY led_act blinding workaround
Fugang Duan [Wed, 28 Jun 2017 10:33:16 +0000 (18:33 +0800)]
MLK-15309-02 arm64: dts: imx8mq-evk: add the enet PHY led_act blinding workaround

Add enet PHY AR8031 led_act blinding issue sw workaround.
Adjust the PIN drive strength for the better timing.
Set the PTP ref clock to 100Mhz.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
7 years agoMLK-15309-01 net: phy: at803x: add EEE mode, 1.8V IO, led_act blinding workaround...
Fugang Duan [Wed, 28 Jun 2017 11:58:27 +0000 (19:58 +0800)]
MLK-15309-01 net: phy: at803x: add EEE mode, 1.8V IO, led_act blinding workaround support

SmartEEE feature is enabled in default, add interface for user to disable
the feature for IEEE1588 high accurate convergence.

The phy support 1.8v RGMII VDDIO voltage, add interface for user to enable
VDDIO 1.8v support.

When phy/RJ45 power supply is not stable, LED_ACT may be busy on blinding,
add sw workaround to fix the issue.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
7 years agoMLK-15308 arm64: dts: imx8mq-evk: add post delay for BT modem
Fugang Duan [Mon, 26 Jun 2017 06:17:48 +0000 (14:17 +0800)]
MLK-15308 arm64: dts: imx8mq-evk: add post delay for BT modem

i.MX8MQ evk board install Murata 1CX WIFI/BT module, 1CX Bluetooth
requires the post delay after BT_REG power on.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
7 years agoMLK-15302 imx8mq: add wdog support
Peng Fan [Thu, 29 Jun 2017 02:45:41 +0000 (10:45 +0800)]
MLK-15302 imx8mq: add wdog support

Add wdog nodes in dtsi.
Enable wdog1 for imx8mq evk board.
Enable imx wdt in defconfig.
Correct clock, offset 0x4550 is actually for wdog3.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15300-2 dts: i.MX8QXP: perf: add irq number
Frank Li [Wed, 28 Jun 2017 16:39:35 +0000 (11:39 -0500)]
MLK-15300-2 dts: i.MX8QXP: perf: add irq number

Assigned irq nubmber for ddr perf counter

Signed-off-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-15300-1 perf: fixed crash when irq have not assigned in dts file
Frank Li [Wed, 28 Jun 2017 16:36:57 +0000 (11:36 -0500)]
MLK-15300-1 perf: fixed crash when irq have not assigned in dts file

[ 28.061044] perf[2494]: PC Alignment exception: pc=0000000072656d69 sp=ffff800032f2bd30
[ 28.069061] Internal error: Oops - SP/PC alignment exception: 8a000000 1 PREEMPT SMP
[ 28.077066] Modules linked in:
[ 28.080128] CPU: 2 PID: 2494 Comm: perf Not tainted 4.9.11-02540-g3ebe22c #52
[ 28.087263] Hardware name: Freescale i.MX8QXP LPDDR4 ARM2 (DT)
[ 28.093093] task: ffff80002e097080 task.stack: ffff800032f28000
[ 28.099011] PC is at 0x72656d69
[ 28.102163] LR is at perf_try_init_event+0x98/0xb0
[ 28.106950] pc : [<0000000072656d69>] lr : [<ffff0000081594e0>] pstate: 60000145

Signed-off-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-15034: dma: imx-sdma: no need report interrupt for channel0
Robin Gong [Tue, 27 Jun 2017 02:05:05 +0000 (10:05 +0800)]
MLK-15034: dma: imx-sdma: no need report interrupt for channel0

It is possible for an irq triggered by channel0 to be received later,
after clks are disabled. If that happens then clearing them by writing
to SDMA_H_INTR won't work and the system will hang processing infinite
interrupts. Actually, don't need interrupt triggered on channel0 since
it's pollling to know channel0 done rather than interrupt in current
code, just clear BD setting to disable channel0 interrupt to avoid the
above case.

Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
7 years agoMLK-15083 watchdog: imx2_wdt: fallback to timeout reset if explicit reset fails
Octavian Purdila [Wed, 21 Jun 2017 08:01:23 +0000 (11:01 +0300)]
MLK-15083 watchdog: imx2_wdt: fallback to timeout reset if explicit reset fails

If explicit reset fails fallback using the watchdog timeout. We
already have set the timeout counter to 0, but we might need to ping
the watchdog to load the new timeout, if a previous watchdog timeout
value has already been set.

We also decrease the time we spend waiting, to give a chance to log
that the explicit reset failed and that we fallback to watchdog
timeout reset.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-15007-4: arm64: dts: imx8qm: enable iommu for fec
Peng Fan [Mon, 26 Jun 2017 01:31:36 +0000 (09:31 +0800)]
MLK-15007-4: arm64: dts: imx8qm: enable iommu for fec

Enable iommu for FEC1/2.
The SID is programmed in U-BOOT with value 0x12 that shared
by FEC/FEC2, so FEC1/2 will share one SID and one context.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15007-3 arm64: defconfig: enable SMMUv2
Peng Fan [Mon, 26 Jun 2017 01:29:38 +0000 (09:29 +0800)]
MLK-15007-3 arm64: defconfig: enable SMMUv2

Enable SMMUv2 in defconfig.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15007-2 arm64: dts: imx8qm: add smmu node
Peng Fan [Mon, 26 Jun 2017 01:25:02 +0000 (09:25 +0800)]
MLK-15007-2 arm64: dts: imx8qm: add smmu node

Add smmu node for i.MX8QM.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15007-1 iommu: arm: pgtable: alloc pagetable in DMA area
Peng Fan [Wed, 28 Jun 2017 02:46:03 +0000 (10:46 +0800)]
MLK-15007-1 iommu: arm: pgtable: alloc pagetable in DMA area

Normally the iommu pagetable could be in 64bit address space,
but we have one patch to address PCIE driver, 'commit 9e03e5076269
("MLK-15064-2 ARM64: DMA: limit the dma mask to be 32bit")'

The patch restrict swiotlb and iommu dma to be in 32bit address.

So if we allocate pages in highmem, then dma_map_single will return
a 32bit address. Then, we will get "Cannot accommodate DMA
translation for IOMMU page tables", because `dma != virt_to_phys(pages)`.

So we strict the lpae iommu pgtable in DMA area to fix this issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoiommu/arm-smmu: Set SMTNMB_TLBEN in ACR to enable caching of bypass entries
Nipun Gupta [Fri, 4 Nov 2016 09:55:23 +0000 (15:25 +0530)]
iommu/arm-smmu: Set SMTNMB_TLBEN in ACR to enable caching of bypass entries

The SMTNMB_TLBEN in the Auxiliary Configuration Register (ACR) provides an
option to enable the updation of TLB in case of bypass transactions due to
no stream match in the stream match table. This reduces the latencies of
the subsequent transactions with the same stream-id which bypasses the SMMU.
This provides a significant performance benefit for certain networking
workloads.

With this change substantial performance improvement of ~9% is observed with
DPDK l3fwd application (http://dpdk.org/doc/guides/sample_app_ug/l3_forward.html)
on NXP's LS2088a platform.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 6eb18d4a2b860ad259763c5e6d632839dcf974a1)