linux.git
10 years agoENGR00303701-2 ARM: dts: imx6sx-19x19-arm2: enable the WEIM
Huang Shijie [Mon, 17 Mar 2014 07:01:11 +0000 (15:01 +0800)]
ENGR00303701-2 ARM: dts: imx6sx-19x19-arm2: enable the WEIM

enable the 32MB parallel NOR flash.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00303701-1 ARM: dts: imx6sx: add WEIM support
Huang Shijie [Mon, 17 Mar 2014 05:36:23 +0000 (13:36 +0800)]
ENGR00303701-1 ARM: dts: imx6sx: add WEIM support

Add the WEIM node and the pinctrl.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00306309 ARM:imx:imx6qdl: Fix procedure to switch the parent of LDB_DI_CLK
Ranjani Vaidyanathan [Mon, 31 Mar 2014 18:35:45 +0000 (13:35 -0500)]
ENGR00306309 ARM:imx:imx6qdl: Fix procedure to switch the parent of LDB_DI_CLK

Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk tree,
the glitchy parent mux of ldb_di[x]_clk can cause a glitch to enter the
ldb_di_ipu_div divider. If the divider gets locked up, no ldb_di[x]_clk is
generated, and the LVDS display will hang when the ipu_di_clk is sourced from
ldb_di_clk.

To fix the problem, both the new and current parent of the ldb_di_clk should
be disabled before the switch. This patch ensures that correct steps are
followed when ldb_di_clk parent is switched in the beginning of boot.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoENGR00306442-2 ARM: imx6sx: Fix audio noise during monaural audio playback
Nicolin Chen [Tue, 1 Apr 2014 08:33:08 +0000 (16:33 +0800)]
ENGR00306442-2 ARM: imx6sx: Fix audio noise during monaural audio playback

We should disable the pull up/down bit to the tx data pin as the pulling
operation would cause I2S signal distortion.

Thus this patches dropped the pull up/down bit of TXC pad and the useless
0x40000 bit from all of pads in the group.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00306442-1 ARM: imx6sx: Merge SPDIF and AUDIO clocks into one gate clock
Nicolin Chen [Tue, 1 Apr 2014 08:23:37 +0000 (16:23 +0800)]
ENGR00306442-1 ARM: imx6sx: Merge SPDIF and AUDIO clocks into one gate clock

On Solo X, SPDIF and AUDIO clocks shares one single gate to switch two
entirely different clock routes:

SPDIF <--      <---- SPDIF_PODF ----....
 \    /
  gate1
 /    \
AUDIO <--      <---- AUDIO_PODF ----....

The two audio modules would easily cause conflict during clock operations
if running in the same time:

SPDIF <-- gate1 <---- SPDIF_PODF ----....

AUDIO <-- gate1 <---- AUDIO_PODF ----....

To keep them safe, we here have to merge them into one gate clock and limit
their rates and parent identical:

<---- SPDIF_PODF ----....
       /
SPDIF, AUDIO <-- gate1
       \
<---- AUDIO_PODF ----....

[ The only disadvantage of this modification is that we can not separately
  set a different clock rates and clock sources to SPDIF and AUDIO clock. ]

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer
Nicolin Chen [Tue, 25 Mar 2014 03:46:35 +0000 (11:46 +0800)]
ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer

We might not be able to get appl_ptr, so we estimated it by using hw_ptr,
while the distance between then should not be 2 * priv->period_bytes
initially but 8 * priv->period_bytes as we pri-filled one entire buffer
size at the beginning. The driver's memory access might be overlapped
with ALSA's buffer updating. So this patch fixes this inaccurate distance.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775)

10 years agoENGR00305624-1 ASoC: imx-hdmi-dma: Use neon data copy function
Nicolin Chen [Thu, 6 Mar 2014 11:04:30 +0000 (19:04 +0800)]
ENGR00305624-1 ASoC: imx-hdmi-dma: Use neon data copy function

Use neon data copy function as default to improve data copy performance so that
we can prevent some noise issue happening to HDMI audio due to the performance
issue.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit aca6d0c4c96d658021bda4b5a4e454076e27e9f2)

10 years agoENGR00304914-1 ASoC: imx-hdmi-dma: Limit period size for 6DQ
Nicolin Chen [Fri, 21 Mar 2014 09:30:44 +0000 (17:30 +0800)]
ENGR00304914-1 ASoC: imx-hdmi-dma: Limit period size for 6DQ

The HDMI IP in i.MX6DQ has a bug that it limits the dma period size within 8K.

Patch 'ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes'
doubled the period size which works great with Dual Lite but broke the HDMI
audio function on DQ. Thus fix it for 6DQ case.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 5b5f5e3f7b1dd41022e6e587460fd912fcd481d0)

10 years agoASoC: fsl_sai: Improve fsl_sai_isr()
Nicolin Chen [Fri, 28 Mar 2014 11:39:25 +0000 (19:39 +0800)]
ASoC: fsl_sai: Improve fsl_sai_isr()

This patch improves fsl_sai_isr() in these ways:
1, Add comment for mask fetching code.
2, Return IRQ_NONE if the IRQ is not for the device.
3, Use regmap_write() instead of regmap_update_bits().

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 4a16d85ffa819902f595eac6677788eddc0e6628)

10 years agoASoC: fsl_sai: Add isr to deal with error flag
Nicolin Chen [Thu, 27 Mar 2014 11:06:59 +0000 (19:06 +0800)]
ASoC: fsl_sai: Add isr to deal with error flag

It's quite cricial to clear error flags because SAI might hang if getting
FIFO underrun during playback (I haven't confirmed the same issue on Rx
overflow though).

So this patch enables those irq and adds isr() to clear the flags so as to
keep playback entirely safe.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit e2681a1bf5ae053426a6c5c1daaed17b2f95efe6)

10 years agoENGR00305648-8 dma: imx-sdma: Add SAI script support
Nicolin Chen [Fri, 28 Mar 2014 06:21:52 +0000 (14:21 +0800)]
ENGR00305648-8 dma: imx-sdma: Add SAI script support

This patch adds SAI script support to imx-sdma.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-7 ARM: dts: Add ESAI and SAI(Disabled) for imx6sx-19x19-arm2 board
Nicolin Chen [Thu, 27 Mar 2014 12:04:31 +0000 (20:04 +0800)]
ENGR00305648-7 ARM: dts: Add ESAI and SAI(Disabled) for imx6sx-19x19-arm2 board

This patch adds nodes for ESAI and SAI for imx6sx-19x19-arm2 board
and enables ESAI only due to pin conflict.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-6 ASoC: imx-cs42888: Merge imx6sx-arm2 configuration with old imx6qdl...
Nicolin Chen [Thu, 27 Mar 2014 12:02:35 +0000 (20:02 +0800)]
ENGR00305648-6 ASoC: imx-cs42888: Merge imx6sx-arm2 configuration with old imx6qdl-sabreauto

To simplify the code, we use one unified configuration for both imx6sx-arm2
and the old imx6qdl-sabreauto board.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-5 ARM: imx6sx: set Audio clocks to 24.576MHz
Nicolin Chen [Thu, 27 Mar 2014 11:51:15 +0000 (19:51 +0800)]
ENGR00305648-5 ARM: imx6sx: set Audio clocks to 24.576MHz

This patch sets a default clock 24.576MHz for ESAI clock and swtich the
source of external AUDIO clock from pll4 to pll3 since 24.0Mhz would be
more likely recommanded than 24.576MHz to WM8962 audio codec.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-4 ARM: imx6sx: Add SPDIF support to 19x19 arm2 board
Nicolin Chen [Wed, 26 Mar 2014 03:18:18 +0000 (11:18 +0800)]
ENGR00305648-4 ARM: imx6sx: Add SPDIF support to 19x19 arm2 board

Add SPDIF support to 19x19 arm2 board and create a new dts for it due to
pin conflict.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-3 ARM: imx6sx: Add audio nodes to dtsi
Nicolin Chen [Wed, 26 Mar 2014 03:11:25 +0000 (11:11 +0800)]
ENGR00305648-3 ARM: imx6sx: Add audio nodes to dtsi

This patch adds SPDIF SAI ASRC_P2P and ESAI support to imx6sx.dtsi

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-2 ARM: imx6sx: Add SAI ipg clock to the clock tree
Nicolin Chen [Wed, 26 Mar 2014 02:59:01 +0000 (10:59 +0800)]
ENGR00305648-2 ARM: imx6sx: Add SAI ipg clock to the clock tree

There's one clock for SAI memory access missing in the clock tree. Thus add it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305648-1 ASoC: imx-sgtl5000: Support non-ssi cpu-dai
Nicolin Chen [Tue, 25 Mar 2014 12:56:18 +0000 (20:56 +0800)]
ENGR00305648-1 ASoC: imx-sgtl5000: Support non-ssi cpu-dai

The current imx-sgtl5000 driver always attaches the cpu-dai to ssi while
in fact it could be attached to other cpu-dais like SAI. Thus this patch
use a general code to support another cpu-dai. And meanwhile update the
devicetree for i.MX6 Series.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00306276: iMX6: Add workaround for ARM errata 761320 and 794072
Nitin Garg [Sat, 29 Mar 2014 22:32:22 +0000 (17:32 -0500)]
ENGR00306276: iMX6: Add workaround for ARM errata 761320 and 794072

These are Category B, hence workaround is essential.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
10 years agoENGR00306257 [#1027]fix system hang up issue caused by GPU
Richard Liu [Tue, 1 Apr 2014 01:58:49 +0000 (09:58 +0800)]
ENGR00306257 [#1027]fix system hang up issue caused by GPU

This issue happens when multiple thread is trying to idle GPU at the
same time, root cause is some wrong logic related with powerMutex which
cause cpu still access GPU AHB register after GPU is suspend(clock off),
that cause the bus lockup and make the whole system hang.

Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Jason Liu
10 years agoENGR00306156 ARM: dts: imx6sx-sdb: add gpio key support
Anson Huang [Mon, 31 Mar 2014 07:22:46 +0000 (15:22 +0800)]
ENGR00306156 ARM: dts: imx6sx-sdb: add gpio key support

Add GPIO key support on i.MX6SX-SDB, see below mapping:

KEY_FUNC1 -> KEY_VOLUMEUP;
KEY_FUNC2 -> KEY_VOLUMEDOWN;

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00306171 ARM: imx6x: fix imx6_enet_mac_init() function build warning
Fugang Duan [Mon, 31 Mar 2014 07:12:37 +0000 (15:12 +0800)]
ENGR00306171 ARM: imx6x: fix imx6_enet_mac_init() function build warning

Use compiler 4.4.4-glibc-2.11.1-multilib-1.0 build kernel, there have
build warning:
arch/arm/mach-imx/mach-imx6q.c:240: warning: 'macaddr_high' may be used uninitialized in this function
arch/arm/mach-imx/mach-imx6q.c:240: warning: 'macaddr1_high' may be used uninitialized in this function

For 4.7/4.8 compiler build, no warning report.

The patch just to avoid the build warning.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00306137 ARM: imx_v7_defconfig: enable 802.2 LLC
Fugang Duan [Mon, 31 Mar 2014 05:24:51 +0000 (13:24 +0800)]
ENGR00306137 ARM: imx_v7_defconfig: enable 802.2 LLC

Enable IEEE 802.2 LLC protocol.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00305598-4 ARM: dts: imx6sx: add new DTS file to enable LCDIF1
Robby Cai [Thu, 27 Mar 2014 10:55:21 +0000 (18:55 +0800)]
ENGR00305598-4 ARM: dts: imx6sx: add new DTS file to enable LCDIF1

Due to the CSI and LCDIF1 shares the same pin MX6SX_PAD_LCD1_ENABLE.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00305598-3 ARM: dts: imx6sx: add csi and v4l2 capture support
Robby Cai [Thu, 27 Mar 2014 10:41:01 +0000 (18:41 +0800)]
ENGR00305598-3 ARM: dts: imx6sx: add csi and v4l2 capture support

Add csi camera support and csi v4l2 capture support on i.MX6SX 19x19 ARM2 board.
Since MX6SX_PAD_LCD1_ENABLE pin is shared between CSI and LCDIF1. LCDIF1 is
disabled by default.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00305598-2 ARM: dts: imx6sx: Add ov5640 camera support on imx6sx-19x19-arm2
Robby Cai [Thu, 27 Mar 2014 10:20:57 +0000 (18:20 +0800)]
ENGR00305598-2 ARM: dts: imx6sx: Add ov5640 camera support on imx6sx-19x19-arm2

Add ov5640 camera support on i.MX6SX 19x19 ARM2 board.
Add new pin group for CSI to reflect the change on this board.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00305598-1 ARM: dts: imx6sx-19x19-arm2: Add new pin control group for I2C2
Robby Cai [Thu, 27 Mar 2014 10:13:18 +0000 (18:13 +0800)]
ENGR00305598-1 ARM: dts: imx6sx-19x19-arm2: Add new pin control group for I2C2

On i.MX6SX 19x19 ARM2 board, two different PINs are used.
This patch reflects this change.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00305272 net: fec: keep VLAN tag in default
Fugang Duan [Mon, 24 Mar 2014 09:56:35 +0000 (17:56 +0800)]
ENGR00305272 net: fec: keep VLAN tag in default

By default, keep VLAN tag and tranfer to user.
If remove the VLAN tag, enable the quirk "FEC_QUIRK_HAS_VLAN" for
enet IP.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00305549 ARM: imx6sx-sdb: enable USB function
Peter Chen [Thu, 27 Mar 2014 07:23:02 +0000 (15:23 +0800)]
ENGR00305549 ARM: imx6sx-sdb: enable USB function

usbotg1 is for dual-role function, usbotg2 is dedicated
to host function.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00305465 MXC IPUv3 fb: Fix permissions of fsl_disp_property sysfs entry
Julien Olivain [Wed, 26 Mar 2014 17:38:02 +0000 (18:38 +0100)]
ENGR00305465 MXC IPUv3 fb: Fix permissions of fsl_disp_property sysfs entry

Set the correct permissions of the fsl_disp_property sysfs entry.

Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Julien Olivain <julien.olivain@freescale.com>
10 years agoENGR00305106-3 ARM: dts: imx6sx-sdb: enable the uart5
Huang Shijie [Tue, 25 Mar 2014 07:45:32 +0000 (15:45 +0800)]
ENGR00305106-3 ARM: dts: imx6sx-sdb: enable the uart5

enable the uart5 for Bluetooth.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00305106-2 ARM: dts: imx6sx: add a pinctrl for uart5
Huang Shijie [Tue, 25 Mar 2014 07:38:02 +0000 (15:38 +0800)]
ENGR00305106-2 ARM: dts: imx6sx: add a pinctrl for uart5

This pinctrl is used by the imx6sx-sdb board.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00305106-1 ARM: dts: imx6sx: add more UART nodes
Huang Shijie [Tue, 25 Mar 2014 07:15:49 +0000 (15:15 +0800)]
ENGR00305106-1 ARM: dts: imx6sx: add more UART nodes

Add uart3 ~ uart5 DT nodes which are supported by the imx6sx.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00305362 ARM: dts: imx6sx: Add gpio for wm8962 headphone detection
Shengjiu Wang [Wed, 26 Mar 2014 08:53:46 +0000 (16:53 +0800)]
ENGR00305362 ARM: dts: imx6sx: Add gpio for wm8962 headphone detection

update devicetree for wm8962 headphone detection.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00305067-10 ARM: dts: imx6sx-sdb: Support Hannstar CABC
Liu Ying [Tue, 25 Mar 2014 06:51:14 +0000 (14:51 +0800)]
ENGR00305067-10 ARM: dts: imx6sx-sdb: 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 agoENGR00305067-9 ARM: dts: imx6sx-sdb: Add pwm4 backlight support
Liu Ying [Tue, 25 Mar 2014 06:48:00 +0000 (14:48 +0800)]
ENGR00305067-9 ARM: dts: imx6sx-sdb: Add pwm4 backlight support

This patch adds pwm4 backlight support for the imx6sx-sdb platform.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-8 ARM: dts: imx6sx-sdb: Specify backlight1's fb-names
Liu Ying [Tue, 25 Mar 2014 06:42:56 +0000 (14:42 +0800)]
ENGR00305067-8 ARM: dts: imx6sx-sdb: Specify backlight1's fb-names

This patch specifies the devicetree node backlight1's property
fb-names to be 'mxs-lcdif0' so that the pwm3 backlight device
will only respond to this framebuffer's blank/unblank events.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-7 ARM: dts: imx6sx-sdb: Rename pwm3 backlight node
Liu Ying [Tue, 25 Mar 2014 06:39:01 +0000 (14:39 +0800)]
ENGR00305067-7 ARM: dts: imx6sx-sdb: Rename pwm3 backlight node

This patch renames the backlight node based on pwm3 from 'backlight'
to 'backlight1' so that we may add the upcoming backlight node based
on pwm4 which is named to 'backlight2'.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-6 ARM: dts: imx6sx-sdb: Add LVDS framebuffer support
Liu Ying [Tue, 25 Mar 2014 06:26:33 +0000 (14:26 +0800)]
ENGR00305067-6 ARM: dts: imx6sx-sdb: Add LVDS framebuffer support

This patch adds LCDIF2 devicetree node and LDB devicetree node
to the devicetree file imx6sx-sdb.dts so that the framebuffer based
on LCDIF2/LVDS can be supported.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-5 ARM: dts: imx6sx-sdb: Change LCDIF1 display node name
Liu Ying [Tue, 25 Mar 2014 06:20:23 +0000 (14:20 +0800)]
ENGR00305067-5 ARM: dts: imx6sx-sdb: Change LCDIF1 display node name

This patch changes the display node name of LCDIF1 from 'display' to
'display0' so that we may add the upcoming display node of LCDIF2
which is named to 'display1'.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-4 ARM: dtsi: imx6sx: Add LCDIF alias entries
Liu Ying [Tue, 25 Mar 2014 06:16:31 +0000 (14:16 +0800)]
ENGR00305067-4 ARM: dtsi: imx6sx: Add LCDIF alias entries

This patch adds alias entries for LCDIF1 and LCDIF2.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-3 video: mxsfb: Add DT alias index info to fb id
Liu Ying [Tue, 25 Mar 2014 06:06:17 +0000 (14:06 +0800)]
ENGR00305067-3 video: mxsfb: Add DT alias index info to fb id

Multiple LCDIFs may be embedded in a SoC.  A real example is the
i.MX6sx SoC.  There are two LCDIFs embedded in it.  In order to
distinguish bewteen multiple framebuffers based on different
LCDIFs, this patch adds devicetree alias index information to a
certain framebuffer's fix id.  The fix id is in the 'mxs-lcdifx'
fashion.  If there is no alias node defined for a lcdif node, the
fix id will be 'mxs-lcdif'.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-2 media: v4l2: mxc pxp output: Weaken fb id check
Liu Ying [Tue, 25 Mar 2014 05:58:17 +0000 (13:58 +0800)]
ENGR00305067-2 media: v4l2: mxc pxp output: Weaken fb id check

This patch uses strncmp() to replace strcmp() to weaken framebuffer
id check so that the mxs framebuffer driver may use different names
for standalone framebuffers.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00305067-1 video: pwm backlight: Add DT check fb support
Liu Ying [Wed, 19 Mar 2014 05:20:30 +0000 (13:20 +0800)]
ENGR00305067-1 video: pwm backlight: Add DT check fb support

A system based on a devicetree kernel may have multiple framebuffers
and each framebuffer has its own pwm backlight.  A specific pwm backlight
should be enabled/disabled according to its framebuffer unblank/blank
events respectively.  The backlight device's callback check_fb() is the
method the backlight core driver uses to determine if a backlight device
should respond to a certain framebuffer blank/unblank events or not.
This patch adds the callback check_fb() for the pwm backlight driver with
devicetree supported.  Users should list every framebuffer name in the
string property fb-names of a pwm backlight devicetree node, otherwise,
the backlight device will respond to every framebuffer's blank/unblank
events in a system.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agomtd: nand: fix GET/SET_FEATURES address on 16-bit devices
David Mosberger [Fri, 21 Mar 2014 22:05:10 +0000 (16:05 -0600)]
mtd: nand: fix GET/SET_FEATURES address on 16-bit devices

GET_FEATURES and SET_FEATURES also need byte-addressing on 16-bit devices.

Signed-off-by: David Mosberger <davidm@egauge.net>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00300658-6 csi: imx6sx: add clock handling in driver
Robby Cai [Wed, 19 Mar 2014 10:27:20 +0000 (18:27 +0800)]
ENGR00300658-6 csi: imx6sx: add clock handling in driver

According to IC team, DCIC1 clock is used in the IPSYNC for CSI1 and
DCIC2 clock is used in the IPSYNC for the CSI2. So dcic clock is needed for CSI.

The display axi clock is a clock gating newly added on imx6sx.
It needs to be enabled for lcdif/pxp/csi/pcie to work.

CSI clock seems to be implemented different other than other SoCs.
It needs also to be enabled before access the registers, otherwise
the system will hang.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00300658-5 ARM: dts: imx6sx: Add clock device node
Robby Cai [Thu, 20 Mar 2014 12:35:25 +0000 (20:35 +0800)]
ENGR00300658-5 ARM: dts: imx6sx: Add clock device node

on imx6sx need to enable display_axi, dcic and csi clock.
display_axi, dcic is not needed on imx6sl.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00300658-4 csi: imx6sx: add CSI_ENABLE bit control in driver
Robby Cai [Wed, 26 Feb 2014 15:50:34 +0000 (23:50 +0800)]
ENGR00300658-4 csi: imx6sx: add CSI_ENABLE bit control in driver

on imx6sx, a new bit CSI_ENABLE is added in IC design.
This patch adds this support for CSI control.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00300658-3 ARM: dts: imx6sx: add camera ov5640 support on imx6sx-sdb
Robby Cai [Mon, 24 Feb 2014 11:51:35 +0000 (19:51 +0800)]
ENGR00300658-3 ARM: dts: imx6sx: add camera ov5640 support on imx6sx-sdb

Add ov5640 camera support on imx6sx-sdb

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00300658-2 ARM: dts: imx6sx: add csi and v4l2 capture support on imx6sx-sdb
Robby Cai [Mon, 24 Feb 2014 06:52:51 +0000 (14:52 +0800)]
ENGR00300658-2 ARM: dts: imx6sx: add csi and v4l2 capture support on imx6sx-sdb

Add CSI module and v4l2 capture support on imx6sx-sdb board

Note1: CSI has pin conflict with LCDIF1 on imx6sx-sdb board.
So camera connector(J13) and LCD expansion connector(J11) can not be used
at the same time. As a result, a new DTS file for LCDIF1 is added.

Note2: Camera connector(J13) can not be used without an adapter card (during
manufacturing process so far) because footprint is mirrored on Sabre-SDB.
This patch is to verify camera feature via LCD connector(J11).

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00300658-1 clk: imx6sx: correct csi parent clock
Robby Cai [Mon, 24 Feb 2014 11:52:22 +0000 (19:52 +0800)]
ENGR00300658-1 clk: imx6sx: correct csi parent clock

correct csi parent clock

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00304860-3 ARM: dts: imx6sx-17x17-arm: add the ECSPI4 DT node
Huang Shijie [Mon, 24 Mar 2014 06:55:01 +0000 (14:55 +0800)]
ENGR00304860-3 ARM: dts: imx6sx-17x17-arm: add the ECSPI4 DT node

Since it has pin conflict with SD3, the default status is "disabled".

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304860-2 ARM: dts: imx6sx: add pinctrl for ECSPI4
Huang Shijie [Mon, 24 Mar 2014 06:47:47 +0000 (14:47 +0800)]
ENGR00304860-2 ARM: dts: imx6sx: add pinctrl for ECSPI4

Add the pinctrl for ECSPI4. We use this pinctrl in the imx6sx-17x17-arm2
board.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304860-1 ARM: dts: imx6sx: add the DT nodes for ECSPI
Huang Shijie [Mon, 24 Mar 2014 06:36:54 +0000 (14:36 +0800)]
ENGR00304860-1 ARM: dts: imx6sx: add the DT nodes for ECSPI

Add four DT nodes for ECSPI.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304676-3: pci: host: imx6: remove gpc operate code
Robin Gong [Fri, 21 Mar 2014 10:40:25 +0000 (18:40 +0800)]
ENGR00304676-3: pci: host: imx6: remove gpc operate code

remove the code about gpc, since it will be done in gpc driver.
That makes driver more clean and better.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00304676-2 ARM: dts: imx6sx: add new pcie regulator for gpc
Robin Gong [Fri, 21 Mar 2014 10:38:48 +0000 (18:38 +0800)]
ENGR00304676-2 ARM: dts: imx6sx: add new pcie regulator for gpc

add new pcie regulator for gpc driver to install the right notify
function.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00304676-1 ARM: imx: gpc: update gpc driver for turning on PCIe
Robin Gong [Fri, 21 Mar 2014 10:28:43 +0000 (18:28 +0800)]
ENGR00304676-1 ARM: imx: gpc: update gpc driver for turning on PCIe

For PCIe module on i.mx6sx, need send one power request to PCIe by GPC.
So we need update gpc driver for the new requirement. We implement it by
regulator notify framwork as pu power on/off in gpc driver. As PCIe use
fs_initcall, we need make sure gpc driver ready before PCIe driver probe.
Otherwise, cause system hang during PCIe driver probe, because the notify
NOT installed ready and the gpc will NOT power on PCIe.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00304574-6 ARM: dts: imx6sx-17x17: add the gpmi DT node
Huang Shijie [Fri, 21 Mar 2014 07:53:00 +0000 (15:53 +0800)]
ENGR00304574-6 ARM: dts: imx6sx-17x17: add the gpmi DT node

Add the gpmi DT node.
Since it has pin conflict with qspi, we disable it by default.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304574-5 mtd: gpmi: add support for imx6sx
Huang Shijie [Fri, 21 Mar 2014 07:30:54 +0000 (15:30 +0800)]
ENGR00304574-5 mtd: gpmi: add support for imx6sx

This patch adds the gpmi support for imx6sx.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304574-4 mtd: gpmi: add gpmi_devdata{} to simplify the code
Huang Shijie [Fri, 21 Mar 2014 05:30:21 +0000 (13:30 +0800)]
ENGR00304574-4 mtd: gpmi: add gpmi_devdata{} to simplify the code

More and more chips use the GPMI controller, but these chips may use
different version of the IPs for GPMI and BCH. The different IPs have
different features, such as the BCH's maximum ECC strength:

     imx23/imx28 -- the BCH's maximum ECC strength is 20
     imx6q       -- the BCH's maximum ECC strength is 40
     imx6sx      -- the BCH's maximum ECC strength is 62

This patch does the following things:

  [1] add a new data structure, gpmi_devdata{}, to store the information for
      each IP. Beside the IP version, we stores the following informations:
         <1> BCH's maximum ECC strength.
         <2> the maximum chain delay in the EDO mode.

      but we may add more information in future.

  [2] add the gpmi_devdata_imx{23|28|6q} to replace the gpmi_ids.

  [3] simplify the code by using the ECC strength from gpmi_devdata, such as
      gpmi_check_ecc() and legacy_set_geometry();

  [4] use the maximum chain delay to initialize the EDO mode,
      see gpmi_compute_edo_timing().

  [5] rewrite the macros, such GPMI_IS_MX{23|28|6Q}.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00304574-3 ARM: dts: imx6sx: add the DT node for gpmi
Huang Shijie [Fri, 21 Mar 2014 02:38:45 +0000 (10:38 +0800)]
ENGR00304574-3 ARM: dts: imx6sx: add the DT node for gpmi

Add the DT node for gpmi, including the pinctrl for gpmi.

Signed-off-by: Huang Shijie <b32955@freescale.com>
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)