linux.git
10 years agoENGR00304574-2 dma: mxs-dma: add the dependency for SOC_IMX6SX
Huang Shijie [Fri, 21 Mar 2014 02:32:54 +0000 (10:32 +0800)]
ENGR00304574-2 dma: mxs-dma: add the dependency for SOC_IMX6SX

Add the dependency for imx6sx.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304574-1 ARM: dts: imx6sx: add dt node for apbh-dma
Huang Shijie [Fri, 21 Mar 2014 02:30:58 +0000 (10:30 +0800)]
ENGR00304574-1 ARM: dts: imx6sx: add dt node for apbh-dma

Add the dt node for apbh-dma.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304827 net: fec: init the phy_id to invalid address
Fugang Duan [Fri, 21 Mar 2014 03:51:13 +0000 (11:51 +0800)]
ENGR00304827 net: fec: init the phy_id to invalid address

Init the phy_id to invalid address in .probe() function.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00303542-4 mach:Update gpu clock to 720M
Loren HUANG [Wed, 26 Feb 2014 11:02:30 +0000 (19:02 +0800)]
ENGR00303542-4 mach:Update gpu clock to 720M

-Designed team confirmed GC400T is designed to run 720M.
-Update the clock source for GC400T.

Signed-off-by: Loren HUANG <b02279@freescale.com>
10 years agoENGR00303542-3 dts:Add gpu description into imx6sx dtsi
Loren HUANG [Wed, 26 Feb 2014 11:01:05 +0000 (19:01 +0800)]
ENGR00303542-3 dts:Add gpu description into imx6sx dtsi

-Add gpu description into imx6sx dtsi to enable gc400t.

Signed-off-by: Loren HUANG <b02279@freescale.com>
10 years agoENGR00303542-2 Change pu dummy for i.mx6sx
Loren HUANG [Thu, 20 Mar 2014 10:27:15 +0000 (18:27 +0800)]
ENGR00303542-2 Change pu dummy for i.mx6sx

-Change pu dummy for i.mx6sx to allow gpu power operation

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Loren Huang <b02279@freescale.com>
10 years agoENGR00303542-1 gpu:Update gpu kernel driver to 5.0.9.1 release
Loren HUANG [Wed, 19 Mar 2014 10:50:24 +0000 (18:50 +0800)]
ENGR00303542-1 gpu:Update gpu kernel driver to 5.0.9.1 release

-Update gpu kernel driver to 5.0.9.1 release

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00304563-2 ARM: dts: add fixed phy address to imx6sx 17x17/19x19 arm2 boards
Fugang Duan [Fri, 21 Mar 2014 00:59:40 +0000 (08:59 +0800)]
ENGR00304563-2 ARM: dts: add fixed phy address to imx6sx 17x17/19x19 arm2 boards

Add fixed phy-id property for imx6sx 17x17/19x19 arm2 boards.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00304563-1 net: fec: add fixed phy address support
Fugang Duan [Fri, 21 Mar 2014 00:51:09 +0000 (08:51 +0800)]
ENGR00304563-1 net: fec: add fixed phy address support

Add fixed phy address support.

i.MX6sx has two MACs, and MAC1 mdio bus connects to two phys which
means MAC2 share MDIO bus with MAC1. So for any one of the two MACn,
which can scan two phy address. For current implementment, it selects
the little address for the default address and binding with the phy.
For the situation, user can add the fixed phy address to DTS.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00303200 [IPU Split] - Vertical line in downsaled image with ratio less 2
Oliver Brown [Wed, 12 Mar 2014 16:21:02 +0000 (11:21 -0500)]
ENGR00303200 [IPU Split] - Vertical line in downsaled image with ratio less 2

The optimal resize ratio should be used if the downscaler is not needed. This
will fix a vertical line in the center for some scaling ratios.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
10 years agoENGR00303778-2 ARM: dts: imx6sx-19x19-arm2: add pxp and v4l2 output support
Robby Cai [Wed, 19 Mar 2014 10:59:47 +0000 (18:59 +0800)]
ENGR00303778-2 ARM: dts: imx6sx-19x19-arm2: add pxp and v4l2 output support

Enable pxp and v4l2 output driver on imx6sx 19x19 ARM2 board.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00303778-1 ARM: dts: imx6sx-sdb: add pxp v4l2 output support on SDB
Robby Cai [Wed, 19 Mar 2014 10:38:19 +0000 (18:38 +0800)]
ENGR00303778-1 ARM: dts: imx6sx-sdb: add pxp v4l2 output support on SDB

Add pxp v4l2 output support

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00304446 net: fec: free resource after phy probe fail
Fugang Duan [Thu, 20 Mar 2014 09:24:02 +0000 (17:24 +0800)]
ENGR00304446 net: fec: free resource after phy probe fail

Current flow call .fec_enet_close() function after phy probe
fail, which is not right. It must free memory and disable all
related clocks when there has no phy connection or phy probe
fail.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00304229 ARM: IMX: Enhace the MAC address init function to support two MACs
Fugang Duan [Wed, 19 Mar 2014 09:07:49 +0000 (17:07 +0800)]
ENGR00304229 ARM: IMX: Enhace the MAC address init function to support two MACs

Since imx6sx has two ethernet MAC, and MAC address read from fuse.
So enhance the MAC address init function to support two MACs.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00299939-3 USB: imx6x: Add dummy LDO2p5 regulator for VBUS wakeup
Ranjani Vaidyanathan [Tue, 4 Mar 2014 21:38:18 +0000 (15:38 -0600)]
ENGR00299939-3 USB: imx6x: 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>
10 years agoENGR00299939-2 ARM: imx6sl: Add dummy LDO2p5 regulator to support VBUS wakeup
Ranjani Vaidyanathan [Tue, 4 Mar 2014 21:31:59 +0000 (15:31 -0600)]
ENGR00299939-2 ARM: imx6sl: Add dummy LDO2p5 regulator to support 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.

This patch ensures that the low power idle code checks the status of the
dummy ldo2p5 regulator before disabling LDO2p5.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00299939-1 ARM: dts: imx6sl:Add dummy LDO2p5 regulator to support vbus wakeup
Ranjani Vaidyanathan [Tue, 4 Mar 2014 21:06:30 +0000 (15:06 -0600)]
ENGR00299939-1 ARM: dts: imx6sl:Add dummy LDO2p5 regulator to support 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.
This patch adds the dummy regulator to the dts files.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00303795-4 usb: chipidea: imx: add hsic support for imx6sx
Peter Chen [Tue, 18 Mar 2014 01:05:42 +0000 (09:05 +0800)]
ENGR00303795-4 usb: chipidea: imx: add hsic support for imx6sx

Some improvements and bug-fixes for imx6sx:
- Add one bit for sending resume signal using 32K OSC
- Add board level pad regulator
- HSIC also needs host quirk, add this fix for imx6sl too

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00303795-3 usb: chipidea: imx: rename host quirk flag to reflect its real meaning
Peter Chen [Tue, 18 Mar 2014 01:15:52 +0000 (09:15 +0800)]
ENGR00303795-3 usb: chipidea: imx: rename host quirk flag to reflect its real meaning

This flag is not only used for mxs phy's bug, but also
for speical routine for other imx host operations.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00303795-2 usb: chipidea: coordinate usb phy initialization for different phy...
Peter Chen [Thu, 13 Mar 2014 08:59:25 +0000 (16:59 +0800)]
ENGR00303795-2 usb: chipidea: coordinate usb phy initialization for different phy type

For internal PHY (like UTMI), the phy clock may from internal pll,
it is on/off on the fly, the access PORTSC.PTS will hang without
phy clock. So, the usb_phy_init which will open phy clock needs to
be called before hw_phymode_configure.
See: http://marc.info/?l=linux-arm-kernel&m=139350618732108&w=2

For external PHY (like ulpi), it needs to configure portsc.pts before
visit viewport, or the viewport can't be visited. so phy_phymode_configure
needs to be called before usb_phy_init.
See: cd0b42c2a6d2a74244f0053f8960f5dad5842278

It may not the best solution, but it can work for all situations.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: shc_work@mail.ru
Cc: denis@eukrea.com
Cc: festevam@gmail.com
Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00303795-1 ARM: imx6sx: enable USB hsic
Peter Chen [Tue, 18 Mar 2014 00:32:08 +0000 (08:32 +0800)]
ENGR00303795-1 ARM: imx6sx: enable USB hsic

- Add USB hsic support for imx6sx
- Enable hsic support at imx6sx 17x17 board
- Enable usbotg1 and hsic support at imx6sx 19x19 board

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agousb: doc: rename ci13xxx-imx.txt to ci-hdrc-imx.txt
Peter Chen [Mon, 6 Jan 2014 02:10:40 +0000 (10:10 +0800)]
usb: doc: rename ci13xxx-imx.txt to ci-hdrc-imx.txt

We have already renamed the file name, change doc name at this
patch.

Cc: devicetree@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: chipidea: Propagate the real error code on platform_get_irq() failure
Fabio Estevam [Wed, 19 Feb 2014 05:41:44 +0000 (13:41 +0800)]
usb: chipidea: Propagate the real error code on platform_get_irq() failure

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: chipidea: udc: add maximum-speed = full-speed option
Michael Grzeschik [Wed, 19 Feb 2014 05:41:43 +0000 (13:41 +0800)]
usb: chipidea: udc: add maximum-speed = full-speed option

This patch makes it possible to set the chipidea udc into full-speed only mode.
It is set by the oftree property "maximum-speed = full-speed".

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: chipidea: use dev_get_platdata()
Jingoo Han [Wed, 19 Feb 2014 05:41:42 +0000 (13:41 +0800)]
usb: chipidea: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: chipidea: refine PHY operation
Peter Chen [Wed, 19 Feb 2014 05:41:40 +0000 (13:41 +0800)]
usb: chipidea: refine PHY operation

- Delete global_phy due to we can get the phy from phy layer now
- using devm_usb_get_phy to instead of usb_get_phy
- delete the otg_set_peripheral, which should be handled by otg layer

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agousb: common: introduce of_usb_get_maximum_speed()
Felipe Balbi [Sun, 30 Jun 2013 10:56:45 +0000 (13:56 +0300)]
usb: common: introduce of_usb_get_maximum_speed()

this helper will be used for controllers which
want to work at a lower speed even though they
support higher USB transfer rates.

One such case is Texas Instruments' AM437x
SoC where it uses a USB3 controller without
a USB3 PHY, rendering the controller USB2-only.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoENGR00304199 ARM: dtsi: add enet2 support for imx6sx arm2 platforms
Fugang Duan [Tue, 18 Mar 2014 07:49:30 +0000 (15:49 +0800)]
ENGR00304199 ARM: dtsi: add enet2 support for imx6sx arm2 platforms

Add enet2 support for imx6sx 17x17/19x19 arm2 board.

Since imx6sx has two enet interface, and all AR8031 ethernet
daughter boards max7322 connect to same i2c bus, and same i2c
slave address. Phy address also are the same in default. So need
to change max7322 i2c slave address and phy address to others to
avoid collision.

Ar8031 ethernet daughter board rework:
R9: switch to B, remove R22, install R21 with 10k.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00303791-1 ARM:imx6x: Add IRAM page table support for imx6sx.
Ranjani Vaidyanathan [Mon, 17 Mar 2014 18:18:50 +0000 (13:18 -0500)]
ENGR00303791-1 ARM:imx6x: Add IRAM page table support for imx6sx.

Allocate page tables in IRAM that will be used when ever DDR is put
into self-refresh. Add support for this to iMX6SX.
Some common files are also changed to accomodate the OCRAM_S address that
is used to store the IRAM page table in iMX6SX.

This patch depends on the following two commits:
ENGR297285-1 [MX6x] Support IRAM page table when DDR is in self-refresh.
ENGR297285-2 [MX6x] Support IRAM page table when DDR is in self-refresh.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00297285-2 [MX6x] Support IRAM page table when DDR is in self-refresh.
Ranjani Vaidyanathan [Thu, 13 Feb 2014 22:51:11 +0000 (16:51 -0600)]
ENGR00297285-2 [MX6x] Support IRAM page table when DDR is in self-refresh.

The bottom 16KB of the IRAM is reserved for the IRAM page table.
Reduce the available IRAM size for the other drivers by 16KB.

This commit is cherry-picked:
d43a087f363b5dc91ddc4fc401540050d7f55c7f

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00297285-1 [MX6x] Support IRAM page table when DDR is in self-refresh
Ranjani Vaidyanathan [Thu, 13 Feb 2014 22:50:20 +0000 (16:50 -0600)]
ENGR00297285-1 [MX6x] Support IRAM page table when DDR is in self-refresh

Whenever DDR is explicitly put into self-refresh, we need to ensure
that no access are made to the DDR. All the bus masters excpet ARM
are shutdown gracefully.
The ARM core can continue to access the DDR due to:
1. Speculative accesses
   This can be prevented by flushing the Branch Target Address Cache
2. Aggressive Prefetching
   This can be minimized by adding nops.
Apart from this the TLB architecture in ARM does not guarantee that
an entry remains in the TLB unless its explicitly locked. Even if
free slots are available an entry maybe evicted. So flushing the TLB
does not guarantee a page table walk will not happen.

The solution is to put a minimized page table in IRAM that can be used when
DDR is in self-refresh. The IRAM page tables should have entries for IRAM,
AIPS1 and AIPS2 as these entries will be needed by the code that puts DDR
into self-refresh. It should not contain any entries that point to the DDR.

This patch set accomplishes the following:
1. Set the IRAM to be mapped as 1M sections in the high mem region.
   This makes it possible to create entries for the IRAM code in the IRAM page table.
We need to ensure that both the DDR and IRAM page table have mapping for the IRAM code.
2. Ensure the IRAM, AIPS1, AIPS2 have entries in the IRAM page table.
3. Save TTBR1
4. Set TTBR1 to point to the page tables stored in IRAM. Switch to using
TTBR1 before DDR is put into self-refresh. Ensure the following settings:
    a. TTBCR.N = 1
     This means the 0-2G virtual address space is translated using TTBR0
     and 2G-4G is translated using TTBR1.
    b. Set TTBCR.PD0 = 1
      With this setting page table walks using TTBR0 are disabled.
4. After the DDR has exited self-refresh, reset TTBCR to 0 (TTBR0 will
be used for translations now).
5. Restore TTBR1

Even though TTBR1 is only used to decode the top 2G of virtual address
space, ARM requires that we allocate the entire 16KB for the page table.
To minimize IRAM/OCRAM required, we put the code in the bottom 8K and
page table entries in the top 8K.
This requires the low power code be optimized to occupy as little space
as possible.

This commit is cherry-picked:
93ae491d9dbe34a91e2dd5832b02b0f0a390ddbe

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00303820 [#887] refine physical address check for external memory
Xianzhong [Tue, 18 Mar 2014 12:40:59 +0000 (20:40 +0800)]
ENGR00303820 [#887] refine physical address check for external memory

2G above address will cause system reboot and fixed in original patch,
error check code is added based on the original logic.

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 7d85c98bf781eb047c2000bd82ea7559c24a2446)

10 years agoENGR00303629-2 qspi: support SF25FL128S by enabling DDR Quad IO mode
Allen Xu [Fri, 14 Mar 2014 20:18:25 +0000 (15:18 -0500)]
ENGR00303629-2 qspi: support SF25FL128S by enabling DDR Quad IO mode

Enalbe DDR Quad IO mode to support Spansion SF25FL128S NOR flash.

Signed-off-by: Allen Xu <b45815@freescale.com>
10 years agoENGR00303629-1: ARM: dts: imx6sx-sdb: support NOR Flash SF25FL128S
Allen Xu [Fri, 14 Mar 2014 20:11:37 +0000 (15:11 -0500)]
ENGR00303629-1: ARM: dts: imx6sx-sdb:  support NOR Flash SF25FL128S

add Spansion SF25FL128S in sdb dts file.

Signed-off-by: Allen Xu <b45815@freescale.com>
10 years agonet: fec: fix the error to get the previous BD entry
Fugang Duan [Mon, 17 Mar 2014 08:03:06 +0000 (16:03 +0800)]
net: fec: fix the error to get the previous BD entry

Bug: error to get the previous BD entry. When the current BD
is the first BD, the previous BD entry must be the last BD,
not "bdp - 1" in current logic.

V4:
  * Optimize fec_enet_get_nextdesc() for code clean.
    Replace "ex_new_bd - ring_size" with "ex_base".
    Replace "new_bd - ring_size" with "base".

V3:
  * Restore the API name because David suggest to use fec_enet_
    prefix for all function in fec driver.
    So, change next_bd() -> fec_enet_get_nextdesc()
        change pre_bd()  -> fec_enet_get_prevdesc()
    * Reduce the two APIs parameters for easy to call.

V2:
  * Add tx_ring_size and rx_ring_size to struct fec_enet_private.
  * Replace api fec_enet_get_nextdesc() with next_bd().
    Replace api fec_enet_get_prevdesc() with pre_bd().

  * Move all ring size check logic to next_bd() and pre_bd(), which
    simplifies the code redundancy.

V1:
  * Add BD ring size check to get the previous BD entry in correctly.

Reviewed-by: Li Frank <B20596@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Acked-by: Frank Li <frank.li@freescale.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoENGR00303663 mxc v4l2 capture: Don't return error if we cannot get mipi csi2
Liu Ying [Mon, 17 Mar 2014 03:28:53 +0000 (11:28 +0800)]
ENGR00303663 mxc v4l2 capture: Don't return error if we cannot get mipi csi2

The mipi csi2 code is ugly present in the capture pipeline setup/disable
routions with '#ifdef CONFIG_MXC_MIPI_CSI2/#endif' protected.  Whenever
it finds mipi_csi2_info is not gotten correctly, it will return error to
callers.  This breaks the normally routines in which mipi csi2 is not used
and mipi csi2 driver is disabled in its devicetree node(but with the
Kconfig CONFIG_MXC_MIPI_CSI2 defined).  A real example is the capture
feature on the MX6 Sabreauto platforms.  We have only parallel CSI input
on it and the mipi csi2 driver is disabled in its devicetree node but with
the Kconfig CONFIG_MXC_MIPI_CSI2 defined.  So, a reasonable choice at present
is not to return error if mipi_csi2_info cannot be gotten, though we could
eventually re-organize the capture code for a better total solution in the
future.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoNET: fec: only enable napi if we are successful
Fugang Duan [Mon, 17 Mar 2014 05:59:00 +0000 (13:59 +0800)]
NET: fec: only enable napi if we are successful

If napi is left enabled after a failed attempt to bring the interface
up, we BUG:

fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
libphy: PHY fixed-0:00 not found
fec 2188000.ethernet eth0: could not attach to PHY
------------[ cut here ]------------
kernel BUG at include/linux/netdevice.h:502!
Internal error: Oops - BUG: 0 [#1] SMP ARM
...
PC is at fec_enet_open+0x4d0/0x500
LR is at __dev_open+0xa4/0xfc

Only enable napi after we are past all the failure paths.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoENGR00303308 hdmi:update default video mode setting required by xserver
Sandor Yu [Thu, 13 Mar 2014 09:44:41 +0000 (17:44 +0800)]
ENGR00303308 hdmi:update default video mode setting required by xserver

xserver will read default video mode in command line by sysfs node
/sys/class/graphics/fb0/mode, but the sysfs node is not initialized
when system bootup without hdmi cable plugin
or frame buffer register in blank state.
Fixed:
- Remove unused previous_mode
- Add default_mode, initialize in disp_init function.
- Initialize fbi->mode in disp_init function and hdmi_setup function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00243315-4 MXC V4L2 Capture:Improve debug info for s_std
Liu Ying [Fri, 8 Mar 2013 08:55:37 +0000 (16:55 +0800)]
ENGR00243315-4 MXC V4L2 Capture:Improve debug info for s_std

commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 introduced an
annoying kernel log by changing a pure debug info to error level.
This patch reverts that change.

Conflicts:

drivers/media/video/mxc/capture/mxc_v4l2_capture.c

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

10 years agoENGR00243315-3 MXC V4L2 Capture:Remove unnecessary mclk setting
Liu Ying [Fri, 8 Mar 2013 08:44:41 +0000 (16:44 +0800)]
ENGR00243315-3 MXC V4L2 Capture:Remove unnecessary mclk setting

commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 added a hard
coding for csi_parma.mclk setting to 27MHz. The comment added by
that commit is totally wrong by telling that csi_param.mclk
would be a kind of 'pixel clock' set in 'csi_data_dest' register.
This patch removes the unnecessary mclk setting for csi_param.mclk
variable, since it is only valid for CSI test mode.

Conflicts:

drivers/media/video/mxc/capture/mxc_v4l2_capture.c

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

10 years agoENGR00243315-2 IPUv3 CSI:Remove test mode clock setting
Liu Ying [Fri, 8 Mar 2013 08:33:35 +0000 (16:33 +0800)]
ENGR00243315-2 IPUv3 CSI:Remove test mode clock setting

This patch removes test mode clock setting in function
ipu_csi_init_interface(), since the setting is only
necessary for function _ipu_csi_set_test_generator().
This unnecessary setting is added wrongly by commit
f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57.

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

10 years agoENGR00243315-1 IPUv3 CSI:Correct CCIR code1/2 for PAL and NTSC
Liu Ying [Fri, 8 Mar 2013 08:01:48 +0000 (16:01 +0800)]
ENGR00243315-1 IPUv3 CSI:Correct CCIR code1/2 for PAL and NTSC

We reversed CCIR code1/2 setting before, which may brings
captured frame quality issue(jaggy edge can be seen). This
patch revert that change.

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

10 years agoENGR00303418 mtd: fsl-quadspi: set AHB transfer size to the maximum value
Allen Xu [Fri, 14 Mar 2014 15:48:21 +0000 (10:48 -0500)]
ENGR00303418 mtd: fsl-quadspi: set AHB transfer size to the maximum value

Set AHB transfer size to 1K which significantly improved the read
performance.

Add ahb_buf_size field in fsl_qspi_devtype_data to denote the size for
different SoC.

Before:

root@imx6qdlsolo:~# dd if=/dev/mtd1 of=/dev/null bs=1M count=16
16+0 records in
16+0 records out
16777216 bytes (17 MB) copied, 0.472183 s, 35.5 MB/s

After:

root@imx6qdlsolo:~# dd if=/dev/mtd1 of=/dev/null bs=1M count=16
16+0 records in
16+0 records out
16777216 bytes (17 MB) copied, 0.369439 s, 45.4 MB/s

Signed-off-by: Allen Xu <b45815@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00303533 mtd: fsl-quadspi: reset the module in the probe
Huang Shijie [Fri, 14 Mar 2014 07:13:36 +0000 (15:13 +0800)]
ENGR00303533 mtd: fsl-quadspi: reset the module in the probe

The uboot may run the QuadSpi controler with command:
    #sf probe

So we should reset the module in the probe.
This patch also clear the pending interrupts which arised by the uboot
code.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00298127-2 ARM: dtsi: imx6qdl sabreauto: Disable mipi csi
Liu Ying [Fri, 14 Mar 2014 09:34:11 +0000 (17:34 +0800)]
ENGR00298127-2 ARM: dtsi: imx6qdl sabreauto: Disable mipi csi

As the sabreauto CPU board schematics mentions, the MIPI connector
isn't mechanically compatible with Freescale MIPI display and camera
board, then we have no way to support MIPI features currently on
this platform.  So, let's disable MIPI CSI.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00298127-1 ARM: dtsi: imx6qdl sabreauto: Remove v4l2_cap_1 node
Liu Ying [Fri, 14 Mar 2014 09:26:28 +0000 (17:26 +0800)]
ENGR00298127-1 ARM: dtsi: imx6qdl sabreauto: Remove v4l2_cap_1 node

As the sabreauto CPU board schematics mentions, the MIPI connector
isn't mechanically compatible with Freescale MIPI display and camera
board, then we have only the parallel CSI video input that is supported
by the v4l2_cap_0 node.  So, let's remove the orphan one - v4l2_cap_1.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00303300-2 arm: dts: Add MLB50 dts support on i.MX6SX-17x17-arm2 board.
Luwei Zhou [Thu, 13 Mar 2014 08:51:25 +0000 (16:51 +0800)]
ENGR00303300-2 arm: dts: Add MLB50 dts support on i.MX6SX-17x17-arm2 board.

Add MLB50 devicetree support on i.MX6SX-17x17-arm2 platform. Since the MLB50 has
pin conflict with usdhc2 on i.MX6SX-17x17-arm2 board, add an extra dts file to
enable mlb and disable usdhc2.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00303300-1 mxc: mlb: Add MLB50 driver support on i.MX6SX chip
Luwei Zhou [Thu, 13 Mar 2014 08:42:57 +0000 (16:42 +0800)]
ENGR00303300-1 mxc: mlb: Add MLB50 driver support on i.MX6SX chip

Add MLB50 driver supported on i.MX6SX chip. MLB50 will not support
frame rate over 1024 per second.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00302869-2 ARM: imx: imx6qdl: enable cfg_clk to make MIPI CSI2 work
Robby Cai [Thu, 13 Mar 2014 12:02:34 +0000 (20:02 +0800)]
ENGR00302869-2 ARM: imx: imx6qdl: enable cfg_clk to make MIPI CSI2 work

The following error was reported.

-----------------------------------------------------------
root@imx6qdlsolo:~# /unit_tests/mxc_v4l2_capture.out -d /dev/video1 1.yuv
in_width = 176, in_height = 144
out_width = 176, out_height = 144
top = 0, left = 0
mipi csi2 can not receive sensor clk!
sensor chip is ov5640_mipi_camera
sensor supported frame size:
 640x480
 320x240
 720x480
 720x576
 1280x720
 1920x1080
 2592x1944
 176x144
 1024x768
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
mipi csi2 can not receive sensor clk!
mxc_v4l2_s_param: vidioc_int_s_parm returned an error -1
VIDIOC_S_PARM failed
get format failed

-----------------------------------------------------------

Root cause analysis:
It only happens when HDMI is not used/enabled. There is a clock named
video_27m which are needed by HDMI (as isfrclk's parent) and MIPI-CSI2 (as
cfg_clk's parent). MIPI-CSI2 driver is lack of enabling this clock before
start to work and only happen to work when HDMI driver enables this clock.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00302869-1 ARM: dts: imx6qdl: add cfg_clk for MIPI CSI2
Robby Cai [Tue, 11 Mar 2014 10:41:45 +0000 (18:41 +0800)]
ENGR00302869-1 ARM: dts: imx6qdl: add cfg_clk for MIPI CSI2

MIPI CSI2 depends on this clock to work.
This patch also updates the binding document.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00302472-17 ARM: dts: imx6sx-19x19-arm2: Support Hannstar CABC
Liu Ying [Wed, 12 Mar 2014 04:39:27 +0000 (12:39 +0800)]
ENGR00302472-17 ARM: dts: imx6sx-19x19-arm2: Support Hannstar CABC

This patch adds a device tree node for the Hannstar CABC function.
We currently disable the CABC feature since it makes a panel's
backlight unstable when display content varies considerably from
time to time.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-16 video: mxc ipuv3 fb: Report registered disp drv nicely
Liu Ying [Tue, 11 Mar 2014 08:27:25 +0000 (16:27 +0800)]
ENGR00302472-16 video: mxc ipuv3 fb: Report registered disp drv nicely

The mxc ipuv3 fb driver would report any display driver name that
it is trying to register.  To suppress the report, this patch has
the driver provide the registered display driver name after register
finishes.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-15 ARM: dts: imx6sx-19x19-arm2: Support LVDS output
Liu Ying [Tue, 11 Mar 2014 07:30:21 +0000 (15:30 +0800)]
ENGR00302472-15 ARM: dts: imx6sx-19x19-arm2: Support LVDS output

This patch adds the Hannstar XGA LVDS panel support on the
imx6sx-19x19-arm2 board.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-14 ARM: dtsi: imx6sx: Add LDB DT node
Liu Ying [Tue, 11 Mar 2014 06:59:58 +0000 (14:59 +0800)]
ENGR00302472-14 ARM: dtsi: imx6sx: Add LDB DT node

There is one LDB module embedded in the imx6sx SoC.
This patch adds LDB devicetree node into imx6sx.dtsi.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-13 ARM: dts: imx6sx-19x19-arm2: Enable LCDIF1/2
Liu Ying [Tue, 11 Mar 2014 07:21:27 +0000 (15:21 +0800)]
ENGR00302472-13 ARM: dts: imx6sx-19x19-arm2: Enable LCDIF1/2

This patch enables LCDIF1 and LCDIF2.  LCDIF1 will drive
the SEIKO parallel WVGA panel and LCDIF2 will drive LDB
to support a 18bit LVDS panel.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-12 ARM: dts: imx6sx-19x19-arm2: Enable PWM3
Liu Ying [Tue, 11 Mar 2014 07:18:05 +0000 (15:18 +0800)]
ENGR00302472-12 ARM: dts: imx6sx-19x19-arm2: Enable PWM3

This patch enables PWM3 so that PWM backlight could be
supported.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-11 video: mxc LDB: Add FB_MXS to Kconfig dependency
Liu Ying [Tue, 11 Mar 2014 06:53:02 +0000 (14:53 +0800)]
ENGR00302472-11 video: mxc LDB: Add FB_MXS to Kconfig dependency

Since LCDIF may drive LDB, let's add FB_MXS to LDB Kconfig
dependency.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-10 video: mxsfb: Add mxc disp driver support
Liu Ying [Tue, 11 Mar 2014 06:41:02 +0000 (14:41 +0800)]
ENGR00302472-10 video: mxsfb: Add mxc disp driver support

This patch adds mxc display driver support for the mxsfb
driver so that it may interactive with encoder drivers.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-9 video: mxc disp: Drop post_init callback
Liu Ying [Tue, 11 Mar 2014 06:15:33 +0000 (14:15 +0800)]
ENGR00302472-9 video: mxc disp: Drop post_init callback

Since there is no encoder driver using the post_init
callback, let's drop it.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-8 ARM: dts: imx6qdl sabreauto: Remove LDB video mode string
Liu Ying [Tue, 11 Mar 2014 05:59:38 +0000 (13:59 +0800)]
ENGR00302472-8 ARM: dts: imx6qdl sabreauto: Remove LDB video mode string

This patch removes the video mode strings for framebuffers which are
driven by LDB since they are specified in the lvds-channel DT node.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-7 ARM: dts: imx6qdl sabresd: Remove LDB video mode string
Liu Ying [Tue, 11 Mar 2014 05:56:47 +0000 (13:56 +0800)]
ENGR00302472-7 ARM: dts: imx6qdl sabresd: Remove LDB video mode string

This patch removes the video mode strings for framebuffers which are
driven by LDB since they are specified in the lvds-channel DT node.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-6 video: mxc: LDB driver refactor
Liu Ying [Mon, 10 Mar 2014 10:31:51 +0000 (18:31 +0800)]
ENGR00302472-6 video: mxc: LDB driver refactor

This patch almost reworks the LDB driver to make the
implementation simpler and clearer.  The new version
should support all the LDB modules embedded in imx53,
imx6qdl and imx6sx.  The lvds-channel subsidiary DT
node is introduced to represent each LVDS channel.
People may specify a channel's CRTC, working mode(dual
mode or split mode), data width, data mapping, display
timing and if it is a primary channel in the node.

Change logs:
* Use CTRC concept so that the driver may support both
  IPU and LCDIF as the display engines.
* Add mxc dispdrv enable() callback.
* Cache LDB ctrl register value at probe()/setup()/
  enable() stages and finally write to the register at
  enable() stage.
* Simplify logics for setting ctrl/bus muxing/clocks.
* Use regmap to write crtl and bus muxing registers.
* Remove LDB description in DT binding doc fsl_ipuv3_fb.txt.
  Instead, add a new one in fsl,ldb.txt.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-5 video: mxc disp: Let encoder know fbi when enable/disable
Liu Ying [Mon, 10 Mar 2014 10:52:56 +0000 (18:52 +0800)]
ENGR00302472-5 video: mxc disp: Let encoder know fbi when enable/disable

This patch adds framebuffer info structure to the mxc display driver
enable/disable callback parameters so that the encoder drivers may
know the framebuffer information.  In this way, the encoder drivers
which may deal with more than one framebuffer are able to figure out
the one it is handling.  A real example is the LDB encoder, which may
deal with two standalone framebuffers at most.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-4 video: mxc ipuv3 fb: Don't bail out if no DT mode str
Liu Ying [Mon, 10 Mar 2014 09:53:29 +0000 (17:53 +0800)]
ENGR00302472-4 video: mxc ipuv3 fb: Don't bail out if no DT mode str

The encoder drivers should decide if they need mode string for
initialization or not.  So, we don't have to provide mode string
in the device tree node.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-3 video: mxc: Introduce CRTC concept
Liu Ying [Mon, 10 Mar 2014 09:30:15 +0000 (17:30 +0800)]
ENGR00302472-3 video: mxc: Introduce CRTC concept

As the mxc display system is getting more and more complex, various
CRTCs(CRT controllers), such as IPUx DIy and LCDIFz, may drive
various encoders.  For example, imx6sx/imx6dl LCDIF may drive LDB
while imx6dl IPU0 DI0/1 may drive LDB as well.  This patch introduces
CRTC concept to the display framework so that the core logic could be
less IPU specific.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-2 ARM: imx6q: Add imx6sx LDB mux ctrl bit definitions
Liu Ying [Mon, 10 Mar 2014 06:38:19 +0000 (14:38 +0800)]
ENGR00302472-2 ARM: imx6q: Add imx6sx LDB mux ctrl bit definitions

This patch adds LDB mux ctrl bit definitions for imx6sx.
The bit DISP_MUX_LDB_MUX_CTRL is defined in the register IOMUXC_GPR5.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302472-1 ARM: imx6q: Add imx6dl LVDS mux ctrl bit definitions
Liu Ying [Mon, 10 Mar 2014 06:25:56 +0000 (14:25 +0800)]
ENGR00302472-1 ARM: imx6q: Add imx6dl LVDS mux ctrl bit definitions

This patch adds LVDS mux ctrl bit definitions for imx6dl.
The bits LVDS0/1_MUX_CTL are defined in the register IOMUXC_GPR3.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00302247 usb: charger: use stable plug contact in charger detection
Li Jun [Thu, 13 Mar 2014 02:08:00 +0000 (10:08 +0800)]
ENGR00302247 usb: charger: use stable plug contact in charger detection

- Background:
When a USB plug is inserted, the pins are staggered such that the ground
and VBUS pins make first, followed by the D+/D- pins. The detection of
the VBUS eventually results in the usb_charger_detect() being called
in order to further identify the type of USB port the product is being
tied to. USB 2.0 and the Battery Charging 1.1 specs define how this
detection is to be done. The problem with current dirver is that it
does not allow the D+/D- detection circuit to settle to a stable state
prior to checking to see if there is a valid result. Instead, the for
loop breaks on the first iteration due to a false indication of contact.
The code then looks to see what kind of device is actually out there,
and if the D+/D- pins still have not made contact, it comes to the
potentially erroneous conclusion that it is an SDP.

- Solution:
This patch use a successive check to make sure the contact is reliable.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00302223 usb: charger: increase wait time before check CHRG_DETECTED bit
Li Jun [Fri, 7 Mar 2014 02:15:27 +0000 (10:15 +0800)]
ENGR00302223 usb: charger: increase wait time before check CHRG_DETECTED bit

One customer reported an issue that sometimes SW cannot get right charger
detection status on their HW, that is: CHRG_DETECTED bit sometimes is still
0 after 40ms wait time, increase the wait time to be 100ms can resolve the
issue with customer's HW and usb charger. Per usb PHY IC owner's comments,
the required wait time depends on charger's cap of the charger, bigger cap
need more wait time, BC spec only define the min wait time 40mSx, not define
max wait time, so it's ok to have 100ms wait time.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
10 years agoENGR00301078-2: ARM: dts: imx6sl-evk: add support for pfuze200 on imx6sl-evk
Robin Gong [Thu, 6 Mar 2014 11:36:02 +0000 (19:36 +0800)]
ENGR00301078-2: ARM: dts: imx6sl-evk: add support for pfuze200 on imx6sl-evk

move pmic device node from imx6sl-evk.dtsi to upper-level, and add
another layer on imx6sl-evk to diff pfuze100 or pfuze200. Meanwhile
only works in ldo-enable mode if using pfuze200, since 'SW1C' switch
regulator is cut for cost-down which means VDDARM_IN and VDDSOC_IN have
to share the same switch regulator

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00301078-1: ARM: dts: imx6dl-sabresd: add support for pfuze200 on mx6dl-sabresd
Robin Gong [Thu, 6 Mar 2014 10:59:30 +0000 (18:59 +0800)]
ENGR00301078-1: ARM: dts: imx6dl-sabresd: add support for pfuze200 on mx6dl-sabresd

move pmic device node from imx6qdl-sabresd.dtsi to up-level, and add
another layer on imx6dl-sabresd to diff pfuze100 or pfuze200. Meanwhile
only work in ldo-enable mode if using pfuze200,since 'SW1C' switch
regulator is cut for cost-down which means VDDARM_IN and VDDSOC_IN have
to share the same switch regulator

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agopfuze100-regulator: Fix of_node_get() parameter
Fabio Estevam [Wed, 19 Feb 2014 02:46:14 +0000 (23:46 -0300)]
pfuze100-regulator: Fix of_node_get() parameter

Since commit d7857c42 (regulator: pfuze100: Use of_get_child_by_name) we get
the following probe failure:

pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 0
pfuze100-regulator 1-0008: FAB: 0, FIN: 0
pfuze100-regulator 1-0008: regulators node not found
pfuze100-regulator: probe of 1-0008 failed with error -22

Now that of_get_child_by_name() is used we should adjust the device_node pointer
'np' to not get the parent node anymore.

Suggested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoregulator: pfuze100: Use of_get_child_by_name
Sachin Kamat [Fri, 14 Feb 2014 11:50:00 +0000 (17:20 +0530)]
regulator: pfuze100: Use of_get_child_by_name

of_find_node_by_name walks the allnodes list, and can thus walk
outside of the parent node. Use of_get_child_by_name instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoregulator: pfuze100: Add PFUZE200 support to Kconfig and module description
Axel Lin [Wed, 5 Mar 2014 10:02:43 +0000 (18:02 +0800)]
regulator: pfuze100: Add PFUZE200 support to Kconfig and module description

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 2cee2121db44cfeee206d0854bedd52344eea444)

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoregulator: pfuze100: Add terminate entry for [i2c|of]_device_id tables
Axel Lin [Tue, 4 Mar 2014 10:20:14 +0000 (18:20 +0800)]
regulator: pfuze100: Add terminate entry for [i2c|of]_device_id tables

Also remove PFUZE_NUM to avoid below build warnings:

  CC [M]  drivers/regulator/pfuze100-regulator.o
drivers/regulator/pfuze100-regulator.c:86:2: warning: excess elements in array initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:86:2: warning: (near initialization for 'pfuze_device_id') [enabled by default]
drivers/regulator/pfuze100-regulator.c:93:2: warning: excess elements in array initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:93:2: warning: (near initialization for 'pfuze_dt_ids') [enabled by default]

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit e6c4c3378d82c5eeb136ed06b1a23651bcdaf739)

10 years agoregulator: pfuze100: add pfuze200 support
Robin Gong [Tue, 4 Mar 2014 09:40:36 +0000 (17:40 +0800)]
regulator: pfuze100: add pfuze200 support

support pfuze200 chip which remove SW1C and SW4 based on pfuze100.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit f2518480c7b744296a5587990a54e3a284d932b8)

Conflicts:

drivers/regulator/pfuze100-regulator.c

10 years agoregulator: pfuze100: Fix address of FABID
Axel Lin [Mon, 9 Dec 2013 07:24:19 +0000 (15:24 +0800)]
regulator: pfuze100: Fix address of FABID

According to the datasheet, the address of FABID is 0x4. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
(cherry picked from commit c07a24939f36fb6de522a9726369ea64eee5d98d)

10 years agoENGR00303122-4 ARM: dtsi: Fix asrc clock providers for i.MX6 series
Nicolin Chen [Tue, 11 Mar 2014 08:26:35 +0000 (16:26 +0800)]
ENGR00303122-4 ARM: dtsi: Fix asrc clock providers for i.MX6 series

Assign mem_clk, ipg_clk, and correct asrck_clk for i.MX6 series

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00303122-3 ARM: imx6sx: fix ASRC related clocks in the clock tree
Nicolin Chen [Tue, 11 Mar 2014 08:21:44 +0000 (16:21 +0800)]
ENGR00303122-3 ARM: imx6sx: fix ASRC related clocks in the clock tree

According to imx6sx RM, there are three clock providers for ASRC:
Module clock    Clock root      Gate
asrck_clock_d   spdif0_clk_root N/A
ipg_clk         ahb_clk_root    asrc_clk_enable
mem_clk         ahb_clk_root    asrc_clk_enable

while the current clock tree describes a clock named 'ASRC' that only
describes the asrc_clk_enable function.

Thus this patch first adds the other missing clocks to ASRC.

[ Since we don't have the gate for asrck_clock_d, we can pass spdif0_clk
  to ASRC in the devicetree directly. ]

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00303122-2 ARM: imx6q: fix ASRC related clocks in the clock tree
Nicolin Chen [Tue, 11 Mar 2014 08:05:37 +0000 (16:05 +0800)]
ENGR00303122-2 ARM: imx6q: fix ASRC related clocks in the clock tree

According to imx6q RM, there are three clock providers for ASRC:
Module clock Clock root Gate
asrck_clock_d spdif1_clk_root N/A
ipg_clk ahb_clk_root asrc_clk_enable
mem_clk ahb_clk_root asrc_clk_enable

while the current clock tree describes a confusing clock named 'asrc'
that combines this three clocks by rooting its rate from spdif1_clk_root
but set its gate from ipg/mem_clk.

Thus this patch first fixes the name asrc to the correct one -- spdif1
and adds the missing clocks to ASRC.

[ Since we don't have the gate for asrck_clock_d, we can pass spdif0_clk
  to ASRC in the devicetree directly. ]

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00303122-1 mxc: asrc: Fix asrc clocks management
Nicolin Chen [Tue, 11 Mar 2014 07:35:08 +0000 (15:35 +0800)]
ENGR00303122-1 mxc: asrc: Fix asrc clocks management

ASRC needs three clocks from SoC, they are:

mem_clk: Peripheral access clock
ipg_clk: Peripheral clock
asrck_clk: ASRC module clock

while the current driver only maintains two of them and has confusing
clock names. Thus fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00302531 Noise come out after change the HDMI resolution when video pause
Shengjiu Wang [Fri, 7 Mar 2014 09:32:41 +0000 (17:32 +0800)]
ENGR00302531 Noise come out after change the HDMI resolution when video pause

After change the resolution, the blank state will be changed, the audio will
be triggered to start. which didn't care about the audio is running or not
before changing the resolution.
Add hdmi_abort_state for this special case.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00302235-3 pcie: enable pcie on imx6sx sdb board
Richard Zhu [Tue, 4 Mar 2014 04:10:31 +0000 (12:10 +0800)]
ENGR00302235-3 pcie: enable pcie on imx6sx sdb board

enable pcie on imx6sx sdb board

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00302235-2 arm: enable pcie on imx6sx
Richard Zhu [Tue, 4 Mar 2014 04:08:24 +0000 (12:08 +0800)]
ENGR00302235-2 arm: enable pcie on imx6sx

- add mandatory pcie related clks in imx6sx clks tree
- add pcie dts in imx6sx dts
- add pcie kconfig option in imx6sx soc config
- add pcie regulate into dts

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00303325-1 pcie: enable pcie on imx6sx
Richard Zhu [Tue, 25 Feb 2014 05:01:53 +0000 (13:01 +0800)]
ENGR00303325-1 pcie: enable pcie on imx6sx

Enable pcie on imx6sx 19x19 socs.
- imx6sx pcie has its own power domain, add the standalone power
control codes for imx6sx pcie.
- the pcie ref (100mhz differential clock) is routed out and used
by pcie ep on imx6sx pcie.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger init
Nicolin Chen [Thu, 6 Mar 2014 11:14:29 +0000 (19:14 +0800)]
ENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger init

The offset reflects the current position of DMA access in the ALSA ring buffer.
So we should clear it before re-start DMA engine becasue the DMA access should
re-start its job from the 0 position. If we don't do this, the driver might get
a wrong idea about current position of DMA access. Thus fix it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes
Nicolin Chen [Fri, 7 Mar 2014 11:59:04 +0000 (19:59 +0800)]
ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes

We found HDMI Audio has a performance issue when playback 8 channels 192KHz
files, CPU might lag its interrupt responsing while SDMA continues updating
HDMI internal AHB DMA's address and restarting AHB DMA, which resulted the
noise when AHB DMA access overlaps with the data copy procedures in this
driver.

Thus we here double the buffer size and period size of HDMI Audio to chop
the CPU interrupt to its half in the same span of time so that we can keep
the data copy procedures safe and provent it from overlapping access with
AHB DMA.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00302688-2 ARM:dts:imx6sx: Fixed code indent
Ranjani Vaidyanathan [Mon, 10 Mar 2014 23:05:49 +0000 (18:05 -0500)]
ENGR00302688-2 ARM:dts:imx6sx: Fixed code indent

Fixed code indent.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00302688-1 ARM:dts:imx6sx: Fixed build break
Ranjani Vaidyanathan [Mon, 10 Mar 2014 23:04:59 +0000 (18:04 -0500)]
ENGR00302688-1 ARM:dts:imx6sx: Fixed build break

Fixed dtb build break.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00301394 ARM:dts:imx6sx:Add support for imx6sx-19x19-arm2 board support
Ranjani Vaidyanathan [Thu, 27 Feb 2014 18:32:42 +0000 (12:32 -0600)]
ENGR00301394 ARM:dts:imx6sx:Add support for imx6sx-19x19-arm2 board support

Add dts files to support iMX6SX 19x19 ddr3 validation board.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoASoC: fsl-sai: Add SND_SOC_DAIFMT_DSP_A/B support.
Xiubo Li [Thu, 27 Feb 2014 00:45:01 +0000 (08:45 +0800)]
ASoC: fsl-sai: Add SND_SOC_DAIFMT_DSP_A/B support.

o Add SND_SOC_DAIFMT_DSP_A support.
o Add SND_SOC_DAIFMT_DSP_B support.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit a3f7dcc9cc0392528bff75b17adfcd74fb8a0ecd)
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoASoC: fsl-sai: fix Freescale SAI DAI format setting.
Xiubo Li [Tue, 25 Feb 2014 09:54:51 +0000 (17:54 +0800)]
ASoC: fsl-sai: fix Freescale SAI DAI format setting.

o Fix some bugs of fsl_sai_set_dai_fmt_tr().
o Add SND_SOC_DAIFMT_LEFT_J support.
o Add SND_SOC_DAIFMT_CBS_CFM support.
o Add SND_SOC_DAIFMT_CBM_CFS support.
o And SND_SOC_DAIFMT_RIGHT_J need to be done in the future.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 13cde090030c7d00e991c85b87c12891cc8e4df4)
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00302299 ARM: dts: imx6sx: add adc support on i.MX6SX-17x17-ARM2 platform
Luwei Zhou [Fri, 7 Mar 2014 08:23:53 +0000 (16:23 +0800)]
ENGR00302299 ARM: dts: imx6sx: add adc support on i.MX6SX-17x17-ARM2 platform

add adc support for i.MX6SX-17x17-ARM2 platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00302353 ARM: dts: Add SSI<->WM8962 audio support for imx6sx-sdb
Nicolin Chen [Fri, 7 Mar 2014 12:25:45 +0000 (20:25 +0800)]
ENGR00302353 ARM: dts: Add SSI<->WM8962 audio support for imx6sx-sdb

Append audio nodes to the devicetree to add audio support for imx6sx-sdb with
Wolfson WM8962 CODEC.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agomtd: gpmi: add subpage read support
Huang Shijie [Fri, 3 Jan 2014 03:01:42 +0000 (11:01 +0800)]
mtd: gpmi: add subpage read support

1) Why add the subpage read support?
  The page size of the nand chip becomes larger and larger, the imx6 has to
  supports the 16K page or even bigger page. But sometimes, the upper layer only
  needs a small part of the page, such as 512 bytes or less.

  For example, ubiattach may only read 64 bytes per page.

2) We only enable the subpage read support when it meets the conditions:
   <1> the chip is imx6 (or later chips) which can supports large nand page.
   <2> the size of ECC parity is byte aligned.
       If the size of ECC parity is not byte aligned, the calling of NAND_CMD_RNDOUT
       will fail.

3) What does this patch do?
   This patch will fake a virtual small page for the subpage read, and call the
   gpmi_ecc_read_page() to do the real work.

   In order to fake a virtual small page, the patch changes the BCH registers and
   the bch_geometry{}. After the subpage read finished, we will restore them back.

4) Performace:
    4.1) Tested with Toshiba TC58NVG2S0F(4096 + 224) with the following command:
         #ubiattach /dev/ubi_ctrl -m 4

       The detail information of /dev/mtd4 shows below:
       --------------------------------------------------------------
       #mtdinfo /dev/mtd4
        mtd4
        Name:                           test
        Type:                           nand
        Eraseblock size:                262144 bytes, 256.0 KiB
        Amount of eraseblocks:          1856 (486539264 bytes, 464.0 MiB)
        Minimum input/output unit size: 4096 bytes
        Sub-page size:                  4096 bytes
        OOB size:                       224 bytes
        Character device major/minor:   90:8
        Bad blocks are allowed:         true
        Device is writable:             true
       --------------------------------------------------------------

    4.2) Before this patch:
       --------------------------------------------------------------
       [   94.530495] UBI: attaching mtd4 to ubi0
       [   98.928850] UBI: scanning is finished
       [   98.953594] UBI: attached mtd4 (name "test", size 464 MiB) to ubi0
       [   98.958562] UBI: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
       [   98.964076] UBI: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
       [   98.969518] UBI: VID header offset: 4096 (aligned 4096), data offset: 8192
       [   98.975128] UBI: good PEBs: 1856, bad PEBs: 0, corrupted PEBs: 0
       [   98.979843] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
       [   98.985878] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 2024916145
       [   98.993635] UBI: available PEBs: 0, total reserved PEBs: 1856, PEBs reserved for bad PEB handling: 40
       [   99.001807] UBI: background thread "ubi_bgt0d" started, PID 831
       --------------------------------------------------------------
       The attach time is about 98.9 - 94.5 = 4.4s

    4.3) After this patch:
       --------------------------------------------------------------
       [  286.464906] UBI: attaching mtd4 to ubi0
       [  289.186129] UBI: scanning is finished
       [  289.211416] UBI: attached mtd4 (name "test", size 464 MiB) to ubi0
       [  289.216360] UBI: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
       [  289.221858] UBI: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
       [  289.227293] UBI: VID header offset: 4096 (aligned 4096), data offset: 8192
       [  289.232878] UBI: good PEBs: 1856, bad PEBs: 0, corrupted PEBs: 0
       [  289.237628] UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
       [  289.243553] UBI: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 2024916145
       [  289.251348] UBI: available PEBs: 1812, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40
       [  289.259417] UBI: background thread "ubi_bgt0d" started, PID 847
       --------------------------------------------------------------
       The attach time is about 289.18 - 286.46 = 2.7s

     4.4) The conclusion:
       We achieve (4.4 - 2.7) / 4.4 = 38.6% faster in the ubiattach.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agomtd: gpmi: do not use the mtd->writesize
Huang Shijie [Fri, 3 Jan 2014 03:01:41 +0000 (11:01 +0800)]
mtd: gpmi: do not use the mtd->writesize

The nfc_geo->payload_size is equal to the mtd->writesize now,
use the nfc_geo->payload_size to replace the mtd->writesize.

This patch makes preparation for the gpmi's subpage read support.
In the subpage support, the nfc_geo->payload_size maybe smaller then
the mtd->writesize.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agomtd: nand: add "page" argument for read_subpage hook
Huang Shijie [Fri, 3 Jan 2014 03:01:40 +0000 (11:01 +0800)]
mtd: nand: add "page" argument for read_subpage hook

Add the "page" argument for the read_subpage hook. With this argument,
the implementation of this hook could prints out more accurate information
for debugging.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agomtd: nand: remove unused function input parameter
Cai Zhiyong [Wed, 25 Dec 2013 12:11:15 +0000 (20:11 +0800)]
mtd: nand: remove unused function input parameter

The nand_get_flash_type parameter "busw" input value is not used by any
branch, and it is updated before use it in the function, so remove it,
define the "busw" as an internal variable.

Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00302227-8 dts: imx6sx-sdb: add flexcan support
Dong Aisheng [Thu, 6 Mar 2014 11:12:16 +0000 (19:12 +0800)]
ENGR00302227-8 dts: imx6sx-sdb: add flexcan support

Add flexcan support

Signed-off-by: Dong Aisheng <b29396@freescale.com>
10 years agoENGR00302227-7 dts: imx6sx-17x17-arm2: do not use sw polling for card detect
Dong Aisheng [Thu, 6 Mar 2014 10:45:33 +0000 (18:45 +0800)]
ENGR00302227-7 dts: imx6sx-17x17-arm2: do not use sw polling for card detect

The SW polling for card detect will keep sending command repeatly
at backgroud which will consume CPU MIPS and aslo affects the normal
SD debug when enable CONFIG_MMC_DEBUG.

Just as the board design, we simply treat it as no card detect
support.

Signed-off-by: Dong Aisheng <b29396@freescale.com>