linux.git
7 years agoMLK-11917-1 media: output: pxp_v4l2: remove some duplicate dead code
Fancy Fang [Mon, 30 Nov 2015 02:19:35 +0000 (10:19 +0800)]
MLK-11917-1 media: output: pxp_v4l2: remove some duplicate dead code

The code slice in the 'v4l2_fmt_to_pxp_fmt()' function:
"
        else if (v4l2_pix_fmt == V4L2_PIX_FMT_RGB555)
                pxp_fmt = PXP_PIX_FMT_RGB555;
"
appears twice continuously. And the second code slice
will become dead code which is never executed. So
remove the second one.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11912 cpufreq: imx: fix dereference null return value issue
Bai Ping [Thu, 26 Nov 2015 10:22:20 +0000 (18:22 +0800)]
MLK-11912 cpufreq: imx: fix dereference null return value issue

After coverity code check, it reports dereference NULL return value
complain, so fix it.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11896-3 usb: chipidea: imx: add NULL check for usbmisc_data
Li Jun [Thu, 26 Nov 2015 09:35:13 +0000 (17:35 +0800)]
MLK-11896-3 usb: chipidea: imx: add NULL check for usbmisc_data

Check if data->usbmisc_data is NULL before dereference it in probe.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
7 years agoMLK-11914-2 video: mipi_dsi: add the missing error code check
Fancy Fang [Fri, 27 Nov 2015 07:09:30 +0000 (15:09 +0800)]
MLK-11914-2 video: mipi_dsi: add the missing error code check

Add the missing error code check just as the others which
have the check.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11914-1 video: mipi_dsi: correct wrong buf index usage
Fancy Fang [Fri, 27 Nov 2015 07:04:06 +0000 (15:04 +0800)]
MLK-11914-1 video: mipi_dsi: correct wrong buf index usage

The 'buf' index loop is obviously wrong. So correct
it.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11913 dma: pxp-v3: remove some duplicate dead code
Fancy Fang [Fri, 27 Nov 2015 02:21:27 +0000 (10:21 +0800)]
MLK-11913 dma: pxp-v3: remove some duplicate dead code

The code slice in the pxp_probe() function:
"
       if (!res || irq < 0) {
               err = -ENODEV;
               goto exit;
       }
"
appears twice closely. And the second code slice will become
dead code which is never executed. So remove the second one.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11907 dma: pxp-dev: allocate the 'sg' buffer dynamically.
Fancy Fang [Thu, 26 Nov 2015 08:47:07 +0000 (16:47 +0800)]
MLK-11907 dma: pxp-dev: allocate the 'sg' buffer dynamically.

The 'sg' buffer should be allocated dynamically, since its
size is dependent on the 'sg_len' which is calculated
according to the functions required.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit 57f08c108fc4f4721449b4b94be9820c7443978a)

7 years agoMLK-11896-2 usb: chipidea: imx: derefence pointer after NULL check
Li Jun [Thu, 26 Nov 2015 09:34:18 +0000 (17:34 +0800)]
MLK-11896-2 usb: chipidea: imx: derefence pointer after NULL check

Dereference data pointer after its NULL check.

Signed-off-by: Li Jun <jun.li@freescale.com>
7 years agoMLK-11896-1 usb: chipidea: imx: add break for switch case
Li Jun [Thu, 26 Nov 2015 02:48:05 +0000 (10:48 +0800)]
MLK-11896-1 usb: chipidea: imx: add break for switch case

Fix the coverity check complains although there is no function issue
with current code.

Signed-off-by: Li Jun <jun.li@freescale.com>
7 years agoASoC: fsl-sai: set xCR4/xCR5/xMR for SAI master mode
Zidan Wang [Mon, 9 Nov 2015 11:03:13 +0000 (19:03 +0800)]
ASoC: fsl-sai: set xCR4/xCR5/xMR for SAI master mode

For SAI master mode, when Tx(Rx) sync with Rx(Tx) clock, Rx(Tx) will
generate bclk and frame clock for Tx(Rx), we should set RCR4(TCR4),
RCR5(TCR5) and RMR(TMR) for playback(capture), or there will be sync
error sometimes.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 51659ca069ce5bdf20675a7967a39ef8419e87f2)

7 years agoMGS-1276 ENGR00306443-2 dts:Add QoS description in imx6sx dts
Shawn Xiao [Mon, 2 Feb 2015 07:39:51 +0000 (15:39 +0800)]
MGS-1276 ENGR00306443-2 dts:Add QoS description in imx6sx dts

(cherry-pick from f9759787e60ad3422d2119f9f25ac320ca58f5df)

confilict: arch/arm/boot/dts/imx6sx.dtsi
The dts file arch has changed in 3.14. Add QoS description in
imx6sx dts manually and solve the conflict.

Date Feb 2, 2015

Signed-off-by: Shawn Xiao <b49994@freescale.com>
7 years agoMLK-11881 video: fbdev: mxc ipuv3 fb: Correct ->prefetch in ioctrl SET_PREFETCH
Liu Ying [Fri, 20 Nov 2015 05:50:20 +0000 (13:50 +0800)]
MLK-11881 video: fbdev: mxc ipuv3 fb: Correct ->prefetch in ioctrl SET_PREFETCH

When a framebuffer is blanked, the user may call the MXCFB_SET_PREFETCH ioctrl
to enable or disable the prefetch engine.  After sanity check, the cached
->prefetch should reflect the user's intention for next unblank operation
any way instead of checking ->cur_prefetch first.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11870 usb: chipidea: otg: disable term select override for B device
Li Jun [Wed, 18 Nov 2015 08:31:00 +0000 (16:31 +0800)]
MLK-11870 usb: chipidea: otg: disable term select override for B device

In MLK-11272, we introduce a workaround to resolve data pulse detection
IC issue in i.MX7D, but did not disable the term select override after
the A device becomes B device in some cases: a_idle --> enable term
select override --> b_idle, which cause the B device cannot be enumerated
in b_peripheral mode. This patch is to fix it by disable the term select
and data pulse when A device becomes B device.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 2df52fcaded838a572c2ee8f93d6cc827a2ebc60)

7 years agoMLK-11857 mxc IPUv3: PRE: Use spinlock to protect pre_list instead of mutex
Liu Ying [Fri, 13 Nov 2015 06:55:55 +0000 (14:55 +0800)]
MLK-11857 mxc IPUv3: PRE: Use spinlock to protect pre_list instead of mutex

The pre_list can be accessed in an irq context.  To avoid potential hang up
issue, use spinlock to protect pre_list instead of mutex.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11874 media: platform: mxc v4l2 capture: Correct suspend/resume for capture
Liu Ying [Thu, 19 Nov 2015 05:43:58 +0000 (13:43 +0800)]
MLK-11874 media: platform: mxc v4l2 capture: Correct suspend/resume for capture

The capture channel should be correctly disabled in ->suspend() and
enabled in ->resume() with ->enc_disable()/->enc_disable_csi() and
->enc_enable()/->enc_enable_csi() respectively.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11876 dma: imx-sdma: fix 'section mismatch'
Robin Gong [Thu, 19 Nov 2015 03:07:50 +0000 (11:07 +0800)]
MLK-11876 dma: imx-sdma: fix 'section mismatch'

The commit '39c6663 MLK-11848-2 dma: imx-sdma: add __init for probe()' is
not correct, fix it totally.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11832: MIPI CSI: Adjust mipi csi sensor power up process
Sandor Yu [Wed, 18 Nov 2015 03:43:59 +0000 (11:43 +0800)]
MLK-11832: MIPI CSI: Adjust mipi csi sensor power up process

Add s_stream interface for MIPI CSI and ov5647/ov5640 drivers.
Enable MIPI CSI sensor after MIPI CSI DPHY CLK enable
in case MIPI DPHY miss MIPI CSI sensor signal.

Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit 26d81b416be6e3af203d1254a3116dbcf39a5605)

7 years agoMLK-11859: dts: Fix imx7D mipi csi reset bit error
Sandor Yu [Tue, 17 Nov 2015 09:20:51 +0000 (17:20 +0800)]
MLK-11859: dts: Fix imx7D mipi csi reset bit error

There is a error in i.MX7D RM RevB.
Actually the register of SRC_MIPIPHY_RCR(src offset 0x28)
bit 1 for MIPI PHY Master Reset
bit 2 for MIPI PHY Slave Reset.

Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit 4f3128a79c023319c9e21690be866dc46a9d6816)

7 years agoMLK-11813 change the clock type of 'pre_periph_sel' on imx6sl
Bai Ping [Tue, 3 Nov 2015 16:51:34 +0000 (00:51 +0800)]
MLK-11813 change the clock type of 'pre_periph_sel' on imx6sl

The 'pre_periph2_sel' and 'pre_periph_clk' and other two clks
should have the ability to change its parent clk without disabling
itself first, so change the clk type of these clocks to make the
parent can be swithed without disabling the clock.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11803 pci: imx: imx6qp pcie ep self-test failed
Richard Zhu [Mon, 2 Nov 2015 03:41:02 +0000 (11:41 +0800)]
MLK-11803 pci: imx: imx6qp pcie ep self-test failed

imx pcie used the wrab mode to do the cached access
methods on axi bus. There is 64bytes address mis-aligned
problem.
Disable the cached operations.

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
(cherry picked from commit 85db70336ab66136481926bcd7f5abe599e2aa4f)

7 years agoMLK-11765 video: mxsfb: change the fb buffer managment
Fancy Fang [Wed, 28 Oct 2015 09:16:01 +0000 (17:16 +0800)]
MLK-11765 video: mxsfb: change the fb buffer managment

The previous fb buffer management has two problems:

1. After reallocate a bigger buffer and free the old buffer,
   user space app doesn't know this and may continue accessing
   the old buffer.
2. The freed buffer contents will be lost.

So, this patch allocates a big enough fb buffer(32MB) from the
beginning and never reallocates it.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit c76a37e342369675aa9ef2efde6373d288c2f013)

Conflicts:
drivers/video/mxsfb.c

7 years agoMLK-11849: ARM: dts: fix the iomux issue in sai dts
Han Xu [Tue, 10 Nov 2015 20:19:53 +0000 (14:19 -0600)]
MLK-11849: ARM: dts: fix the iomux issue in sai dts

some issue was involved when merging the commit to kernel 4.1

Signed-off-by: Han Xu <b45815@freescale.com>
7 years agoMLK-11848-2 dma: imx-sdma: add __init for probe()
Robin Gong [Tue, 10 Nov 2015 10:29:01 +0000 (18:29 +0800)]
MLK-11848-2 dma: imx-sdma: add __init for probe()

Fix buiding error with GCC 4.6.2:

WARNING: drivers/dma/built-in.o(.text+0xefac): Section mismatch in reference from the function sdma_probe() to the function .init.text:sdma_event_remap.isra.21()
The function sdma_probe() references
the function __init sdma_event_remap.isra.21().
This is often because sdma_probe lacks a __init
annotation or the annotation of sdma_event_remap.isra.21 is wrong.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11848-1 spi: spi: Revert "spi: check tx_buf and rx_buf in spi_unmap_msg"
Robin Gong [Tue, 10 Nov 2015 10:06:53 +0000 (18:06 +0800)]
MLK-11848-1 spi: spi: Revert "spi: check tx_buf and rx_buf in spi_unmap_msg"

This commit 06634f8a25f4c5e4ff0c0ef5368a48eb394db63b cherry-picked wrong,
and that cause SPI DMA mode never works. Actually, no need this patch since
this patch has already been upsteaminged as below:

commit f8bb820da4ae863c676156627973a950129559fb
Author: Robin Gong <b38343@freescale.com>
Date:   Thu Apr 16 10:54:18 2015 +0800

    spi: check tx_buf and rx_buf in spi_unmap_msg

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11844-2 ARM: dts: imx7d: reserve DDR space for M4 use case
Anson Huang [Tue, 10 Nov 2015 11:12:55 +0000 (19:12 +0800)]
MLK-11844-2 ARM: dts: imx7d: reserve DDR space for M4 use case

FreeRTOS/M4 has DDR use case, M4 can only execute on DDR
space lower than 0xa0000000, Linux kernel will reserve 1M
(0x9ff00000 - 0x9fffffff) for it, below are the DDR usage:

0x80000000 - 0x9fefffff: Linux kernel;
0x9ff00000 - 0x9fffffff: FreeRTOS;
0xa0000000 - 0xbfefffff: Linux kernel;
0xbff00000 - 0xbfffffff: RPMSG shared memory;
0xc0000000 - 0xffffffff: Linux kernel if boards has 2GB DDR.

Also, remove 'reg' property which is unused.

Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
7 years agoMLK-11844-1 ARM: dts: imx6sx: reserve DDR space for M4 use case
Anson Huang [Tue, 10 Nov 2015 11:05:02 +0000 (19:05 +0800)]
MLK-11844-1 ARM: dts: imx6sx: reserve DDR space for M4 use case

FreeRTOS/M4 has DDR use case, M4 can only execute on DDR
space lower than 0xa0000000, Linux kernel will reserve 1M
(0x9ff00000 - 0x9fffffff) for it, below are the DDR usage:

0x80000000 - 0x9fefffff: Linux kernel;
0x9ff00000 - 0x9fffffff: FreeRTOS;
0xa0000000 - 0xbfefffff: Linux kernel;
0xbff00000 - 0xbfffffff: RPMSG shared memory;
0xc0000000 - 0xffffffff: Linux kernel if boards has 2GB DDR.

Also, remove 'reg' property which is unused.

Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
7 years agoMLK-11828-2 ARM: dts: reserve OCRAM space for M4
Anson Huang [Fri, 6 Nov 2015 10:46:35 +0000 (18:46 +0800)]
MLK-11828-2 ARM: dts: reserve OCRAM space for M4

FreeRTOS has use case of running on OCRAM, reserve the
bottom half of OCRAM spase(0x910000 - 0x91efff) for M4,
the last 4K is for shared memory power management.

Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
7 years agoMLK-11828-1 ARM: dts: reserve OCRAM space for M4
Anson Huang [Fri, 6 Nov 2015 10:41:59 +0000 (18:41 +0800)]
MLK-11828-1 ARM: dts: reserve OCRAM space for M4

FreeRTOS has use case of running on OCRAM, reserve the
bottom half of OCRAM spase(0x910000 - 0x91ffff) for M4.

Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
7 years agoMLK-11284 ARM: ERRATA: Add ARM/MP: 814220 SW workaround
Jason Liu [Fri, 24 Jul 2015 09:06:11 +0000 (17:06 +0800)]
MLK-11284 ARM: ERRATA: Add ARM/MP: 814220 SW workaround

ARM/MP: 814220—B-Cache maintenance by set/way operations can execute out of order.

Description:
The v7 ARM states that all cache and branch predictor maintenance operations
that do not specify an address execute, relative to each other, in program
order. However, because of this erratum, an L2 set/way cache maintenance
operation can overtake an L1 set/way cache maintenance operation, this would
cause the data corruption.

This ERRATA affected the Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5.

This patch is the SW workaround by adding a DSB before changing cache levels as
the ARM ERRATA: ARM/MP: 814220 told in the ARM ERRATA documentation.

Signed-off-by: Jason Liu <r64343@freescale.com>
(cherry picked from commit 0e9a87bbd4f7d1c48e42c65aa94939a7283599dd)

Conflicts:
arch/arm/mach-imx/Kconfig

7 years agoMLK-11842 video: epdc: change 'CONFIG_PM_RUNTIME' to 'CONFIG_PM'
Fancy Fang [Mon, 9 Nov 2015 08:23:28 +0000 (16:23 +0800)]
MLK-11842 video: epdc: change 'CONFIG_PM_RUNTIME' to 'CONFIG_PM'

The 'CONFIG_PM_RUNTIME' has been eliminated and all the users
should use 'CONFIG_PM' directly. So do this change for epdc and
epdc-v2.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11841 dma: pxp: change 'CONFIG_PM_RUNTIME' to 'CONFIG_PM'
Fancy Fang [Mon, 9 Nov 2015 08:19:15 +0000 (16:19 +0800)]
MLK-11841 dma: pxp: change 'CONFIG_PM_RUNTIME' to 'CONFIG_PM'

The 'CONFIG_PM_RUNTIME' has been eliminated and all the users
should use 'CONFIG_PM' directly. So do this change for pxp-v2
and pxp-v3.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11840 video: mxsfb: change 'CONFIG_PM_RUNTIME' to 'CONFIG_PM'
Fancy Fang [Mon, 9 Nov 2015 08:11:53 +0000 (16:11 +0800)]
MLK-11840 video: mxsfb: change 'CONFIG_PM_RUNTIME' to 'CONFIG_PM'

The 'CONFIG_PM_RUNTIME' has been eliminated and all the users
should use 'CONFIG_PM' directly. So do this change for mxsfb.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11838 ARM: dts: imx6sx: fix suspend/resume failed on i.mx6sx-sdb-reva board
Robin Gong [Mon, 9 Nov 2015 03:28:16 +0000 (11:28 +0800)]
MLK-11838 ARM: dts: imx6sx: fix suspend/resume failed on i.mx6sx-sdb-reva board

There is one ROM bug on i.mx6sx TO1.1 that default ROM code use the old
ocram space 0x900000, but it should be 0x8f8000. So SW workaround need to
be added, unfortunately, the 'romcp' device node not added in i.mx6sx dtsi
on v4.1, thus i.mx6sx-sdb-reva board will be failed to resume back, add them
back.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11831-2 usb: chipidea: imx: add request{release}_bus_freq
Peter Chen [Fri, 6 Nov 2015 07:33:17 +0000 (15:33 +0800)]
MLK-11831-2 usb: chipidea: imx: add request{release}_bus_freq

When the usb in idle, it calls release_bus_req.
When the usb is going to use, it calls request_bus_req.
This is a rework patch of ENGR00286459 and ENGR00286926.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
7 years agoMLK-11831-1 usb: chipidea: imx: Add dummy LDO2p5 regulator for VBUS wakeup
Ranjani Vaidyanathan [Fri, 6 Nov 2015 07:21:25 +0000 (15:21 +0800)]
MLK-11831-1 usb: chipidea: imx: Add dummy LDO2p5 regulator for VBUS wakeup

LDO2p5 cannot be disabled in low power idle mode when the USB driver
enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy
regulator that the USB driver will enable when VBUS wakeup is required.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
7 years agoMLK-11829-3 ARM: dts: imx6qdl-sabresd: add egalax touch screen support
Haibo Chen [Fri, 6 Nov 2015 07:12:49 +0000 (15:12 +0800)]
MLK-11829-3 ARM: dts: imx6qdl-sabresd: add egalax touch screen support

Add egalax touch screen support for imx6qdl-sabresd board.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-11829-2 ARM: dts: imx6sx-sabreauto: add egalax touch screen support
Haibo Chen [Fri, 6 Nov 2015 06:00:16 +0000 (14:00 +0800)]
MLK-11829-2 ARM: dts: imx6sx-sabreauto: add egalax touch screen support

Add egalax touch screen support on i2c2 bus.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-11829-1 ARM: dts: imx6sx-sdb: add egalax touch screen support
Haibo Chen [Fri, 6 Nov 2015 05:47:39 +0000 (13:47 +0800)]
MLK-11829-1 ARM: dts: imx6sx-sdb: add egalax touch screen support

Add i2c2 bus and add egalax touch screen support on imx6sx-sdb board.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-11700 video: mxsfb: correct the fb pan display ret value
Fancy Fang [Wed, 14 Oct 2015 03:26:27 +0000 (11:26 +0800)]
MLK-11700 video: mxsfb: correct the fb pan display ret value

The fb_pan_display() return value should be corrected
according to the wait_for_completion_timeout() return
value.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit 459d01cbda39e51029c55e583909ef645037b7f3)

Conflicts:
drivers/video/mxsfb.c

7 years agoMLK-9817 spi: imx: convert all clk_enable to clk_prepare_enable
Bai Ping [Sat, 8 Nov 2014 13:35:26 +0000 (21:35 +0800)]
MLK-9817 spi: imx: convert all clk_enable to clk_prepare_enable

This is done in preperation for low power mode. Convert all clk_enable
to clk_prepare_enable and clk_disable to clk_disable_unprepare. Make sure
PLL3 power down when entering low power mode.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 1808b31fdae576e775159a05cde9b45e404bb6e2)

7 years agoMLK-11802-3 ARM: imx6ul-14x14-evk: Enable dual switch function for USB
Peter Chen [Fri, 30 Oct 2015 09:25:28 +0000 (17:25 +0800)]
MLK-11802-3 ARM: imx6ul-14x14-evk: Enable dual switch function for USB

Since we have supported control vbus through ID pin, we can
support dual switch function for otg port, but fully otg can't
be supported at this port.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agoMLK-11252-02 cpufreq: imx: add dc regulator in cpufreq driver
Bai Ping [Thu, 16 Jul 2015 11:08:28 +0000 (19:08 +0800)]
MLK-11252-02 cpufreq: imx: add dc regulator in cpufreq driver

In some i.MX6 board (i.MX6UL EVK), it will have a additional
GPIO controlled DC-DC regulator. we need to change this regulator's
voltage According the maximum frequency that CPU can run at.

At present, we only need to set the voltage to minimum one, we need
to set the voltage to the maximum before suspend, resume back to the
minimum voltage after suspend.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 31f0773ee7d6ba5715486a221857f2ceccb434b4)

7 years agoMLK-11252-01 ARM: imx: dts: add gpio regulator to control the dc-dc voltage on imx6ul...
Bai Ping [Thu, 16 Jul 2015 10:48:48 +0000 (18:48 +0800)]
MLK-11252-01 ARM: imx: dts: add gpio regulator to control the dc-dc voltage on imx6ul evk board

For the i.MX6UL EVK board, according to the latest schematic, use a GPIO pin along with
the 'PMIC_STBY_REQ' pin to control the DC-DC voltage output. the possible voltage output
as below:

PMIC_STBY_REQ = 0, GPIO_DVFS = 0, output is 1.4V (1.375V + 25mV) <Default>
PMIC_STBY_REQ = 0, GPIO_DVFS = 1, output is 1.3V (1.275V + 25mV)
PMIC_STBY_REQ = 1, GPIO_DVFS = 0, output is 0.925V (0.9V + 25mV)

In normal run mode, the voltage output should be changed using the 'GPIO_DVFS' pin,
so add gpio regulator to control it.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 4517cf404b4e0cfb805a9d0c412b2f2839400d9b)

7 years agoMLK-11268-2 ARM: imx: disconnect vddhigh and vddsnvs in dsm for imx6ul
Anson Huang [Tue, 21 Jul 2015 16:40:00 +0000 (00:40 +0800)]
MLK-11268-2 ARM: imx: disconnect vddhigh and vddsnvs in dsm for imx6ul

Same as i.MX6SX, need to disconnect vddhigh and vddsnvs
in DSM on i.MX6UL, they have same design.

Signed-off-by: Anson Huang <b20788@freescale.com>
(cherry picked from commit f0c63b894a60512318481cb8a7b0777cdb7c46ab)

7 years agoMLK-11268-1 ARM: imx: disconnect vddhigh and vddsnvs in dsm for imx6sx
Anson Huang [Tue, 21 Jul 2015 16:36:38 +0000 (00:36 +0800)]
MLK-11268-1 ARM: imx: disconnect vddhigh and vddsnvs in dsm for imx6sx

per design team's recommendation, in DSM mode,
need to disconnect vddhigh and vddsnvs, add it for i.MX6SX.

i.MX6SX has different bit definition than i.MX6SL about this
bit in PMU_MISC0 register.

Signed-off-by: Anson Huang <b20788@freescale.com>
(cherry picked from commit ec42012c66961c357a1ed4c31d27f83a1db86611)

7 years agoMLK-11465-2: ARM: dts: imx7d/imx6ul: update SW1A for PFUZE3000
Robin Gong [Tue, 1 Sep 2015 01:58:02 +0000 (09:58 +0800)]
MLK-11465-2: ARM: dts: imx7d/imx6ul: update SW1A for PFUZE3000

Update max voltage of SW1A to 3.3V on PF3000, see below datasheet:
http://cache.freescale.com/files/analog/doc/data_sheet/PF3000.pdf?fsrch=1&sr=1&pageNum=1

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 5cd7d3c5933b052b899183a45fa4be8cdb2a0c69)

7 years agoMLK-11465-1: regulator: pfuze100: update voltage setting for SW1A of PF3000
Robin Gong [Tue, 1 Sep 2015 01:21:58 +0000 (09:21 +0800)]
MLK-11465-1: regulator: pfuze100: update voltage setting for SW1A of PF3000

Regards to the pfuze3000 doc update, regulator driver need to be updated too.
Otherwise the voltage information show wrongly.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit ac1992e3eab0d31195781bb7d1c4ff7ccea1c86a)

7 years agoMGS-1211 gpu: add GPU for 6sl,6sx,6dl
Shawn Xiao [Wed, 28 Oct 2015 06:38:58 +0000 (14:38 +0800)]
MGS-1211 gpu: add GPU for 6sl,6sx,6dl

Add the GPU configuration in the dtsi files for the above three SOCs.

date Oct 28, 2015

Signed-off-by: Shawn Xiao <b49994@freescale.com>
7 years agoMGS-1087 gpu: Move the GPU reserved memory to DTS file
Shawn Xiao [Mon, 19 Oct 2015 03:54:21 +0000 (11:54 +0800)]
MGS-1087 gpu: Move the GPU reserved memory to DTS file

Currently 128M reserved for GPU in all the i.MX6 boards that is
requiring kernel to allocate CMA 320M. For the low end devices like 6SX
and 6SL, the 320M is huge. Sometimes customer board may have very less
RAM.

With Kernel 4.1, there is a new feature CMA can be calculated at DTS
level based on the amount queried from different module drivers.So
moving the GPU memory to DTS is valid and can be configured for each
board.

And at the same time, also keep the option for user to configure the
parameters "contiguousBase and contiguousSize" in u-boot.

Signed-off-by: Shawn Xiao <b49994@freescale.com>
7 years agoMLK-11786 ARM: dts: imx6qp: correct vddcore regulator input
Anson Huang [Thu, 29 Oct 2015 14:03:32 +0000 (22:03 +0800)]
MLK-11786 ARM: dts: imx6qp: correct vddcore regulator input

On i.MX6QP SabreSD board, VDDCORE is from PFuze's SW2, this
is different from i.MX6QDL SabreSD board, which is from SW1A/B.

Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
7 years agoMLK-10183 ASoC: wm8962: separate ALC Coefficients to four reigsters
Zidan Wang [Thu, 29 Oct 2015 09:26:14 +0000 (17:26 +0800)]
MLK-10183 ASoC: wm8962: separate ALC Coefficients to four reigsters

Attempt to read volatile register when cache_only is set will return
EBUSY. After playback/record, wm8962_runtime_suspend function will set
cache_only flag, so the volitale register ALC2 can't be read from cache.

Separate ALC Coefficients to four reigsters, the volatile register ALC2
will be read from hardware instead of cache.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit 5ec8878be12530517b4c8ae307441a0ac16071a3)

7 years agoMLK-11779 sim: imx: set gpio active high
Gao Pan [Mon, 26 Oct 2015 04:58:25 +0000 (12:58 +0800)]
MLK-11779 sim: imx: set gpio active high

Sim card CVCC is determined by the gpio value from sim controller.
How the CVCC is controlled on both post card boards is decribed below.

NCN8025:Vcc=ACTIVE_HIGH?5V:3V
TDA8035:Vcc=ACTIVE_HIGH?5V:1.8V

Different sim cards have different CVCC range. To support all cards
with same dts, this patch set gpio active high.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11778 sim: imx: change pad settings to improve signal quality
Gao Pan [Wed, 21 Oct 2015 09:43:32 +0000 (17:43 +0800)]
MLK-11778 sim: imx: change pad settings to improve signal quality

Change pad settings to improve signal quality.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11777 sim: imx: remove useless code
Gao Pan [Thu, 22 Oct 2015 08:28:13 +0000 (16:28 +0800)]
MLK-11777 sim: imx: remove useless code

sim_activate() process is contained in the cold reset.
Thus, it is redundant and should be removed.

This patch also adds comments to cold reset process.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11789 mmc: sdhci: Add 1ms delay in eMMC tuning procedure
Haibo Chen [Thu, 29 Oct 2015 09:21:37 +0000 (17:21 +0800)]
MLK-11789 mmc: sdhci: Add 1ms delay in eMMC tuning procedure

On 4.1 kernel, some eMMC on i.MX7D-SDB board can't pass HS400 tuning,
the same eMMC can pass HS400 tuning on 3.14 kernel. The difference
is that 4.1 kernel does not have 1ms delay for eMMC during the
tuning procedure. The root cause still not find, add back the
1ms delay first.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
7 years agoMLK-11781-2 dts: imx6ul-9x9-evk: fix uSDHC1 CD GPIO polarity
Dong Aisheng [Wed, 28 Oct 2015 08:33:17 +0000 (16:33 +0800)]
MLK-11781-2 dts: imx6ul-9x9-evk: fix uSDHC1 CD GPIO polarity

The default gpio flag is 0 which actually means ACTIVE_HIGH.
However, it should be ACTIVE_LOW.
Change it using correct macro directly.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-11781-1 dts: imx6ul-evk: add non-removable property for TF card
Dong Aisheng [Wed, 28 Oct 2015 08:24:59 +0000 (16:24 +0800)]
MLK-11781-1 dts: imx6ul-evk: add non-removable property for TF card

The TF card slot on uSDHC2 does not support CD function,
so add non-removable property.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-10629-4 mmc: sdhci: remove MMC_CAP_NEEDS_POLL
Dong Aisheng [Thu, 9 Apr 2015 08:23:24 +0000 (16:23 +0800)]
MLK-10629-4 mmc: sdhci: remove MMC_CAP_NEEDS_POLL

This will cause meaningless CPU overhead by polling the card at backgroud
if the CD is broken.
Most board does not intend to use this function, so remove it.
Platform driver could add it for test if needed.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Conflicts:
drivers/mmc/host/sdhci.c

7 years agoMGS-577 ARM: Export the cache management symbols when !MULTI_CACHE
Shawn Xiao [Fri, 17 Apr 2015 02:48:09 +0000 (10:48 +0800)]
MGS-577 ARM: Export the cache management symbols when !MULTI_CACHE

When compiling a GPU module without CONFIG_MULTI_CACHE enabled, the
compiler prompt warning which says symbol v7_dma_map_area and
v7_dma_flush_area not exported. And when insmod GPU module, it also
warns the above two symbols not found, which cause insmod module failed.

This patch export these dma access functions and fix these issues.

Signed-off-by: Shawn Xiao <b49994@freescale.com>
7 years agoMLK-11763-2 imx_v7_defconfig: add Broadcom bcmdhd driver support
Dong Aisheng [Thu, 12 Mar 2015 09:26:19 +0000 (17:26 +0800)]
MLK-11763-2 imx_v7_defconfig: add Broadcom bcmdhd driver support

Add Broadcom bcmdhd driver support.
BTW, the in kernel upstream brcmfmac driver is removed to avoid confusion.
And Atheros driver is also removed which is not supported anymore.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-11763-1 bcmdhd: make the driver work for 4.1 kernel
Dong Aisheng [Mon, 26 Oct 2015 10:42:43 +0000 (18:42 +0800)]
MLK-11763-1 bcmdhd: make the driver work for 4.1 kernel

Fixing a lot of compiling issues due to kernel upgrade and then
make it work on 4.1 kernel.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
7 years agoMLK-11403: I2C: imx: restore pin setting for i2c
Gao Pan [Tue, 25 Aug 2015 06:00:32 +0000 (14:00 +0800)]
MLK-11403: I2C: imx: restore pin setting for i2c

restore pin setting for i2c in suspend/resume

Signed-off-by: Gao Pan <gaopan@freescale.com>
7 years agoMLK-11550-1: regulator: pfuze100: restore some registers after LPSR for pfuze3000
Robin Gong [Tue, 15 Sep 2015 04:46:39 +0000 (12:46 +0800)]
MLK-11550-1: regulator: pfuze100: restore some registers after LPSR for pfuze3000

Some registers on pfuze3000 will lost after exit from LPSR, need restore them,
otherwise system may reboot with below command after system enter LPSR one time:

root@imx7d_all:~# echo enabled > /sys/class/tty/ttymxc0/power/wakeup
root@imx7d_all:~# echo mem > /sys/power/state

because LDOGCTL not recover as 1. Add 'fsl,lpsr-mode' property to this case,
please add this property if your board support LPSR mode as imx7d-12x12-lpddr3-arm2
board.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11391 ARM: imx: make sure SNVS clk is enabled during suspend
Anson Huang [Wed, 19 Aug 2015 17:11:42 +0000 (01:11 +0800)]
MLK-11391 ARM: imx: make sure SNVS clk is enabled during suspend

As SNVS clk may be disabled in kernel to save power(~1mA),
but during suspend/resume, we have to access SNVS register
to do MMDC retention and power down SoC etc.., need to
make sure SNVS clk is enabled before accessing its register.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11415: ARM: dts: fix the pinctrl conflict on i.MX7D 12x12 lpddr3 ARM2 board
Han Xu [Tue, 25 Aug 2015 19:08:03 +0000 (14:08 -0500)]
MLK-11415: ARM: dts: fix the pinctrl conflict on i.MX7D 12x12 lpddr3 ARM2 board

fix the pin conflict between ECSPI with MIPI and EPDC on i.MX7D 12x12 lpddr3 ARM2 board.

Signed-off-by: Han Xu <b45815@freescale.com>
7 years agoMLK-11074: ARM:dts: fix mipi pin conflict with ecspi1
Han Xu [Tue, 9 Jun 2015 15:27:00 +0000 (10:27 -0500)]
MLK-11074: ARM:dts: fix mipi pin conflict with ecspi1

mipi pins conflict with ecspi1 on i.MX7D 12x12 lpddr3 ARM2 board, manage
the mipi pins in a individual group to solve the issue.

Signed-off-by: Han Xu <b45815@freescale.com>
7 years agoMLK-11402 ARM: dts : add i2c IOMUX sleep state
Gao Pan [Thu, 11 Jun 2015 08:45:47 +0000 (16:45 +0800)]
MLK-11402 ARM: dts : add i2c IOMUX sleep state

Add i2c IOMUX sleep state for imx7d-12x12-lpddr3-arm2.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11571 [MX7D-12LPDDR3] LCD: Screen still shows with weak backlight after system...
Fancy Fang [Fri, 9 Oct 2015 08:35:26 +0000 (16:35 +0800)]
MLK-11571 [MX7D-12LPDDR3] LCD: Screen still shows with weak backlight after system entered suspend mode. 100%

The 'backlight' and 'pwm1' are disabled due to the lpsr mode
not ready in the previous patch in the imx7d-12x12-lpddr3-arm2
dts. So they should be enabled again after lpsr ready.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11658 ARM: dts: imx7d-12x12-lpddr3-arm2: enable v4l2 output
Robby Cai [Tue, 29 Sep 2015 10:25:30 +0000 (18:25 +0800)]
MLK-11658 ARM: dts: imx7d-12x12-lpddr3-arm2: enable v4l2 output

enable v4l2 output feature on i.MX7D 12x12 LPDDR3 ARM2 board.

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11550-2: ARM: dts: imx7d-12x12-lpddr3-arm2: add 'fsl,lpsr-mode' for pfuze3000
Robin Gong [Tue, 15 Sep 2015 04:53:57 +0000 (12:53 +0800)]
MLK-11550-2: ARM: dts: imx7d-12x12-lpddr3-arm2: add 'fsl,lpsr-mode' for pfuze3000

Add 'fsl,lpsr-mode' property to support LPSR mode on arm2 board.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11438-5 ARM: dts: enable lcdif and pxp
Robby Cai [Fri, 28 Aug 2015 07:28:31 +0000 (15:28 +0800)]
MLK-11438-5 ARM: dts: enable lcdif and pxp

Enabled lcdif and pxp as lpsr mode is supported.

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11438-3 ARM: dts: imx7d: add lpsr mode for lcdif
Robby Cai [Thu, 27 Aug 2015 12:42:22 +0000 (20:42 +0800)]
MLK-11438-3 ARM: dts: imx7d: add lpsr mode for lcdif

Add lpsr mode for lcdif

Signed-off-by: Robby Cai <r63905@freescale.com>
7 years agoMLK-11473 ARM: dts: add sim1 IOMUX sleep state for imx7d-12x12-lpddr3-arm2
Gao Pan [Tue, 1 Sep 2015 03:45:20 +0000 (11:45 +0800)]
MLK-11473 ARM: dts: add sim1 IOMUX sleep state for imx7d-12x12-lpddr3-arm2

SIM1 IOMUX is changed into reset state in LPSR mode. This patch
adds sim1 IOMUX sleep state in dts for IOMUX restoring.

Signed-off-by: Gao Pan <b54642@freescale.com>
7 years agoMLK-11454 ARM: dts: imx7d-12x12-lpddr3-arm2: enable USB function
Peter Chen [Fri, 28 Aug 2015 07:39:48 +0000 (15:39 +0800)]
MLK-11454 ARM: dts: imx7d-12x12-lpddr3-arm2: enable USB function

It doesn't need to do any changes when using lpsr mode for USB.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agoMLK-11409-1: ARM: dts: imx7d-12x12-lpddr3-arm2.dts
Robin Gong [Tue, 25 Aug 2015 06:25:22 +0000 (14:25 +0800)]
MLK-11409-1: ARM: dts: imx7d-12x12-lpddr3-arm2.dts

Restore pinhogs after exit from lpsr mode.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11511 ARM: imx: force ARM into wfi during LPSR enter
Anson Huang [Mon, 7 Sep 2015 14:23:01 +0000 (22:23 +0800)]
MLK-11511 ARM: imx: force ARM into wfi during LPSR enter

During stress test of LPSR using RTC alarm, sometimes
RTC alarm fail to fire, the control register(offset 0x38)
is changed and RTC alarm is disabled, according to
design team, when enter LPSR with programming SNVS
to shutdown PMIC, SNVS need some time to finish power
down process, better to put ARM into wfi during this
window.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-15 ARM: imx: add gpcv2 save/restore for lpsr
Anson Huang [Mon, 27 Jul 2015 11:17:06 +0000 (19:17 +0800)]
MLK-11281-15 ARM: imx: add gpcv2 save/restore for lpsr

Redo necessary gpcv2 initialization after resume from
LPSR mode, as its state is lost in lpsr mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-14: ARM: imx: restore RC_OSC after LPSR
Robin Gong [Thu, 11 Jun 2015 07:49:38 +0000 (15:49 +0800)]
MLK-11281-14: ARM: imx: restore RC_OSC after LPSR

Restore RC_OSC after LPSR resume back, otherwise,
low power idle will never works normally.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-13 ARM: imx: add gpio save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:23:23 +0000 (23:23 +0800)]
MLK-11281-13 ARM: imx: add gpio save/restore for lpsr

Add GPIO state retention support for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-12 ARM: imx: add system counter save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:21:39 +0000 (23:21 +0800)]
MLK-11281-12 ARM: imx: add system counter save/restore for lpsr

Add system counter state retention for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-11 ARM: imx: add gpt1 save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:20:15 +0000 (23:20 +0800)]
MLK-11281-11 ARM: imx: add gpt1 save/restore for lpsr

Add GPT1 state retention support for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-10 ARM: imx: add ccm save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:18:19 +0000 (23:18 +0800)]
MLK-11281-10 ARM: imx: add ccm save/restore for lpsr

When exit from LPSR mode, CCM settings will be lost, so
we need to do CCM state retention support to make sure
after resume from LPSR mode, clk tree settings are same
as before entering LPSR;

Due to hardware design requirement, CCM clk root registers
access needs their parents enabled, so we use special
sequence to restore PLLs, PFDs, ROOTs, and LPCGs.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-9 ARM: imx: add debug uart io save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:15:29 +0000 (23:15 +0800)]
MLK-11281-9 ARM: imx: add debug uart io save/restore for lpsr

When exit from lpsr mode, iomuxc's io/pad settings will
be lost, although driver resume callback will restore
module io settings from sleep mode to default mode, debug
uart needs to be enabled earlier to support
"no_console_suspend" case.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-8 ARM: imx: add iomuxc gpr save/restore for lpsr
Anson Huang [Fri, 31 Jul 2015 15:12:54 +0000 (23:12 +0800)]
MLK-11281-8 ARM: imx: add iomuxc gpr save/restore for lpsr

Add IOMUXC GPR state retention support for i.MX7D LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-7 ARM: imx: add low power ocram save/restore
Anson Huang [Fri, 31 Jul 2015 15:08:06 +0000 (23:08 +0800)]
MLK-11281-7 ARM: imx: add low power ocram save/restore

In LPSR mode, low power ocram can NOT contain its memory any
more, need to support state retention to make sure its memory
is correct after resume from LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-6 ARM: imx: add lpsr support for imx7d
Anson Huang [Thu, 23 Jul 2015 11:05:16 +0000 (19:05 +0800)]
MLK-11281-6 ARM: imx: add lpsr support for imx7d

Add LPSR mode support if dtb contains "fsl,enable-lpsr" property,
when echo mem to make system enter DSM mode, whole SOC will be
powered down except LPSR, SNVS domain and DDR chip's power,
that means all modules in SOC domain will be powered down,
including ccm, iomuxc, gpc....

So, all drivers need to restore their iomux settings and
clk settings after resume;

When system enters LPSR mode, can be waked up by long press
ON/OFF button or using RTC alarm.

In LPSR mode resume, ROM will read the entry point in LPSR
register, make DRAM exit retention mode and jump to DRAM
to resume kernel immediately, so before entering LPSR mode,
we need to set the resume entry correctly in LPSR register
and clear it after resume.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-5 ARM: dts: only enable necessary modules for LPSR mode
Anson Huang [Thu, 23 Jul 2015 10:50:12 +0000 (18:50 +0800)]
MLK-11281-5 ARM: dts: only enable necessary modules for LPSR mode

Add property "fsl,enable-lpsr" to enable lpsr mode by default,
when this property is set, DSM mode will go into LPSR mode.

As many modules save/restore is NOT ready, to make tiny
kernel enter/exit LPSR mode work, only enable those
necessary modules for now.

Other modules will be enabled after their drivers are
ready to support LPSR mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-4 ARM: imx: add iomuxc lpsr gpr node for imx7d
Anson Huang [Thu, 23 Jul 2015 10:49:05 +0000 (18:49 +0800)]
MLK-11281-4 ARM: imx: add iomuxc lpsr gpr node for imx7d

Add LPSR GPR node to support LPSR mode on i.MX7D.

Signed-off-by: Anson Huang <b20788@freescale.com>
7 years agoMLK-11281-3 pinctrl: pinctrl-imx: add suspend/resume for LPSR
Robin Gong [Thu, 11 Jun 2015 09:23:32 +0000 (17:23 +0800)]
MLK-11281-3 pinctrl: pinctrl-imx: add suspend/resume for LPSR

To support pinctl hog restore after LPSR resume back,
add suspend/resume in pinctrl driver.

Signed-off-by: Robin Gong <b38343@freescale.com>
7 years agoMLK-11758 dts: mx6ul evk: set regulator wlreg_on always on
Fugang Duan [Mon, 26 Oct 2015 06:07:55 +0000 (14:07 +0800)]
MLK-11758 dts: mx6ul evk: set regulator wlreg_on always on

Murata adapter VDDIO is derived from sd slot VMMC supply, if usdhc cannot
detect sd/sdio card, VMMC is shutdown that causes VDDIO has no voltage, and
bt cannot work. So BT depends on VDDIO/VMMC.

Now the workaround is set wlreg_on alwasys on, usdhc can detect wifi card
and supply VMMC 3.3V voltage, so that Murata adapter VDDIO has power supply.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit f17b5e5be37875e05794621eacf386ec25adf223)

7 years agoMLK-11748 ARM: dts: imx7d-12x12-lpddr3-arm2-sai: configure gpio1_12 pin to non GPIO...
Zidan Wang [Fri, 23 Oct 2015 03:49:03 +0000 (11:49 +0800)]
MLK-11748 ARM: dts: imx7d-12x12-lpddr3-arm2-sai: configure gpio1_12 pin to non GPIO function before lpsr suspend

It's hardware issue that if there are interrupts in GPIO1, the system
will not enter lpsr suspend state.

gpio1_12 pin is used as headphone detect pin for wm8958 sound card. If
headphone is not plugged in, the gpio1_12 pin is high level. When lpsr
suspend without headphone plugged in, gpio will be powered down and
there will be a interrupt in the gpio1_12 pin.

So we should avoid thus interrupt. We fix this issue by configuring
gpio1_12 pin to non GPIO function before lpsr suspend.

Because ALSA will set SAI pins to sleep state before suspend, and will
not set them to default state after resume if cpu dai is not active. So
we'd better remove non SAI pins from SAI pin group, and let iomuxc to
control the gpio pin state.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit b3e988b838388f901d471a6938d0fb67b9bcad3b)

Conflicts:
arch/arm/boot/dts/imx7d-12x12-lpddr3-arm2.dts

7 years agoMLK-11722 mxc IPUv3: PRE: Correct block mode bad update window calculation
Liu Ying [Fri, 16 Oct 2015 03:26:59 +0000 (11:26 +0800)]
MLK-11722 mxc IPUv3: PRE: Correct block mode bad update window calculation

In order to workaround the PRE SoC bug recorded by errata ERR009624, the
software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL
register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode.

In non-small y resolution cases(>9 lines), we choose to check the STORE_BLOCK_Y
field of the register HW_PRE_STRORE_ENGINE_STATUS to determine the bad window
to update the SDW_UDPATE bit of the PRE_CTRL register.  According to the
description of the STRORE_BLOCK_Y field in block mode, the field indicates the
Y coordinate of the block currently being rendered.  Thus, we should round up
the real display y resolution to 4 lines to align with the block high(the out-
standing lines are cropped by PRG and IPU).  To maximize the safe window, we
just need to avoid updating the shadow bit during the last block of lines.
To conclude, the bad window for block mode is (store_block_y == 0 ||
store_block_y >= DIV_ROUND_UP(y_resolution, 4) - 1).

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
7 years agoMLK-11749: pinctrl: support pinctrl setting assertion via gpios
Shawn Guo [Mon, 15 Jul 2013 08:31:53 +0000 (16:31 +0800)]
MLK-11749: pinctrl: support pinctrl setting assertion via gpios

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@freescale.com>
7 years agoMLK-10853-2 dts: imx6ul-ddr3-arm2: add flexcan2 support
Dong Aisheng [Wed, 29 Apr 2015 11:15:33 +0000 (19:15 +0800)]
MLK-10853-2 dts: imx6ul-ddr3-arm2: add flexcan2 support

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 <b29396@freescale.com>
(cherry picked from commit 14d7595a2f1622c72de1bc534cf18b9e828140ea)

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

7 years agoMLK-11093-2 dts: imx6ul-14x14-ddr3-arm2-emmc: enable HS200 support
Dong Aisheng [Thu, 11 Jun 2015 09:01:16 +0000 (17:01 +0800)]
MLK-11093-2 dts: imx6ul-14x14-ddr3-arm2-emmc: enable HS200 support

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 <b29396@freescale.com>
(cherry picked from commit f0f86b3bcd0ae1b1405f752862bde9745222372d)

7 years agoMLK-11093-1 dts: imx6ul-14x14-ddr-arm2: add SD1 eMMC support
Dong Aisheng [Thu, 11 Jun 2015 06:40:17 +0000 (14:40 +0800)]
MLK-11093-1 dts: imx6ul-14x14-ddr-arm2: add SD1 eMMC support

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 <b29396@freescale.com>
(cherry picked from commit e46408ad15bed829e6f254ced16524fcfe99176f)

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

7 years agoMLK-10584 bcmdhd: fix connect Adhoc network warnings
Dong Aisheng [Mon, 25 May 2015 11:13:05 +0000 (19:13 +0800)]
MLK-10584 bcmdhd: fix connect Adhoc network warnings

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 <b29396@freescale.com>
(cherry picked from commit a6a35af7350b26c1e30cc14aa2ad6e117ab260dc)

7 years agoMLK-10717 bcmdhd: fix rmmod warnings when associated with AP
Dong Aisheng [Wed, 20 May 2015 09:14:41 +0000 (17:14 +0800)]
MLK-10717 bcmdhd: fix rmmod warnings when associated with AP

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
[<80014a40>] (unwind_backtrace) from [<80011698>] (show_stack+0x10/0x14)
[<80011698>] (show_stack) from [<80705f90>] (dump_stack+0x7c/0xbc)
[<80705f90>] (dump_stack) from [<8002fbe0>] (warn_slowpath_common+0x6c/0x88)
[<8002fbe0>] (warn_slowpath_common) from [<8002fc98>] (warn_slowpath_null+0x1c/0x24)
[<8002fc98>] (warn_slowpath_null) from [<806b2d4c>] (cfg80211_netdev_notifier_call+0x3f4/0x468)
[<806b2d4c>] (cfg80211_netdev_notifier_call) from [<8004e044>] (notifier_call_chain+0x44/0x84)
[<8004e044>] (notifier_call_chain) from [<8004e148>] (raw_notifier_call_chain+0x18/0x20)
[<8004e148>] (raw_notifier_call_chain) from [<8059b218>] (rollback_registered_many+0x1dc/0x340)
[<8059b218>] (rollback_registered_many) from [<8059b3a4>] (rollback_registered+0x28/0x3c)
[<8059b3a4>] (rollback_registered) from [<8059c658>] (unregister_netdevice_queue+0x54/0xb0)
[<8059c658>] (unregister_netdevice_queue) from [<8059c6cc>] (unregister_netdev+0x18/0x20)
[<8059c6cc>] (unregister_netdev) from [<7f00ef84>] (dhd_detach+0x238/0x474 [bcmdhd])
[<7f00ef84>] (dhd_detach [bcmdhd]) from [<7f05621c>] (dhdsdio_release+0x40/0x1c0 [bcmdhd])
[<7f05621c>] (dhdsdio_release [bcmdhd]) from [<7f0569fc>] (dhdsdio_disconnect+0x3c/0x94 [bcmdhd])
[<7f0569fc>] (dhdsdio_disconnect [bcmdhd]) from [<7f0493a8>] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
[<7f0493a8>] (bcmsdh_remove [bcmdhd]) from [<7f04ade8>] (bcmsdh_sdmmc_remove+0x4c/0x64 [bcmdhd])
[<7f04ade8>] (bcmsdh_sdmmc_remove [bcmdhd]) from [<804baff8>] (sdio_bus_remove+0x30/0xf8)
[<804baff8>] (sdio_bus_remove) from [<80346c94>] (__device_release_driver+0x70/0xcc)
[<80346c94>] (__device_release_driver) from [<803473bc>] (driver_detach+0xac/0xb0)
[<803473bc>] (driver_detach) from [<80346994>] (bus_remove_driver+0x4c/0xa0)
[<80346994>] (bus_remove_driver) from [<7f05f930>] (dhd_module_cleanup+0x2c/0x3c [bcmdhd])
[<7f05f930>] (dhd_module_cleanup [bcmdhd]) from [<80084c54>] (SyS_delete_module+0x11c/0x17c)
[<80084c54>] (SyS_delete_module) from [<8000e3e0>] (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 <b29396@freescale.com>
(cherry picked from commit 740bef7011441010f6183662d452304dca7c7adf)

7 years agoMLK-11065-8 bcmdhd: fixed build errors with 3.9.2 toolchain
Dong Aisheng [Tue, 24 Mar 2015 08:02:34 +0000 (16:02 +0800)]
MLK-11065-8 bcmdhd: fixed build errors with 3.9.2 toolchain

  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 <b29396@freescale.com>
(cherry picked from commit 3f47e9588c8acf5c4cc5079e746bc05e7d5c69ec)

7 years agoMLK-11065-7 bcmdhd: call wifi_card_detect in wifi_platform_bus_enumerate
Dong Aisheng [Thu, 9 Apr 2015 08:36:06 +0000 (16:36 +0800)]
MLK-11065-7 bcmdhd: call wifi_card_detect in wifi_platform_bus_enumerate

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

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 25ce53802b419f3b2002c5345abee1b85827c688)