]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoASoC: hdmi: Mark the maximum significant bits to HDMI codec
Jyri Sarha [Tue, 14 Oct 2014 17:29:26 +0000 (20:29 +0300)]
ASoC: hdmi: Mark the maximum significant bits to HDMI codec

HDMI audio can not have more than 24 bits even if on i2s bus there
would be 32 bit samples. Mark this by adding .sig_bits = 24 to
playback stream definition.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 74d813cf37c210e94d155b0c19598fe269b8f78c)

9 years agoMLK-9989 arm: imx: imx_v7_mfg_defconfig: enable CONFIG_IMX_SEMA4 by default
Anson Huang [Fri, 12 Dec 2014 11:28:24 +0000 (19:28 +0800)]
MLK-9989 arm: imx: imx_v7_mfg_defconfig: enable CONFIG_IMX_SEMA4 by default

enable CONFIG_IMX_SEMA4 by default for imx_v7_mfg_defconfig.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-10 arm: imx: add A9-M4 power management
Anson Huang [Thu, 4 Dec 2014 04:24:49 +0000 (12:24 +0800)]
MLK-9955-10 arm: imx: add A9-M4 power management

this patch adds A9-M4 power management, including
below features:

1. busfreq: M4 is registered as a high speed device
   of A9, when M4 is running at high speed, busfreq
   will NOT enter low bus mode, when M4 is entering
   its low power idle, A9 will be able to enter low
   bus mode according to its state machine;
2. low power idle: only when M4 is in its low power
   idle, busfreq is staying at low bus mode, low
   power idle is available for kernel;
3. suspend: when M4 is NOT in its low power idle,
   when linux is about to suspend, it will only
   force SOC enter WAIT mode, only when M4 is in
   its low power idle in TCM, linux suspend can
   enter DSM mode. M4 can request/release wakeup
   source via MU to A9.

as M4 can NOT switch its clk parent due to glitch MUX,
to handle this case, A9 will help switch M4's clk
parent, the flow is as below:

M4:
1. enter low power idle, send bus use count-- to A9;
2. enter wfi and only wait for MU interrupt;
3. receive A9's clk switch ready message, go into low
   power idle;
4. receive interrupt to exit low power idle, send request
   to A9 for increase busfreq and M4 freq, enter wfi
   and only wait for MU interrupt;
5. receive A9 ready message, go out of low power idle.

A9:
1. when receive M4's message of entering low power idle,
   wait M4 into wfi, hold M4 in wfi by hardware, gate
   M4 clk, then switch M4's clk to OSC, ungate M4 clk,
   send ready command to wake up M4 into low power idle;
2. when receive M4's message of exiting low power idle,
   wait M4 into wfi, hold M4 in wfi by hardware, gate
   M4 clk, then switch M4's clk to origin high clk,
   ungate M4 clk, send ready command to wake up M4
   to exit low power idle;

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-9 arm: imx: add A9-M4 clk shared management
Anson Huang [Thu, 4 Dec 2014 04:22:20 +0000 (12:22 +0800)]
MLK-9955-9 arm: imx: add A9-M4 clk shared management

As A9 and M4 share many resources on i.MX6SX, especially for
clk and power related resource, so we need to handle the hardware
conflict between these two cores, there are two cases that we
need to consider currently:

clk management: for every clk node, only when both A9 and
M4 do NOT need it, then we can disable it from hardware;

Here we use MU and hardware SEMA4 to achieve our goal, MU is
for communiation between A9 and M4, SEMA4 is to protect the
shared memory.

For clk management, we use shared memory to maintain the clk
status for both A9 and M4 side, and this shared memory is
protected by hardware SEMA4, A9 and M4 will maintain their
own clk tree info in their SW environment, and get other
CORE's clk tree info from shared memory to decide whether
to perform a hardware setting change when they plan to.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9872-3 arm: imx: adjust qspi device index according to dtb setting
Anson Huang [Wed, 19 Nov 2014 06:24:16 +0000 (14:24 +0800)]
MLK-9872-3 arm: imx: adjust qspi device index according to dtb setting

When resume from DSM with Mega/Fast off, we need to restore
the right QSPI module for M4, so get the qspi index from dtb file.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9674-3 arm: imx: add QSPI save/restore when M4 is enabled
Allen Xu [Mon, 13 Oct 2014 23:15:35 +0000 (18:15 -0500)]
MLK-9674-3 arm: imx: add QSPI save/restore when M4 is enabled

As M4 is executing on QSPI2 flash, and QSPI is inside Mega/Fast
domain which may lost power in DSM, so we need to do save/restore
of QSPI2 controller to make sure QSPI flash can be accessed before
waking up M4 after exiting from DSM.

Signed-off-by: Allen Xu <b45815@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-8 arm: imx: add mu driver support
Anson Huang [Thu, 4 Dec 2014 02:02:15 +0000 (10:02 +0800)]
MLK-9955-8 arm: imx: add mu driver support

add MU driver support in mach-imx, all the MU functions
and communications between A9 and M4 will be done in
this file, including MCC, shared clk/power management.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-7 arm: dts: imx6sx: add mu support
Anson Huang [Thu, 4 Dec 2014 02:06:52 +0000 (10:06 +0800)]
MLK-9955-7 arm: dts: imx6sx: add mu support

add MU support for i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-6 arm: dts: imx6sx: add m4 dts support
Anson Huang [Thu, 4 Dec 2014 01:58:27 +0000 (09:58 +0800)]
MLK-9955-6 arm: dts: imx6sx: add m4 dts support

1. add i.MX6SX SabreAuto board M4 dts support;
2. add shared memory node support for AMP clk/power management;
3. add qspi restore node for suspend/resume with Mega/Fast off
   when M4 is enabled and running on QSPI flash.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-5 arm: dts: imx6sx: add sema4 support
Anson Huang [Thu, 4 Dec 2014 02:05:38 +0000 (10:05 +0800)]
MLK-9955-5 arm: dts: imx6sx: add sema4 support

add SEMA4 support for i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-4 arm: imx: enable CONFIG_IMX_SEMA4 by default
Anson Huang [Wed, 3 Dec 2014 07:13:56 +0000 (15:13 +0800)]
MLK-9955-4 arm: imx: enable CONFIG_IMX_SEMA4 by default

enable CONFIG_IMX_SEMA4 by default.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-3 arm: imx: add HAVE_IMX_AMP for imx6sx
Anson Huang [Thu, 4 Dec 2014 01:51:27 +0000 (09:51 +0800)]
MLK-9955-3 arm: imx: add HAVE_IMX_AMP for imx6sx

add HAVE_IMX_AMP and select by default for i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-2 driver: char: sema4: rename sema4 driver diretory
Anson Huang [Wed, 3 Dec 2014 07:25:59 +0000 (15:25 +0800)]
MLK-9955-2 driver: char: sema4: rename sema4 driver diretory

as sema4 is a common driver for amp system, not just
for mcc, so rename sema4 diretory from imx_mcc
to imx_amp.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9955-1 arm: imx: add necessary mcc header file
Anson Huang [Thu, 4 Dec 2014 02:07:40 +0000 (10:07 +0800)]
MLK-9955-1 arm: imx: add necessary mcc header file

add necessary mcc header file for mcc and sema4.

Acked-by: Jason Liu
Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9870 mcc: sema4: mutex lock should be initiazled
Richard Zhu [Tue, 18 Nov 2014 02:20:03 +0000 (10:20 +0800)]
MLK-9870 mcc: sema4: mutex lock should be initiazled

mutex lock should be initialized, otherwise
there maybe kernel BUG warning.
"BUG: spinlock bad magic on CPU#0, swapper/0/1"

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

9 years agoMLK-9707-5 arm: mcc: mcc2.0 sema4 related changes
Richard Zhu [Mon, 20 Oct 2014 07:40:18 +0000 (15:40 +0800)]
MLK-9707-5 arm: mcc: mcc2.0 sema4 related changes

imx sema4 driver changes in mcc2.0 updates

Signed-off-by: Richard Zhu <richard.zhu@freescale.com>
9 years agoENGR00308060-3 mcc: add sema4 driver required by mcc
Richard Zhu [Fri, 11 Apr 2014 07:11:14 +0000 (15:11 +0800)]
ENGR00308060-3 mcc: add sema4 driver required by mcc

- add linux sema4 driver, that mandatory required by mcc.
  - use volatile types in sema4 structure
  - align the port definiton a9 is 1, m4 is 2.

Signed-off-by: Richard Zhu <r65037@freescale.com>
9 years agonet: fec: only enable mdio interrupt before phy device link up
Nimrod Andy [Thu, 11 Dec 2014 01:20:33 +0000 (09:20 +0800)]
net: fec: only enable mdio interrupt before phy device link up

Before phy device link up, we only enable FEC mdio interrupt, which
is more reasonable.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: clear all interrupt events to support i.MX6SX
Nimrod Andy [Thu, 11 Dec 2014 01:20:32 +0000 (09:20 +0800)]
net: fec: clear all interrupt events to support i.MX6SX

For i.MX6SX FEC controller, there have interrupt mask and event
field extension. To support all SOCs FEC, we clear all interrupt
events during MAVC initial process.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: reset fep link status in suspend function
Nimrod Andy [Thu, 11 Dec 2014 01:20:31 +0000 (09:20 +0800)]
net: fec: reset fep link status in suspend function

On some i.MX6 serial boards, phy power and refrence clock are supplied
or controlled by SOC. When do suspend/resume test, the power and clock
are disabled, so phy device link down.

For current driver, fep->link is still up status, which cause extra operation
like below code. To avoid the dumy operation, we set fep->link to down when
phy device is real down.
...
if (fep->link) {
napi_disable(&fep->napi);
netif_tx_lock_bh(ndev);
fec_stop(ndev);
netif_tx_unlock_bh(ndev);
napi_enable(&fep->napi);
fep->link = phy_dev->link;
status_change = 1;
}
...

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMLK-9969 dts: Enable subdev csi driver in imx6sx AI board
Sandor Yu [Mon, 8 Dec 2014 08:01:44 +0000 (16:01 +0800)]
MLK-9969 dts: Enable subdev csi driver in imx6sx AI board

Enable OV5640, VADC and CSI driver in imx6sx AI board

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoMLK-9968 dts: Enable subdev csi driver in imx6sx SDB board
Sandor Yu [Mon, 8 Dec 2014 07:59:56 +0000 (15:59 +0800)]
MLK-9968 dts: Enable subdev csi driver in imx6sx SDB board

Enable OV5640, VADC and CSI driver in imx6sx SDB board

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoMLK-9919 net: fec: reinit MAC0 MII bus for MAC1 use after resume back
Fugang Duan [Wed, 10 Dec 2014 05:46:08 +0000 (13:46 +0800)]
MLK-9919 net: fec: reinit MAC0 MII bus for MAC1 use after resume back

i.MX6SX-AI board has two enet MACs (MAC0 and MAC1), they share MAC0 MII
bus. When PHY0 don't connect to enet MAC0, MAC0 mii bus probe phy0 failed,
and the net interface is set to unattach mode. During suspend resume test,
driver don't reinit MAC0 after resume back, so MII bus don't work that causes
MAC1 also cannot access PHY1.

The patch just is workaround that reinit MAC0 MII bus for MAC1 using.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00305366-01 net: fec: disable netfilter in default
Fugang Duan [Wed, 10 Dec 2014 04:41:17 +0000 (12:41 +0800)]
ENGR00305366-01 net: fec: disable netfilter in default

Disable netfilter feature for enet can increase 30Mbps bandwidth
for imx6sx enet tx path.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00306137 ARM: imx_v7_defconfig: enable 802.2 LLC
Fugang Duan [Wed, 10 Dec 2014 04:34:11 +0000 (12:34 +0800)]
ENGR00306137 ARM: imx_v7_defconfig: enable 802.2 LLC

Enable IEEE 802.2 LLC protocol.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoMLK-9977 ARM: dts: imx6sx: specify the phy address
Fugang Duan [Mon, 13 Oct 2014 09:17:27 +0000 (17:17 +0800)]
MLK-9977 ARM: dts: imx6sx: specify the phy address

Since fec controller contain mdio bus,  for imx serial chips, there have
no independent/external MDIO bus. ENET1 and ENET2 share use ENET1 mdio bus.
So, specify the phy address for two MACs.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agonet: fec: avoid kernal crash by NULL pointer when no phy connection
Nimrod Andy [Tue, 9 Dec 2014 10:46:56 +0000 (18:46 +0800)]
net: fec: avoid kernal crash by NULL pointer when no phy connection

On i.MX6SX sabreauto board, when there have no phy daughter board connection,
there have kernel crash by NULL pointer:

fec 2188000.ethernet eth0: could not attach to PHY
Unable to handle kernel NULL pointer dereference at virtual address 00000220
pgd = 80004000
[00000220] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.24-01042-g27eaeea-dirty #405
task: d8078000 ti: d8076000 task.ti: d8076000
PC is at mutex_lock+0x10/0x54
LR is at phy_start+0x14/0x68
pc : [<806ad4e4>]    lr : [<803b0f90>]    psr: 60000113
sp : d8077d80  ip : 00000000  fp : d83cc000
r10: 0000100c  r9 : d83cc800  r8 : 00000000
r7 : d83bcd0c  r6 : 00000200  r5 : 00000220  r4 : 00000220
r3 : 00000000  r2 : 00000000  r1 : d83bcd90  r0 : 00000220
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 8000404a  DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xd8076240)
Stack: (0xd8077d80 to 0xd8078000)
7d80: 00000000 803b0f90 00000001 00000000 d83bc800 803be034 00000007 805c3fb4
7da0: 00000003 80d4e0bc 805efcb8 fffffff1 fffffff0 00000000 00000000 d8077dfc
7dc0: 0000000d 80d6ce80 80d126b0 800499c8 d83bc800 d83bc800 806f0f40 d83bc82c
7de0: 00000000 00000000 80d6ce80 80d126b0 0000016b 80540250 d8076008 d83bc800
7e00: 0000016b d83bc800 00001003 00000001 00001002 805404d4 d83bc800 00000120
7e20: 00001002 00001002 00000000 805405d4 d83bc800 00000001 80d126c0 00001002
7e40: 80dbc5dc 80d02024 00000000 806ae360 00000002 d6128420 d6127198 12400000
7e60: 00000000 00000000 00000002 d61271e8 00000000 12400000 d801674c 800e49f0
7e80: d6127198 d6124e58 00000000 80238848 d61271c4 00000000 00000001 d8016700
7ea0: 80dd2e00 80d752c0 80d752c0 80cfdaec 0000010c 80239430 806c2e90 d800f080
7ec0: d800f380 804e46b4 ffffffbc 80d15cb0 00000007 80d752c0 80d752c0 80d01e94
7ee0: 0000010c d8076030 00000000 800088cc 80dbaba4 80bd411c d80a6f00 806b1e04
7f00: 00000000 00000000 00000000 80125b84 00000000 80d2c56c 60000113 00000001
7f20: ef7ff9df 806c80cc 0000010c 80043f5c 80c95eb8 00000007 ef7ffa1d 00000007
7f40: 80d2c55c 80d15cb0 00000007 80d752c0 80d752c0 80ccc50c 0000010c 80d0a114
7f60: 80d0a10c 80cccc04 00000007 00000007 80ccc50c 806ae410 00000000 8004cb84
7f80: 80d17bc0 00000000 806a4bd4 00000000 00000000 00000000 00000000 00000000
7fa0: 00000000 806a4bdc 00000000 8000e5f8 00000000 00000000 00000000 00000000
7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 1e79a7bb e5337f77
[<806ad4e4>] (mutex_lock) from [<803b0f90>] (phy_start+0x14/0x68)
[<803b0f90>] (phy_start) from [<803be034>] (fec_enet_open+0x448/0x5dc)
[<803be034>] (fec_enet_open) from [<80540250>] (__dev_open+0xa8/0x110)
[<80540250>] (__dev_open) from [<805404d4>] (__dev_change_flags+0x88/0x170)
[<805404d4>] (__dev_change_flags) from [<805405d4>] (dev_change_flags+0x18/0x48)
[<805405d4>] (dev_change_flags) from [<80d02024>] (ip_auto_config+0x190/0xf94)
[<80d02024>] (ip_auto_config) from [<800088cc>] (do_one_initcall+0xe8/0x144)
[<800088cc>] (do_one_initcall) from [<80cccc04>] (kernel_init_freeable+0x104/0x1c8)
[<80cccc04>] (kernel_init_freeable) from [<806a4bdc>] (kernel_init+0x8/0xec)
[<806a4bdc>] (kernel_init) from [<8000e5f8>] (ret_from_fork+0x14/0x3c)
Code: e92d4010 e3a03000 e1a04000 ee073fba (e1903f9f)

Add phydev check to fix the issue.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoENGR00322839 ARM: dts: imx6sx: enet RGMII TXCLK output drive strength is weak
Fugang Duan [Mon, 8 Dec 2014 10:40:02 +0000 (18:40 +0800)]
ENGR00322839 ARM: dts: imx6sx: enet RGMII TXCLK output drive strength is weak

The current enet RGMII TXCLK rise/fall time which could be observed(~0.85ns)
is longer than requirement (<=0.75ns).

The current setting, SPEED/DSE/SRE=10/110/1 is used, and then it needs to
increase DSE to 111 "37 Ohm @ 3.3V, 21 Ohm@1.8V, 34 Ohm for DDR". After the
change RGMII TXCLK match the spec requirement.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoMLK-9768: dma: imx-sdma: fix UART loopback random failed
Robin Gong [Mon, 8 Dec 2014 09:30:40 +0000 (17:30 +0800)]
MLK-9768: dma: imx-sdma: fix UART loopback random failed

For UART, we need use old chn_real_count to know the real rx count even in
cylic dma mode, because UART driver use cyclic mode to increase performance
without any data loss.

Signed-off-by: Robin Gong <b38343@freescale.com>
9 years agonet: fec: init maximum receive buffer size for ring1 and ring2
Fugang Duan [Mon, 8 Dec 2014 09:05:32 +0000 (17:05 +0800)]
net: fec: init maximum receive buffer size for ring1 and ring2

i.MX6SX fec support three rx ring1, the current driver lost to init
ring1 and ring2 maximum receive buffer size, that cause receving
frame date length error. The driver reports "rcv is not +last" error
log in user case.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: remove unused return value from swap_buffer()
Lothar Waßmann [Mon, 17 Nov 2014 09:51:24 +0000 (10:51 +0100)]
net: fec: remove unused return value from swap_buffer()

The return value of swap_buffer() is not used by any caller, thus
remove it.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: simplify loop counter handling in swap_buffer()
Lothar Waßmann [Mon, 17 Nov 2014 09:51:23 +0000 (10:51 +0100)]
net: fec: simplify loop counter handling in swap_buffer()

Eliminate the DIV_ROUND_UP() and change the loop counter increment to
4 instead. This results in saving 6 instructions in the functions
assembly code.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: use swab32s() instead of cpu_to_be32()
Lothar Waßmann [Mon, 17 Nov 2014 09:51:22 +0000 (10:51 +0100)]
net: fec: use swab32s() instead of cpu_to_be32()

when swap_buffer() is being called, we know for sure, that we need to
byte swap the data. Furthermore, this function is called for swapping
data in both directions. Thus cpu_to_be32() is semantically not
correct for all use cases. Use swab32s() to reflect this.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: improve access to quirk flags by copying them into fec_enet_private struct
Lothar Waßmann [Mon, 17 Nov 2014 09:51:21 +0000 (10:51 +0100)]
net: fec: improve access to quirk flags by copying them into fec_enet_private struct

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: change type of 'bufdesc_ex' to bool
Fugang Duan [Mon, 8 Dec 2014 08:45:24 +0000 (16:45 +0800)]
net: fec: change type of 'bufdesc_ex' to bool

fep->bufdesc_ex is treated as a boolean value, thus declare it as
such.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: fix regression on i.MX28 introduced by rx_copybreak support
Lothar Waßmann [Fri, 7 Nov 2014 09:02:47 +0000 (10:02 +0100)]
net: fec: fix regression on i.MX28 introduced by rx_copybreak support

commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx performance")
introduced a regression for i.MX28. The swap_buffer() function doing
the endian conversion of the received data on i.MX28 may access memory
beyond the actual packet size in the DMA buffer. fec_enet_copybreak()
does not copy those bytes, so that the last bytes of a packet may be
filled with invalid data after swapping.
This will likely lead to checksum errors on received packets.
E.g. when trying to mount an NFS rootfs:
UDP: bad checksum. From 192.168.1.225:111 to 192.168.100.73:44662 ulen 36

Do the byte swapping and copying to the new skb in one go if
necessary.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMLK-9828 ARM: imx: change uart clk parent to pll3_80m on i.mx6sx in default
Fugang Duan [Mon, 8 Dec 2014 08:27:54 +0000 (16:27 +0800)]
MLK-9828 ARM: imx: change uart clk parent to pll3_80m on i.mx6sx in default

By default, uboot set uart clk parent to OSC to make UART work when M4
is enabled. In the situation, uart maximum baud rate only reach at 1.5Mbps
that cannot match real case requirement.

The patch set the uart module clock source to pll3_80m in default. If
test low power case, it needs to add "uart_from_osc" in kernel command line.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoMLK-9893 tty: serial: imx: sync the completed and cur index
Fugang Duan [Thu, 20 Nov 2014 09:50:41 +0000 (17:50 +0800)]
MLK-9893 tty: serial: imx: sync the completed and cur index

The current logic has one potential issue cause data buffer lost in
busy system. When sdma copy data buffer count is zero, completed index
also increase, which cause data buffer lost. The patch fix the issue.

(cherry-picked from commit: f7b01c9263ea73b9150e8a7fa48812c1d47d0493)

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00329198-01 ARM: imx6sx: pm: support no_console_suspend with Mega/Fast mix
Fugang Duan [Wed, 3 Sep 2014 04:23:33 +0000 (12:23 +0800)]
ENGR00329198-01 ARM: imx6sx: pm: support no_console_suspend with Mega/Fast mix

For imx6sx, with M/F mix off in DSM, during the window of SOC
resume and UART driver resume, the UART1 hardware is NOT working.

So, add uart1 registers save/restore during suspend/resume When
no_console_suspend is enabled.

Signed-off-by: Fugang Duan <B38611@freescale.com>
9 years agoENGR00327584-2 ARM: imx: add ocram save/restore for i.mx6sx
Anson Huang [Tue, 19 Aug 2014 03:11:53 +0000 (11:11 +0800)]
ENGR00327584-2 ARM: imx: add ocram save/restore for i.mx6sx

On i.MX6SX, when mega/fast mix power is off during DSM,
OCRAM data will be lost, so we need to do save/resotre
during DSM enter/exit.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoENGR00327584-1 : ARM: dts: imx6sx: add new ocram node for mega/fast save/restore
Anson Huang [Tue, 19 Aug 2014 03:02:48 +0000 (11:02 +0800)]
ENGR00327584-1 : ARM: dts: imx6sx: add new ocram node for mega/fast save/restore

As when Mega/Fast mix power domain is off in DSM mode, ocram
need to do save/restore for entire space, some of the ocram
space is reserved by low power modules, so to make ocram save/restore
simple, we define a node including total ocram space for DSM
save/restore when mega/fast mix is off.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9825 arm: imx: add mega/fast mix power off feature in DSM
Anson Huang [Mon, 10 Nov 2014 08:13:36 +0000 (16:13 +0800)]
MLK-9825 arm: imx: add mega/fast mix power off feature in DSM

This patch adds mega fast domain power off feature in DSM,
it can save about 0.72mW power;

If there is any module in Mega/Fast domain enabled as wakeup source,
then Mega/Fast domain's power will be kept on in DSM.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMGS-324 [#1472] dump GPU AQAXIStatus register for AXI BUS ERROR
Xianzhong [Tue, 25 Nov 2014 17:34:42 +0000 (01:34 +0800)]
MGS-324 [#1472] dump GPU AQAXIStatus register for AXI BUS ERROR

AQAXiStatus register info is helpful to debug AXI BUS ERROR,
need dump this GPU register when AXI BUS ERROR happen.

Date: Dec 03, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
9 years agoMLK-9958 ARM: dts: imx6sx-19x19-arm2: add new DTS file to enable LCDIF1
Robby Cai [Wed, 3 Dec 2014 03:24:32 +0000 (11:24 +0800)]
MLK-9958 ARM: dts: imx6sx-19x19-arm2: add new DTS file to enable LCDIF1

Due to the CSI and LCDIF1 shares the same pin MX6SX_PAD_LCD1_ENABLE,
we need to disable CSI.

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-9723-7: ARM: imx_v7_defconfig: build in mqs
Shengjiu Wang [Tue, 21 Oct 2014 07:15:16 +0000 (15:15 +0800)]
MLK-9723-7: ARM: imx_v7_defconfig: build in mqs

enable mqs sound card.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 21cf6e439bdf9a0cf287b1dd04ceb56d0486167d)

9 years agoMLK-9723-6: ARM: dts: add imx6sx-19x19-arm2-mqs.dts for mqs
Shengjiu Wang [Tue, 21 Oct 2014 10:59:14 +0000 (18:59 +0800)]
MLK-9723-6: ARM: dts: add imx6sx-19x19-arm2-mqs.dts for mqs

Initialize dts file for mqs.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit d390f670990a0880cdd0db4271a724a96755b0ea)

9 years agoMLK-9723-5: ASoC: imx-mqs: add mqs machine driver
Shengjiu Wang [Tue, 21 Oct 2014 06:28:14 +0000 (14:28 +0800)]
MLK-9723-5: ASoC: imx-mqs: add mqs machine driver

Implement machine driver for mqs, which use the sai as cpu dai.
sai work on master mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit cac9eb41debc6444d753dc936cdf76874260b9e4)

9 years agoMLK-9723-4: ASoC: fsl_mqs: add mqs codec driver
Shengjiu Wang [Mon, 29 Sep 2014 02:56:03 +0000 (10:56 +0800)]
MLK-9723-4: ASoC: fsl_mqs: add mqs codec driver

Implement codec driver for mqs. mqs is a very simple IP. which support:

Word length: 16bit.
DAI format: Left-Justified, slave mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 9da6bdd2072b850e9bb910512123eff7d80a0e2f)

9 years agoMLK-9723-3: include: imx6q-iomuxc-gpr: add bit description for MQS
Shengjiu Wang [Mon, 29 Sep 2014 02:56:56 +0000 (10:56 +0800)]
MLK-9723-3: include: imx6q-iomuxc-gpr: add bit description for MQS

Add MQS's bit description in gpr header file.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 1e576de4b46a0fadd1c8df7f08229ac759e765f5)

9 years agoMLK-9723-2: ASoC: fsl_sai: fix no frame clk in master mode
Shengjiu Wang [Thu, 23 Oct 2014 10:00:39 +0000 (18:00 +0800)]
MLK-9723-2: ASoC: fsl_sai: fix no frame clk in master mode

After several open/close sai test with ctrl+c,  there will be I/O error.
The SAI can't work anymore, can't recover. There will be no frame clock.
With adding the software reset in trigger stop, the issue can be fixed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 5e74f9510104df33b7c85f266f6e017428277047)

9 years agoMLK-9723-1: ASoC: fsl_sai: add mclk divider function for master mode
Shengjiu Wang [Thu, 23 Oct 2014 09:17:30 +0000 (17:17 +0800)]
MLK-9723-1: ASoC: fsl_sai: add mclk divider function for master mode

SAI has 4 mclk source, and the divider is 8bit. fsl_sai_set_bclk will
select proper mclk source and calculate the divider.
After fsl_sai_set_bclk, enable the selected mclk in hw_params(), and
add hw_free() to disable the mclk.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 6dc915199870f692c41f6694557e281d61bc9207)

9 years agoASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
Nicolin Chen [Mon, 4 Aug 2014 07:07:25 +0000 (15:07 +0800)]
ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode

There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 855675f6e6a65688a7f4cf45b9b5a98cf6c6f5c3)

9 years agoASoC: fsl_sai: Make Synchronous and Asynchronous modes exclusive
Nicolin Chen [Fri, 8 Aug 2014 10:41:19 +0000 (18:41 +0800)]
ASoC: fsl_sai: Make Synchronous and Asynchronous modes exclusive

The previous patch (ASoC: fsl_sai: Add asynchronous mode support) added
new Device Tree bindings for Asynchronous and Synchronous modes support.
However, these two shall not be present at the same time.

So this patch just simply makes them exclusive so as to avoid incorrect
Device Tree binding usage.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit ce7344a4ebabe90e064d3e087727f45624cdc942)

9 years agoASoC: fsl_sai: Add asynchronous mode support
Nicolin Chen [Tue, 5 Aug 2014 07:32:05 +0000 (15:32 +0800)]
ASoC: fsl_sai: Add asynchronous mode support

SAI supports these operation modes:
1) asynchronous mode
   Both Tx and Rx are set to be asynchronous.
2) synchronous mode (Rx sync with Tx)
   Tx is set to be asynchronous, Rx is set to be synchronous.
3) synchronous mode (Tx sync with Rx)
   Rx is set to be asynchronous, Tx is set to be synchronous.
4) synchronous mode (Tx/Rx sync with another SAI's Tx)
5) synchronous mode (Tx/Rx sync with another SAI's Rx)

* 4) and 5) are beyond this patch because they are related with another SAI.

As the initial version of this SAI driver, it supported 2) as default while
the others were totally missing.

So this patch just adds supports for 1) and 3).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 08fdf65e37d560581233e06a659f73deeb3766f9)

9 years agoASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
Nicolin Chen [Mon, 4 Aug 2014 07:07:25 +0000 (15:07 +0800)]
ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode

There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit af96ff5b7448dc776dc24a5c4313c6ec1ee94e53)

9 years agoASoC: fsl_sai: Initialize with software reset
Nicolin Chen [Tue, 5 Aug 2014 09:20:21 +0000 (17:20 +0800)]
ASoC: fsl_sai: Initialize with software reset

This patch adds software reset code in dai_probe() so as to make a true init
by clearing SAI's internal logic, including the bit clock generation, status
flags, and FIFO pointers.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 376d1a92ca587d3974d4791cdb99baa8b8e7f0dd)

9 years agoMLK-9962-2: ARM: dts: imx6sx-sabreauto: change asrc_p2p to asrc
Shengjiu Wang [Fri, 5 Dec 2014 05:56:54 +0000 (13:56 +0800)]
MLK-9962-2: ARM: dts: imx6sx-sabreauto: change asrc_p2p to asrc

In 3.14, the asrc_p2p and asrc node has been merged together. So
the asrc_p2p need to be changed to asrc.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
9 years agoMLK-9962-1: ARM: dts: imx6sx-sabreauto: add clock route for ESAI master mode
Shengjiu Wang [Fri, 5 Dec 2014 02:44:59 +0000 (10:44 +0800)]
MLK-9962-1: ARM: dts: imx6sx-sabreauto: add clock route for ESAI master mode

In 3f81aadd7e12ee7d83b271354b76316d31a04ffc, we set the ESAI clock route
in mach-imx6sx.c. In L3.14, as there is assigned-clks feature in devicetree,
we can set the clock route in dts file.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
9 years agoMLK-9684-8: ARM: dts: imxqdl-sabreauto: refine fm device tree
Shengjiu Wang [Mon, 13 Oct 2014 07:48:07 +0000 (15:48 +0800)]
MLK-9684-8: ARM: dts: imxqdl-sabreauto: refine fm device tree

As the radio machine drive use the codec_of_node, so add si476x-codec
node for this usage.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 89a4342b5d6ee21173566fab6ae017c660a23620)

9 years agoMLK-9684-6: ARM: clk-imx6sx: add missing lvds2 clock to the clock tree
Shengjiu Wang [Mon, 13 Oct 2014 03:47:32 +0000 (11:47 +0800)]
MLK-9684-6: ARM: clk-imx6sx: add missing lvds2 clock to the clock tree

We actually have lvds2 (analog clock2), an I/O clock like lvds1, in the SoC.
And this lvds2, along with lvds1, can be used to provide external clock source
to the internal pll, such as pll4_audio and pll5_video.

So This patch mainly adds the lvds2 to the clock tree and fix its relationship
with pll4 accordingly.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit f9cfc11cf8628bd01efda611074131bfa323a120)

9 years agoMLK-9684-3: ASoC: imx-si476x: SRCK and SRFS is used for fm in imx6sx
Shengjiu Wang [Mon, 13 Oct 2014 03:27:12 +0000 (11:27 +0800)]
MLK-9684-3: ASoC: imx-si476x: SRCK and SRFS is used for fm in imx6sx

Configure the aumux port to output SRCK and SRFS from STCK and STFS
of internal port when use the SYN mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit f4428f5617916863b5410afea5614cc52190f1a8)

9 years agoMLK-9684-2: ASoC: imx-si476x: remove the codec_name, use the codec_of_node
Shengjiu Wang [Mon, 13 Oct 2014 03:26:02 +0000 (11:26 +0800)]
MLK-9684-2: ASoC: imx-si476x: remove the codec_name, use the codec_of_node

As the codec_name has a suffix, which is a index and is different
for different platform or different kernel. So here change machine driver
to use codec_of_node, which can be same for different platform/kernel,
then we can maintain a same machine driver for fm.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e87b135f34cba5cfcd0614b045d4035118fb6d77)

9 years agoMLK-9684-1: mfd: si476x-i2c: add of_compatible for si476x-codec
Shengjiu Wang [Mon, 13 Oct 2014 03:10:27 +0000 (11:10 +0800)]
MLK-9684-1: mfd: si476x-i2c: add of_compatible for si476x-codec

Add of_compatible for si476x-codec, then si476x-codec driver will have
codec_of_node, So machine driver can use the codec_of_node.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e2ec44f91a21b127e155e8317d06e8ead7fd2678)

9 years agoMLK-9731 ASoC: imx-hdmi-dma: audio output is noisy in long time playback
Shengjiu Wang [Fri, 31 Oct 2014 05:51:20 +0000 (13:51 +0800)]
MLK-9731 ASoC: imx-hdmi-dma: audio output is noisy in long time playback

In the frame_to_bytes(), when hw_ptr*frame_bits exceed the maxmum of unsigned
long, the return value is saturated, so the appl_bytes is wrong.
This patch is to correct the usage of frame_to_bytes().

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 9e66132d9c96305b65aa5fa3ba8a35271a04ded9)

9 years agoMLK-9866: mfd: si476x: FM will fail to open sometimes.
Shengjiu Wang [Tue, 18 Nov 2014 06:20:55 +0000 (14:20 +0800)]
MLK-9866: mfd: si476x: FM will fail to open sometimes.

In commit e856a0ebc23dcd2c933e3f902317652cc50f0067, we disabled
wait_event_timeout for CMD_POWER_DOWN, which will cause power down
failed sometimes, then FM will fail to reopen.
In this patch enable the wait_event_timeout for power down.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 30aa7f1a3580d0a5bc866c624d1da441fd5502c1)

9 years agoMLK-9782: ASoC: fsl_esai: fix the channel swap issue in low possibility
Shengjiu Wang [Mon, 3 Nov 2014 08:47:17 +0000 (16:47 +0800)]
MLK-9782: ASoC: fsl_esai: fix the channel swap issue in low possibility

There is very low possibility that channel swap happened in beginning when
multi output/input pin is enabled. The issue is that hardware can't send data
to correct pin in the begginning with the normal enable flow.
Here use TSMA/TSMB as the trigger for sending data to workaround this issue.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 859b0fc4544bef30e269b4f6a81999db1d07a42d)

9 years agoMLK-9760: ASoC: fsl_esai: fix NULL pointer issue in reset handler
Shengjiu Wang [Wed, 29 Oct 2014 07:47:35 +0000 (15:47 +0800)]
MLK-9760: ASoC: fsl_esai: fix NULL pointer issue in reset handler

When test with case arecord -Dhw:0,1 | aplay -Dhw:0,0, xrun happened,
the reset handler will be called, but for BE(backend) stream, the
substream->ops is null.
This patch is to fix this null pointer issue.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 4db112a8cd3caf5a553afea88cf7fe8d9781f459)

9 years agoMLK-9954 arm: imx: update operating point for i.MX6DL
Bai Ping [Thu, 4 Dec 2014 11:44:26 +0000 (19:44 +0800)]
MLK-9954 arm: imx: update operating point for i.MX6DL

Update the i.MX6DL cpu operating points to comply with the latest
published datasheet. Latest i.MX6DL datasheet of Rev.4, 10/2014
updates the 396MHz setpoint's min voltage from 1.075V to 1.125V, Add a
25mV margin to cover the board IR drop, here use 1.15V for 396MHz to
match datasheet.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9952 ARM: dts: Enable the imx6sx-17x17-arm2-mlb.dts in the device tree makefile...
Luwei Zhou [Thu, 4 Dec 2014 01:10:50 +0000 (09:10 +0800)]
MLK-9952 ARM: dts: Enable the imx6sx-17x17-arm2-mlb.dts in the device tree makefile list.

Enable the imx6sx-17x17-arm2-mlb.dts in the device tree makefile list

Signed-off-by: Luwei Zhou <b45643@freescale.com>
9 years agoMLK-9946 ARM: dts: Add new dts for MLB support for i.MX6SX-17x17-arm2 platform.
Luwei Zhou [Wed, 3 Dec 2014 08:21:40 +0000 (16:21 +0800)]
MLK-9946 ARM: dts: Add new dts for MLB support for i.MX6SX-17x17-arm2 platform.

Add new device tree  for MLB support for i.MX6SX-17x17-arm2 platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
9 years agoMLK-9943 ARM: dts: add new dts for nand support for 19x19 arm2
Allen Xu [Tue, 2 Dec 2014 19:23:39 +0000 (03:23 +0800)]
MLK-9943 ARM: dts: add new dts for nand support for 19x19 arm2

Add new dts file to support NAND for imx6sx 19x19 arm2 board.

Signed-off-by: Allen Xu <b45815@freescale.com>
9 years agoMGS-304 [#1461]GPU driver will cause kernel panic when allocate memory failed
Loren Huang [Wed, 26 Nov 2014 03:59:38 +0000 (11:59 +0800)]
MGS-304 [#1461]GPU driver will cause kernel panic when allocate memory failed

-The issue is triggered by suspend/resume test
when doing bonnie++ which will consume lots of
memory.

-The root cause is vivante didn't report the allocation
failure to uplevel correctly which cause the improper
free.

-Correct the free logic to fix this issue.

Date: Nov 26, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Jason Liu
Tested-by: Peter Chen
(cherry picked from commit 2378f1c0b48f1c632a96c1e6c1107e2773f34170)

9 years agoMGS-298 gpu:Add new option to enable shadow memory free
Loren Huang [Tue, 25 Nov 2014 08:19:49 +0000 (16:19 +0800)]
MGS-298 gpu:Add new option to enable shadow memory free

It's a specific requirement form customer.
Environmant variable VIV_FBO_PERFER_MEM is added.
When it's set, driver will free fbo shadow memory immediately
when it's switch out.
Original vivante patch name:cl29153.diff

Date: Nov 25, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit c9d486e75fc7059050604188334ea846a25b9d13)

9 years agoMLK-9741-01: ARM: IMX6SL-EVK: EPDC: add two ioctls to disable/enable EPDC hardware...
Fancy Fang [Fri, 7 Nov 2014 08:44:46 +0000 (16:44 +0800)]
MLK-9741-01: ARM: IMX6SL-EVK: EPDC: add two ioctls to disable/enable EPDC hardware access

The two ioctls can be used to disable/enable EPDC hardware
access which are required by epdc user apps to do some
sync jobs.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
9 years agoMLK-9887 arm: dts: imx6sx: add sabreauto board support
Anson Huang [Fri, 21 Nov 2014 05:19:35 +0000 (13:19 +0800)]
MLK-9887 arm: dts: imx6sx: add sabreauto board support

Add i.MX6SX SABREAUTO board support.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoMLK-9779-05 csi: Remove csi driver source from mxc/capture folder
Sandor Yu [Thu, 20 Nov 2014 08:36:25 +0000 (16:36 +0800)]
MLK-9779-05 csi: Remove csi driver source from mxc/capture folder

- Remove v4l2 csi capture driver, vadc driver and csi driver
from mxc/capture folder.
- Rename ov5640 module name from ov5640_camera.ko to
  ov5640_camera_int.ko

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoMLK-9779-04 dts: imx6sl: Add ov5640 camera to evk dts
Sandor Yu [Thu, 20 Nov 2014 08:28:07 +0000 (16:28 +0800)]
MLK-9779-04 dts: imx6sl: Add ov5640 camera to evk dts

- Add imx6sx-19x19-arm2-csi.dtb file
- Remove int-device v4l2 capture setting
- Add ov5640 camera endport setting
- Enable csi item.

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years ago MLK-9779-03 camera: Rearchitecture ov5640 driver with subdev
Sandor Yu [Thu, 20 Nov 2014 08:18:58 +0000 (16:18 +0800)]
 MLK-9779-03 camera: Rearchitecture ov5640 driver with subdev

Pass test on imx6sl and imx6sx platfrom.

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoMLK-9779-02 dts: Add csi and vadc in dts
Sandor Yu [Mon, 10 Nov 2014 07:45:08 +0000 (15:45 +0800)]
MLK-9779-02 dts: Add csi and vadc in dts

- Remove csi v4l2 int-device dts settting.
- Binding subdev client device and host device in dts.
vadc to csi1, ov5640 to csi0.

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoMLK-9779-01 camera: imx6sx/sl CSI/VADC driver in subdev
Sandor Yu [Mon, 10 Nov 2014 07:36:49 +0000 (15:36 +0800)]
MLK-9779-01 camera: imx6sx/sl CSI/VADC driver in subdev

CSI and VADC driver rewrite with v4l2 subdev architecture.
- mx6s_capture.c driver support imx6sx and imx6sl csi module.
- No PXP function included in csi driver, csi driver not support
csc, crop and resize function.
- Both csi and vadc driver register device tree.
- v4l2 subdev bridge device drivers register device with asynchronous.

Signed-off-by: Sandor Yu <R01008@freescale.com>
9 years agoMLK-9876 cpufreq: imx6: update operating point for imx6Q
Bai Ping [Wed, 19 Nov 2014 16:35:38 +0000 (00:35 +0800)]
MLK-9876 cpufreq: imx6: update operating point for imx6Q

Update the imx6Q cpu operating points to comply with the latest
published datasheet. Latest i.MX6Q datasheet of Rev.3, 02/2014
updates the 792MHz setpoint's min voltage from 1.125V to 1.15V, add a
25mV margin to cover the board IR drop, here use 1.175V for 792MHz to
match datasheet.

Signed-off-by: Bai Ping <b51503@freescale.com>
9 years agoMLK-9877: ARM: dts: imx6sx: add gpu clock for gpc driver
Robin Gong [Mon, 17 Nov 2014 08:40:06 +0000 (16:40 +0800)]
MLK-9877: ARM: dts: imx6sx: add gpu clock for gpc driver

Add gpu clock for pu-enable, otherwise, GPU may crash in some test cases.

Signed-off-by: Robin Gong <b38343@freescale.com>
9 years agoMLK-9869: ARM: imx_v7_defconfig: add BT config
Shenwei Wang [Tue, 18 Nov 2014 16:03:53 +0000 (10:03 -0600)]
MLK-9869: ARM: imx_v7_defconfig: add BT config

added BT config to imx_v7_defconfig to enable the BT interface in Linux
kernel by default.

Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
9 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>
9 years agoMLK-4791 EPDC/MAX17135: Fix PMIC regulator voltage access error
Evan Kotara [Thu, 6 Nov 2014 21:46:12 +0000 (15:46 -0600)]
MLK-4791 EPDC/MAX17135: Fix PMIC regulator voltage access error

Incorrect register value range definition causes access error.

Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
9 years agoMLK-9818 arm: imx: Add uart to be source from OSC 24MHz support
Bai Ping [Mon, 10 Nov 2014 14:59:34 +0000 (22:59 +0800)]
MLK-9818 arm: imx: Add uart to be source from OSC 24MHz support

In order to optmize low power IDLE power number all PLLs should be in bypass mode.
On imx6sl, UART can be sourced directly from the 24MHz XTAL. Its frequency is
limited to 4MHz due to an internal divider of 6. For customer who don't require
higher uart speed, add "uart_at_4M" to the kernel command line.

This patch is copied from commit fc096695b46563b7bf05df4e84e8c17241506651
on L3.10.y branch because of so many conflicts to resolve.

Signed-off-by: Bai Ping <b51503@freescale.com>
Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
9 years agoMGS-271 gpu:gpu idle information can't be fetched
Loren Huang [Tue, 11 Nov 2014 09:27:27 +0000 (17:27 +0800)]
MGS-271 gpu:gpu idle information can't be fetched

patch 5.0.11.p4-0039-base-CL26176-Dump-whole-process-db
dropped idle sys interace.

And vivante didn't fully integrate patch
patch 5.0.11.p4-0039-base-CL26176-Dump-whole-process-db

The fix is add back the missed code and logic.

Date: Nov 10, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit dc397c3a4e150f18e68cf26350fa0aafe98d3e31)

9 years agoMLK-9823 arm: imx: correct L2 controller settings after resume
Anson Huang [Tue, 11 Nov 2014 02:13:58 +0000 (10:13 +0800)]
MLK-9823 arm: imx: correct L2 controller settings after resume

As we have specific tag and data latency settings on our platforms,
so we have to restore these settings after resume with L2 controller
power gated. Otherwise, system perpormance will be impacted a lot:

dd read test(dd if=/dev/mmcblk2 of=/dev/null bs=1M count=2000) of SD
card would lower from 61.4MB/s to 57.7MB/s, ~6% drop.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agoENGR00321817-02 fbcon: System hang when calling fb_new_modelist()
Sandor Yu [Thu, 17 Jul 2014 12:41:14 +0000 (20:41 +0800)]
ENGR00321817-02 fbcon: System hang when calling fb_new_modelist()

System will hang if calling fb_new_modelist() function from mxc_hdmi
driver.

In the function of fbcon_new_modelist(), pointer variable vc is missing
null pointer check, add null pointer check vc to fix the issue.

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

9 years agoENGR00321817-01 HDMI: Dispaly blank after resume
Sandor Yu [Thu, 17 Jul 2014 12:18:32 +0000 (20:18 +0800)]
ENGR00321817-01 HDMI: Dispaly blank after resume

Issue reproduce steps:
1. Boot up without HDMI cable plugin
2. Insert the HDMI cable.
3. echo mem > /sys/power/state , enter suspend,
4. resume it,
System can resume from suspend but display is blank.
Error log:
mxc_sdc_fb fb.31: Unable to allocate framebuffer memory
detected fb_set_par error, error code: -12

In mxc hdmi driver, if system bootup without hdmi cable plugin,
driver will create a default modelist.

In fbcon driver, array fb_display[] initialized when system bootup
and save current mode pointer that point to default modelist.

When hdmi cable is plugin the modelist will rebuild according edid
data, but the pointer of video mode in fb_display[] is not updated.

When system resume, fbcon will use the invalidate pointer to
configured framebuffer, framebuffer will crash.

Add function fb_new_modelist() after modelist is rebuild to fix the
issue.

Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit 5687cb8dc5099acdb0e3a0542f666326764d558c)
(cherry picked from commit 5451976da30e34db74069d7197748556f9eb5c69)

9 years agoENGR00295814 ARM: dts: imx6qdl: correct gpio key's active state
Anson Huang [Mon, 20 Jan 2014 11:30:09 +0000 (19:30 +0800)]
ENGR00295814 ARM: dts: imx6qdl: correct gpio key's active state

From schematic, below GPIO keys' active state is low, so we need
to set correct active state in dts.

i.MX6Q/DL-SABRESD board: power, vol+ and vol-.
i.MX6Q/DL-SABREAUTO board: home, back, prog, vol+ and vol-.

Signed-off-by: Anson Huang <b20788@freescale.com>
(cherry picked from commit f1319b3268db3e0e80d85ba9f4ae3b569b916dd4)
Signed-off-by: Robin Gong <b38343@freescale.com>
9 years agoARM: imx: add anatop settings for LPDDR2 when enter DSM mode
Anson Huang [Wed, 17 Sep 2014 03:11:46 +0000 (11:11 +0800)]
ARM: imx: add anatop settings for LPDDR2 when enter DSM mode

For LPDDR2 platform, no need to enable weak2P5 in DSM mode,
it can be pulled down to save power(~0.65mW).

And per design team's recommendation, we should disconnect
VDDHIGH and SNVS in DSM mode on i.MX6SL.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: replace cpu type check with ddr type check
Anson Huang [Wed, 17 Sep 2014 03:11:45 +0000 (11:11 +0800)]
ARM: imx: replace cpu type check with ddr type check

As the DDR/IO and MMDC setting are different on LPDDR2 and DDR3,
we used cpu type to decide how to do these settings in suspend
before which is NOT flexible, take i.MX6SL for example, although
it has LPDDR2 on EVK board, but users can also use DDR3 on other
boards, so it is better to read the DDR type from MMDC then decide
how to do related settings.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoMLK-9808 HDMI: EDID bug fixes / improvements
Sandor Yu [Fri, 7 Nov 2014 03:14:05 +0000 (11:14 +0800)]
MLK-9808 HDMI: EDID bug fixes / improvements

Changes in order of appearence:
- If an EDID extension block other than the known (CEA extension) is found
  don't fail monitor detection completely, just proceed to the next block.
- If 4 or more extensions are present two problems arise:
  - only 2 extensions will actually be read and
  - parsing will read beyond the buffer.
  Throw a BUG() and add a comment, don't have time for a rewrite right now.
- The EDID I2C read code has a 1 second timeout - per byte. With 128 bytes
  per block this could take over 2 minutes. And we have indeed seen a very
  long pause on Linux shutdown on rare occasions. At 100 kHz reading a byte
  takes 0.6 ms, reduce the timeout to 30 ms.
- Checking extblknum < 0 is pointless when its value was assigned from an
  unsigned char.
- Some old monitors didn't set the 'number of EDID ext. blocks' field. 0xFF
  means no extensions.
- Calling mxc_edid_parse_ext_blk() only makes sense if an ext. block was
  actually read. Otherwise it's sure to fail, and monitor detection with it.
- As the 1st extension was parsed beforehand the following for loop must
  start at 2, otherwise the 1st extension is parsed twice.
- Inside the read loop all bytes were written to tmpedid[1], It should
  tmpedid[i].
- And then when parsing the read data they have to start at tmpedid[0],
  not at tmpedid[EDID_LENGTH], which is beyond the buffer.
- Improved debugging a bit by inserting a message if reading fails and also
  removing one that may be confused with another with the same text.
- If getting the EDID data fails we will retry once. But if the failure was
  due to not being able to parse the data rather than a read error
  re-reading will yield HDMI_EDID_SAME. The code will misinterpret that as
  'no change, video modes already set up'. Instead continue with the status
  code of the initial attempt.
- Before retrying wait 0.2 s, most likely reading initially failed because
  the cable had not been fully inserted.

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

9 years agoENGR00323271-02 hdmi: Add mipi core clock to hdmi drivers
Sandor Yu [Wed, 23 Jul 2014 03:01:08 +0000 (11:01 +0800)]
ENGR00323271-02 hdmi: Add mipi core clock to hdmi drivers

HDMI isfr clock source from video 27M clock.

There are one clock gate control of video27m_root in CCM,
ccm_video27m_root_cg = ((lpcg_mipi_core_cfg_clk_enable_clock_root
| lpcg_mipi_core_pll_refclk_enable_clock_root) | lpcg_vpu_rclk_enable_clock_root);
The video 27M clock depend on vpu clock or mipi core clock.

In mx6 chip, vpu can been disabled by fuse,
so for vpu disabled case, mipi core clock should enabled and make sure
27M clock on.

Add mipi core clock management in hdmi drivers to support vpu disabled
case.

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

9 years agoMLK-8906 video: mxc: mipi dsi: Set panel vm back to var in .setup()
Liu Ying [Wed, 5 Nov 2014 07:28:29 +0000 (15:28 +0800)]
MLK-8906 video: mxc: mipi dsi: Set panel vm back to var in .setup()

In order to prevent some critical framebuffer var entries(e.g.,
sync/vmode flags) from being changed, this patch sets the active
mipi dsi panel's video mode back to the framebuffer var.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 30a40ea663a655fdcdfec195f0aaef7a21d4126f)

9 years agoMGS-210 gpu:5.0.11.p4 gpu driver kernel part integration
Loren Huang [Thu, 6 Nov 2014 08:39:44 +0000 (16:39 +0800)]
MGS-210 gpu:5.0.11.p4 gpu driver kernel part integration

Integrate 5.0.11.p4 kernel change.

Date: Nov 6, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 4d1f341c418d70a73cded239a2bba554e25de5ac)

9 years agoMGS-200 gpu:Correct the CMA allocator logic
Loren Huang [Mon, 13 Oct 2014 09:14:59 +0000 (17:14 +0800)]
MGS-200 gpu:Correct the CMA allocator logic

In original logic, the CMA always allocate memory, but report
allocation failure, it will cause serious memory leak.
Correct logic to fix it.

Date: Oct 13, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 0625c8b5b72c620269e5fd5feee93d51f4536d49)

9 years agoENGR00332861 ARM:imx6x: Fix build break caused by GPU driver.
Ranjani Vaidyanathan [Tue, 23 Sep 2014 16:35:07 +0000 (11:35 -0500)]
ENGR00332861 ARM:imx6x: Fix build break caused by GPU driver.

    The GPU driver fails to build when the kernel is not built in-place,
    KBUILD_OUTPUT is set to point to some other directory.
    This patch fixes this issue.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
(cherry picked from commit 6ca660c57badbebfb68af697b2a3a26075a99269)

9 years agoENGR00329409 gpu:5.0.11.p3 gpu driver kernel part integration
Loren Huang [Mon, 22 Sep 2014 09:38:28 +0000 (17:38 +0800)]
ENGR00329409 gpu:5.0.11.p3 gpu driver kernel part integration

Integrate p2 and p3 kernel change together.

Date: Sep 22, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 0667c47bcf0717e96d1d8a95965de8c21466777e)

Conflicts:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c